/* ==========================================================================
   Candelé · marca.css — LA única fuente de la marca (tienda y panel). Celular primero.
   Úsenla con <link rel="stylesheet" href="/core/marca.css"> y pongan encima solo lo propio de cada página.
   Nada de colores sueltos en otros CSS: usen los tokens (var(--vino), var(--crema-2)...).

   1. Fuentes y tokens · 2. Base · 3. Tipografía y utilidades · 4. Botones · 5. Chips, sellos y burbujas
   6. Precio y estrellas · 7. Tarjetas (genérica, producto, categoría) · 8. Formularios · 9. Hojas inferiores y paneles
   10. Avisos (toast) y cargando · 11. Barra inferior del celular · 12. Tablas y estados (panel)
   ========================================================================== */

/* 1. Fuentes y tokens ------------------------------------------------------ */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..800&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@500&display=swap");

:root {
	/* Colores de la marca */
	--crema: #f8e9c9;          /* fondo */
	--crema-2: #fdf5e6;        /* tarjetas */
	--durazno: #efbea6;
	--rosa-palo: #fedcc2;
	--vino: #8a1410;           /* marca, botones */
	--vino-osc: #3a0a08;       /* texto */
	--cafe: #6e4a42;           /* texto secundario */
	--linea: rgba(58, 10, 8, .12);
	--linea-fuerte: rgba(58, 10, 8, .24);
	--wa: #25d366;
	--wa-texto: #06331a;
	--blanco-calido: #fffaf1;  /* campos */
	/* Estados (contraste AA sobre su fondo) */
	--ok: #29461a;       --ok-fondo: #e6efd9;      --ok-borde: #c9dbb4;
	--alerta: #6b4300;   --alerta-fondo: #fbe8bf;  --alerta-borde: #ecc97a;
	--error: #8a1410;    --error-fondo: #fde0d6;   --error-borde: #efb3a1;
	--info: #24406b;     --info-fondo: #e1e9f5;    --info-borde: #b9cbe6;

	/* Tipos */
	--f-titulo: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
	--f-texto: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
	--f-serif: "Instrument Serif", "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	/* Formas */
	--r-xs: 10px;
	--r-sm: 14px;
	--r: 18px;
	--r-lg: 22px;
	--r-pill: 999px;

	/* Espacios y medidas */
	--gutter: 16px;
	--max: 1320px;
	--alto-cabecera: 64px;
	--alto-menu: 64px;          /* barra inferior del celular (0 en escritorio) */
	--seguro-abajo: env(safe-area-inset-bottom, 0px);
	--e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px; --e-5: 24px; --e-6: 32px; --e-7: 48px; --e-8: 64px;

	/* Sombras y movimiento */
	--sombra-1: 0 1px 2px rgba(58, 10, 8, .06), 0 4px 14px rgba(58, 10, 8, .06);
	--sombra-2: 0 10px 40px rgba(58, 10, 8, .16);
	--sombra-3: 0 24px 80px rgba(58, 10, 8, .28);
	--curva: cubic-bezier(.2, .7, .2, 1);
	--rapido: .18s;
	--medio: .32s;

	/* Proporción de las fotos de producto */
	--foto-producto: 4 / 5;

	color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 28px; } }
@media (min-width: 1024px) { :root { --alto-cabecera: 80px; --alto-menu: 0px; } }
@media (min-width: 1280px) { :root { --gutter: 40px; } }

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--alto-cabecera) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	min-height: 100dvh;
	background: var(--crema);
	color: var(--vino-osc);
	font-family: var(--f-texto);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
body.con-menu { padding-bottom: calc(var(--alto-menu) + var(--seguro-abajo)); }
body.sin-scroll { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--vino); }
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-family: var(--f-titulo);
	font-weight: 800;
	font-stretch: 88%;
	line-height: 1.04;
	letter-spacing: -.02em;
	color: var(--vino-osc);
	text-wrap: balance;
}
h1 { font-size: clamp(36px, 9vw, 64px); }
h2 { font-size: clamp(28px, 7vw, 46px); }
h3 { font-size: clamp(20px, 5vw, 26px); }
p { margin: 0 0 1em; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--vino); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--durazno); color: var(--vino-osc); }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--linea); margin: var(--e-5) 0; }

