/* Be Inspired - Gallery Lightbox (styles)
 *
 * The picture must display WHOLE inside the gallery card, and a tap on it
 * must open the full-screen lightbox.
 *
 * Root cause of the "minimized by the container" picture:
 * WooCommerce runs jquery.zoom on the gallery slide. The zoom plugin creates
 * an absolutely-positioned clone of the picture (.zoomImg) at its NATURAL
 * size (1280x853) on top of the slide. The gallery card has
 * `overflow: hidden`, so only a 340x226 window of that clone is visible -
 * the picture looks cropped and can never be seen whole.
 *
 * That clone also has `pointer-events: auto` and sits directly over the
 * picture, so it swallows every tap before it can reach the link.
 *
 * Fix: the clone is taken out of the way (pointer-events none), and on
 * touch screens it is hidden outright so the original picture - which fits
 * the slide exactly - is what the visitor sees.
 */

/* The zoom clone must never intercept a tap on the picture. */
.woocommerce div.product .woocommerce-product-gallery__image .zoomImg,
.woocommerce-page div.product .woocommerce-product-gallery__image .zoomImg {
	pointer-events: none !important;
}

/* On touch screens the in-place magnifier is switched to click mode by
 * WooCommerce, which is exactly what traps the picture in the card. Hide the
 * clone so the whole picture shows; the full-screen lightbox (and the
 * magnifier glyph) is how you see it large. */
@media (hover: none), (pointer: coarse) {
	.woocommerce div.product .woocommerce-product-gallery__image .zoomImg,
	.woocommerce-page div.product .woocommerce-product-gallery__image .zoomImg {
		display: none !important;
	}
}

/* The picture itself: clickable, and never cropped by the card. */
.woocommerce div.product .woocommerce-product-gallery__image a,
.woocommerce-page div.product .woocommerce-product-gallery__image a {
	cursor: zoom-in;
}

.woocommerce div.product .woocommerce-product-gallery__image img,
.woocommerce-page div.product .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
}
