/**
 * CWP Product Frame — overlay styles.
 *
 * The plugin is hard-coupled to the IJC Infinity theme (gate enforced in PHP).
 * The theme provides the following positioning ancestors for our overlay:
 *
 *   • Loop card  — overlay lives inside `.thumbnail.relative`
 *                  (sibling of `.product-images`, fired via `cwp_before_product_thumbnail`)
 *   • Single PDP — overlay lives inside `.product-images__image.relative`
 *                  (inside the `<a class="block">` wrapper, fired via `cwp_before_product_image`)
 *
 * The overlay is absolutely positioned and stretched to 100% of those ancestors,
 * with `pointer-events: none` so clicks pass through to the underlying link.
 */

.cwp-product-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: var(--cwp-pf-z, 10);
}

.cwp-product-frame__img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

/*
 * Defensive: ensure positioning context exists even if the theme's utility
 * classes are stripped or overridden by a builder. These selectors only
 * match the IJC Infinity markup, so they're safe no-ops elsewhere.
 */
.thumbnail:has(> .product-images),
.product-images__image {
	position: relative;
}
