/**
 * Naikka | Postobón Sabores — interna del sabor.
 *
 * Tokens inyectados desde PHP en .nps-sabor:
 *   --nps-marca  → color oficial del sabor (bolita, flechas, pill, COMPRAR)
 *   --nps-semi   → color del semicírculo de fondo
 *
 * Mobile-first. Breakpoint desktop: 981px.
 */

/* =========================================================
   Tokens globales
   ========================================================= */

.nps-sabor {
	/* Paleta azul del selector de presentaciones */
	--nps-azul-titulo: #1BA0E2;
	--nps-azul-activo: #004F8A;
	--nps-azul-inactivo: #9FD3EF;

	/* Geometría del semicírculo. Tunear acá.
	   --nps-arco-w > 100% aplana el arco y sube los bordes laterales.
	   --nps-arco-h  = profundidad del arco (fija, en px).
	   --nps-offset-top = banda recta de arriba, reservada para el menú.
	   Subir el offset NO deforma el arco: solo lo empuja hacia abajo. */
	--nps-arco-w: 132%;
	--nps-arco-h: 300px;
	--nps-offset-top: 8rem;

	position: relative;
	overflow: hidden;
	background: #fff;
	padding-bottom: 32px;
}

.nps-sabor *,
.nps-sabor *::before,
.nps-sabor *::after {
	box-sizing: border-box;
}

/* Utilidad a11y — la defino acá por si el tema no la trae */
.nps-sabor .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* =========================================================
   Semicírculo de fondo
   ========================================================= */

.nps-sabor__semicirculo {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: var(--nps-arco-w);
	height: calc(var(--nps-offset-top) + var(--nps-arco-h));
	background: var(--nps-semi);
	/* Radio vertical en px (no %) → el arco mide siempre --nps-arco-h,
	   sin importar cuánto crezca la banda de arriba. */
	border-radius: 0 0 50% 50% / 0 0 var(--nps-arco-h) var(--nps-arco-h);
	z-index: 0;
	pointer-events: none;
}

.nps-sabor__inner {
	position: relative;
	z-index: 1;
	max-width: 1300px;
	margin: 0 auto;
	padding: var(--nps-offset-top) 20px 0;
}

/* =========================================================
   Estado vacío (admin)
   ========================================================= */

.nps-sabor__vacio {
	text-align: center;
	padding: 80px 20px;
	font-family: 'ExconRegular', sans-serif;
}

/* =========================================================
   Stage + paneles de presentación
   ========================================================= */

.nps-stage {
	position: relative;
	min-height: 300px;
}

.nps-panel {
	position: relative;
	display: block;
}

/* Sin esto el [hidden] del HTML no gana contra el display */
.nps-panel[hidden] {
	display: none;
}

.nps-panel__slider {
	position: relative;
	width: 58%;
	max-width: 260px;
	margin: 0 auto;
}

/* ---- Swiper ---- */

.nps-swiper {
	overflow: hidden;
	width: 100%;
}

.nps-slide {
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	height: auto;
}

/* La botella va sobre el recuadro claro; las fotos de contexto no lo necesitan */
.nps-slide--botella {
	background: none;
}

.nps-slide__img {
	display: block;
	width: 100%;
	height: 100%;
}

/* Botella = PNG/WebP recortado → contain (no se recorta)
   Contexto = foto → cover (llena el recuadro) */
.nps-slide--botella .nps-slide__img {
	object-fit: contain;
	padding: 12px;
}

.nps-slide--contexto .nps-slide__img {
	object-fit: cover;
}

/* ---- Flechas ---- */

.nps-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--nps-marca);
	color: #fff;
	cursor: pointer;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, filter 0.2s ease;
}

.nps-arrow:hover {
	filter: brightness(1.12);
}

.nps-arrow:focus-visible {
	outline: 3px solid var(--nps-azul-activo);
	outline-offset: 3px;
}

.nps-arrow svg {
	width: 18px;
	height: 18px;
}

.nps-arrow--prev {
	left: 0;
	transform: translate(-50%, -50%);
}

.nps-arrow--next {
	right: 0;
	transform: translate(50%, -50%);
}

.nps-arrow--prev:active { transform: translate(-50%, -50%) scale(0.92); }
.nps-arrow--next:active { transform: translate(50%, -50%) scale(0.92); }

/* Sin loop, los extremos deshabilitan la flecha correspondiente */
.nps-arrow.swiper-button-disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

/* ---- Pill "Manzana / 250 ml" ---- */

.nps-pill {
	position: absolute;
	right: -14px;
	top: 58%;
	z-index: 5;
	display: flex;
	flex-direction: column;
	background: var(--nps-marca);
	color: #fff;
	font-family: 'SodaFont', sans-serif;
	font-size: 15px;
	line-height: 1.05;
	padding: 8px 12px;
	border-radius: 5px;
	pointer-events: none;
}

/* ---- Burbujas decorativas ---- */

.nps-burbuja {
	position: absolute;
	border-radius: 50%;
	z-index: 2;
	pointer-events: none;
}

.nps-burbuja--1,
.nps-burbuja--3 {
	width: 9px;
	height: 9px;
	border: 2px solid #fff;
	top: 14%;
}

.nps-burbuja--2,
.nps-burbuja--4 {
	width: 18px;
	height: 18px;
	background: #fff;
	top: 26%;
}

.nps-burbuja--1 { left: 20%; }
.nps-burbuja--2 { left: 12%; }
.nps-burbuja--3 { right: 20%; }
.nps-burbuja--4 { right: 12%; }

/* =========================================================
   Selector de sabor (bolitas)
   ========================================================= */

.nps-sabores-nav {
	position: relative;
	z-index: 3;
	margin-top: 18px;
}

