/* Reserve the first image before FlexSlider wraps the gallery; final layout is unchanged. */
.single-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    aspect-ratio: 1;
}
.single-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
    display: none;
}
.single-product .woocommerce-product-gallery .flex-viewport {
    aspect-ratio: 1;
    height: auto !important;
}
@media (max-width: 767px) {
    .single-product .woocommerce-product-gallery .flex-control-thumbs:has(> li:nth-child(6)):not(:has(> li:nth-child(11))) {
        min-height: 135px;
    }
    .single-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
        margin-bottom: 79px;
    }
    .single-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper:has(> .woocommerce-product-gallery__image:nth-child(6)) {
        margin-bottom: 150px;
    }
}
