/* Bound the slide before the image loads so the WooCommerce carousel can measure it. */
.tooth-refresh.single-product div.product .woocommerce-product-gallery__image > a {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-height: min(65vh, 34rem);
    background: white;
}
.tooth-refresh.single-product div.product .woocommerce-product-gallery__image > a > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.tooth-refresh.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    background: white;
}

/* WooCommerce otherwise hides even the first photo while its slider starts. */
.tooth-tepe-gallery div.product .woocommerce-product-gallery {
    opacity: 1 !important;
}
/* FlexSlider widens the track before it assigns widths to its individual slides. */
.tooth-tepe-gallery .flex-viewport > .woocommerce-product-gallery__wrapper:has(> .woocommerce-product-gallery__image:first-child:not([style*="width"])) {
    width: 100% !important;
}
.tooth-tepe-gallery .flex-viewport .woocommerce-product-gallery__image:not(:first-child):not([style*="width"]) {
    display: none;
}