.nps-sabores-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nps-sabores-nav__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nps-dot {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--dot-color);
	transition: transform 0.25s ease;
}

.nps-dot:hover {
	transform: scale(1.15);
}

.nps-dot:focus-visible {
	outline: 3px solid var(--nps-azul-activo);
	outline-offset: 3px;
}

/* Activo: relleno → anillo blanco → anillo de color (efecto diana) */
.nps-dot.is-active {
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px var(--dot-color);
	transform: scale(1.2);
}

.nps-selector-titulo {
	margin: 14px 0 0;
	text-align: center;
	font-family: 'SodaFont', sans-serif;
	font-size: 17px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--nps-azul-titulo);
}

/* =========================================================
   Zona inferior: presentaciones + COMPRAR
   ========================================================= */

.nps-bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	margin-top: 26px;
}

.nps-presentaciones {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 6px;
	width: 100%;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: none;
}

.nps-presentaciones::-webkit-scrollbar {
	display: none;
}

.nps-presentacion {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 4px;
	background: none;
	border: none;
	cursor: pointer;
	flex: 0 0 auto;
}

.nps-presentacion:focus-visible {
	outline: 3px solid var(--nps-azul-activo);
	outline-offset: 2px;
	border-radius: 6px;
}

/*
 * El ícono se pinta con mask, no como <img>.
 * El .webp actúa como molde y el color lo pone el CSS.
 * REQUISITO: los .webp deben tener fondo transparente.
 */
.nps-presentacion__icono {
	display: block;
	width: 34px;
	height: 44px;
	background-color: var(--nps-azul-inactivo);
	-webkit-mask-image: var(--icono);
	mask-image: var(--icono);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center bottom;
	mask-position: center bottom;
	transition: background-color 0.25s ease;
}

.nps-presentacion__label {
	font-family: 'SodaFont', sans-serif;
	font-size: 10px;
	color: var(--nps-azul-inactivo);
	white-space: nowrap;
	transition: color 0.25s ease;
}

.nps-presentacion:hover .nps-presentacion__icono,
.nps-presentacion:hover .nps-presentacion__label {
	background-color: var(--nps-azul-titulo);
}

.nps-presentacion:hover .nps-presentacion__label {
	background: none;
	color: var(--nps-azul-titulo);
}

.nps-presentacion.is-active .nps-presentacion__icono {
	background-color: var(--nps-azul-activo);
}

.nps-presentacion.is-active .nps-presentacion__label {
	color: var(--nps-azul-activo);
}

/* ---- COMPRAR ---- */

.nps-comprar {
	display: inline-block;
	font-family: 'SodaFont', sans-serif;
	font-size: 22px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #fff;
	text-decoration: none;
	background: var(--nps-marca);
	padding: 13px 46px;
	border-radius: 999px;
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--nps-marca) 32%, #fff);
	transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.nps-comprar:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 0 0 9px color-mix(in srgb, var(--nps-marca) 22%, #fff);
}

.nps-comprar:focus-visible {
	outline: 3px solid var(--nps-azul-activo);
	outline-offset: 4px;
}

/* =========================================================
   Desktop
   ========================================================= */

@media (min-width: 981px) {

	.nps-sabor {
		--nps-arco-w: 120%;
		--nps-arco-h: 480px;
		padding-bottom: 56px;
	}

	.nps-sabor__inner {
		padding: var(--nps-offset-top) 24px 0;
	}

	.nps-stage {
		min-height: 420px;
	}

	.nps-panel__slider {
		width: 300px;
		max-width: 100%;
	}

	.nps-slide {
		aspect-ratio: 4 / 5;
		border-radius: 18px;
	}

	.nps-arrow {
		width: 54px;
		height: 54px;
	}

	.nps-arrow svg {
		width: 22px;
		height: 22px;
	}



	.nps-pill {
		right: auto;
		left: calc(100% - 12px);
		top: 62%;
		font-size: 22px;
		padding: 12px 18px;
		border-radius: 7px;
	}

	.nps-burbuja--1,
	.nps-burbuja--3 {
		width: 13px;
		height: 13px;
		top: 16%;
	}

	.nps-burbuja--2,
	.nps-burbuja--4 {
		width: 26px;
		height: 26px;
		top: 28%;
	}

	.nps-burbuja--1 { left: 26%; }
	.nps-burbuja--2 { left: 20%; }
	.nps-burbuja--3 { right: 26%; }
	.nps-burbuja--4 { right: 20%; }

	.nps-sabores-nav {
		margin-top: 28px;
	}

	.nps-sabores-nav__list {
		gap: 22px;
	}

	.nps-dot {
		width: 52px;
		height: 52px;
	}

	.nps-dot.is-active {
		border-width: 5px;
		box-shadow: 0 0 0 3px var(--dot-color);
	}

	.nps-selector-titulo {
		margin-top: 22px;
		font-size: 30px;
	}

	.nps-bottom {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		gap: 30px;
		margin-top: 42px;
	}

	.nps-presentaciones {
		width: auto;
		gap: 14px;
		overflow: visible;
	}

	.nps-presentacion__icono {
		width: 52px;
		height: 70px;
	}

	.nps-presentacion__label {
		font-size: 13px;
	}

	.nps-comprar {
		font-size: 32px;
		padding: 16px 62px;
		box-shadow: 0 0 0 7px color-mix(in srgb, var(--nps-marca) 32%, #fff);
	}
}

/* =========================================================
   Accesibilidad: motion reducido
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.nps-slide,
	.nps-arrow,
	.nps-dot,
	.nps-comprar,
	.nps-presentacion__icono,
	.nps-presentacion__label {
		transition: none;
	}
}