/* PHONECASH: modo Navidad.
   Solo se carga del 1 de noviembre al 6 de enero (ver inc/navidad.php).
   Se mantiene la base de siempre (negro, blanco y azul) y se suman dos acentos: rojo de lazo y dorado. */

:root {
	--xmas-red: #c8102e;
	--xmas-red-text: #b0122c;
	--xmas-gold: #f0cf8e;
	--xmas-gold-deep: #b88a3c;
	--xmas-grad: linear-gradient(92deg, #ff6b81 0%, #ff9f7a 38%, #f7c98a 70%, #f6e2b0 100%);
}

/* ---------- Estrella ---------- */

.xmas-sparkle {
	flex: none;
	display: inline-block;
	vertical-align: middle;
	color: var(--xmas-gold);
}

/* ---------- Franja superior ---------- */

.xmas-ribbon {
	position: relative;
	z-index: 1;
	background: #f5f5f7;
	color: #1d1d1f;
	text-align: center;
}

.xmas-ribbon__text {
	margin: 0;
	padding-block: 12px;
	font-size: 14px;
	line-height: 1.45;
	letter-spacing: -0.016em;
	text-wrap: balance;
}

.xmas-ribbon__star {
	margin: -3px 6px 0 0;
	color: var(--xmas-gold-deep);
}

.xmas-ribbon__count {
	font-weight: 600;
	color: var(--xmas-red-text);
}

.xmas-ribbon a {
	color: var(--blue-link);
	white-space: nowrap;
}

.xmas-ribbon a::after {
	content: "";
	display: inline-block;
	width: 0.42em;
	height: 0.42em;
	margin-left: 0.32em;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: translateY(-0.08em) rotate(45deg);
}

.xmas-ribbon--dark {
	background: #0e0e10;
	color: #d2d2d7;
	box-shadow: inset 0 -1px 0 #1d1d1f;
}

.xmas-ribbon--dark .xmas-ribbon__star {
	color: var(--xmas-gold);
}

.xmas-ribbon--dark .xmas-ribbon__count {
	background: var(--xmas-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.xmas-ribbon--dark a {
	color: var(--blue-bright);
}

/* ---------- Encabezado: destello sobre la marca ---------- */

.is-navidad .site-header .brand {
	position: relative;
}

.is-navidad .site-header .brand::after {
	content: "";
	position: absolute;
	top: -8px;
	right: -12px;
	width: 11px;
	height: 11px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5C12.9 8.1 15.9 11.1 22.5 12 15.9 12.9 12.9 15.9 12 22.5 11.1 15.9 8.1 12.9 1.5 12 8.1 11.1 11.1 8.1 12 1.5Z' fill='%23f0cf8e'/%3E%3C/svg%3E") center / contain no-repeat;
	pointer-events: none;
}

/* ---------- Nieve (la dibuja navidad.js) ---------- */

.xmas-snow {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ---------- Portada ---------- */

.is-navidad .hero-copy {
	padding-top: clamp(96px, 8.4vw, 118px);
}

.xmas-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	font-size: clamp(17px, 1.9vw, 21px);
	font-weight: 600;
	letter-spacing: -0.012em;
	line-height: 1.2;
}

.xmas-eyebrow span {
	background: var(--xmas-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/* Adornos que cuelgan */
.xmas-decor {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.xmas-orn {
	--s: var(--sd);
	--l: var(--ld);
	position: absolute;
	top: 0;
	left: var(--x);
	width: var(--s);
}

.xmas-orn__sway {
	display: flex;
	flex-direction: column;
	align-items: center;
	transform-origin: 50% 0;
}

/* Hilo */
.xmas-orn__sway::before {
	content: "";
	flex: none;
	width: 1px;
	height: var(--l);
	background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 45%, rgba(255, 255, 255, 0.55));
}

/* Tapa dorada con su argolla */
.xmas-orn__cap {
	position: relative;
	z-index: 1;
	flex: none;
	width: 30%;
	height: calc(var(--s) * 0.14);
	margin-bottom: calc(var(--s) * -0.035);
	border-radius: 2px 2px 1px 1px;
	background: linear-gradient(90deg, #6b4c1b, #f3d996 30%, #a57b32 56%, #f0d08a 80%, #6b4c1b);
}

.xmas-orn__cap::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 100%;
	width: calc(var(--s) * 0.14);
	height: calc(var(--s) * 0.14);
	min-width: 5px;
	min-height: 5px;
	border: 1.25px solid #d8b66d;
	border-radius: 50%;
	transform: translate(-50%, 40%);
}

/* Esfera de vidrio */
.xmas-orn__ball {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1;
	border-radius: 50%;
	background:
		radial-gradient(circle at 33% 27%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.5) 4%, rgba(255, 255, 255, 0) 17%),
		radial-gradient(circle at 40% 34%, var(--c1) 0%, var(--c2) 50%, var(--c3) 100%);
	box-shadow:
		inset calc(var(--s) * -0.08) calc(var(--s) * -0.12) calc(var(--s) * 0.22) rgba(0, 0, 0, 0.5),
		inset calc(var(--s) * 0.04) calc(var(--s) * 0.05) calc(var(--s) * 0.1) rgba(255, 255, 255, 0.16),
		0 0 calc(var(--s) * 0.75) var(--glow);
}

/* Reflejo de luz abajo */
.xmas-orn__ball::after {
	content: "";
	position: absolute;
	inset: 60% 22% 8% 32%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.xmas-orn--blue {
	--c1: #5aaeff;
	--c2: #0071e3;
	--c3: #001634;
	--glow: rgba(0, 113, 227, 0.42);
}

.xmas-orn--red {
	--c1: #ff6f80;
	--c2: #c8102e;
	--c3: #33030c;
	--glow: rgba(200, 16, 46, 0.4);
}

.xmas-orn--gold {
	--c1: #fff3cf;
	--c2: #d6a955;
	--c3: #3f2a0c;
	--glow: rgba(240, 207, 142, 0.32);
}

.xmas-orn--silver {
	--c1: #ffffff;
	--c2: #a7abb6;
	--c3: #24262c;
	--glow: rgba(255, 255, 255, 0.16);
}

@media (max-width: 1199px) {
	.xmas-orn {
		--s: calc(var(--sd) * 0.8);
		--l: calc(var(--ld) * 0.42);
	}

	.xmas-orn--desk {
		display: none;
	}
}

@media (max-width: 760px) {
	.xmas-orn {
		--s: var(--sm);
		--l: var(--lm);
		left: var(--xm);
	}
}

/* ---------- Sección "Esta Navidad, regala iPhone" ---------- */

.xmas {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding-block: clamp(84px, 11vw, 144px);
	background:
		radial-gradient(55% 60% at 76% 46%, rgba(0, 113, 227, 0.2), rgba(0, 113, 227, 0) 72%),
		radial-gradient(100% 85% at 50% 0%, #0b1222 0%, #04060b 55%, #000 100%);
	color: #f5f5f7;
	scroll-margin-top: var(--header-h);
}

.xmas > .container {
	position: relative;
}

.xmas-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	grid-template-areas:
		"copy art"
		"perks perks";
	align-items: center;
	gap: clamp(48px, 6vw, 88px) clamp(32px, 5vw, 72px);
}

.xmas-copy {
	grid-area: copy;
	min-width: 0;
}

.xmas-kicker {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	color: var(--xmas-gold);
	font-size: clamp(17px, 1.8vw, 20px);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.xmas h2 {
	max-width: 12ch;
	margin: 16px 0 0;
	color: #f5f5f7;
	font-size: clamp(40px, 5.8vw, 68px);
	line-height: 1.03;
	letter-spacing: -0.042em;
	text-wrap: balance;
}

.xmas-grad {
	background: var(--xmas-grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.xmas-lead {
	max-width: 30em;
	margin: 24px 0 0;
	color: #a1a1a6;
	font-size: clamp(19px, 2vw, 22px);
	line-height: 1.42;
	letter-spacing: -0.016em;
}

.xmas-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
	margin-top: 36px;
}

.xmas-art {
	grid-area: art;
	position: relative;
	justify-self: center;
	width: min(100%, 440px);
}

.xmas-art__glow {
	position: absolute;
	inset: -14% -16% -6%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 196, 130, 0.3), rgba(214, 33, 61, 0.14) 52%, rgba(214, 33, 61, 0) 100%);
	pointer-events: none;
}

.xmas-gift-art {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.55));
}

.xmas-spark {
	transform-box: fill-box;
	transform-origin: center;
}

/* Cuenta regresiva */
.xmas-count {
	position: absolute;
	right: -6px;
	bottom: 6%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 150px;
	padding: 16px 22px 15px;
	border-radius: 22px;
	background: rgba(30, 30, 34, 0.58);
	-webkit-backdrop-filter: blur(22px) saturate(1.5);
	backdrop-filter: blur(22px) saturate(1.5);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 24px 60px rgba(0, 0, 0, 0.45);
	text-align: left;
}

.xmas-count__num {
	color: #fff;
	font-size: clamp(46px, 5vw, 62px);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.045em;
	line-height: 1;
}

.xmas-count__label {
	margin-top: 6px;
	color: #c7c7cc;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.xmas-count.is-text .xmas-count__num {
	display: none;
}

.xmas-count.is-text .xmas-count__label {
	margin: 0;
	color: #fff;
	font-size: 19px;
	font-weight: 600;
}

/* Beneficios */
.xmas-perks {
	grid-area: perks;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px 32px;
	margin: 0;
	padding: 38px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	list-style: none;
}

.xmas-perks li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
	color: #a1a1a6;
	font-size: 15px;
	line-height: 1.45;
}

.xmas-perks .icon {
	flex: none;
	margin-top: 1px;
	color: var(--xmas-gold);
}

.xmas-perks strong {
	display: block;
	margin-bottom: 3px;
	color: #f5f5f7;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.012em;
}

@media (max-width: 960px) {
	.xmas-perks {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.xmas-grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"copy"
			"art"
			"perks";
		gap: 44px;
		text-align: center;
	}

	.xmas h2 {
		margin-inline: auto;
	}

	.xmas-lead {
		margin-inline: auto;
	}

	.xmas-actions {
		flex-direction: column;
		gap: 18px;
	}

	.xmas-art {
		width: min(88%, 380px);
	}

	.xmas-perks {
		text-align: left;
	}
}

@media (max-width: 520px) {
	.xmas-perks {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
		padding-top: 32px;
	}

	/* En el celular la cuenta va centrada debajo de la caja, en una sola línea. */
	.xmas-count {
		position: relative;
		right: auto;
		bottom: auto;
		flex-direction: row;
		align-items: baseline;
		justify-content: center;
		gap: 10px;
		width: max-content;
		max-width: 100%;
		min-width: 0;
		margin: -4px auto 0;
		padding: 12px 22px;
		border-radius: var(--pill);
	}

	.xmas-count__num {
		font-size: 34px;
	}

	.xmas-count__label {
		margin: 0;
		font-size: 15px;
	}

	.xmas-count.is-text .xmas-count__label {
		font-size: 17px;
	}
}

/* ---------- Catálogo: etiqueta de oferta en rojo navideño ---------- */

.is-navidad .onsale {
	background: var(--xmas-red);
}

/* ---------- Ficha del producto: "Es para regalo" ---------- */

.xmas-gift {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 4px 0 14px;
	padding: 14px 16px;
	border-radius: 18px;
	background: linear-gradient(135deg, #fff5f6 0%, #fffaf2 100%);
	box-shadow: inset 0 0 0 1px rgba(200, 16, 46, 0.14);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.xmas-gift input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.xmas-gift__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	color: var(--xmas-red);
}

.xmas-gift__text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	text-align: left;
}

.xmas-gift__text strong {
	color: #1d1d1f;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.012em;
}

.xmas-gift__text small {
	color: #6e6e73;
	font-size: 13px;
	line-height: 1.35;
}

.xmas-gift__switch {
	position: relative;
	flex: none;
	width: 46px;
	height: 28px;
	border-radius: 999px;
	background: #e3e3e8;
	transition: background-color 0.25s var(--ease);
}

.xmas-gift__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	transition: transform 0.35s var(--ease-out);
}

.xmas-gift input:checked ~ .xmas-gift__switch {
	background: #34c759;
}

.xmas-gift input:checked ~ .xmas-gift__switch::after {
	transform: translateX(18px);
}

.xmas-gift input:focus-visible ~ .xmas-gift__switch {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

/* ---------- Cierres de página ---------- */

.is-navidad .closing {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: radial-gradient(70% 90% at 50% 0%, #0d1424 0%, #000 72%);
}

.is-navidad .closing > .container {
	position: relative;
}

.is-navidad .closing > .container::before {
	content: "";
	display: block;
	width: 132px;
	height: 18px;
	margin: 0 auto 28px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 18'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23f0cf8e' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23f0cf8e'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='1' x2='0'%3E%3Cstop offset='0' stop-color='%23f0cf8e' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23f0cf8e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect y='8.5' width='52' height='1' fill='url(%23a)'/%3E%3Crect x='80' y='8.5' width='52' height='1' fill='url(%23b)'/%3E%3Cpath d='M66 0C66.8 6 68.2 7.6 74.5 9 68.2 10.4 66.8 12 66 18 65.2 12 63.8 10.4 57.5 9 63.8 7.6 65.2 6 66 0Z' fill='%23f0cf8e'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Pie de página ---------- */

.xmas-footer-note,
.footer-brand .xmas-footer-note {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: none;
	margin: 20px 0 0;
	padding: 8px 14px 8px 12px;
	border-radius: var(--pill);
	background: rgba(240, 207, 142, 0.08);
	box-shadow: inset 0 0 0 1px rgba(240, 207, 142, 0.16);
	color: var(--xmas-gold);
	font-size: 13px;
	line-height: 1.3;
}

/* ---------- Movimiento ---------- */

@media (prefers-reduced-motion: no-preference) {
	.xmas-eyebrow {
		animation: xmas-rise 1.1s var(--ease-out) 0s both;
	}

	.xmas-orn {
		animation: xmas-drop 1.9s cubic-bezier(0.2, 0.9, 0.25, 1.12) var(--in) both;
	}

	.xmas-orn__sway {
		animation: xmas-sway var(--t) ease-in-out calc(var(--in) * -4) infinite alternate;
	}

	.xmas-gift-art {
		animation: xmas-float 5.5s ease-in-out infinite alternate;
	}

	.xmas-spark {
		animation: xmas-twinkle 3.4s ease-in-out var(--d, 0s) infinite;
	}

	.is-navidad .site-header .brand::after {
		animation: xmas-twinkle 3.8s ease-in-out 1s infinite;
	}

	@keyframes xmas-rise {
		from {
			opacity: 0;
			transform: translateY(24px);
		}
	}

	@keyframes xmas-drop {
		from {
			opacity: 0;
			transform: translateY(-115%);
		}

		35% {
			opacity: 1;
		}
	}

	@keyframes xmas-sway {
		from {
			transform: rotate(-3.2deg);
		}

		to {
			transform: rotate(3.2deg);
		}
	}

	@keyframes xmas-float {
		from {
			transform: translateY(0);
		}

		to {
			transform: translateY(-10px);
		}
	}

	@keyframes xmas-twinkle {
		0%,
		100% {
			opacity: 0.35;
			transform: scale(0.72);
		}

		50% {
			opacity: 1;
			transform: scale(1);
		}
	}
}