/* 3. Tipografía y utilidades ---------------------------------------------- */
.contenedor { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.contenedor--estrecho { max-width: 820px; }
.seccion { padding-block: 48px; }
@media (min-width: 1024px) { .seccion { padding-block: 80px; } }

.etiqueta {
	display: inline-block;
	margin-bottom: .85em;
	font-family: var(--f-mono);
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--cafe);
	text-decoration: none;
}
.etiqueta--clara { color: var(--rosa-palo); }
.acento {
	font-family: var(--f-serif);
	font-style: italic;
	font-weight: 400;
	font-stretch: 100%;
	letter-spacing: -.005em;
	color: var(--vino);
	padding-right: .04em;
}
.texto-suave { color: var(--cafe); }
.texto-chico { font-size: 14px; }
.centro { text-align: center; }
.numeros { font-variant-numeric: tabular-nums; }
.visualmente-oculto {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.saltar-contenido {
	position: fixed; top: 8px; left: 8px; z-index: 1000;
	padding: 12px 18px; border-radius: var(--r-pill);
	background: var(--vino-osc); color: var(--crema); font-weight: 700; text-decoration: none;
	transform: translateY(-160%); transition: transform var(--rapido);
}
.saltar-contenido:focus { transform: none; color: var(--crema); }
.pila { display: grid; gap: var(--e-3); }
.fila { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2); }
.fila--entre { justify-content: space-between; }
.rejilla { display: grid; gap: var(--e-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e-5); } }
@media (min-width: 1200px) { .rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.desliza {
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 70vw); gap: var(--e-3);
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
	-webkit-overflow-scrolling: touch;
}
.desliza > * { scroll-snap-align: start; }
.desliza::-webkit-scrollbar { display: none; }
@media (max-width: 1023.98px) { .solo-escritorio { display: none !important; } }
@media (min-width: 1024px) { .solo-movil { display: none !important; } }
.icono { width: 22px; height: 22px; }

