/* ==========================================================================
   Cuba Provider — main.css
   Tokens (iguales a lib/cp_ui/theme de la app), base, componentes,
   cabecera, megamenú, pie, barra inferior móvil y cajones.
   Móvil primero. Puntos de corte: 600, 768, 1024, 1280, 1440.
   ========================================================================== */

:root {
	/* Marca */
	--cp-brand: #21a04a;
	--cp-brand-dark: #16803a;
	--cp-brand-soft: #e9f7ee;
	--cp-brand-grad: linear-gradient(135deg, #2fb35a 0%, #17853d 100%);
	--cp-accent: #ff6a00;
	--cp-accent-soft: #fff1e6;
	--cp-accent-grad: linear-gradient(135deg, #ff4d2e 0%, #ff8a00 100%);
	--cp-sale: #e5322d;
	--cp-sale-soft: #fdecec;
	--cp-verified: #1d63e8;
	--cp-verified-soft: #e8f0fd;
	--cp-star: #ffb400;
	--cp-warn: #b26a00;
	--cp-warn-soft: #fff4e5;
	--cp-success: #1f9d55;

	/* Neutros */
	--cp-ink: #111111;
	--cp-text: #333333;
	--cp-muted: #767676;
	--cp-faint: #a3a3a3;
	--cp-bg: #f4f4f4;
	--cp-surface: #ffffff;
	--cp-surface-alt: #f7f7f7;
	--cp-line: #ededed;
	--cp-line-strong: #dadada;
	--cp-scrim: rgba(0, 0, 0, 0.42);
	--cp-header-dark: linear-gradient(180deg, #16201a 0%, #24332a 100%);

	/* Niveles mayoristas (metales de las tarjetas del sitio) */
	--cp-level-basic: #1e63c4;
	--cp-level-pro: #b8892a;
	--cp-level-elite: #6e7b88;
	--cp-level-vip: #2a2d33;

	/* Tipografía */
	--cp-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--cp-fs-xs: 0.75rem;
	--cp-fs-sm: 0.8125rem;
	--cp-fs-md: 0.9375rem;
	--cp-fs-lg: 1.0625rem;
	--cp-fs-xl: 1.25rem;
	--cp-fs-2xl: 1.5rem;
	--cp-fs-3xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);

	/* Espacios (rejilla de 4 px) */
	--cp-s1: 4px;
	--cp-s2: 8px;
	--cp-s3: 12px;
	--cp-s4: 16px;
	--cp-s5: 20px;
	--cp-s6: 24px;
	--cp-s8: 32px;
	--cp-s10: 40px;
	--cp-s12: 48px;
	--cp-gutter: 16px;

	/* Radios y sombras */
	--cp-r-xs: 6px;
	--cp-r-img: 10px;
	--cp-r-card: 12px;
	--cp-r-lg: 16px;
	--cp-r-xl: 20px;
	--cp-r-pill: 999px;
	--cp-shadow-card: 0 1px 2px rgba(17, 17, 17, 0.04), 0 2px 10px rgba(17, 17, 17, 0.04);
	--cp-shadow-hover: 0 8px 24px rgba(17, 17, 17, 0.1);
	--cp-shadow-float: 0 12px 40px rgba(17, 17, 17, 0.16);
	--cp-shadow-bar: 0 -2px 16px rgba(17, 17, 17, 0.06);

	/* Movimiento */
	--cp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--cp-fast: 0.15s;
	--cp-normal: 0.24s;

	/* Maquetación */
	--cp-container: 1360px;
	--cp-header-h: 64px;
	--cp-bottomnav-h: 60px;
}

@media (min-width: 768px) {
	:root {
		--cp-gutter: 24px;
	}
}

/* ─────────────────────────── Base ─────────────────────────── */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--cp-bg);
	color: var(--cp-text);
	font-family: var(--cp-font);
	font-size: var(--cp-fs-md);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-feature-settings: "tnum" 0;
	overflow-x: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--cp-brand-dark);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--cp-s3);
	color: var(--cp-ink);
	font-weight: 750;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

h1 {
	font-size: var(--cp-fs-3xl);
}

h2 {
	font-size: var(--cp-fs-2xl);
}

h3 {
	font-size: var(--cp-fs-xl);
}

p {
	margin: 0 0 var(--cp-s3);
}

ul,
ol {
	margin: 0;
	padding: 0;
}

:focus-visible {
	outline: 2px solid var(--cp-brand);
	outline-offset: 2px;
	border-radius: 4px;
}

::selection {
	background: var(--cp-brand-soft);
	color: var(--cp-ink);
}

.cp-sr,
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cp-skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 1000;
	padding: 10px 14px;
	background: var(--cp-ink);
	color: #fff;
	border-radius: var(--cp-r-xs);
	transition: top var(--cp-fast);
}

.cp-skip:focus {
	top: 12px;
	color: #fff;
}

.cp-container {
	width: 100%;
	max-width: calc(var(--cp-container) + 2 * var(--cp-gutter));
	margin: 0 auto;
	padding-left: var(--cp-gutter);
	padding-right: var(--cp-gutter);
}

.cp-main {
	display: block;
	min-height: 50vh;
	padding-bottom: var(--cp-s10);
}

@media (max-width: 767px) {
	.cp-hide-sm {
		display: none !important;
	}
}

@media (max-width: 1023px) {
	.cp-hide-md {
		display: none !important;
	}
}

@media (min-width: 1024px) {
	.cp-only-mobile {
		display: none !important;
	}
}

/* ─────────────────────────── Iconos ─────────────────────────── */

.cp-icon {
	flex: none;
	display: inline-block;
	vertical-align: middle;
}

/* ─────────────────────────── Botones ─────────────────────────── */

/* Los selectores de WooCommerce van dentro de :where() (especificidad 0) para
   que .cp-btn--primary/--secondary… ganen en un enlace que lleve las dos clases. */
.cp-btn,
:where(.button, button.button, a.button, input.button, .woocommerce a.button, .woocommerce button.button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--cp-s2);
	min-height: 44px;
	padding: 0 var(--cp-s5);
	border: 1.5px solid transparent;
	border-radius: var(--cp-r-pill);
	background: var(--cp-surface);
	color: var(--cp-ink);
	font-weight: 700;
	font-size: var(--cp-fs-md);
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--cp-fast), color var(--cp-fast), border-color var(--cp-fast), transform var(--cp-fast), box-shadow var(--cp-fast);
	-webkit-tap-highlight-color: transparent;
}

.cp-btn:active {
	transform: scale(0.98);
}

.cp-btn--primary,
:where(.button.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce #respond input#submit.alt, .woocommerce input.button.alt) {
	background: var(--cp-brand-grad);
	color: #fff;
	border-color: transparent;
	box-shadow: 0 4px 14px rgba(33, 160, 74, 0.28);
}

.cp-btn--primary:hover,
:where(.button.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover) {
	color: #fff;
	filter: brightness(1.04);
	box-shadow: 0 6px 18px rgba(33, 160, 74, 0.36);
}

.cp-btn--accent {
	background: var(--cp-accent-grad);
	color: #fff;
	box-shadow: 0 4px 14px rgba(255, 106, 0, 0.26);
}

.cp-btn--accent:hover {
	color: #fff;
	filter: brightness(1.04);
}

.cp-btn--secondary {
	background: var(--cp-surface);
	border-color: var(--cp-ink);
	color: var(--cp-ink);
}

.cp-btn--secondary:hover {
	background: var(--cp-ink);
	color: #fff;
}

