/* Product image hover swap — crossfade front ↔ back */

.hover-swap-container {
	position: relative;
	overflow: hidden;
}

/* Smooth transition on both front and back images */
.hover-swap-container img {
	transition: opacity 0.35s ease;
}

/* Back image: invisible overlay, sized to match front exactly */
.hover-swap-back {
	position: absolute !important;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	/* object-fit is set dynamically in JS to match front image */
	object-fit: cover;
	opacity: 0;
	pointer-events: none;
	z-index: 1;
}

/* On hover: show back, hide front */
.hover-swap-container:hover .hover-swap-back {
	opacity: 1;
}

.hover-swap-container:hover img:not(.hover-swap-back) {
	opacity: 0;
}

/* Override theme hover effects on front image inside swap container */
.hover-swap-container:hover .product-image,
.hover-swap-container:hover .card-img,
.hover-swap-container:hover .website-image {
	opacity: 0 !important;
}

/* Disable on touch-only devices */
@media (hover: none) {
	.hover-swap-back {
		display: none;
	}
}
