/* Hoja de estilos del menú digital — VITGREEN
 *
 * DISEÑO: «carta escrita a mano sobre papel».
 *
 * La carta del restaurante es beige, serif y muy limpia. Para que el menú
 * digital sea minimalista SIN ser otro menú de plantilla, el valor añadido va
 * por el lado de lo hecho a mano: papel con fibra, filetes de tinta trazados a
 * pulso, tarjetas que se apoyan torcidas como hojas sueltas, números escritos a
 * mano y un ramo dibujado con una sola línea. Todo eso son SVG y CSS del propio
 * sitio: ninguna imagen de adorno, ninguna petición a un servidor ajeno.
 *
 * Los colores NO se escriben sueltos: salen del bloque PALETA. Los nombres son de
 * papel, no de color: --fondo es el fondo tanto si el menú es crema como si es
 * negro, y cambiar de restaurante es cambiar ese bloque y nada más.
 *
 * La escala de letra tiene SEIS tamaños y no siete (13, 15, 17, 20, 26, 44 px):
 * un escalón de 2 px no se distingue y es lo que hace que una interfaz parezca
 * improvisada. El espaciado va en múltiplos de 4.
 */

/* ── Tipografías, alojadas en el propio sitio ─────────────────────────────
   Lisu Bosa (serif) para lo que se lee; Montserrat para lo que se pulsa;
   Caveat para lo que parece escrito a mano. Ninguna se pide a internet. */
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fuentes/montserrat-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Lisu Bosa';
  src: url('assets/fuentes/lisu-bosa-400.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Lisu Bosa';
  src: url('assets/fuentes/lisu-bosa-500.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Lisu Bosa';
  src: url('assets/fuentes/lisu-bosa-600.woff2') format('woff2');
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: 'Caveat';
  src: url('assets/fuentes/caveat-400.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Caveat';
  src: url('assets/fuentes/caveat-600.woff2') format('woff2');
  font-weight: 600; font-display: swap;
}

/* ==== PALETA: INICIO ====
 *
 * Papel marfil de la carta, tinta casi negra con fondo verde, y un verde de
 * huerto para los precios y los botones. Los contrastes anotados están medidos
 * sobre --fondo y --fondo-claro, que son los dos fondos reales del menú, y
 * cumplen el 4.5:1 que pide la WCAG AA para texto pequeño.
 *
 * Casi ningún verde de marca aguanta texto menudo: --acento vale para precios
 * grandes y filetes; --acento-texto es la variante que sí pasa; --acento-fondo es
 * el relleno del botón, que tiene que aguantar --acento-tinta encima.
 */
:root {
  --fondo: #F2EEE1;            /* papel de la página */
  --fondo-claro: #FBF8EC;      /* hoja de la tarjeta */
  --fondo-hueso: #E8E2D0;      /* píldoras y botones suaves */
  --fondo-hueso-vivo: #DED6C0;
  --fondo-velado: rgba(242, 238, 225, .94);

  --tinta: #23261F;            /* tinta principal (13,8:1) */
  --tinta-suave: #545849;      /* texto secundario (6,5:1) */
  --tinta-clara: #F7F3E6;      /* texto sobre fondo oscuro */
  --tinta-clara-suave: #E7E1CD;

  --acento: #3F5A37;           /* verde de huerto: precios grandes y filetes */
  --acento-vivo: #334A2D;
  --acento-texto: #3B5433;     /* verde legible en texto pequeño (6,0:1) */
  --acento-fondo: #37502F;     /* relleno de botón bajo --acento-tinta (7,4:1) */
  --acento-fondo-vivo: #2C4126;
  --acento-tinta: #F7F3E6;

  --profundo: #2A3226;         /* pie y fondos oscuros */
  --borde-fuerte: #8C8A76;
  --borde: rgba(35, 38, 31, .24);
  --borde-tenue: rgba(35, 38, 31, .12);
  --apagado: #A8A292;

  --aviso-fondo: #FBF0D6;      /* recuadro de «esto está por confirmar» */
  --aviso-borde: #E0C99A;
  --aviso-texto: #6B4319;

  --whatsapp: #1F6B47;
  --whatsapp-vivo: #175236;
  --whatsapp-tinta: #F1FBF4;

  --sombra-hoja: 0 1px 0 rgba(35,38,31,.10), 0 8px 20px -12px rgba(35,38,31,.45);
  --sombra-alta: 0 16px 44px -12px rgba(20,24,18,.45);

  --ancho: 1160px;
  --fuente-titulo: 'Lisu Bosa', Georgia, 'Times New Roman', serif;
  --fuente-texto: 'Lisu Bosa', Georgia, 'Times New Roman', serif;
  --fuente-ui: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fuente-mano: 'Caveat', 'Bradley Hand', 'Segoe Script', cursive;

  /* La fibra del papel. Un ruido SVG, del propio sitio, sin ninguna imagen. */
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)' opacity='.16'/%3E%3C/svg%3E");

  color-scheme: light;
}
/* ==== PALETA: FIN ==== */

/* ==== ESCALA TIPOGRÁFICA: INICIO ====
 *
 * CINCO tamaños reales (13, 16, 20, 26 y 44 px) y ningún otro. --t-2 y --t-3
 * valen lo mismo a propósito: antes eran 15 y 17, y un escalón de 2 px no se
 * distingue —el propio contrato lo dice— así que sobraba uno de los dos. Tener
 * los dos nombres deja el código legible (recetas / cuerpo) sin inventar un
 * tamaño que no se ve. Cambiar de escala es cambiar estas seis líneas.
 */
:root {
  --t-1: .8125rem;    /* 13 px · etiquetas, pies, datos menudos */
  --t-2: 1rem;        /* 16 px · recetas, botones */
  --t-3: 1rem;        /* 16 px · cuerpo   (igual que --t-2 a propósito) */
  --t-4: 1.25rem;     /* 20 px · nombre de plato, precio grande */
  --t-5: 1.625rem;    /* 26 px · título de sección */
  --t-6: 2.75rem;     /* 44 px · el nombre en la portada */
}
/* ==== ESCALA TIPOGRÁFICA: FIN ==== */

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

html { scroll-behavior: smooth; scroll-padding-top: 8rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background-color: var(--fondo);
  background-image: var(--grano);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: var(--t-3);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }

.salto-contenido {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--tinta); color: var(--fondo); padding: 12px 20px;
  border-radius: 0 0 4px 0; text-decoration: none;
}
.salto-contenido:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 3px;
  border-radius: 2px;
}