.cp-btn--tonal {
	background: var(--cp-brand-soft);
	color: var(--cp-brand-dark);
}

.cp-btn--tonal:hover {
	background: #d8f0e1;
	color: var(--cp-brand-dark);
}

.cp-btn--ghost {
	background: transparent;
	color: var(--cp-brand-dark);
	padding: 0 var(--cp-s2);
}

.cp-btn--light {
	background: #fff;
	color: var(--cp-ink);
}

.cp-btn--sm {
	min-height: 36px;
	padding: 0 var(--cp-s4);
	font-size: var(--cp-fs-sm);
}

.cp-btn--lg {
	min-height: 52px;
	padding: 0 var(--cp-s8);
	font-size: var(--cp-fs-lg);
}

.cp-btn--block {
	display: flex;
	width: 100%;
}

/* Botones del tema que además llevan .button de WooCommerce: woocommerce.css
   (.woocommerce a.button, 0-2-1) les imponía su forma (rectángulo de 3 px,
   inline-block, texto arriba). Vuelve la del tema; colores y tamaños siguen
   viniendo de .cp-btn--* y de las reglas de cada área. */
.woocommerce :is(a, button, input).button.cp-btn {
	align-items: center;
	justify-content: center;
	border-radius: var(--cp-r-pill);
	line-height: 1;
}

.woocommerce :is(a, button, input).button.cp-btn:not(.cp-btn--block) {
	display: inline-flex;
}

.woocommerce :is(a, button, input).button.cp-btn:not(.cp-btn--lg):not(.cp-btn--sm) {
	padding: 0 var(--cp-s5);
}

.cp-btn[disabled],
.cp-btn.is-disabled,
.button.disabled,
.button:disabled {
	opacity: 0.5;
	pointer-events: none;
}

.cp-iconbtn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cp-ink);
	-webkit-tap-highlight-color: transparent;
}

.cp-iconbtn:hover {
	background: var(--cp-surface-alt);
}

/* ─────────────────────────── Chips y badges ─────────────────────────── */

.cp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-r-pill);
	background: var(--cp-surface);
	color: var(--cp-text);
	font-size: var(--cp-fs-sm);
	font-weight: 600;
	white-space: nowrap;
	transition: border-color var(--cp-fast), background var(--cp-fast), color var(--cp-fast);
}

.cp-chip:hover {
	border-color: var(--cp-line-strong);
	color: var(--cp-ink);
}

.cp-chip.is-active {
	border: 1.4px solid var(--cp-ink);
	color: var(--cp-ink);
	font-weight: 750;
}

.cp-chip--soft.is-active {
	border-color: rgba(33, 160, 74, 0.35);
	background: var(--cp-brand-soft);
	color: var(--cp-brand-dark);
}

.cp-badge {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 8px;
	border-radius: var(--cp-r-pill);
	font-size: 11.5px;
	font-weight: 750;
	line-height: 1;
	white-space: nowrap;
}

.cp-badge--sale {
	background: var(--cp-sale);
	color: #fff;
}

.cp-badge--new {
	background: var(--cp-brand);
	color: #fff;
}

.cp-badge--hot {
	background: var(--cp-accent-grad);
	color: #fff;
}

.cp-badge--soft {
	background: var(--cp-brand-soft);
	color: var(--cp-brand-dark);
}

.cp-badge--verified {
	background: var(--cp-verified-soft);
	color: var(--cp-verified);
}

.cp-badge--rank {
	min-width: 30px;
	justify-content: center;
	background: #8a6d1c;
	color: #fff;
	border-radius: var(--cp-r-xs);
}

.cp-badge--rank-1 {
	background: linear-gradient(135deg, #f2c94c, #c89211);
	color: #3a2c00;
}

.cp-badge--rank-2 {
	background: linear-gradient(135deg, #e5e9ee, #a9b2bc);
	color: #22272d;
}

.cp-badge--rank-3 {
	background: linear-gradient(135deg, #e7b58a, #b0703e);
	color: #fff;
}

.cp-badge--rank-4 {
	background: rgba(17, 17, 17, 0.72);
	color: #fff;
}

/* ─────────────────────────── Superficies ─────────────────────────── */

.cp-card {
	background: var(--cp-surface);
	border-radius: var(--cp-r-card);
	box-shadow: var(--cp-shadow-card);
}

.cp-section {
	margin-top: var(--cp-s6);
}

.cp-section--card {
	padding: var(--cp-s4);
	background: var(--cp-surface);
	border-radius: var(--cp-r-card);
}

@media (min-width: 768px) {
	.cp-section--card {
		padding: var(--cp-s6);
	}
}

.cp-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--cp-s3);
	margin-bottom: var(--cp-s4);
}

.cp-section__title {
	display: flex;
	align-items: center;
	gap: var(--cp-s2);
	margin: 0;
	font-size: var(--cp-fs-xl);
	font-weight: 800;
}

@media (min-width: 1024px) {
	.cp-section__title {
		font-size: 1.375rem;
	}
}

.cp-section__icon {
	color: var(--cp-brand);
}

.cp-section__sub {
	margin: 4px 0 0;
	color: var(--cp-muted);
	font-size: var(--cp-fs-sm);
}

.cp-section__more {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	color: var(--cp-muted);
	font-size: var(--cp-fs-sm);
	font-weight: 600;
	white-space: nowrap;
}

.cp-section__more:hover {
	color: var(--cp-brand-dark);
}

/* «Ver todo»: 44 px de toque sin mover la cabecera de la sección. */
@media (max-width: 1023px) {
	.cp-section__more {
		margin-block: -12px;
		padding-block: 12px;
	}
}

/* ─────────────────────────── Precios ─────────────────────────── */

.cp-price,
.price {
	color: var(--cp-ink);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.cp-price del,
.price del {
	color: var(--cp-faint);
	font-weight: 500;
	font-size: 0.8em;
	text-decoration-thickness: 1px;
	margin-right: 4px;
}

.cp-price ins,
.price ins {
	text-decoration: none;
	color: var(--cp-sale);
}

.cp-price--ask {
	color: var(--cp-muted);
	font-weight: 600;
	font-size: var(--cp-fs-sm);
}

.cp-login-price {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--cp-brand-dark);
	font-size: var(--cp-fs-sm);
	font-weight: 700;
	line-height: 1.3;
}

.cp-login-price:hover {
	text-decoration: underline;
}

/* Tarjetas: en escritorio, el texto largo de siempre; en móvil y tableta,
   píldora corta «Ver precio» (una línea también a 360 px). */
.cp-login-price__short {
	display: none;
}

@media (max-width: 1023px) {
	.cp-login-price--card {
		position: relative;
		gap: 5px;
		min-height: 30px;
		padding: 0 12px 0 10px;
		border-radius: var(--cp-r-pill);
		background: var(--cp-brand-soft);
		font-size: var(--cp-fs-xs);
		font-weight: 750;
		line-height: 1;
		white-space: nowrap;
		transition: background var(--cp-fast);
	}
	.cp-login-price--card .cp-icon {
		width: 13px;
		height: 13px;
	}
	.cp-login-price--card:hover {
		background: #d8f0e1;
		text-decoration: none;
	}
	/* Zona de toque de 44 px sin cambiar el tamaño visible. */
	.cp-login-price--card::after {
		content: "";
		position: absolute;
		inset: -7px -4px;
	}
	.cp-login-price--card .cp-login-price__long {
		display: none;
	}
	.cp-login-price--card .cp-login-price__short {
		display: inline;
	}
}

/* ─────────────────────────── Rejillas ─────────────────────────── */

.cp-grid {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 600px) {
	.cp-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}
}

