/* Shared portrait gallery for current and future WooCommerce products. */
.single-product .woocommerce-product-gallery .flex-viewport {
    height: auto !important;
    aspect-ratio: 2 / 3;
    background: #fff;
}
.single-product .woocommerce-product-gallery__image > a {
    display: block;
    aspect-ratio: 2 / 3;
    background: #fff;
}
.single-product .woocommerce-product-gallery__image > a > img {
    width: 100%;
    height: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center;
}
/* The full-resolution lightbox remains available; avoid a square hover overlay. */
.single-product .woocommerce-product-gallery .zoomImg { display: none !important; }
.single-product .woocommerce-product-gallery .vivante-video-frame {
    aspect-ratio: 2 / 3;
    background: #fff;
}
.single-product .woocommerce-product-gallery .vivante-video-frame video {
    object-fit: cover;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #fff;
    box-sizing: border-box;
    border: 1px solid transparent;
    opacity: .65;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.single-product .woocommerce-product-gallery .flex-control-thumbs li img:focus-visible {
    opacity: 1;
    border-color: #9b7b42;
    outline: none;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li img[src$="play.svg"] {
    object-fit: contain;
    background: #f7f4ed;
}
@media (min-width: 993px) {
    .single-product .product-details-wrapper > .woocommerce-product-gallery {
        width: 53% !important;
        max-width: calc(66.667vh + 25.333px);
        padding-left: 92px;
        box-sizing: border-box;
        position: relative;
    }
    .single-product .product-details-wrapper > .summary {
        width: 42% !important;
    }
    .single-product .woocommerce-product-gallery .flex-control-thumbs {
        position: absolute;
        top: 0;
        left: 0;
        width: 76px;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: 100%;
        overflow-y: auto;
        scrollbar-width: thin;
    }
    .single-product .woocommerce-product-gallery .flex-control-thumbs li {
        width: 100% !important;
        flex: 0 0 auto;
        margin: 0 !important;
        float: none;
    }
}
@media (max-width: 992px) {
    .single-product .woocommerce-product-gallery .flex-control-thumbs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin-top: 12px;
        padding-bottom: 4px;
    }
    .single-product .woocommerce-product-gallery .flex-control-thumbs li {
        width: 60px !important;
        flex: 0 0 60px;
        margin: 0 !important;
    }
}
