
/* Hide the zoom image overlay created by zoom libraries */
.zoomImg,
img.zoomImg {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Prevent zoom container from capturing mouse events */
.woocommerce-product-gallery__image {
    pointer-events: auto !important;
}

.woocommerce-product-gallery__image a {
    pointer-events: auto !important;
}

/* Hide thumbnail li elements with broken images */
.flex-control-thumbs li:has(img.image-error),
.flex-control-thumbs li img.image-error {
    display: none !important;
}

/* Also hide the main gallery image divs with broken images */
.woocommerce-product-gallery__image:has(img.image-error) {
    display: none !important;
}

/* Hide broken images in Fresco lightbox */
.fr-thumbnail-error,
.fr-thumbnail-frame:has(.fr-thumbnail-error) {
    display: none !important;
}

/* Hide lightbox pages with broken images */
.fr-page:has(img.image-error),
.fr-page.hide-broken-image {
    display: none !important;
}

/* Hide broken image icon/alt text in lightbox */
.fr-content img[alt]::before,
.fr-content img[alt]::after {
    display: none !important;
}

/* Additional safety - hide pages with images that have 0 dimensions */
.fr-page:has(img[style*="display: none"]) {
    display: none !important;
}

body #products-grid li.column.product:has(.product_thumbnail img[alt="Placeholder"]),
body #products-grid li.column.product:has(.product_thumbnail img[alt="placeholder"]) {
    display: block !important;
}