@media (min-width: 900px) {
	.cp-grid--cols-4,
	.cp-grid--cols-5,
	.cp-grid--cols-6 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.cp-grid--cols-5,
	.cp-grid--cols-6 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (min-width: 1440px) {
	.cp-grid--cols-6 {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* ─────────────────────────── Tarjeta de producto ─────────────────────────── */

.cp-card-product {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--cp-surface);
	border-radius: var(--cp-r-card);
	overflow: hidden;
	transition: box-shadow var(--cp-normal) var(--cp-ease), transform var(--cp-normal) var(--cp-ease);
}

@media (hover: hover) {
	.cp-card-product:hover {
		box-shadow: var(--cp-shadow-hover);
		transform: translateY(-2px);
	}
	.cp-card-product:hover .cp-card-product__img {
		transform: scale(1.03);
	}
}

.cp-card-product__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #fff;
	overflow: hidden;
}

.cp-card-product__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.4s var(--cp-ease);
}

.cp-card-product__badges {
	position: absolute;
	top: 8px;
	left: 8px;
	display: flex;
	gap: 4px;
}

.cp-card-product__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px 10px 12px;
}

.cp-card-product__brand {
	align-self: flex-start;
	padding: 1px 7px;
	border-radius: var(--cp-r-xs);
	background: var(--cp-verified-soft);
	color: var(--cp-verified);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.cp-card-product__title {
	margin: 0;
	color: var(--cp-text);
	font-size: var(--cp-fs-sm);
	font-weight: 500;
	line-height: 1.38;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.76em;
}

@media (min-width: 768px) {
	.cp-card-product__title {
		font-size: 0.875rem;
	}
}

.cp-card-product__title a:hover {
	color: var(--cp-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.cp-card-product__price .cp-price {
	font-size: 1.125rem;
}

@media (min-width: 768px) {
	.cp-card-product__price .cp-price {
		font-size: 1.1875rem;
	}
}

.cp-card-product__price .woocommerce-Price-currencySymbol {
	font-size: 0.72em;
	vertical-align: 0.28em;
	margin-right: 1px;
}

.cp-card-product__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	color: var(--cp-muted);
	font-size: var(--cp-fs-xs);
}

.cp-card-product__moq {
	color: var(--cp-text);
	font-weight: 600;
}

/* Lista de ranking («Lo más vendido» de la portada y del carrito vacío) en
   el móvil: puesto, foto, nombre, precio y vendidos en filas, sin tarjetas
   cortadas por el borde del carril. La portada enseña 5; el carrito, 3. */
@media (max-width: 599px) {
	.cp-home-rank .cp-grid--swipe,
	.cp-cart-empty__best .cp-rail__track {
		display: grid;
		grid-auto-flow: row;
		grid-template-columns: minmax(0, 1fr);
		grid-auto-columns: auto;
		gap: 8px;
		overflow: visible;
		margin-inline: 0;
		padding: 0;
	}
	.cp-home-rank .cp-grid--swipe > li:nth-child(n + 6),
	.cp-cart-empty__best .cp-rail__track > li:nth-child(n + 4) {
		display: none;
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-card-product {
		flex-direction: row;
		align-items: center;
		gap: 12px;
		padding: 8px;
		background: var(--cp-surface-alt);
		box-shadow: none;
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-card-product__media {
		flex: none;
		width: 92px;
		border-radius: var(--cp-r-img);
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-card-product__badges {
		top: 5px;
		left: 5px;
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-badge--rank {
		min-width: 26px;
		height: 20px;
		font-size: 11px;
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-card-product__body {
		flex: 1;
		min-width: 0;
		gap: 3px;
		padding: 0 4px 0 0;
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-card-product__brand {
		display: none;
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-card-product__title {
		min-height: 0;
		font-size: var(--cp-fs-sm);
		font-weight: 600;
		color: var(--cp-ink);
	}
	:is(.cp-home-rank, .cp-cart-empty__best) .cp-card-product__price .cp-price {
		font-size: 1.0625rem;
	}
}

/* ─────────────────────────── Carrusel ─────────────────────────── */

.cp-rail {
	position: relative;
}

.cp-rail__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 10px) / 2.25);
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 2px 2px 8px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.cp-rail__track::-webkit-scrollbar {
	display: none;
}

.cp-rail__track > * {
	scroll-snap-align: start;
}

@media (min-width: 600px) {
	.cp-rail__track {
		grid-auto-columns: calc((100% - 36px) / 4);
		gap: 12px;
	}
}

/* Tableta: media tarjeta asomando, para que se vea que el carril se desliza. */
@media (min-width: 600px) and (max-width: 1023px) {
	.cp-rail__track {
		grid-auto-columns: calc((100% - 36px) / 3.5);
	}
}

@media (min-width: 1024px) {
	.cp-rail__track {
		grid-auto-columns: calc((100% - 48px) / 5);
	}
}

@media (min-width: 1440px) {
	.cp-rail__track {
		grid-auto-columns: calc((100% - 60px) / 6);
	}
}

.cp-rail__nav {
	position: absolute;
	top: 36%;
	z-index: 2;
	display: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--cp-line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: var(--cp-shadow-card);
	color: var(--cp-ink);
}

.cp-rail__nav--prev {
	left: -14px;
}

.cp-rail__nav--next {
	right: -14px;
}

@media (hover: hover) and (min-width: 1024px) {
	.cp-rail__nav {
		display: grid;
	}
	.cp-rail__nav[disabled] {
		opacity: 0;
		pointer-events: none;
	}
}

/* ─────────────────────────── Formularios ─────────────────────────── */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
select,
textarea,
.input-text {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1.5px solid var(--cp-line-strong);
	border-radius: var(--cp-r-img);
	background: var(--cp-surface);
	color: var(--cp-ink);
	font-size: 16px; /* evita el zoom de iOS */
	line-height: 1.3;
	transition: border-color var(--cp-fast), box-shadow var(--cp-fast);
	-webkit-appearance: none;
	appearance: none;
}

textarea {
	min-height: 110px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.input-text:focus {
	outline: none;
	border-color: var(--cp-brand);
	box-shadow: 0 0 0 4px rgba(33, 160, 74, 0.14);
}

select {
	padding-right: 38px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

label {
	display: inline-block;
	margin-bottom: 6px;
	color: var(--cp-ink);
	font-size: var(--cp-fs-sm);
	font-weight: 650;
}

/* Selector de cantidad (woocommerce/global/quantity-input.php) */
.cp-qty {
	display: inline-flex;
	align-items: center;
	height: 42px;
	border: 1.5px solid var(--cp-line-strong);
	border-radius: var(--cp-r-pill);
	background: var(--cp-surface);
	overflow: hidden;
}

.cp-qty__btn {
	display: grid;
	place-items: center;
	width: 42px;
	height: 100%;
	border: 0;
	background: transparent;
	color: var(--cp-ink);
	-webkit-tap-highlight-color: transparent;
}

.cp-qty__btn:hover {
	background: var(--cp-surface-alt);
}

.cp-qty__btn[disabled] {
	color: var(--cp-faint);
	pointer-events: none;
}

.cp-qty .qty {
	width: 58px;
	min-height: 0;
	height: 100%;
	padding: 0 2px;
	border: 0;
	border-radius: 0;
	background: transparent;
	text-align: center;
	font-weight: 750;
	font-variant-numeric: tabular-nums;
	-moz-appearance: textfield;
	box-shadow: none !important;
}

.cp-qty .qty::-webkit-outer-spin-button,
.cp-qty .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ─────────────────────────── Avisos de WooCommerce ─────────────────────────── */

.woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.cp-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--cp-s2) var(--cp-s3);
	margin: var(--cp-s4) 0;
	padding: var(--cp-s3) var(--cp-s4);
	border: 0;
	border-radius: var(--cp-r-card);
	background: var(--cp-surface);
	box-shadow: var(--cp-shadow-card);
	color: var(--cp-text);
	font-size: var(--cp-fs-sm);
	list-style: none;
}

.woocommerce-message {
	border-left: 4px solid var(--cp-brand);
}

.woocommerce-info {
	border-left: 4px solid var(--cp-verified);
}

.woocommerce-error {
	border-left: 4px solid var(--cp-sale);
	flex-direction: column;
	align-items: flex-start;
}

.woocommerce-message .button,
.woocommerce-info .button {
	order: 2;
	margin-left: auto;
	min-height: 36px;
	font-size: var(--cp-fs-sm);
}

/* ─────────────────────────── Migas y paginación ─────────────────────────── */

.cp-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: var(--cp-s3) 0;
	color: var(--cp-muted);
	font-size: var(--cp-fs-sm);
}

.cp-breadcrumbs a:hover {
	color: var(--cp-ink);
}

.cp-breadcrumbs__sep {
	color: var(--cp-faint);
}

.woocommerce-pagination ul,
.cp-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: var(--cp-s8) 0 0;
	list-style: none;
}

.woocommerce-pagination .page-numbers:not(ul),
.cp-pagination .page-numbers:not(ul),
.cp-pagination > a,
.cp-pagination > span {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-r-pill);
	background: var(--cp-surface);
	font-weight: 700;
}

.woocommerce-pagination .current,
.cp-pagination .current {
	border-color: var(--cp-ink);
	background: var(--cp-ink);
	color: #fff;
}

/* ─────────────────────────── Estado vacío ─────────────────────────── */

.cp-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--cp-s2);
	padding: var(--cp-s12) var(--cp-s4);
	text-align: center;
}

.cp-empty__icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin-bottom: var(--cp-s2);
	border-radius: 50%;
	background: var(--cp-brand-soft);
	color: var(--cp-brand);
}

.cp-empty__title {
	margin: 0;
	font-size: var(--cp-fs-xl);
}

.cp-empty__text {
	max-width: 420px;
	color: var(--cp-muted);
}

/* ==========================================================================
   CABECERA
   ========================================================================== */

.cp-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--cp-surface);
	transition: box-shadow var(--cp-normal);
}