.envoltura { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: 20px; }
.oculto-visual {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ── Cabecera ────────────────────────────────────────────────────── */
.cabecera {
  position: sticky; top: 0; z-index: 60;
  background: var(--fondo-velado);
  background-image: var(--grano);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--borde-tenue);
}
.cabecera__interior {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding-block: 8px;
}
/* La hoja dibujada con tres trazos. Acompaña al nombre y no lo sustituye. */
.cabecera__hoja {
  width: 36px; height: 36px; flex: none;
  fill: none; stroke: var(--acento); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.cabecera__nombre {
  font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-4);
  letter-spacing: .16em; margin: 0; line-height: 1.1; text-transform: uppercase;
}
.cabecera__bajada {
  margin: 0; font-family: var(--fuente-mano); font-weight: 600;
  font-size: var(--t-3); color: var(--acento-texto); letter-spacing: .02em;
  transform: rotate(-2deg);
}
.cabecera__acciones { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ── Botones: sellos y filetes, no píldoras ──────────────────────── */
.boton {
  border: 1px solid transparent; border-radius: 2px;
  font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-2);
  padding: 12px 20px; display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: .01em;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.boton--principal {
  background: var(--acento-fondo); color: var(--acento-tinta);
  box-shadow: 2px 2px 0 rgba(42,50,38,.22);
}
.boton--principal:hover { background: var(--acento-fondo-vivo); box-shadow: 1px 1px 0 rgba(42,50,38,.3); }
.boton--linea { background: var(--fondo-claro); border-color: var(--borde); color: var(--tinta); }
.boton--linea:hover { background: var(--fondo-hueso); border-color: var(--acento); }
.boton--fantasma { background: transparent; color: var(--acento-texto); padding-inline: 8px; }
.boton--fantasma:hover { color: var(--acento-vivo); text-decoration: underline; }
.boton:active { transform: translateY(1px); }

.carrito-boton { position: relative; }
.carrito-boton__cuenta {
  min-width: 24px; height: 24px; padding: 0 4px;
  background: var(--acento-fondo); color: var(--acento-tinta);
  border-radius: 2px; font-size: var(--t-1); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--fuente-ui);
}

