.bm-card-gallery {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

/*
 * V1.0.1
 *
 * The gallery must establish its own image geometry.
 * Do not use a height:100% chain because ProductList Stripe/Grid/List
 * intentionally allow the image column to size intrinsically.
 */
.bm-card-gallery__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.bm-card-gallery__track {
    display: flex;
    width: 100%;
    height: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform .24s ease;
    will-change: transform;
}

.bm-card-gallery__slide {
    display: flex;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    text-decoration: none;
}

.bm-card-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    object-fit: contain;
}

.bm-card-gallery__arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: inline-flex;
    width: 30px;
    height: 30px;
    min-width: 30px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid rgba(101, 37, 215, .22);
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #6525d7;
    box-shadow: 0 2px 8px rgba(21, 21, 26, .12);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.bm-card-gallery__arrow--prev {
    left: 8px;
}

.bm-card-gallery__arrow--next {
    right: 8px;
}

.bm-card-gallery__arrow:disabled {
    opacity: .28;
    cursor: default;
}

.bm-card-gallery__dots {
    position: absolute;
    z-index: 5;
    right: 8px;
    bottom: 7px;
    left: 8px;
    display: flex;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
}

.bm-card-gallery__dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(101, 37, 215, .28);
    cursor: pointer;
    pointer-events: auto;
}

.bm-card-gallery__dot.is-active {
    width: 17px;
    background: #6525d7;
}

/*
 * ProductList compatibility.
 *
 * Preserve the dimensions of the existing image column. Only the contents
 * of that column become a gallery.
 */
.bm-product-list--stripe .bm-product-list__image.bm-card-gallery,
.bm-product-list--list .bm-product-list__image.bm-card-gallery,
.bm-product-list--grid .bm-product-list__image.bm-card-gallery {
    min-width: 0;
    align-self: start;
}

.bm-product-list--stripe .bm-product-list__image.bm-card-gallery,
.bm-product-list--list .bm-product-list__image.bm-card-gallery {
    width: 100%;
}

/*
 * BlogProductSlider compatibility.
 * The outer product carousel remains completely independent.
 */
.bm-product-card__image.bm-card-gallery {
    width: 100%;
    min-width: 0;
}

@media (max-width: 767px) {
    .bm-card-gallery__arrow {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bm-card-gallery__track {
        transition: none;
    }
}