.admin-bar .cp-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .cp-header {
		top: 0;
	}
}

.cp-header.is-scrolled {
	box-shadow: 0 2px 18px rgba(17, 17, 17, 0.08);
}

/* Barra superior (solo escritorio) */
.cp-topbar {
	display: none;
	border-bottom: 1px solid var(--cp-line);
	color: var(--cp-muted);
	font-size: var(--cp-fs-xs);
}

@media (min-width: 1024px) {
	.cp-topbar {
		display: block;
	}
	.cp-header.is-scrolled .cp-topbar {
		display: none;
	}
}

.cp-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--cp-s4);
	min-height: 36px;
}

.cp-topbar__left,
.cp-topbar__right {
	display: flex;
	align-items: center;
	gap: var(--cp-s5);
}

.cp-topbar__item,
.cp-topbar__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.cp-topbar__item .cp-icon {
	color: var(--cp-brand);
}

.cp-topbar__link:hover {
	color: var(--cp-ink);
}

.cp-topbar__link--chat {
	color: var(--cp-brand-dark);
	font-weight: 700;
}

.cp-topbar__link--app .cp-icon {
	color: var(--cp-brand);
}

/* «Enviar a La Habana · Principal» (cp_deliver_button(), inc/parts/checkout.php):
   una sola línea de 28 px que cabe en la barra sin cambiar su altura y recorta
   con «…» la dirección larga. Abre el selector de direcciones de Escuba. */
/* La izquierda cede el sitio que falte (la píldora recorta); los enlaces, no. */
.cp-topbar__left {
	flex: 1 1 auto;
	min-width: 0;
}

.cp-topbar__right {
	flex: none;
}

.cp-topbar__left > .cp-topbar__item {
	flex: none;
}

.cp-topbar__deliver {
	display: flex;
	flex: 0 1 auto;
	min-width: 0;
}

.cp-deliver {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	max-width: min(340px, 28vw);
	height: 28px;
	margin: 0;
	padding: 0 8px 0 9px;
	border: 1px solid var(--cp-line-strong);
	border-radius: var(--cp-r-pill);
	background: var(--cp-surface);
	color: var(--cp-text);
	font: inherit;
	font-size: var(--cp-fs-xs);
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color var(--cp-fast), background var(--cp-fast);
}

.cp-deliver:hover,
.cp-deliver:focus-visible {
	border-color: rgba(33, 160, 74, 0.55);
	background: var(--cp-brand-soft);
}

.cp-deliver .cp-icon {
	flex: none;
	color: var(--cp-brand);
}

.cp-deliver .cp-deliver__chev {
	color: var(--cp-muted);
}

.cp-deliver__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cp-deliver__label {
	color: var(--cp-muted);
}

.cp-deliver__place {
	color: var(--cp-ink);
	font-weight: 750;
}

.cp-deliver__who {
	color: var(--cp-text);
	font-weight: 600;
}

/* Fila principal */
.cp-masthead__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas:
		"menu logo actions"
		"search search search";
	align-items: center;
	gap: 8px 10px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.cp-masthead__menu {
	grid-area: menu;
	margin-left: -10px;
}

.cp-logo {
	grid-area: logo;
	display: inline-flex;
	align-items: center;
}

.cp-logo picture {
	display: block;
}

/* Ancho y alto vienen del <img> (194×46): con height fijo y width auto no
   salta nada al cargar. La variante clara (pie) ya trae los grises en blanco. */
.cp-logo img {
	width: auto;
	height: 34px;
}

.cp-logo--drawer img {
	height: 30px;
}

@media (min-width: 768px) {
	.cp-masthead__inner {
		grid-template-columns: auto auto 1fr auto;
		grid-template-areas: "menu logo search actions";
		gap: 12px 20px;
		padding-top: 12px;
		padding-bottom: 12px;
	}
	.cp-logo img {
		height: 40px;
	}
}

@media (min-width: 1024px) {
	.cp-masthead__inner {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "logo search actions";
		gap: 32px;
		padding-top: 16px;
		padding-bottom: 16px;
	}
	.cp-masthead__menu {
		display: none;
	}
	.cp-logo img {
		height: 46px;
	}
}

/* Buscador */
.cp-search {
	grid-area: search;
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 760px;
	justify-self: center;
	height: 44px;
	border: 2px solid var(--cp-brand);
	border-radius: var(--cp-r-pill);
	background: var(--cp-surface);
	transition: box-shadow var(--cp-fast);
}

.cp-search:focus-within {
	box-shadow: 0 0 0 4px rgba(33, 160, 74, 0.14);
}

@media (min-width: 1024px) {
	.cp-search {
		height: 48px;
	}
}

.cp-search__icon {
	display: grid;
	place-items: center;
	padding-left: 14px;
	color: var(--cp-muted);
}

.cp-search__input,
.cp-search__input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 100%;
	min-height: 0;
	padding: 0 10px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none !important;
	font-size: 16px;
}

