/**
 * MEDUP Product Gallery - WooCommerce Integration Styles
 * Version: 3.3.0
 *
 * Scoped to single product pages and gated behind :has(.medup-gallery) so
 * that WooCommerce's native gallery keeps working untouched on any product
 * where the MEDUP gallery has nothing to render.
 */

/* Force the gallery container visible: WooCommerce prints an inline
   `opacity: 0` FOUC guard that its own JS normally clears. */
.single-product .woocommerce-product-gallery:has(.medup-gallery) {
    opacity: 1 !important;
}

/* Neutralise leftover FlexSlider inline geometry (width/float) if the
   WooCommerce gallery script had already run. */
.single-product .woocommerce-product-gallery:has(.medup-gallery) .woocommerce-product-gallery__wrapper {
    width: auto !important;
    float: none !important;
}

/* Hide the WooCommerce images, zoom trigger and thumbnail strip when the
   MEDUP gallery is present. display:none also removes them from tab order. */
.single-product .woocommerce-product-gallery:has(.medup-gallery) .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery:has(.medup-gallery) .woocommerce-product-gallery__trigger,
.single-product .woocommerce-product-gallery:has(.medup-gallery) .flex-control-nav,
.single-product .woocommerce-product-gallery:has(.medup-gallery) .flex-control-thumbs {
    display: none !important;
}

/* The MEDUP gallery owns the container spacing inside the product gallery. */
.single-product .woocommerce-product-gallery:has(.medup-gallery) .medup-gallery {
    margin-top: 0;
}