/* ── Portada: una hoja con su fotografía enmarcada ───────────────── */
.portada { position: relative; overflow: hidden; padding-block: 40px 56px; }
.portada__interior {
  display: grid; gap: 32px; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .portada__interior { grid-template-columns: 1.05fr .95fr; gap: 48px; padding-block: 40px; }
}
.portada__bloque { max-width: 34rem; }
.portada__etiqueta {
  font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-1);
  letter-spacing: .18em; text-transform: uppercase; color: var(--acento-texto); margin: 0 0 8px;
}
/* La línea manuscrita: el «since 2024» de la carta, escrito a mano. */
.portada__mano {
  font-family: var(--fuente-mano); font-weight: 600; font-size: var(--t-5);
  color: var(--acento-texto); margin: 0 0 4px; transform: rotate(-2deg);
  transform-origin: left center;
}
.portada__titulo {
  font-family: var(--fuente-titulo); font-weight: 500;
  font-size: var(--t-6);
  letter-spacing: .06em; line-height: 1.02; margin: 0 0 16px;
  text-transform: uppercase;
}
.portada__texto { margin: 0 0 24px; font-size: var(--t-3); color: var(--tinta-suave); max-width: 32rem; }
.portada__acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.portada__nota {
  font-family: var(--fuente-mano); font-size: var(--t-2); color: var(--acento-texto);
  margin: 12px 0 0; max-width: 32rem;
}
.portada__datos {
  display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0 0;
  padding: 0; list-style: none; font-size: var(--t-1); color: var(--tinta-suave);
  font-family: var(--fuente-ui);
}
.portada__datos li { display: flex; align-items: center; gap: 8px; }
.portada__datos strong { color: var(--acento-texto); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* La fotografía va pegada a la hoja con dos trozos de cinta: es el gesto que
   más «hecho a mano» resulta y no cuesta ni un byte de imagen. */
.portada__marco {
  position: relative; margin: 0;
  background: var(--fondo-claro); padding: 12px 12px 0;
  border: 1px solid var(--borde);
  box-shadow: var(--sombra-hoja);
  transform: rotate(-1.2deg);
}
.portada__marco::before,
.portada__marco::after {
  content: ''; position: absolute; width: 56px; height: 20px;
  background: rgba(226, 214, 182, .72);
  border-left: 1px dashed rgba(35,38,31,.18);
  border-right: 1px dashed rgba(35,38,31,.18);
}
.portada__marco::before { top: -10px; left: 16px; transform: rotate(-6deg); }
.portada__marco::after { top: -10px; right: 16px; transform: rotate(5deg); }
/* `height: auto` no es adorno: el <img> trae width y height en el HTML (para que
   el navegador reserve el hueco) y sin esto esos atributos fijan la altura en
   píxeles y la foto se estira a lo alto. */
.portada__foto {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  filter: saturate(.92) contrast(1.04) sepia(.06);
}
.portada__pie {
  font-family: var(--fuente-mano); font-size: var(--t-2); color: var(--tinta-suave);
  padding: 8px 4px 12px; text-align: right;
}

/* ── Navegación de categorías ────────────────────────────────────── */
.navegacion {
  position: sticky; top: 64px; z-index: 50;
  background: var(--fondo-velado); background-image: var(--grano);
  backdrop-filter: saturate(120%) blur(8px);
  border-block: 1px solid var(--borde-tenue);
}
.navegacion__lista {
  display: flex; gap: 8px; margin: 0; padding: 12px 0;
  list-style: none; overflow-x: auto; scrollbar-width: none;
}
.navegacion__lista::-webkit-scrollbar { display: none; }
.navegacion__enlace {
  display: inline-block; white-space: nowrap; text-decoration: none;
  font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-1);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--tinta-suave); background: transparent;
  border: 1px solid var(--borde-tenue); border-radius: 2px;
  padding: 12px; min-height: 44px;
  transition: background-color .18s, color .18s, border-color .18s;
}
.navegacion__enlace:hover { background: var(--fondo-hueso); color: var(--tinta); border-color: var(--borde); }
.navegacion__enlace[aria-current="true"] {
  background: var(--acento-fondo); color: var(--acento-tinta); border-color: var(--acento-fondo);
}

