/* ==========================================================================
   XPAC Product Reveal
   ========================================================================== */

.xpac-product-reveal {
	position: relative;
	width: 100%;
	overflow: hidden;
	--pr-float-duration: 3.5s;
	--pr-float-distance: 24px;
	--pr-enter-distance: clamp(96px, 16vw, 220px);
	--pr-red: #cf2029;
}

.xpac-pr-stage {
	position: relative;
	width: 100%;
	min-height: clamp(300px, 42.3vw, 812px);
}

.xpac-pr-slide {
	position: absolute;
	inset: 0;
	display: block;
	padding: 0;
	opacity: 0;
	pointer-events: none;
	transition:
		opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
		clip-path 0.8s cubic-bezier(0.4, 0, 0.2, 1),
		filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.xpac-pr-slide.is-active {
	opacity: 1;
	pointer-events: auto;
	transform: translate3d(0, 0, 0) scale(1);
	clip-path: inset(0 0 0 0);
	filter: none;
	z-index: 2;
}

.xpac-pr-bg {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0;
	pointer-events: none;
	transition: opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.xpac-pr-slide.is-active .xpac-pr-bg {
	opacity: 1;
}

.xpac-pr-product {
	position: absolute;
	top: var(--pr-product-y, 53%);
	left: var(--pr-product-x, 44%);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--pr-product-width, 39%);
	max-width: 90%;
	opacity: 0;
	transform: translate(-50%, calc(-50% + var(--pr-enter-distance)));
	transition:
		opacity 0.92s cubic-bezier(0.22, 1, 0.36, 1) 0.48s,
		transform 0.92s cubic-bezier(0.22, 1, 0.36, 1) 0.48s;
}

.xpac-pr-slide.is-active .xpac-pr-product {
	opacity: 1;
	transform: translate(-50%, -50%);
}

.xpac-pr-product-img {
	display: block;
	max-width: 100%;
	height: auto;
	object-fit: contain;
	transition: opacity 0.4s ease;
}

/* ── Hover image swap ───────────────────────────────────────────────────── */
.xpac-pr-product-img--hover {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
}

/* Trigger only on active slide so hover on inactive slides does nothing */
.xpac-pr-slide.is-active .xpac-pr-product.has-hover-img:hover .xpac-pr-product-img:not(.xpac-pr-product-img--hover) {
	opacity: 0;
}

.xpac-pr-slide.is-active .xpac-pr-product.has-hover-img:hover .xpac-pr-product-img--hover {
	opacity: 1;
}

/* Slide transitions, selected per slide in Elementor. */
.xpac-pr-transition-fade {
	transform: translate3d(0, 0, 0);
}

.xpac-pr-transition-slide-left {
	transform: translate3d(56px, 0, 0);
}

.xpac-pr-transition-slide-up {
	transform: translate3d(0, 56px, 0);
}

.xpac-pr-transition-zoom-soft {
	transform: scale(1.06);
	filter: blur(2px);
}

.xpac-pr-transition-reveal {
	transform: translate3d(0, 0, 0) scale(1.02);
	clip-path: inset(0 18% 0 18%);
	filter: saturate(0.85);
}

/* Product image effects. */
@keyframes xpac-float-v {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(calc(-1 * var(--pr-float-distance))); }
}

.xpac-pr-slide.is-active .xpac-pr-product--float .xpac-pr-product-img {
	animation: xpac-float-v var(--pr-float-duration) ease-in-out infinite;
}

@keyframes xpac-float-h {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(calc(-1 * var(--pr-float-distance) * 0.67)); }
}

.xpac-pr-slide.is-active .xpac-pr-product--float-h .xpac-pr-product-img {
	animation: xpac-float-h var(--pr-float-duration) ease-in-out infinite;
}

@keyframes xpac-float-d {
	0%, 100% { transform: translate(0, 0); }
	50% {
		transform: translate(
			calc(var(--pr-float-distance) * 0.5),
			calc(-1 * var(--pr-float-distance) * 0.7)
		);
	}
}

