/* ==========================================================================
   Christmas Special Offer pop-up  (markup: inc/christmas-popup.php)
   ========================================================================== */

.xmas-popup {
	--xp-bg: #f7ece4;
	--xp-red: #9b1c24;
	--xp-red-dark: #84161d;
	--xp-ink: #3d2e28;
	--xp-ink-soft: #5e4a40;
	--xp-gold: #c9a77c;
	--xp-gold-dark: #8c6f4b;
	--xp-line: #d9c4b5;
	--xp-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--xp-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--xp-script: 'Dancing Script', 'Brush Script MT', cursive;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility 0s linear .35s;
}
.xmas-popup[hidden] { display: none; }
.xmas-popup.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .35s ease, visibility 0s;
}
html.xmas-popup-lock,
html.xmas-popup-lock body { overflow: hidden; }

.xmas-popup *,
.xmas-popup *::before,
.xmas-popup *::after { box-sizing: border-box; }

.xmas-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(60, 48, 42, .55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	cursor: pointer;
}

/* ---------- Dialog ---------- */
.xmas-popup__dialog {
	position: relative;
	display: grid;
	grid-template-columns: 43% 57%;
	width: 100%;
	max-width: 1100px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	background: var(--xp-bg);
	background-image: radial-gradient(120% 90% at 75% 20%, #fbf4ee 0%, var(--xp-bg) 55%, #f3e3d8 100%);
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: 0 30px 80px rgba(40, 25, 20, .35), 0 6px 18px rgba(40, 25, 20, .18);
	transform: translateY(18px) scale(.97);
	transition: transform .45s cubic-bezier(.2, .8, .2, 1);
	color: var(--xp-ink);
	text-align: center;
	font-variant-numeric: lining-nums; /* Cormorant uses old-style digits by default */
	font-feature-settings: "lnum" 1;
}
.xmas-popup.is-open .xmas-popup__dialog { transform: none; }
.xmas-popup__nowrap { white-space: nowrap; }
.xmas-popup__loc > span { display: block; white-space: nowrap; }
.xmas-popup__loc > .xmas-popup__loc-sep { display: none; }

/* ---------- Close ---------- */
.xmas-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	width: 46px;
	height: 46px;
	padding: 0;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid #d8c8bd;
	background: #fff;
	color: #1f1714;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(40, 25, 20, .15);
	transition: transform .2s ease, background-color .2s ease;
}
.xmas-popup__close:hover { transform: rotate(90deg); background: #fbf4ee; }
.xmas-popup__close svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.6;
	stroke-linecap: round;
}

/* ---------- Photo ---------- */
.xmas-popup__media {
	position: relative;
	min-height: 100%;
	overflow: hidden;
}
.xmas-popup__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 45% 30%;
	display: block;
	max-width: none;
	-webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%);
	mask-image: linear-gradient(to right, #000 82%, transparent 100%);
}

/* ---------- Content ---------- */
.xmas-popup__content {
	position: relative;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}
.xmas-popup__inner {
	position: relative;
	z-index: 2;
	padding: 34px 44px 26px 24px;
}

/* Decorations */
.xmas-popup__deco { position: absolute; pointer-events: none; z-index: 1; }
.xmas-popup__ornament { top: 0; left: 4%; width: 48px; }
.xmas-popup__star { fill: none; stroke: var(--xp-gold); stroke-width: 1.4; stroke-linejoin: round; }
.xmas-popup__star--1 { top: 128px; left: 1%; width: 30px; }
.xmas-popup__sparkle { fill: var(--xp-gold); }
.xmas-popup__sparkle--1 { top: 40px; left: 20%; width: 16px; }
.xmas-popup__sparkle--2 { top: 70px; right: 9%; width: 20px; }
.xmas-popup__sparkle--3 { top: 120px; right: 4%; width: 16px; }
.xmas-popup__gift { right: 0; bottom: 0; width: 150px; height: auto; }

.xmas-popup__emblem { width: min(300px, 80%); margin: 0 auto 2px; }
.xmas-popup__emblem svg { display: block; width: 100%; height: auto; }

/* Title */
.xmas-popup__title {
	margin: 0;
	padding: 0;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	border: 0;
}
.xmas-popup__title-main {
	display: block;
	font-family: var(--xp-serif);
	font-weight: 600;
	font-size: clamp(40px, 6vw, 74px);
	line-height: .95;
	letter-spacing: .01em;
	color: var(--xp-red);
}
.xmas-popup__title-sub {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-top: 8px;
	font-family: var(--xp-serif);
	font-weight: 600;
	font-size: clamp(20px, 2.8vw, 34px);
	letter-spacing: .26em;
	color: var(--xp-ink-soft);
}
.xmas-popup__title-sub::before,
.xmas-popup__title-sub::after,
.xmas-popup__terms::before,
.xmas-popup__terms::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--xp-line);
}