/* ── Secciones ───────────────────────────────────────────────────── */
.seccion { padding-block: 56px 16px; }
.seccion__cabecera {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px; padding-bottom: 12px;
  position: relative;
}
/* El filete de tinta bajo el título: un trazo dibujado, no una línea de regla.
   Va como SVG en el propio CSS para que no haya ni una petición más. */
.seccion__cabecera::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='8' viewBox='0 0 240 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.5c34-2.6 68-3.4 102-2.2 26 .9 52 2.4 78 1.2 20-.9 40-2 56-1.4' fill='none' stroke='%233F5A37' stroke-width='1.6' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 240px 8px;
}
/* El número de la sección, escrito a mano, como el de una libreta de recetas. */
.seccion__numero {
  font-family: var(--fuente-mano); font-weight: 600; font-size: var(--t-5);
  color: var(--acento-texto); line-height: 1;
}
.seccion__titulo {
  font-family: var(--fuente-titulo); font-weight: 600;
  font-size: var(--t-5); margin: 0; letter-spacing: .02em;
  text-transform: uppercase;
}
.seccion__meta {
  font-size: var(--t-1); color: var(--tinta-suave); margin: 0 0 0 auto;
  font-family: var(--fuente-ui); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
}
/* La letra pequeña de la sección: qué incluye el desayuno, las medidas de las
   bebidas. Es texto de la carta, así que se lee, no se susurra. */
.seccion__nota {
  font-size: var(--t-2); color: var(--tinta-suave); max-width: 60ch;
  margin: 12px 0 24px; padding-left: 12px;
  border-left: 2px solid var(--borde);
}
.aviso-revision {
  background: var(--aviso-fondo); border: 1px solid var(--aviso-borde);
  border-left: 3px solid var(--acento);
  border-radius: 2px; padding: 12px 16px; font-size: var(--t-2); color: var(--aviso-texto);
  margin: 0 0 24px; max-width: 60rem;
}
.aviso-revision strong { font-family: var(--fuente-ui); font-size: var(--t-1); letter-spacing: .06em; text-transform: uppercase; }
.seccion__ver-mas { margin-top: 24px; }

/* ── Rejilla de tarjetas: hojas sueltas ──────────────────────────── */
.rejilla {
  display: grid; gap: 28px 24px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.rejilla--continuacion { margin-top: 28px; }
.tarjeta {
  position: relative;
  background: var(--fondo-claro); background-image: var(--grano);
  border: 1px solid var(--borde);
  border-radius: 2px; overflow: hidden;
  box-shadow: var(--sombra-hoja);
  display: flex; flex-direction: column;
  transition: box-shadow .22s, transform .22s;
}
/* Cada hoja se apoya ligeramente torcida, y no todas igual: es lo que quita el
   aire de rejilla perfecta de plantilla. Muy poco, para no marear. */
.tarjeta:nth-child(3n+1) { transform: rotate(-.45deg); }
.tarjeta:nth-child(3n+2) { transform: rotate(.35deg); }
.tarjeta:nth-child(3n)   { transform: rotate(-.15deg); }
.tarjeta:hover { box-shadow: var(--sombra-alta); transform: rotate(0deg) translateY(-2px); }
.tarjeta__marco {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--fondo-hueso);
  border-bottom: 1px solid var(--borde-tenue);
}
/* Las fotos vienen de sitios distintos y cada una tiene su luz. Un filtro común
   (un poco de sepia y menos saturación) las hermana y las acerca al papel. */