.cp-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.cp-search__submit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: calc(100% - 6px);
	margin-right: 3px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--cp-r-pill);
	background: var(--cp-brand-grad);
	color: #fff;
	font-weight: 750;
}

.cp-search__submit span {
	display: none;
}

@media (min-width: 768px) {
	.cp-search__submit {
		padding: 0 22px;
	}
	.cp-search__submit span {
		display: inline;
	}
	.cp-search__submit-icon {
		display: none;
	}
}

/* Sugerencias */
.cp-search__suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 950;
	max-height: min(70vh, 520px);
	overflow: auto;
	padding: 8px;
	border-radius: var(--cp-r-card);
	background: var(--cp-surface);
	box-shadow: var(--cp-shadow-float);
}

.cp-suggest__label {
	padding: 8px 10px 4px;
	color: var(--cp-muted);
	font-size: var(--cp-fs-xs);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.cp-suggest__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: var(--cp-r-img);
	color: var(--cp-ink);
}

.cp-suggest__item:hover,
.cp-suggest__item.is-active {
	background: var(--cp-surface-alt);
	color: var(--cp-ink);
}

.cp-suggest__thumb {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: var(--cp-r-xs);
	background: #fff;
	object-fit: contain;
	border: 1px solid var(--cp-line);
}

.cp-suggest__name {
	flex: 1;
	min-width: 0;
	font-size: var(--cp-fs-sm);
	line-height: 1.35;
}

.cp-suggest__name mark {
	background: none;
	color: inherit;
	font-weight: 800;
}

.cp-suggest__sku,
.cp-suggest__count {
	color: var(--cp-muted);
	font-size: var(--cp-fs-xs);
}

.cp-suggest__all {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	padding: 10px;
	border-top: 1px solid var(--cp-line);
	color: var(--cp-brand-dark);
	font-weight: 700;
	font-size: var(--cp-fs-sm);
}

/* Accesos (cuenta, pedidos, carrito) */
.cp-actions {
	grid-area: actions;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 2px;
}

.cp-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 4px 8px;
	border-radius: var(--cp-r-img);
	color: var(--cp-ink);
}

.cp-action:hover {
	background: var(--cp-surface-alt);
	color: var(--cp-ink);
}

.cp-action__text {
	display: none;
	flex-direction: column;
	line-height: 1.15;
}

.cp-action__text small {
	color: var(--cp-muted);
	font-size: var(--cp-fs-xs);
}

.cp-action__text strong,
.cp-action__text .cp-cart-total {
	font-size: var(--cp-fs-sm);
	font-weight: 750;
}

.cp-action__icon {
	position: relative;
	display: inline-grid;
}

.cp-cart-count {
	position: absolute;
	top: -6px;
	right: -9px;
	display: grid;
	place-items: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border: 2px solid var(--cp-surface);
	border-radius: var(--cp-r-pill);
	background: var(--cp-sale);
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	line-height: 1;
}

.cp-cart-count.is-empty {
	display: none;
}

.cp-action--orders,
.cp-action--join {
	display: none;
}

@media (min-width: 1024px) {
	.cp-actions {
		gap: 6px;
	}
	.cp-action__text {
		display: inline-flex;
	}
	.cp-action--orders,
	.cp-action--join {
		display: inline-flex;
	}
}

@media (max-width: 767px) {
	.cp-action--account {
		display: none;
	}
}

/* Lupa de la fila de arriba: solo en móvil, con el buscador recogido. */
.cp-action--search {
	display: none;
	justify-content: center;
	width: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	-webkit-tap-highlight-color: transparent;
}

/* ─────────── Cabecera recogible (móvil y tableta, main.js) ───────────
   .is-collapsed: la cabecera sube --cp-hc px (buscador + píldoras) y la fila
   menú · logo · carrito baja lo mismo, tapada por su propio fondo
   (::before), así que no se mueve y lo recogido queda escondido debajo. El
   alto de la cabecera en el flujo no cambia: el contenido no salta. */
@media (max-width: 1023px) {
	.cp-header {
		transition: transform var(--cp-normal) var(--cp-ease), box-shadow var(--cp-normal);
		will-change: transform;
	}
	.cp-masthead__inner {
		position: relative;
	}
	.cp-masthead__inner::before {
		content: "";
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		z-index: 1;
		height: var(--cp-top-h, 60px);
		background: var(--cp-surface);
		pointer-events: none;
	}
	.cp-masthead__menu,
	.cp-masthead__inner > .cp-logo,
	.cp-actions {
		position: relative;
		z-index: 2;
	}
	.cp-masthead__inner::before,
	.cp-masthead__menu,
	.cp-masthead__inner > .cp-logo,
	.cp-actions {
		transition: transform var(--cp-normal) var(--cp-ease);
	}
	.cp-header.is-collapsed {
		transform: translate3d(0, calc(-1 * var(--cp-hc, 0px)), 0);
	}
	.cp-header.is-collapsed .cp-masthead__inner::before,
	.cp-header.is-collapsed .cp-masthead__menu,
	.cp-header.is-collapsed .cp-masthead__inner > .cp-logo,
	.cp-header.is-collapsed .cp-actions {
		transform: translate3d(0, var(--cp-hc, 0px), 0);
	}
	/* Lo recogido se apaga y, al terminar, deja de poder enfocarse. */
	.cp-chipbar {
		transition: opacity 0.18s ease, visibility 0s;
	}
	.cp-header.is-collapsed .cp-chipbar {
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.18s ease, visibility 0s linear var(--cp-normal);
	}
}

/* Tableta: el buscador va en la fila de arriba, se queda con ella. */
@media (min-width: 768px) and (max-width: 1023px) {
	.cp-masthead__inner > .cp-search {
		z-index: 2;
		transition: transform var(--cp-normal) var(--cp-ease), box-shadow var(--cp-fast);
	}
	.cp-header.is-collapsed .cp-masthead__inner > .cp-search {
		transform: translate3d(0, var(--cp-hc, 0px), 0);
	}
}

@media (max-width: 767px) {
	.cp-masthead__inner > .cp-search {
		transition: opacity 0.18s ease, visibility 0s, box-shadow var(--cp-fast);
	}
	.cp-header.is-collapsed .cp-masthead__inner > .cp-search {
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.18s ease, visibility 0s linear var(--cp-normal);
	}
	.cp-action--search {
		display: inline-flex;
		opacity: 0;
		visibility: hidden;
		transform: scale(0.8);
		transition: opacity 0.18s ease, transform 0.18s var(--cp-ease), visibility 0s linear 0.18s;
	}
	.cp-header.is-collapsed .cp-action--search {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity 0.18s ease, transform 0.18s var(--cp-ease), visibility 0s;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cp-header,
	.cp-header *,
	.cp-header *::before {
		transition: none !important;
	}
}

/* Barra de categorías (escritorio) */
.cp-catbar {
	display: none;
	border-top: 1px solid var(--cp-line);
	border-bottom: 1px solid var(--cp-line);
	background: var(--cp-surface);
}

@media (min-width: 1024px) {
	.cp-catbar {
		display: block;
	}
}

.cp-catbar__inner {
	display: flex;
	align-items: center;
	gap: var(--cp-s4);
	min-height: 48px;
}

.cp-catbar__links {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}

.cp-catbar__links::-webkit-scrollbar {
	display: none;
}

.cp-catbar__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 12px;
	border-radius: var(--cp-r-pill);
	color: var(--cp-text);
	font-size: var(--cp-fs-sm);
	font-weight: 650;
	white-space: nowrap;
}