/* Offer pill */
.xmas-popup__offer {
	margin: 18px auto 0;
	padding: 8px 26px 10px;
	max-width: 560px;
	border-radius: 999px;
	background: radial-gradient(100% 140% at 50% 30%, #f4ddd1 0%, #ecd0c2 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.xmas-popup__offer p { margin: 0; }
.xmas-popup__offer-line {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	line-height: 1;
}
.xmas-popup__gift-icon { width: clamp(34px, 4vw, 50px); height: auto; flex: none; }
.xmas-popup__get {
	font-family: var(--xp-serif);
	font-weight: 500;
	font-size: clamp(28px, 3.4vw, 44px);
	color: var(--xp-ink);
}
.xmas-popup__pct {
	font-family: var(--xp-serif);
	font-weight: 700;
	font-size: clamp(42px, 5.4vw, 68px);
	color: var(--xp-red);
	letter-spacing: -.01em;
}
.xmas-popup__offer-for {
	font-family: var(--xp-serif);
	font-weight: 500;
	font-size: clamp(20px, 2.5vw, 32px);
	color: var(--xp-ink);
	line-height: 1.15;
}

/* Script tagline */
.xmas-popup__script {
	margin: 16px 0 0;
	font-family: var(--xp-script);
	font-weight: 600;
	font-size: clamp(24px, 3vw, 36px);
	line-height: 1.15;
	color: #6b4a3c;
}
.xmas-popup__script svg {
	display: inline-block;
	width: .9em;
	height: .9em;
	margin-left: 6px;
	vertical-align: -.1em;
	fill: none;
	stroke: var(--xp-red);
	stroke-width: 1.6;
}

/* Info box */
.xmas-popup__info {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	align-items: center;
	margin: 18px auto 0;
	max-width: 620px;
	padding: 12px 18px;
	border: 1.5px solid var(--xp-line);
	border-radius: 22px;
	background: rgba(255, 255, 255, .35);
	font-family: var(--xp-serif);
	font-weight: 500;
	font-size: clamp(17px, 1.9vw, 23px);
	line-height: 1.25;
	color: var(--xp-ink);
}
.xmas-popup__info-item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: left;
	padding: 2px 10px;
}
.xmas-popup__info-item--loc { border-left: 1.5px solid #6b5a52; }
.xmas-popup__info-icon { width: 26px; height: 26px; flex: none; }
.xmas-popup__info-label { display: block; }
.xmas-popup__price { display: block; white-space: nowrap; }
.xmas-popup__price del { color: var(--xp-ink-soft); text-decoration-thickness: 1.5px; }
.xmas-popup__price ins {
	text-decoration: none;
	background: none;
	font-weight: 700;
	font-size: 1.4em;
	color: var(--xp-red);
}

/* Buttons */
.xmas-popup__slots,
.xmas-popup__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: fit-content;
	max-width: 100%;
	margin: 18px auto 0;
	border-radius: 999px;
	text-decoration: none !important;
	color: #fff !important;
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.xmas-popup__slots {
	padding: 10px 30px;
	min-width: min(560px, 100%);
	background: linear-gradient(180deg, #a8262d 0%, var(--xp-red-dark) 100%);
	box-shadow: 0 6px 16px rgba(132, 22, 29, .28);
	font-family: var(--xp-serif);
	font-weight: 600;
	font-size: clamp(18px, 2.1vw, 26px);
	line-height: 1.2;
}
.xmas-popup__slots em { font-style: normal; color: #f2c98a; }
.xmas-popup__slots svg { width: 26px; height: 26px; flex: none; }
.xmas-popup__cta {
	margin-top: 14px;
	padding: 13px 36px;
	background: linear-gradient(180deg, #a5875f 0%, var(--xp-gold-dark) 100%);
	box-shadow: 0 8px 18px rgba(110, 82, 50, .3);
	font-family: var(--xp-sans);
	font-weight: 500;
	font-size: clamp(15px, 1.6vw, 19px);
	letter-spacing: .05em;
	text-transform: uppercase;
}
.xmas-popup__cta svg { width: 24px; height: 24px; flex: none; }
.xmas-popup__slots:hover,
.xmas-popup__cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.xmas-popup__slots:focus-visible,
.xmas-popup__cta:focus-visible,
.xmas-popup__wa:focus-visible,
.xmas-popup__close:focus-visible { outline: 3px solid var(--xp-gold); outline-offset: 3px; }

.xmas-popup__wa {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	font-family: var(--xp-sans);
	font-weight: 500;
	font-size: clamp(15px, 1.5vw, 18px);
	color: #2f2622 !important;
	text-decoration: none !important;
}
.xmas-popup__wa:hover { color: #128c4b !important; }
.xmas-popup__wa svg { width: 24px; height: 24px; flex: none; }

.xmas-popup__terms {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 6px auto 0;
	max-width: 520px;
	font-family: var(--xp-serif);
	font-style: italic;
	font-size: 16px;
	color: var(--xp-ink-soft);
}

.xmas-popup .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Short desktop screens (laptops) ---------- */
@media (min-width: 861px) and (max-height: 820px) {
	.xmas-popup__inner { padding-top: 22px; padding-bottom: 18px; }
	.xmas-popup__emblem { width: 220px; }
	.xmas-popup__title-main { font-size: 56px; }
	.xmas-popup__title-sub { font-size: 26px; margin-top: 4px; }
	.xmas-popup__offer { margin-top: 12px; padding: 4px 22px 6px; }
	.xmas-popup__pct { font-size: 52px; }
	.xmas-popup__get { font-size: 34px; }
	.xmas-popup__offer-for { font-size: 25px; }
	.xmas-popup__script { margin-top: 10px; font-size: 29px; }
	.xmas-popup__info { margin-top: 12px; padding: 8px 14px; font-size: 19px; }
	.xmas-popup__slots { margin-top: 12px; padding: 8px 26px; font-size: 21px; }
	.xmas-popup__cta { margin-top: 10px; padding: 11px 32px; font-size: 16px; }
	.xmas-popup__wa { margin-top: 10px; }
	.xmas-popup__gift { width: 120px; }
	.xmas-popup__star--1 { top: 104px; }
}

/* ---------- Tablet & mobile: stacked ---------- */
@media (max-width: 860px) {
	.xmas-popup { padding: 12px; }
	.xmas-popup__dialog {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		max-width: 580px;
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
		overflow-y: auto;
		overscroll-behavior: contain;
		border-radius: 20px;
	}
	.xmas-popup__media { height: clamp(190px, 34vh, 300px); min-height: 0; }
	.xmas-popup__media img {
		object-position: 50% 22%;
		-webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
		mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
	}
	.xmas-popup__content { overflow: visible; }
	.xmas-popup__inner { padding: 4px 22px 22px; }
	.xmas-popup__close { top: 10px; right: 10px; width: 40px; height: 40px; }
	.xmas-popup__close svg { width: 19px; height: 19px; }
	.xmas-popup__ornament,
	.xmas-popup__star--1,
	.xmas-popup__sparkle--1 { display: none; }
	.xmas-popup__sparkle--2 { top: 6px; right: 7%; }
	.xmas-popup__sparkle--3 { top: 40px; right: 3%; }
	.xmas-popup__gift { width: 96px; opacity: .9; }
	.xmas-popup__emblem { width: 200px; }
	.xmas-popup__title-main { font-size: clamp(38px, 10vw, 58px); }
	.xmas-popup__title-sub { font-size: clamp(16px, 4.6vw, 26px); gap: 12px; letter-spacing: .22em; }
	.xmas-popup__offer { padding: 6px 18px 8px; }
	.xmas-popup__pct { font-size: clamp(36px, 9.5vw, 54px); }
	.xmas-popup__get { font-size: clamp(24px, 6vw, 36px); }
	.xmas-popup__offer-for { font-size: clamp(18px, 4.8vw, 26px); }
	.xmas-popup__gift-icon { width: clamp(28px, 7vw, 40px); }
	.xmas-popup__script { font-size: clamp(22px, 6vw, 30px); }
	.xmas-popup__info { font-size: clamp(15px, 4vw, 19px); padding: 10px 8px; }
	.xmas-popup__slots { min-width: 0; width: 100%; padding: 10px 18px; font-size: clamp(16px, 4.3vw, 21px); }
	.xmas-popup__cta { width: 100%; padding: 13px 18px; font-size: clamp(14px, 3.8vw, 17px); }
	.xmas-popup__terms { font-size: 14px; }
}

@media (max-width: 420px) {
	.xmas-popup__media { height: clamp(150px, 24vh, 230px); }
	.xmas-popup__inner { padding: 0 16px 16px; }
	.xmas-popup__emblem { width: 170px; }
	.xmas-popup__offer { margin-top: 12px; }
	.xmas-popup__script { margin-top: 10px; }
	.xmas-popup__info { grid-template-columns: 1fr; gap: 6px; margin-top: 12px; padding: 8px; }
	.xmas-popup__info-item { justify-content: flex-start; padding: 0 6px; }
	.xmas-popup__info-item--loc { border-left: 0; border-top: 1px solid var(--xp-line); padding-top: 6px; }
	.xmas-popup__loc > span { display: inline; }
	.xmas-popup__loc > .xmas-popup__loc-sep { display: inline; }
	.xmas-popup__slots { margin-top: 12px; }
	.xmas-popup__cta { margin-top: 10px; }
	.xmas-popup__wa { margin-top: 10px; font-size: 14px; }
	.xmas-popup__gift { width: 72px; }
	.xmas-popup__slots svg,
	.xmas-popup__cta svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.xmas-popup,
	.xmas-popup__dialog,
	.xmas-popup__close,
	.xmas-popup__slots,
	.xmas-popup__cta { transition: none; }
}