.tarjeta__foto {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.88) contrast(1.03) sepia(.08);
}
.tarjeta__velo {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(242,238,225,0) 55%, rgba(35,38,31,.34) 100%);
  pointer-events: none;
}
/* El precio, como un sello de tinta: papel claro, filete oscuro y un pelín
   torcido. Sobre la fotografía no se puede garantizar ningún fondo, así que el
   color se trae puesto. */
.tarjeta__precio-flotante {
  position: absolute; right: 10px; bottom: 10px;
  background: var(--fondo-claro); color: var(--tinta);
  border: 1px solid var(--tinta);
  font-family: var(--fuente-ui); font-weight: 700; font-size: var(--t-2);
  padding: 4px 12px; border-radius: 2px;
  transform: rotate(-1.6deg);
  box-shadow: 1px 1px 0 rgba(35,38,31,.35);
}
.tarjeta__cuerpo { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tarjeta__nombre {
  font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-4);
  margin: 0; line-height: 1.24; letter-spacing: .01em;
}
.tarjeta__nombre-en,
.tarjeta__detalle {
  display: block; font-family: var(--fuente-mano); font-weight: 400;
  font-size: var(--t-3); color: var(--acento-texto); margin: 4px 0 0;
  line-height: 1.2;
}
.tarjeta__ingredientes {
  margin: 0; font-size: var(--t-2); color: var(--tinta-suave); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Las opciones del plato (medida, sabor, proteína), escritas a mano: es la línea
   que en la carta va suelta al lado del nombre. */
.tarjeta__elige {
  margin: 0; font-family: var(--fuente-mano); font-size: var(--t-2);
  color: var(--acento-texto); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tarjeta__pie { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 12px; }
.tarjeta__pie .boton { flex: 1; justify-content: center; }

/* El hueco de una foto que todavía no ha llegado: un marco dibujado a mano con
   la palabra puesta, en vez de una imagen rota. */
.tarjeta__marco--pendiente {
  background: var(--fondo-hueso); background-image: var(--grano);
}
.tarjeta__marco--pendiente::after {
  content: 'foto pendiente';
  position: absolute; inset: 28% 20%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fuente-mano); font-size: var(--t-4); color: var(--tinta-suave);
  border: 1px dashed var(--apagado); border-radius: 2px;
}

/* Los títulos de grupo: capitulares de libreta, con su trazo debajo. */
.grupo-lista__titulo {
  font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-1);
  letter-spacing: .18em; text-transform: uppercase; color: var(--acento-texto);
  margin: 32px 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.grupo-lista__titulo::after {
  content: ''; flex: 1; height: 1px; background: var(--borde-tenue);
}
.grupo-lista__titulo:first-child { margin-top: 0; }

/* ── Pie ─────────────────────────────────────────────────────────── */
.pie {
  margin-top: 48px; background: var(--profundo); background-image: var(--grano);
  color: var(--tinta-clara-suave);
  padding-block: 40px 32px; font-size: var(--t-2);
}
.pie a { color: var(--tinta-clara); }
/* El ramo dibujado con una línea: separa el pie de la carta sin una raya recta. */
.pie__ramo {
  width: 120px; height: 24px; margin: 0 0 24px;
  fill: none; stroke: var(--tinta-clara-suave); stroke-width: 1.2;
  stroke-linecap: round; opacity: .8;
}
.pie__rejilla { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pie__nombre {
  font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-4);
  letter-spacing: .16em; color: var(--tinta-clara); display: block; margin-bottom: 12px;
  text-transform: uppercase;
}
.pie__titulo {
  font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-1);
  letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 12px; color: var(--acento-tinta); opacity: .8;
}
.pie__texto { margin: 0 0 8px; }
.pie__texto a { display: inline-flex; align-items: center; min-height: 44px; }
.pie__lista { list-style: none; margin: 0; padding: 0; }
.pie__lista li { margin-bottom: 8px; }
.pie__legal {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(231,225,205,.22);
  font-size: var(--t-1); color: var(--tinta-clara-suave);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
}
.pie__ilustrativo { margin: 0; max-width: 46ch; }
.pie__credito { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pie__credito-enlace { display: inline-flex; align-items: center; border-radius: 2px; }
.pie__credito-logo { height: 52px; width: auto; }

.ilustrativo { font-size: var(--t-1); color: var(--tinta-clara-suave); }

/* ── Carrito ─────────────────────────────────────────────────────── */
.panel-fondo {
  position: fixed; inset: 0; z-index: 90; background: rgba(20,24,18,.5);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.panel-fondo[data-abierto="true"] { opacity: 1; visibility: visible; }

.panel {
  position: fixed; z-index: 100; background: var(--fondo); background-image: var(--grano);
  display: flex; flex-direction: column;
  box-shadow: var(--sombra-alta); transition: transform .3s cubic-bezier(.22,.61,.36,1);
}
@media (min-width: 860px) {
  .panel { top: 0; right: 0; height: 100%; width: min(430px, 94vw); transform: translateX(102%); border-left: 1px solid var(--borde); }
  .panel[data-abierto="true"] { transform: translateX(0); }
}
@media (max-width: 859px) {
  .panel { left: 0; right: 0; bottom: 0; max-height: 92dvh; border-radius: 4px 4px 0 0; transform: translateY(102%); }
  .panel[data-abierto="true"] { transform: translateY(0); }
}
.panel__cabecera {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--borde-tenue); background: var(--fondo-claro);
}
.panel__titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-4); margin: 0; }
.panel__cerrar {
  margin-left: auto; background: var(--fondo-claro); border: 1px solid var(--borde);
  border-radius: 2px; width: 44px; height: 44px; line-height: 1; font-size: var(--t-4); padding: 0;
  color: var(--tinta);
}
.panel__cerrar:hover { background: var(--fondo-hueso); }
.panel__cuerpo { overflow-y: auto; padding: 16px 20px; flex: 1; }
.panel__pie { border-top: 1px solid var(--borde-tenue); padding: 16px 20px 20px; background: var(--fondo-claro); }