.xpac-pr-slide.is-active .xpac-pr-product--float-d .xpac-pr-product-img {
	animation: xpac-float-d var(--pr-float-duration) ease-in-out infinite;
}

@keyframes xpac-zoom-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.07); }
}

.xpac-pr-slide.is-active .xpac-pr-product--zoom .xpac-pr-product-img {
	animation: xpac-zoom-pulse var(--pr-float-duration) ease-in-out infinite;
}

@keyframes xpac-slide-up {
	from { transform: translateY(48px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.xpac-pr-slide.is-active .xpac-pr-product--slide-up .xpac-pr-product-img {
	animation: xpac-slide-up 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes xpac-rotate {
	0%, 100% { transform: rotate(-2.5deg); }
	50% { transform: rotate(2.5deg); }
}

.xpac-pr-slide.is-active .xpac-pr-product--rotate .xpac-pr-product-img {
	animation: xpac-rotate var(--pr-float-duration) ease-in-out infinite;
	transform-origin: center bottom;
}

.xpac-pr-product--none .xpac-pr-product-img {
	animation: none !important;
}

/* Navigation */
.xpac-pr-nav {
	position: absolute;
	bottom: 28px;
	left: 50%;
	z-index: 10;
	display: flex;
	gap: 10px;
	transform: translateX(-50%);
}

.xpac-pr-dot {
	display: block;
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.22);
	cursor: pointer;
	transition: background 0.3s ease, transform 0.3s ease;
}

.xpac-pr-dot:hover {
	background: rgba(0, 0, 0, 0.45);
}

.xpac-pr-dot.is-active {
	background: var(--pr-red);
	transform: scale(1.35);
}

.xpac-pr-arrows {
	position: absolute;
	inset: 50% 24px auto;
	z-index: 12;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
	transform: translateY(-50%);
}

.xpac-pr-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	color: var(--pr-red);
	cursor: pointer;
	pointer-events: auto;
	transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.xpac-pr-arrow:hover {
	background: #ffffff;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	transform: translateY(-1px);
}

.xpac-pr-arrow--prev .xpac-pr-arrow-icon {
	transform: rotate(180deg);
}

.xpac-pr-arrow-icon,
.xpac-pr-arrow-icon svg,
.xpac-pr-arrow-icon i {
	display: block;
	width: 1em;
	height: 1em;
	font-size: 18px;
	line-height: 1;
}

.xpac-pr-title {
	text-align: var(--text-align) !important;
}

@media only screen and (max-width: 1024px) {
	.xpac-pr-product {
		max-width: 76%;
	}
}

@media only screen and (max-width: 767px) {
	.xpac-pr-stage {
		min-height: clamp(260px, 75vw, 480px);
	}

	.xpac-pr-product {
		width: min(var(--pr-product-width, 39%), 76vw);
		max-width: 76%;
	}

	.xpac-pr-nav {
		bottom: 14px;
		gap: 8px;
	}

	.xpac-pr-arrows {
		inset-inline: 12px;
	}

	.xpac-pr-arrow {
		width: 38px;
		height: 38px;
	}

	.xpac-product-reveal {
		--pr-float-distance: 14px;
	}
}

/* ── Title slide-in animation when slide becomes active ──────────────────── */
@keyframes xpac-title-slide-in {
	from {
		opacity: 0;
		transform: translateX(-48px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.xpac-pr-title {
	/* Reset between slides so animation re-fires when is-active re-applies */
	opacity: 0;
	transform: translateX(-48px);
}

.xpac-pr-slide.is-active .xpac-pr-title {
	animation: xpac-title-slide-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* ── Elementor editor — no transitions/animations for accurate preview ────── */
.elementor-editor-active .xpac-pr-slide {
	transition: none !important;
}

.elementor-editor-active .xpac-pr-product .xpac-pr-product-img {
	animation: none !important;
}

.elementor-editor-active .xpac-pr-title {
	opacity: 1 !important;
	transform: none !important;
	animation: none !important;
}