/* 4. Botones -------------------------------------------------------------- */
.boton {
	--b-fondo: var(--vino);
	--b-color: var(--crema-2);
	--b-borde: var(--vino);
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 50px; padding: 0 24px;
	border: 1.5px solid var(--b-borde); border-radius: var(--r-pill);
	background: var(--b-fondo); color: var(--b-color);
	font-family: var(--f-texto); font-size: 15px; font-weight: 650; line-height: 1.1; letter-spacing: .005em;
	text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color var(--rapido), color var(--rapido), border-color var(--rapido), transform var(--rapido), box-shadow var(--rapido);
	-webkit-tap-highlight-color: transparent;
}
.boton:hover { --b-fondo: var(--vino-osc); --b-borde: var(--vino-osc); color: var(--b-color); }
.boton:active { transform: scale(.98); }
.boton .icono { width: 20px; height: 20px; }
.boton--oscuro { --b-fondo: var(--vino-osc); --b-color: var(--crema); --b-borde: var(--vino-osc); }
.boton--oscuro:hover { --b-fondo: var(--vino); --b-borde: var(--vino); }
.boton--borde { --b-fondo: transparent; --b-color: var(--vino-osc); --b-borde: var(--vino-osc); }
.boton--borde:hover { --b-fondo: var(--vino-osc); --b-color: var(--crema); --b-borde: var(--vino-osc); }
.boton--claro { --b-fondo: var(--crema-2); --b-color: var(--vino); --b-borde: var(--crema-2); }
.boton--claro:hover { --b-fondo: var(--blanco-calido); --b-color: var(--vino-osc); --b-borde: var(--blanco-calido); }
.boton--suave { --b-fondo: var(--rosa-palo); --b-color: var(--vino-osc); --b-borde: var(--rosa-palo); }
.boton--suave:hover { --b-fondo: var(--durazno); --b-color: var(--vino-osc); --b-borde: var(--durazno); }
.boton--wa { --b-fondo: var(--wa); --b-color: var(--wa-texto); --b-borde: var(--wa); }
.boton--wa:hover { --b-fondo: #1fbe5b; --b-color: var(--wa-texto); --b-borde: #1fbe5b; }
.boton--peligro { --b-fondo: transparent; --b-color: var(--error); --b-borde: var(--error-borde); }
.boton--peligro:hover { --b-fondo: var(--error-fondo); --b-color: var(--error); --b-borde: var(--error); }
.boton--grande { min-height: 56px; padding: 0 28px; font-size: 16px; }
.boton--chico { min-height: 44px; padding: 0 18px; font-size: 14px; }
.boton--ancho { width: 100%; }
.boton[disabled], .boton[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.boton.is-cargando { pointer-events: none; color: transparent; position: relative; }
.boton.is-cargando::after {
	content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
	border: 2.5px solid var(--b-color); border-right-color: transparent; animation: gira .7s linear infinite;
}

.boton-icono {
	display: inline-grid; place-items: center; position: relative;
	width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: var(--vino-osc); text-decoration: none;
	transition: background-color var(--rapido), color var(--rapido);
	-webkit-tap-highlight-color: transparent;
}
.boton-icono:hover { background: rgba(58, 10, 8, .07); color: var(--vino); }
.boton-icono--claro { color: var(--crema); background: rgba(253, 245, 230, .08); }
.boton-icono--claro:hover { color: var(--vino-osc); background: var(--crema); }
.boton-icono--fondo { background: var(--crema-2); box-shadow: var(--sombra-1); }
.boton-icono--chico { width: 36px; height: 36px; }
.boton-icono--chico .icono { width: 18px; height: 18px; }

.enlace-boton {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
	padding: 0; border: 0; background: none; color: var(--vino);
	font-weight: 600; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; cursor: pointer;
}
.enlace-flecha { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap; }
.enlace-flecha .icono { width: 18px; height: 18px; transition: transform var(--rapido); }
.enlace-flecha:hover .icono { transform: translateX(4px); }

/* Selector de talla: botones redondos; .is-agotada tachada (sigue siendo clicable para "avísame") */
.tallas { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.talla {
	position: relative; display: inline-grid; place-items: center;
	min-width: 56px; height: 52px; padding: 0 14px;
	border: 1.5px solid var(--linea-fuerte); border-radius: var(--r-sm);
	background: var(--crema-2); color: var(--vino-osc);
	font-family: var(--f-mono); font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
	cursor: pointer; transition: border-color var(--rapido), background-color var(--rapido), color var(--rapido);
	-webkit-tap-highlight-color: transparent;
}
.talla:hover { border-color: var(--vino-osc); }
.talla[aria-pressed="true"], .talla.is-activa { background: var(--vino-osc); border-color: var(--vino-osc); color: var(--crema); }
.talla.is-agotada { color: rgba(58, 10, 8, .42); background: transparent; border-style: dashed; }
.talla.is-agotada::after { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-14deg); }
.talla.is-perfecta::before {
	content: ""; position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; border-radius: 50%;
	background: var(--ok); box-shadow: 0 0 0 2px var(--crema);
}

/* 5. Chips, sellos y burbujas --------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips--desliza {
	flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
	margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
	-webkit-overflow-scrolling: touch;
}
.chips--desliza::-webkit-scrollbar { display: none; }
.chip {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
	border: 1px solid var(--linea-fuerte); border-radius: var(--r-pill);
	background: var(--crema-2); color: var(--vino-osc);
	font-size: 14.5px; font-weight: 550; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color var(--rapido), color var(--rapido), border-color var(--rapido);
}
button.chip { font: inherit; font-size: 14.5px; font-weight: 550; }
.chip:hover { border-color: var(--vino-osc); color: var(--vino-osc); }
.chip.is-activo, .chip[aria-pressed="true"] { background: var(--vino-osc); border-color: var(--vino-osc); color: var(--crema); }
.chip--mini {
	min-height: 26px; padding: 0 10px;
	font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
	background: var(--crema); border-color: var(--linea); cursor: default;
}
.chip--perfecto { background: var(--ok-fondo); border-color: var(--ok-borde); color: var(--ok); }
.chip--aviso { background: var(--rosa-palo); border-color: var(--durazno); color: var(--vino-osc); }
.chip__muestra { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--linea-fuerte); }

.sello {
	display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
	border-radius: var(--r-pill); background: var(--crema-2); color: var(--vino);
	font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.sello--oferta { background: var(--vino); color: var(--crema-2); }
.sello--agotado { background: var(--vino-osc); color: var(--crema); }
.sello--perfecto { background: var(--ok-fondo); color: var(--ok); }
.sello--nuevo { background: var(--rosa-palo); color: var(--vino-osc); }

.burbuja {
	display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
	border-radius: var(--r-pill); background: var(--vino); color: var(--crema-2);
	font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.cupon {
	display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
	border: 1.5px dashed currentColor; border-radius: var(--r-sm); background: transparent; color: var(--vino);
	font-family: var(--f-mono); font-size: 15px; font-weight: 500; letter-spacing: .08em; cursor: pointer;
}

/* 6. Precio y estrellas --------------------------------------------------- */
.precio { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.precio__ahora { font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: var(--vino-osc); }
.precio--oferta .precio__ahora { color: var(--vino); }
.precio__antes { font-size: 14px; color: var(--cafe); text-decoration: line-through; text-decoration-thickness: 1px; }
.precio__cuotas { flex-basis: 100%; font-size: 13px; color: var(--cafe); }
.precio--grande .precio__ahora { font-size: clamp(24px, 6vw, 30px); }
.precio--grande .precio__antes { font-size: 17px; }

.estrellas { display: inline-flex; gap: 2px; color: var(--vino); vertical-align: middle; }
.estrella { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.estrella.is-llena { fill: currentColor; }

/* 7. Tarjetas ------------------------------------------------------------- */
.tarjeta {
	padding: var(--e-5); border: 1px solid var(--linea); border-radius: var(--r-lg);
	background: var(--crema-2); box-shadow: var(--sombra-1);
}
.tarjeta--plana { box-shadow: none; }
.tarjeta--vino { background: var(--vino); color: var(--crema-2); border-color: transparent; }
.tarjeta--vino h1, .tarjeta--vino h2, .tarjeta--vino h3 { color: var(--crema-2); }
.tarjeta__titulo { margin: 0 0 6px; font-size: 20px; }

/* Tarjeta de producto: <article class="tarjeta-producto"><a class="tarjeta-producto__enlace" href="/p/slug">
   <div class="tarjeta-producto__foto"><img ...><div class="tarjeta-producto__sellos">…</div></div>
   <h3 class="tarjeta-producto__nombre">…</h3><div class="precio">…</div></a></article> */
.tarjeta-producto { position: relative; display: grid; gap: 10px; min-width: 0; align-content: start; }
.tarjeta-producto__enlace { display: grid; gap: 10px; align-content: start; color: inherit; text-decoration: none; }
.tarjeta-producto__foto {
	position: relative; aspect-ratio: var(--foto-producto); overflow: hidden;
	border-radius: var(--r); background: var(--durazno);
}
.tarjeta-producto__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--curva), opacity var(--medio); }
.tarjeta-producto__foto img + img { position: absolute; inset: 0; opacity: 0; }
/* Sin mouse (celular) la segunda foto nunca se ve: con display:none y loading=lazy el navegador ni la descarga */
@media (hover: none) { .tarjeta-producto__foto img + img { display: none; } }
@media (hover: hover) {
	.tarjeta-producto__enlace:hover .tarjeta-producto__foto img { transform: scale(1.03); }
	.tarjeta-producto__enlace:hover .tarjeta-producto__foto img + img { opacity: 1; }
}
.tarjeta-producto__sellos { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.tarjeta-producto__accion { position: absolute; right: 10px; bottom: 10px; }
.tarjeta-producto__nombre { margin: 0; font-size: 16px; font-weight: 650; font-stretch: 100%; letter-spacing: -.005em; line-height: 1.25; }
.tarjeta-producto__tallas { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--cafe); }
.tarjeta-producto.is-agotado .tarjeta-producto__foto img { filter: grayscale(.4); opacity: .78; }

/* Tarjeta de categoría */
.tarjeta-cat { display: grid; gap: 10px; color: inherit; text-decoration: none; }
.tarjeta-cat__foto { aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r-lg); background: var(--durazno); }
.tarjeta-cat__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--curva); }
.tarjeta-cat:hover .tarjeta-cat__foto img { transform: scale(1.04); }
.tarjeta-cat__nombre { margin: 0; font-size: 20px; }