.carrito-vacio { text-align: center; color: var(--tinta-suave); padding: 40px 16px; }
.carrito-vacio p { margin: 0 0 8px; }

.linea-carrito {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 12px 0; border-bottom: 1px dotted var(--borde);
}
.linea-carrito__nombre { font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-3); margin: 0; }
.linea-carrito__unitario { font-size: var(--t-1); color: var(--tinta-suave); margin: 4px 0 0; }
.linea-carrito__importe { font-family: var(--fuente-ui); font-weight: 700; color: var(--acento-texto); text-align: right; }
.cantidad { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--borde); border-radius: 2px; overflow: hidden; background: var(--fondo-claro); }
.cantidad button { border: 0; background: transparent; width: 36px; height: 36px; font-size: var(--t-3); line-height: 1; }
.cantidad button:hover { background: var(--fondo-hueso); }
.cantidad__valor { min-width: 24px; text-align: center; font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-2); }
.linea-carrito__quitar { background: none; border: 0; color: var(--tinta-suave); font-size: var(--t-1); text-decoration: underline; padding: 8px 0; min-height: 24px; }
.linea-carrito__quitar:hover { color: var(--acento-texto); }
.linea-carrito__acciones { display: flex; align-items: center; gap: 12px; }

.subtotal { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.subtotal__etiqueta { font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-2); letter-spacing: .06em; text-transform: uppercase; }
.subtotal__valor { margin-left: auto; font-family: var(--fuente-ui); font-weight: 700; font-size: var(--t-4); color: var(--acento-texto); }
.subtotal__nota { font-size: var(--t-1); color: var(--tinta-suave); margin: 0 0 16px; }