.cp-catbar__link:hover {
	background: var(--cp-surface-alt);
	color: var(--cp-ink);
}

.cp-catbar__link .cp-icon {
	color: var(--cp-muted);
}

.cp-catbar__link.is-hot,
.cp-catbar__link.is-hot .cp-icon {
	color: var(--cp-accent);
}

/* Megamenú */
.cp-mega {
	position: relative;
}

.cp-mega__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--cp-r-pill);
	background: var(--cp-ink);
	color: #fff;
	font-weight: 700;
	font-size: var(--cp-fs-sm);
}

.cp-mega__toggle[aria-expanded="true"] .cp-icon--chevron-down {
	transform: rotate(180deg);
}

.cp-mega__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 960;
	width: min(1100px, calc(100vw - 48px));
	border-radius: var(--cp-r-lg);
	background: var(--cp-surface);
	box-shadow: var(--cp-shadow-float);
	overflow: hidden;
	animation: cp-pop var(--cp-normal) var(--cp-ease);
}

@keyframes cp-pop {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.cp-megamenu {
	display: grid;
	grid-template-columns: 260px 1fr;
	min-height: 420px;
	max-height: min(70vh, 620px);
}

.cp-megamenu__rail {
	list-style: none;
	padding: 8px;
	background: var(--cp-surface-alt);
	overflow-y: auto;
}

.cp-megamenu__root {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	border-radius: var(--cp-r-img);
	color: var(--cp-text);
	font-size: var(--cp-fs-sm);
	font-weight: 600;
}

.cp-megamenu__root .cp-icon {
	color: var(--cp-faint);
}

.cp-megamenu__root.is-active,
.cp-megamenu__root:hover {
	background: var(--cp-surface);
	color: var(--cp-ink);
	box-shadow: var(--cp-shadow-card);
}

.cp-megamenu__root.is-active .cp-icon {
	color: var(--cp-brand);
}

.cp-megamenu__panels {
	padding: 20px 24px;
	overflow-y: auto;
}

.cp-megamenu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.cp-megamenu__head h3 {
	margin: 0;
	font-size: var(--cp-fs-lg);
}

.cp-megamenu__head a {
	display: inline-flex;
	align-items: center;
	color: var(--cp-brand-dark);
	font-size: var(--cp-fs-sm);
	font-weight: 700;
}

.cp-megamenu__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
	gap: 16px 12px;
	list-style: none;
}

.cp-megamenu__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

.cp-megamenu__thumb {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--cp-surface-alt);
	overflow: hidden;
	color: var(--cp-brand-dark);
	font-weight: 800;
	font-size: 1.25rem;
	transition: transform var(--cp-normal) var(--cp-ease), box-shadow var(--cp-normal);
}

.cp-megamenu__thumb.is-empty {
	background: var(--cp-brand-soft);
}

.cp-megamenu__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cp-megamenu__item:hover .cp-megamenu__thumb {
	transform: translateY(-2px);
	box-shadow: var(--cp-shadow-hover);
}

.cp-megamenu__name {
	color: var(--cp-text);
	font-size: var(--cp-fs-xs);
	font-weight: 600;
	line-height: 1.3;
}

.cp-megamenu__grid--brands {
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.cp-megamenu__brand {
	display: grid;
	place-items: center;
	height: 80px;
	padding: 12px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-r-card);
	background: #fff;
	font-weight: 800;
}

.cp-megamenu__brand img {
	max-height: 48px;
	width: auto;
	object-fit: contain;
}

.cp-megamenu__brand:hover {
	border-color: var(--cp-brand);
}

/* Chips de categorías (móvil y tableta) */
.cp-chipbar {
	border-top: 1px solid var(--cp-line);
	background: var(--cp-surface);
}

@media (min-width: 1024px) {
	.cp-chipbar {
		display: none;
	}
}

.cp-chipbar__track {
	display: flex;
	gap: 8px;
	padding: 6px var(--cp-gutter);
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	scroll-padding-inline: var(--cp-gutter);
}

.cp-chipbar__track::-webkit-scrollbar {
	display: none;
}

.cp-chipbar .cp-chip {
	height: 36px;
	padding: 0 14px;
	border-color: transparent;
	background: var(--cp-surface-alt);
}

.cp-chipbar .cp-chip.is-active {
	border-color: var(--cp-ink);
	background: var(--cp-surface);
}

/* ==========================================================================
   PIE
   ========================================================================== */

.cp-trust {
	margin-top: var(--cp-s10);
	background: var(--cp-surface);
	border-top: 1px solid var(--cp-line);
}

.cp-trust__inner {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	padding-top: 24px;
	padding-bottom: 24px;
}

@media (min-width: 1024px) {
	.cp-trust__inner {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 24px;
	}
}

.cp-trust__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

/* «Ayuda en el chat» es un enlace: abre el chat del asistente. */
a.cp-trust__item {
	color: inherit;
	text-decoration: none;
}

a.cp-trust__item:hover strong {
	color: var(--cp-brand-dark);
}

.cp-trust__item > .cp-icon {
	flex: none;
	width: 44px;
	height: 44px;
	padding: 10px;
	border-radius: 50%;
	background: var(--cp-brand-soft);
	color: var(--cp-brand);
}

.cp-trust__item strong {
	display: block;
	color: var(--cp-ink);
	font-size: var(--cp-fs-sm);
	font-weight: 750;
}

.cp-trust__item span {
	display: block;
	color: var(--cp-muted);
	font-size: var(--cp-fs-xs);
}

.cp-footer {
	background: #121813;
	color: rgba(255, 255, 255, 0.72);
	font-size: var(--cp-fs-sm);
}

.cp-footer__inner {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 20px;
	padding-top: 40px;
	padding-bottom: 32px;
}

.cp-footer__brand,
.cp-footer__apps {
	grid-column: 1 / -1;
}

@media (min-width: 768px) {
	.cp-footer__inner {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.cp-footer__inner {
		grid-template-columns: 1.6fr repeat(4, 1fr) 1.3fr;
		gap: 32px;
	}
	.cp-footer__brand,
	.cp-footer__apps {
		grid-column: auto;
	}
}

.cp-footer__brand p {
	max-width: 360px;
	margin: 14px 0;
	line-height: 1.6;
}

.cp-footer__chat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #7be29b;
	font-weight: 750;
}

.cp-footer__chat:hover {
	color: #a6efbc;
}

.cp-footer__title {
	margin: 0 0 12px;
	color: #fff;
	font-size: var(--cp-fs-sm);
	font-weight: 750;
	letter-spacing: 0.02em;
}

.cp-footer__title--pay {
	margin-top: 20px;
}

.cp-footer__links {
	display: grid;
	gap: 9px;
	list-style: none;
}

.cp-footer__links a:hover {
	color: #fff;
}

.cp-store-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 8px 8px 0;
	padding: 8px 14px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--cp-r-img);
	color: #fff;
	line-height: 1.15;
}

.cp-store-badge small {
	display: block;
	color: rgba(255, 255, 255, 0.6);
	font-size: 10.5px;
}

.cp-store-badge span {
	font-weight: 750;
}

.cp-store-badge:hover {
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
}

.cp-paychips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
}

.cp-paychips li {
	padding: 5px 10px;
	border-radius: var(--cp-r-pill);
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.86);
	font-size: var(--cp-fs-xs);
	font-weight: 600;
}

.cp-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 16px 0;
	font-size: var(--cp-fs-xs);
	color: rgba(255, 255, 255, 0.5);
}

.cp-footer__bottom p {
	margin: 0;
}

