/* Keep the native slider's thumbnail order and click handlers. */
body.single-product.woocommerce div.product .woocommerce-product-gallery ol.flex-control-thumbs {
    display: flex !important;
    flex-flow: row nowrap;
    gap: 10px;
    float: none;
    clear: both;
    width: 100% !important;
    max-width: 100%;
    margin: 12px 0 0;
    padding: 0 0 4px;
    overflow-x: auto;
}

body.single-product.woocommerce div.product .woocommerce-product-gallery ol.flex-control-thumbs li {
    flex: 0 0 calc((100% - 30px) / 4);
    float: none;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
}

body.single-product.woocommerce div.product .woocommerce-product-gallery ol.flex-control-thumbs li img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    box-sizing: border-box;
    border: 1px solid transparent;
    opacity: 1;
}

body.single-product.woocommerce div.product .woocommerce-product-gallery ol.flex-control-thumbs img.flex-active {
    border-color: var(--ast-global-color-0, currentColor);
}

body.single-product.woocommerce div.product .woocommerce-product-gallery:has(ol.flex-control-thumbs li) .zofo-gal-dots {
    display: none;
}