.dividir { border: 1px solid var(--borde); border-radius: 2px; padding: 16px; margin-bottom: 16px; background: var(--fondo-claro); }
.dividir__cabecera { display: flex; align-items: center; gap: 8px; }
.dividir__titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-3); margin: 0; }
.dividir__modos { display: flex; gap: 8px; margin: 12px 0 0; }
.dividir__modo {
  border: 1px solid var(--borde); background: var(--fondo); border-radius: 2px;
  padding: 8px 12px; min-height: 36px;
  font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-1);
}
.dividir__modo[aria-pressed="true"] { background: var(--acento-fondo); color: var(--acento-tinta); border-color: var(--acento-fondo); }
.dividir__personas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dividir__persona {
  width: 36px; height: 36px; border-radius: 2px; border: 1px solid var(--borde);
  background: var(--fondo); font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-1);
}
.dividir__persona[aria-pressed="true"] { background: var(--acento-fondo); color: var(--acento-tinta); border-color: var(--acento-fondo); }
.dividir__resultado { margin: 12px 0 0; font-size: var(--t-2); }
.dividir__resultado strong { font-family: var(--fuente-ui); color: var(--acento-texto); font-size: var(--t-3); }
.dividir__asignacion { margin-top: 12px; display: grid; gap: 8px; }
/* El color del desplegable se declara a mano: si no, el navegador pone su tinta
   por defecto y el texto puede quedar invisible sobre el papel. */
.dividir__asignacion select {
  font: inherit; color: var(--tinta); padding: 8px; min-height: 36px;
  border: 1px solid var(--borde); border-radius: 2px; background: var(--fondo-claro); max-width: 100%;
}
.dividir__asignacion-fila { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.dividir__asignacion-nombre { font-size: var(--t-2); }
.dividir__tabla { list-style: none; margin: 12px 0 0; padding: 0; font-size: var(--t-2); }
.dividir__tabla li { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px dotted var(--borde); }
.dividir__tabla span:last-child { margin-left: auto; font-family: var(--fuente-ui); font-weight: 600; }
.dividir__aviso { font-size: var(--t-1); color: var(--tinta-suave); margin: 8px 0 0; }

.acciones-carrito { display: grid; gap: 8px; }
.boton--whatsapp {
  background: var(--whatsapp); color: var(--whatsapp-tinta); width: 100%;
  justify-content: center; padding-block: 16px; font-size: var(--t-2);
}
.boton--whatsapp:hover { background: var(--whatsapp-vivo); }
.boton--whatsapp:disabled { background: var(--apagado); cursor: not-allowed; }
.boton--texto { background: none; border: 0; color: var(--tinta-suave); font-size: var(--t-1); text-decoration: underline; justify-self: center; padding: 12px; }
.boton--texto:hover { color: var(--acento-texto); }

/* ── Ficha de producto ───────────────────────────────────────────── */
.ficha {
  position: fixed; z-index: 110; background: var(--fondo-claro); background-image: var(--grano);
  box-shadow: var(--sombra-alta);
  display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 860px) {
  .ficha { top: 50%; left: 50%; transform: translate(-50%, -46%); width: min(560px, 92vw); max-height: 88vh; border-radius: 4px; border: 1px solid var(--borde); opacity: 0; visibility: hidden; transition: opacity .22s, transform .22s, visibility .22s; }
  .ficha[data-abierto="true"] { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
}
@media (max-width: 859px) {
  .ficha { left: 0; right: 0; bottom: 0; max-height: 92dvh; border-radius: 4px 4px 0 0; transform: translateY(102%); transition: transform .3s cubic-bezier(.22,.61,.36,1); }
  .ficha[data-abierto="true"] { transform: translateY(0); }
}
.ficha__marco { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--fondo-hueso); flex: none; }
.ficha__foto { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.03) sepia(.07); }
.ficha__marco--pendiente { background: var(--fondo-hueso); background-image: var(--grano); }
.ficha__marco--pendiente::after {
  content: 'foto pendiente';
  position: absolute; inset: 30% 30%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fuente-mano); font-size: var(--t-4); color: var(--tinta-suave);
  border: 1px dashed var(--apagado);
}
/* La cruz va sobre la fotografía: lleva su propio fondo y su propia tinta. */
.ficha__cerrar {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
  border-radius: 2px; border: 1px solid var(--borde); background: var(--fondo-claro); color: var(--tinta);
  font-size: var(--t-4); line-height: 1; padding: 0;
}
.ficha__cuerpo { padding: 20px 24px; overflow-y: auto; }
.ficha__nombre { font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-5); margin: 0 0 4px; line-height: 1.16; }
.ficha__nombre-en { font-family: var(--fuente-mano); font-size: var(--t-3); color: var(--acento-texto); margin: 0 0 12px; }
.ficha__precio { font-family: var(--fuente-ui); font-weight: 700; color: var(--acento-texto); font-size: var(--t-4); margin: 0 0 16px; }
.ficha__seccion {
  margin: 0 0 8px; font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-1);
  letter-spacing: .14em; text-transform: uppercase; color: var(--acento-texto);
}
.ficha__ingredientes { margin: 0 0 12px; }
.ficha__ingredientes-en { margin: 0 0 20px; color: var(--tinta-suave); font-size: var(--t-2); }