/* Espacio para la barra inferior en móvil */
@media (max-width: 1023px) {
	body {
		padding-bottom: calc(var(--cp-bottomnav-h) + env(safe-area-inset-bottom));
	}
}

/* ==========================================================================
   BARRA INFERIOR (móvil y tableta, como la app)
   ========================================================================== */

.cp-bottomnav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 920;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	height: calc(var(--cp-bottomnav-h) + env(safe-area-inset-bottom));
	padding-bottom: env(safe-area-inset-bottom);
	border-top: 1px solid var(--cp-line);
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: saturate(1.6) blur(10px);
	-webkit-backdrop-filter: saturate(1.6) blur(10px);
}

@media (min-width: 1024px) {
	.cp-bottomnav {
		display: none;
	}
}

.cp-bottomnav__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border: 0;
	background: transparent;
	color: var(--cp-muted);
	font-size: 11px;
	font-weight: 600;
	-webkit-tap-highlight-color: transparent;
}

.cp-bottomnav__item .cp-icon {
	width: 24px;
	height: 24px;
}

.cp-bottomnav__item.is-active {
	color: var(--cp-brand);
}

.cp-bottomnav__icon {
	position: relative;
	display: inline-grid;
}

/* Contador de mensajes sin leer del chat (main.js lo copia del asistente). */
.cp-bottomnav__item[data-cp-chat] {
	position: relative;
}

.cp-chat-count {
	position: absolute;
	top: 5px;
	left: calc(50% + 3px);
	display: grid;
	place-items: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border: 2px solid var(--cp-surface);
	border-radius: var(--cp-r-pill);
	background: var(--cp-sale);
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.cp-chat-count[hidden] {
	display: none;
}

.cp-pdp-bar__icon .cp-chat-count {
	top: 2px;
	left: calc(50% + 2px);
}

/* Con la barra inferior (o la de la ficha) a la vista, el chat se abre desde
   «Mensajes»: el botón flotante del asistente sobra y tapaba contenido. El
   panel del chat no cambia. */
@media (max-width: 1023px) {
	#asa-root .asa-launcher {
		display: none !important;
	}
}

/* ==========================================================================
   CAJONES (categorías móvil, mini-carrito)
   ========================================================================== */

.cp-drawer {
	position: fixed;
	inset: 0;
	z-index: 1000;
}

.cp-drawer[hidden] {
	display: none;
}

/* La franja de página que queda a la vista: al tocarla se cierra el cajón. */
.cp-drawer__overlay {
	position: absolute;
	inset: 0;
	background: var(--cp-scrim);
	opacity: calc(1 - var(--cp-drag, 0));
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
	animation: cp-fade var(--cp-normal) var(--cp-ease);
}

@keyframes cp-fade {
	from {
		opacity: 0;
	}
}

/* Como mucho el 84 % del ancho: siempre queda a la vista una franja (≥ 16 %). */
.cp-drawer__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(84vw, 440px);
	background: var(--cp-surface);
	box-shadow: var(--cp-shadow-float);
	touch-action: pan-y;
}

.cp-drawer--left .cp-drawer__panel {
	left: 0;
	animation: cp-slide-left var(--cp-normal) var(--cp-ease);
}

.cp-drawer--right .cp-drawer__panel {
	right: 0;
	width: min(420px, 92vw);
	animation: cp-slide-right var(--cp-normal) var(--cp-ease);
}

@keyframes cp-slide-left {
	from {
		transform: translateX(-100%);
	}
}

@keyframes cp-slide-right {
	from {
		transform: translateX(100%);
	}
}

/* Al cerrar (X, franja, Esc o al deslizar) sale por donde entró. */
.cp-drawer.is-closing .cp-drawer__overlay {
	animation: cp-fade-out 0.2s var(--cp-ease) forwards;
}

.cp-drawer--left.is-closing .cp-drawer__panel {
	animation: cp-slide-left-out 0.2s var(--cp-ease) forwards;
}

.cp-drawer--right.is-closing .cp-drawer__panel {
	animation: cp-slide-right-out 0.2s var(--cp-ease) forwards;
}

@keyframes cp-fade-out {
	to {
		opacity: 0;
	}
}

@keyframes cp-slide-left-out {
	to {
		transform: translateX(-100%);
	}
}

@keyframes cp-slide-right-out {
	to {
		transform: translateX(100%);
	}
}

/* Arrastrando con el dedo: sigue al dedo, sin animación. */
.cp-drawer__panel.is-dragging {
	transition: none;
	will-change: transform;
}

.cp-drawer__panel.is-settling {
	transition: transform 0.18s var(--cp-ease);
}

.cp-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 8px 10px 20px;
	border-bottom: 1px solid var(--cp-line);
}

.cp-drawer__head h2 {
	margin: 0;
	font-size: var(--cp-fs-lg);
}

.cp-drawer__body {
	flex: 1;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 8px 0;
	overscroll-behavior: contain;
	/* Dentro de lo que se desplaza, el gesto horizontal es para cerrar el cajón. */
	touch-action: pan-y;
}

body.cp-no-scroll {
	overflow: hidden;
}

/* ─────────── Cajón de categorías (como la pestaña Categorías de la app) ─────────── */

#cp-drawer-categories .cp-drawer__head {
	flex: none;
	min-height: 56px;
	padding: 6px 4px 6px 16px;
}

#cp-drawer-categories .cp-drawer__close {
	flex: none;
}

.cp-drawer__body--cats {
	display: flex;
	min-height: 0;
	padding: 0;
	overflow: hidden;
}

.cp-cats {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	flex: 1;
	min-width: 0;
	min-height: 0;
}

@media (min-width: 400px) {
	.cp-cats {
		grid-template-columns: 92px minmax(0, 1fr);
	}
}

/* Columna izquierda: las categorías principales. */
.cp-cats__rail {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding-bottom: 16px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--cp-bg);
	scrollbar-width: none;
	touch-action: pan-y;
}

.cp-cats__rail::-webkit-scrollbar {
	display: none;
}

.cp-cats__tab {
	position: relative;
	display: flex;
	flex: none;
	align-items: center;
	width: 100%;
	min-height: 60px;
	padding: 8px 6px 8px 10px;
	border: 0;
	background: transparent;
	color: var(--cp-text);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.22;
	text-align: left;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--cp-fast), color var(--cp-fast);
}

.cp-cats__tab span {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	hyphens: manual;
	-webkit-hyphens: manual;
}

.cp-cats__tab[aria-selected="true"] {
	background: var(--cp-surface);
	color: var(--cp-ink);
	font-weight: 750;
}

/* La barra verde del elegido. */
.cp-cats__tab[aria-selected="true"]::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 3px;
	height: 24px;
	border-radius: 0 3px 3px 0;
	background: var(--cp-brand);
	transform: translateY(-50%);
}

.cp-cats__tab:focus-visible {
	outline: 2px solid var(--cp-brand);
	outline-offset: -2px;
	border-radius: 0;
}

/* Derecha: la categoría elegida. */
.cp-cats__panels {
	min-width: 0;
	min-height: 0;
	padding: 10px 10px 24px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--cp-surface);
	touch-action: pan-y;
}

.cp-cats__panel[hidden] {
	display: none;
}

.cp-cats__panel {
	animation: cp-fade var(--cp-fast) var(--cp-ease);
}

