/* ============================================================
   QSHIM v2.4.15 - Single-source WooCommerce gallery zoom icon.
   One navy magnifier is drawn in ::before, independently of the
   anchor's hover background. No markup or lightbox event changes.
   ============================================================ */

/* Keep product gallery beneath the site header/menu. */
body.single-product .elementor-widget-woocommerce-product-images,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery {
    position: relative !important;
    z-index: 0 !important;
}

body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:hover,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:focus,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:active,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:focus-visible {
    position: absolute !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    color: transparent !important;
    background: #FFFFFF none !important;
    border: 0 !important;
    border-radius: 50% !important;
    outline: none !important;
    box-shadow: 0 3px 14px rgba(16,46,75,0.10) !important;
    transform: none !important;
    text-decoration: none !important;
    transition: box-shadow .2s ease, background-color .2s ease !important;
}

/* One and only one icon layer: its SVG is separate from the hover
   background styling, so hover cannot erase the magnifying glass. */
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger::before,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:hover::before,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:focus::before,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:active::before,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:focus-visible::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
    transform: none !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23102E4B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 21px 21px !important;
    box-shadow: none !important;
}

/* Suppress WooCommerce's second glyph and nested icon sources. */
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger::after,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:hover::after,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:focus::after,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:active::after,
body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger > * {
    content: none !important;
    display: none !important;
}

@media (hover: hover) and (pointer: fine) {
    body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:hover {
        box-shadow: 0 0 0 1px rgba(245,130,32,0.35),
                    0 5px 18px rgba(16,46,75,0.13) !important;
    }
}

body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:focus-visible {
    outline: 2px solid #F58220 !important;
    outline-offset: 3px !important;
}

@media (max-width: 767px) {
    body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger,
    body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:hover,
    body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:focus {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
    }
    body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger::before,
    body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger:hover::before {
        background-size: 19px 19px !important;
    }
}

/* Preserve v2.4.12: hide gallery control while cart drawer is open. */
body.single-product.qshim-cart-is-open .woocommerce-product-gallery__trigger {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
@supports selector(body:has(.elementor-menu-cart--shown)) {
    body.single-product:has(.elementor-widget-woocommerce-menu-cart.elementor-menu-cart--shown)
      .woocommerce-product-gallery__trigger,
    body.single-product:has(.elementor-widget-woocommerce-menu-cart .elementor-menu-cart--shown)
      .woocommerce-product-gallery__trigger {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Preserve v2.4.13: header stays above the gallery zoom control. */
body.single-product .elementor-location-header {
    position: relative;
    z-index: 100 !important;
}
body.single-product .elementor-location-header .elementor-sticky--active {
    z-index: 1001 !important;
}
@supports selector(body:has(.dialog-widget-content)) {
    body.single-product:has(.dialog-widget.elementor-popup-modal[aria-modal="true"]:not([aria-hidden="true"]))
      .woocommerce-product-gallery__trigger {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__trigger {
        transition: none !important;
    }
}