/* ── Selector de medida, sabor o proteína ────────────────────────── */
.variantes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.variantes__opcion {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 44px; padding: 8px 16px; border-radius: 2px;
  border: 1px solid var(--borde); background: var(--fondo);
  color: var(--tinta); text-align: left; font-family: var(--fuente-ui);
  font-size: var(--t-2); transition: background .18s, border-color .18s, color .18s;
}
.variantes__opcion:hover { background: var(--fondo-hueso); border-color: var(--acento); }
.variantes__opcion[aria-pressed="true"] {
  background: var(--acento-fondo); border-color: var(--acento-fondo); color: var(--acento-tinta);
}
.variantes__nombre { font-weight: 600; line-height: 1.2; }
.variantes__precio { font-size: var(--t-1); opacity: .9; }
.ficha__pendiente {
  margin: 0 0 20px; font-size: var(--t-2); color: var(--aviso-texto);
  background: var(--aviso-fondo); border: 1px solid var(--aviso-borde);
  border-radius: 2px; padding: 8px 12px;
}
.ficha__pendiente strong { font-family: var(--fuente-ui); font-size: var(--t-1); letter-spacing: .06em; text-transform: uppercase; }
.ficha__pie { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ficha__pie .boton--principal { flex: 1; justify-content: center; }

/* ── Aviso flotante ──────────────────────────────────────────────── */
.aviso-flotante {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--acento-fondo); color: var(--acento-tinta); padding: 12px 20px;
  border-radius: 2px; font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-2);
  z-index: 130; box-shadow: var(--sombra-alta); transition: transform .25s;
  max-width: 92vw; text-align: center;
}
.aviso-flotante[data-visible="true"] { transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .cabecera__bajada { display: none; }
  .cabecera__hoja { width: 28px; height: 28px; }
  .portada { padding-block: 24px 40px; }
  .portada__marco { transform: rotate(-.8deg); }
  .seccion { padding-block: 40px 12px; }
  .seccion__meta { margin-left: 0; }
  .tarjeta__marco { aspect-ratio: 3 / 2; }
  .pie__credito { margin-left: 0; }
}

/* En Safari de iOS la altura de la ventana incluye la barra de herramientas, así
   que 92vh puede quedar por debajo del borde visible. dvh sigue al área real. */
@supports (max-height: 100dvh) {
  @media (max-width: 859px) {
    .panel { max-height: 92dvh; }
    .ficha { max-height: 92dvh; }
  }
}