.cp-cats__hero {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 92px;
	padding: 12px 10px 10px 14px;
	overflow: hidden;
	border-radius: var(--cp-r-card);
	background: linear-gradient(135deg, var(--cp-brand-soft) 0%, #f6faf7 100%);
	color: var(--cp-ink);
	-webkit-tap-highlight-color: transparent;
}

a.cp-cats__hero:hover {
	color: var(--cp-ink);
}

/* Sin foto: la marca de agua de la app (un aro verde muy suave). */
.cp-cats__hero.is-plain::after {
	content: "";
	position: absolute;
	right: -22px;
	bottom: -30px;
	width: 104px;
	height: 104px;
	border: 18px solid rgba(33, 160, 74, 0.1);
	border-radius: 50%;
	pointer-events: none;
}

.cp-cats__hero-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
}

.cp-cats__hero-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: var(--cp-fs-md);
	font-weight: 800;
	line-height: 1.2;
}

.cp-cats__hero-sub {
	color: var(--cp-muted);
	font-size: var(--cp-fs-xs);
}

.cp-cats__all {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	height: 28px;
	margin-top: 6px;
	padding: 0 6px 0 12px;
	border: 1px solid rgba(33, 160, 74, 0.22);
	border-radius: var(--cp-r-pill);
	background: var(--cp-surface);
	color: var(--cp-brand-dark);
	font-size: var(--cp-fs-xs);
	font-weight: 750;
	white-space: nowrap;
}

.cp-cats__hero-thumb {
	display: grid;
	flex: none;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 4px;
	border-radius: var(--cp-r-card);
	background: var(--cp-surface);
	box-shadow: var(--cp-shadow-card);
}

@media (min-width: 400px) {
	.cp-cats__hero-thumb {
		width: 64px;
		height: 64px;
	}
}

.cp-cats__hero-thumb img {
	width: 100%;
	height: 100%;
	border-radius: 8px;
	object-fit: contain;
}

.cp-cats__label {
	margin: 16px 2px 10px;
	color: var(--cp-ink);
	font-size: var(--cp-fs-sm);
	font-weight: 750;
}

.cp-cats__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
	gap: 14px 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cp-cats__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 0;
	padding: 2px 0;
	color: var(--cp-text);
	text-align: center;
	-webkit-tap-highlight-color: transparent;
}

.cp-cats__item:active .cp-cats__thumb {
	transform: scale(0.94);
}

.cp-cats__thumb {
	position: relative;
	display: grid;
	place-items: center;
	width: min(56px, 100%);
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 50%;
	background: var(--cp-surface-alt);
	color: var(--cp-brand-dark);
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0.02em;
	transition: transform var(--cp-fast) var(--cp-ease);
}

/* Borde por encima de la foto: las de fondo blanco no se pierden. */
.cp-cats__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid var(--cp-line);
	border-radius: 50%;
	pointer-events: none;
}

.cp-cats__thumb.is-empty {
	background: var(--cp-brand-soft);
}

.cp-cats__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cp-cats__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	max-width: 100%;
	overflow: hidden;
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.22;
	overflow-wrap: anywhere;
}

/* Marcas: logo en tarjeta, dos por fila. */
.cp-cats__grid--brands {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-top: 12px;
}

.cp-cats__brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 8px;
	border: 1px solid var(--cp-line);
	border-radius: var(--cp-r-card);
	color: var(--cp-ink);
	text-align: center;
}

.cp-cats__logo {
	display: grid;
	place-items: center;
	width: 100%;
	height: 48px;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.cp-cats__logo.is-empty {
	border-radius: var(--cp-r-img);
	background: var(--cp-surface-alt);
}

.cp-cats__logo img {
	max-width: 100%;
	max-height: 48px;
	width: auto;
	object-fit: contain;
}

.cp-cats__brand .cp-cats__name {
	font-weight: 700;
}

/* Celulares: sus marcas con el logo a lo ancho (miniaturas cuadradas con el
   logo en medio: se recortan arriba y abajo) y los modelos con stock. */
.cp-cats__grid--phones .cp-cats__logo {
	position: relative;
	overflow: hidden;
	border-radius: var(--cp-r-img);
}

.cp-cats__grid--phones .cp-cats__logo img {
	position: absolute;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	object-fit: cover;
}

.cp-cats__count {
	margin-top: -4px;
	color: var(--cp-muted);
	font-size: 11px;
	line-height: 1.2;
}

/* «Descarga la app» (inc/parts/app-promo.php): abajo y discreto, una línea. */
#cp-drawer-categories .cp-appdrawer {
	gap: 10px;
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) 16px;
	border-top: 1px solid var(--cp-line);
	background: var(--cp-surface);
}

#cp-drawer-categories .cp-appdrawer__icon {
	width: 28px;
	height: 28px;
	border-radius: 7px;
}

#cp-drawer-categories .cp-appdrawer__txt strong {
	color: var(--cp-text);
	font-size: 12.5px;
	font-weight: 650;
	line-height: 1.25;
}

#cp-drawer-categories .cp-appdrawer__txt small {
	display: none;
}

#cp-drawer-categories .cp-appdrawer__go {
	height: 30px;
	padding: 0 10px;
	border: 1px solid rgba(33, 160, 74, 0.3);
	background: transparent;
	color: var(--cp-brand-dark);
	font-size: var(--cp-fs-xs);
}

/* Móvil (< 768 px): los avisos de WooCommerce del catálogo y la ficha («Añadido
   al carrito»…), una banda a todo el ancho, como el resto de la página. */
@media (max-width: 767px) {
	.cp-main--shop .woocommerce-notices-wrapper > *,
	.cp-main--product .woocommerce-notices-wrapper > * {
		margin-right: calc(-1 * var(--cp-gutter));
		margin-left: calc(-1 * var(--cp-gutter));
		border-radius: 0;
		box-shadow: none;
	}
}

/* ==========================================================================
   VARIOS
   ========================================================================== */

/* WebView de la app: Escuba marca is-webview; el tema esconde su cromo. */
.is-webview .cp-header,
.is-webview .cp-trust,
.is-webview .cp-footer,
.is-webview .cp-bottomnav {
	display: none !important;
}

.is-webview {
	padding-bottom: 0 !important;
}

/* Página de una columna de texto */
.cp-prose {
	max-width: 820px;
	color: var(--cp-text);
	font-size: 1rem;
	line-height: 1.7;
}

.cp-prose h2 {
	margin-top: var(--cp-s8);
	font-size: var(--cp-fs-xl);
}

.cp-prose h3 {
	margin-top: var(--cp-s6);
	font-size: var(--cp-fs-lg);
}

.cp-prose ul,
.cp-prose ol {
	margin: 0 0 var(--cp-s4) var(--cp-s6);
}

.cp-prose li + li {
	margin-top: 6px;
}

.cp-prose a {
	color: var(--cp-brand-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cp-prose table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--cp-s4) 0;
	font-size: var(--cp-fs-sm);
}

.cp-prose th,
.cp-prose td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--cp-line);
	text-align: left;
}

.cp-page-title {
	margin: var(--cp-s4) 0 var(--cp-s5);
	font-size: var(--cp-fs-3xl);
	font-weight: 800;
}

/* Avisos de WooCommerce: sin los iconos ::before de woocommerce.css (checkout y
   Mi cuenta) ni el anillo de foco cuando WooCommerce los enfoca por JS. */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	content: none !important;
	display: none !important;
}

.woocommerce-notices-wrapper [tabindex="-1"]:focus,
.woocommerce-NoticeGroup [tabindex="-1"]:focus,
.woocommerce-error[tabindex="-1"]:focus,
.woocommerce-message[tabindex="-1"]:focus,
.woocommerce-info[tabindex="-1"]:focus {
	outline: none;
}
