/* LOCAL-GALLERY-REPAIR-V1: scoped only to product image areas. */
/* Static mirrors must remain readable even if gallery JavaScript fails. */
.woo-variation-product-gallery .woo-variation-gallery-wrapper.loading-gallery .woo-variation-gallery-container { opacity: 1 !important; visibility: visible !important; filter: none !important; }
.woo-variation-product-gallery .woo-variation-gallery-wrapper.loading-gallery:after { display: none !important; }
.woo-variation-product-gallery:not(.mirror-gallery-ready) .mirror-gallery-frame,
.woo-variation-product-gallery:not(.mirror-gallery-ready) .mirror-gallery-thumbs { display: none; }
.woo-variation-product-gallery:not(.mirror-gallery-ready) .woo-variation-gallery-slider:not(.slick-initialized) .wvg-gallery-image ~ .wvg-gallery-image { display: none; }
.woo-variation-product-gallery.mirror-gallery-ready .woo-variation-gallery-slider,
.woo-variation-product-gallery.mirror-gallery-ready .woo-variation-gallery-thumbnail-slider { display: none !important; }
.woo-variation-product-gallery.mirror-gallery-ready .woo-variation-gallery-container { opacity: 1 !important; visibility: visible !important; filter: none !important; }
.woo-variation-product-gallery.mirror-gallery-ready .woo-variation-gallery-wrapper { opacity: 1 !important; visibility: visible !important; }
.woo-variation-product-gallery .mirror-gallery-frame { position: relative; width: 100%; overflow: hidden; cursor: zoom-in; background: #fff; }
.woo-variation-product-gallery .mirror-gallery-img { display: block; width: 100%; height: auto; object-fit: contain; }
.woo-variation-product-gallery .mirror-gallery-zoom { position: absolute; inset: 0; background-position: 50% 50%; background-repeat: no-repeat; background-size: 220% 220%; pointer-events: none; opacity: 0; transition: opacity .12s ease; }
.woo-variation-product-gallery .mirror-gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 12px; padding-bottom: 3px; }
.woo-variation-product-gallery .mirror-gallery-thumb { flex: 0 0 calc(50% - 5px); border: 1px solid #eee; border-radius: 0; background: white; padding: 0; cursor: pointer; scroll-snap-align: start; }
.woo-variation-product-gallery .mirror-gallery-thumb.active { border-color: #333; }
.woo-variation-product-gallery .mirror-gallery-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.mirror-gallery-lightbox { display: none; position: fixed; inset: 0; z-index: 2147483640; background: rgba(0,0,0,.94); align-items: center; justify-content: center; }
.mirror-gallery-lightbox.is-open { display: flex; }
.mirror-gallery-lightbox .mirror-gallery-full { width: auto; height: auto; max-width: 85vw; max-height: 90vh; object-fit: contain; }
.mirror-gallery-lightbox button { position: absolute; cursor: pointer; border: 0; color: white; background: rgba(0,0,0,.3); font-weight: 300; font-family: sans-serif; z-index: 2; }
.mirror-gallery-lightbox .mirror-gallery-close { right: 14px; top: 8px; font-size: 34px; width: 50px; height: 50px; }
.mirror-gallery-lightbox .mirror-gallery-prev { left: 8px; font-size: 42px; width: 48px; height: 60px; }
.mirror-gallery-lightbox .mirror-gallery-next { right: 8px; font-size: 42px; width: 48px; height: 60px; }
body.mirror-gallery-modal-open { overflow: hidden; }
@media (hover: none) { .woo-variation-product-gallery .mirror-gallery-zoom { display: none; } }