/* Foto sin cargar (o fallida) */
.foto-vacia { display: grid; place-items: center; width: 100%; height: 100%; background: var(--durazno); color: var(--vino); font-family: var(--f-serif); font-style: italic; font-size: 28px; }

/* 8. Formularios ---------------------------------------------------------- */
.campo { display: grid; gap: 6px; }
.campo__nombre { font-weight: 600; font-size: 14.5px; }
.campo__ayuda { font-size: 13.5px; color: var(--cafe); }
.campo__error { font-size: 13.5px; font-weight: 600; color: var(--error); }
.campos { display: grid; gap: var(--e-4); }
.campos--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-3); }
@media (max-width: 420px) { .campos--2.campos--apila { grid-template-columns: 1fr; } }

.entrada,
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea {
	width: 100%; min-height: 52px; padding: 12px 16px;
	border: 1.5px solid var(--linea-fuerte); border-radius: var(--r-sm);
	background: var(--blanco-calido); color: var(--vino-osc);
	font-size: 16px; line-height: 1.3;   /* 16px: el iPhone no hace zoom */
	transition: border-color var(--rapido), box-shadow var(--rapido);
	-webkit-appearance: none; appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
select {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a0a08' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
input:focus, select:focus, textarea:focus, .entrada:focus { border-color: var(--vino); box-shadow: 0 0 0 4px rgba(138, 20, 16, .12); outline: none; }
[aria-invalid="true"] { border-color: var(--error) !important; background-color: #fff6f2; }
::placeholder { color: rgba(110, 74, 66, .7); }
label { font-weight: 600; font-size: 14.5px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--vino); vertical-align: -4px; margin: 0 8px 0 0; }
.opcion { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1.5px solid var(--linea-fuerte); border-radius: var(--r-sm); background: var(--blanco-calido); cursor: pointer; font-weight: 550; }
.opcion:has(input:checked) { border-color: var(--vino); box-shadow: 0 0 0 3px rgba(138, 20, 16, .1); }
.opcion input { margin-top: 2px; }
.entrada-con-unidad { position: relative; }
.entrada-con-unidad > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--cafe); pointer-events: none; }
.entrada-con-unidad > input { padding-right: 44px; }
.interruptor { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor__pista { width: 46px; height: 28px; border-radius: var(--r-pill); background: var(--linea-fuerte); position: relative; transition: background-color var(--rapido); flex-shrink: 0; }
.interruptor__pista::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--blanco-calido); box-shadow: var(--sombra-1); transition: transform var(--rapido) var(--curva); }
.interruptor input:checked + .interruptor__pista { background: var(--vino); }
.interruptor input:checked + .interruptor__pista::after { transform: translateX(18px); }
.interruptor input:focus-visible + .interruptor__pista { outline: 3px solid var(--vino); outline-offset: 2px; }
.cantidad { display: inline-flex; align-items: center; border: 1.5px solid var(--linea-fuerte); border-radius: var(--r-pill); background: var(--blanco-calido); }
.cantidad button { width: 40px; height: 40px; border: 0; background: none; font-size: 18px; font-weight: 700; border-radius: 50%; }
.cantidad output, .cantidad span { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 9. Hojas inferiores y paneles (<dialog>) -------------------------------- */
/* <dialog class="hoja"><div class="hoja__asa"></div><header class="hoja__cabeza"><h2 class="hoja__titulo">…</h2>
   <button class="boton-icono" data-cerrar>×</button></header><div class="hoja__cuerpo">…</div><footer class="hoja__pie">…</footer></dialog>
   En celular sube desde abajo; desde 768px queda centrada. .panel--der es el carrito lateral. */
dialog { color: inherit; }
.hoja, .panel {
	margin: 0; padding: 0; border: 0;
	background: var(--crema); color: var(--vino-osc);
	max-width: none; max-height: none; overscroll-behavior: contain;
}
.hoja::backdrop, .panel::backdrop { background: rgba(58, 10, 8, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.hoja[open], .panel[open] { display: flex; flex-direction: column; }
.hoja {
	position: fixed; left: 0; right: 0; bottom: 0; top: auto;
	width: 100%; max-height: 90dvh;
	border-radius: var(--r-lg) var(--r-lg) 0 0;
	padding-bottom: var(--seguro-abajo);
	box-shadow: var(--sombra-3);
}
@media (min-width: 768px) {
	.hoja {
		top: 50%; bottom: auto; left: 50%;
		width: min(600px, calc(100vw - 48px)); max-height: min(86dvh, 820px);
		border-radius: var(--r-lg); transform: translate(-50%, -50%);
	}
	.hoja--ancha { width: min(880px, calc(100vw - 48px)); }
}
.panel--der, .panel--izq { position: fixed; top: 0; bottom: 0; width: min(92vw, 440px); height: 100dvh; box-shadow: var(--sombra-3); }
.panel--der { right: 0; left: auto; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.panel--izq { left: 0; right: auto; border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.hoja__asa { width: 44px; height: 5px; margin: 10px auto 0; border-radius: 4px; background: var(--linea-fuerte); flex-shrink: 0; }
@media (min-width: 768px) { .hoja__asa { display: none; } }
.hoja__cabeza, .panel__cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px 10px; flex-shrink: 0; }
.hoja__cabeza .boton-icono, .panel__cabeza .boton-icono { margin: -6px -10px 0 0; }
.hoja__titulo, .panel__titulo { margin: 0; font-size: 24px; display: flex; align-items: center; gap: 10px; }
.hoja__cuerpo, .panel__cuerpo { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 24px; -webkit-overflow-scrolling: touch; }
.hoja__pie, .panel__pie {
	display: flex; gap: 10px; flex-shrink: 0;
	padding: 14px 20px calc(14px + var(--seguro-abajo));
	border-top: 1px solid var(--linea); background: var(--crema-2);
}
.hoja__pie .boton, .panel__pie .boton { flex: 1; }
@media (prefers-reduced-motion: no-preference) {
	.hoja[open] { animation: entra-abajo var(--medio) var(--curva); }
	.panel--der[open] { animation: entra-der var(--medio) var(--curva); }
	.panel--izq[open] { animation: entra-izq var(--medio) var(--curva); }
	.hoja[open]::backdrop, .panel[open]::backdrop { animation: aparece var(--medio) ease; }
	.hoja.is-cerrando { animation: sale-abajo .22s ease forwards; }
	.panel--der.is-cerrando { animation: sale-der .22s ease forwards; }
	.panel--izq.is-cerrando { animation: sale-izq .22s ease forwards; }
	.hoja.is-cerrando::backdrop, .panel.is-cerrando::backdrop { animation: desaparece .22s ease forwards; }
}
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
	.hoja[open] { animation-name: entra-centro; }
	.hoja.is-cerrando { animation-name: sale-centro; }
}
@keyframes entra-abajo { from { transform: translateY(100%); } }
@keyframes sale-abajo { to { transform: translateY(100%); } }
@keyframes entra-der { from { transform: translateX(100%); } }
@keyframes sale-der { to { transform: translateX(100%); } }
@keyframes entra-izq { from { transform: translateX(-100%); } }
@keyframes sale-izq { to { transform: translateX(-100%); } }
@keyframes entra-centro { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }
@keyframes sale-centro { to { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }
@keyframes aparece { from { opacity: 0; } }
@keyframes desaparece { to { opacity: 0; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes brillo { to { background-position: -200% 0; } }

/* 10. Avisos (toast), mensajes y cargando --------------------------------- */
.avisos { position: fixed; left: 50%; bottom: calc(var(--alto-menu) + var(--seguro-abajo) + 16px); z-index: 200; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); transform: translateX(-50%); pointer-events: none; }
.aviso {
	padding: 14px 18px; border-radius: var(--r-sm);
	background: var(--vino-osc); color: var(--crema-2); box-shadow: var(--sombra-2);
	font-weight: 600; font-size: 15px; pointer-events: auto;
}
@media (prefers-reduced-motion: no-preference) { .aviso { animation: entra-abajo var(--medio) var(--curva); } }
.aviso--ok { background: var(--ok); }
.aviso--error { background: var(--vino); }
.mensaje { padding: 12px 14px; border: 1px solid transparent; border-radius: var(--r-sm); font-size: 14.5px; font-weight: 550; }
.mensaje--ok { background: var(--ok-fondo); border-color: var(--ok-borde); color: var(--ok); }
.mensaje--alerta { background: var(--alerta-fondo); border-color: var(--alerta-borde); color: var(--alerta); }
.mensaje--error { background: var(--error-fondo); border-color: var(--error-borde); color: var(--error); }
.mensaje--info { background: var(--info-fondo); border-color: var(--info-borde); color: var(--info); }
.esqueleto {
	border-radius: var(--r-sm);
	background: linear-gradient(90deg, rgba(58, 10, 8, .06) 25%, rgba(58, 10, 8, .11) 37%, rgba(58, 10, 8, .06) 63%);
	background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) { .esqueleto { animation: brillo 1.4s ease infinite; } }
.girando { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--linea-fuerte); border-top-color: var(--vino); animation: gira .8s linear infinite; }
.vacio { padding: 40px 16px; text-align: center; color: var(--cafe); }

/* 11. Barra inferior del celular (Inicio, Tienda, Mi talla, Carrito) ------- */
.menu-inferior {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	display: grid; grid-template-columns: repeat(4, 1fr);
	height: calc(var(--alto-menu) + var(--seguro-abajo)); padding-bottom: var(--seguro-abajo);
	background: rgba(253, 245, 230, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	border-top: 1px solid var(--linea);
}
.menu-inferior__item {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	min-height: 44px; padding: 0; border: 0; background: none; color: var(--cafe);
	font-size: 11px; font-weight: 600; letter-spacing: .01em; text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}
.menu-inferior__item .icono { width: 24px; height: 24px; }
.menu-inferior__item[aria-current="page"] { color: var(--vino); }
.menu-inferior__item[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--vino); }
.menu-inferior__item .burbuja { position: absolute; top: 6px; left: calc(50% + 4px); min-width: 18px; height: 18px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--crema-2); }
@media (min-width: 1024px) { .menu-inferior { display: none; } }

/* 12. Tablas y estados (panel) -------------------------------------------- */
.tabla-caja { overflow-x: auto; border: 1px solid var(--linea); border-radius: var(--r); background: var(--crema-2); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabla th, .tabla td { padding: 12px 14px; border-bottom: 1px solid var(--linea); text-align: left; vertical-align: middle; }
.tabla th { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--cafe); background: var(--crema); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td.num, .tabla th.num { text-align: right; font-variant-numeric: tabular-nums; }
.estado { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado--pendiente { background: var(--alerta-fondo); color: var(--alerta); }
.estado--pagado { background: var(--info-fondo); color: var(--info); }
.estado--empacado { background: var(--rosa-palo); color: var(--vino-osc); }
.estado--enviado { background: var(--durazno); color: var(--vino-osc); }
.estado--entregado { background: var(--ok-fondo); color: var(--ok); }
.estado--cancelado { background: var(--linea); color: var(--cafe); }
.dato { display: grid; gap: 2px; }
.dato__valor { font-size: clamp(24px, 6vw, 34px); font-weight: 800; font-stretch: 88%; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dato__nombre { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--cafe); }

@media print {
	body { background: #fff; padding: 0; }
	.menu-inferior, .avisos, .no-imprimir { display: none !important; }
}
