/* Hoja de estilos del menú digital — LA TERRAZA DEL OPIUM
 *
 * DISEÑO: «la barra del bar, de noche».
 *
 * La carta del restaurante es madera oscura con un rótulo de neón blanco y los
 * precios en etiquetas doradas. Eso es lo que el cliente reconoce, así que el
 * menú digital lo toma de ahí y de ningún otro sitio:
 *
 *   · la madera del propio cartel, en el fondo, muy apagada;
 *   · el dorado de sus etiquetas de precio, para los precios y los filetes;
 *   · el blanco del neón, para la letra;
 *   · la barandilla de su rótulo, como adorno y como separador del pie.
 *
 * No hay degradados por todas partes, ni sombras en cada caja, ni la misma
 * tarjeta redondeada repetida: el radio es de 2 px, como una etiqueta de papel.
 *
 * Los colores NO se escriben sueltos: salen del bloque PALETA. Los nombres son
 * de papel y no de color, para que cambiar de restaurante sea cambiar ese bloque.
 *
 * La escala tiene SEIS tamaños (13, 16, 16, 20, 26 y 44 px) y el espaciado va en
 * múltiplos de 4 px. Las fuentes se alojan en el propio sitio: la página no pide
 * nada a ningún servidor ajeno.
 */

/* ── Tipografías, alojadas en el propio sitio ─────────────────────────────
   Montserrat para lo que se pulsa y para los títulos; Lisu Bosa, serif, para
   lo que se lee (ingredientes y descripciones). Ninguna se pide a internet. */
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fuentes/montserrat-variable.woff2') format('woff2-variations');
  font-weight: 300 800; 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-600.woff2') format('woff2');
  font-weight: 600; font-display: swap;
}

/* ==== PALETA: INICIO ====
 *
 * El dorado de la carta (#E9B24B) es el color de marca y sirve tal cual sobre
 * esta madera oscura: sobre --fondo-claro da más de 8:1, que es de sobra para
 * texto menudo. Por eso aquí no hace falta una variante oscura, sino una un
 * poco más clara para los textos secundarios.
 *
 * Todo texto se mide sobre --fondo-claro (#1F1613), que es la superficie donde
 * de verdad se lee: las tarjetas.
 */
:root {
  /* Madera y tinta */
  --fondo: #17100E;
  --fondo-claro: #1F1613;
  --fondo-hueso: #2A1E19;
  --fondo-hueso-vivo: #35251F;
  --fondo-velado: rgba(23, 16, 14, .95);
  --tinta: #F6ECDC;              /* crema: texto principal (13,9:1) */
  --tinta-suave: #CFBDAB;        /* secundario (9,4:1) */
  --tinta-clara: #FBF4E7;
  --tinta-clara-suave: #E2D3C0;

  /* Dorado de la casa */
  --acento: #E9B24B;             /* precios, filetes, foco (8,3:1) */
  --acento-vivo: #F4C766;
  --acento-texto: #EFC97E;       /* dorado para texto menudo (9,1:1) */
  --acento-fondo: #E9B24B;       /* relleno de botón */
  --acento-fondo-vivo: #F4C766;
  --acento-tinta: #17100E;       /* tinta sobre el dorado (8,3:1) */

  --profundo: #0F0A08;           /* pie */
  --borde: rgba(246, 236, 220, .22);
  --linea: rgba(246, 236, 220, .16);   /* el mismo filo, para la capa del sistema */
  --borde-tenue: rgba(246, 236, 220, .12);
  --borde-fuerte: #7A6551;
  --apagado: #8C7A69;

  --aviso-fondo: #2E2216;
  --aviso-borde: #6E5527;
  --aviso-texto: #F6DCA8;

  --whatsapp: #15703F;
  --whatsapp-vivo: #1A874C;
  --whatsapp-tinta: #F2FFF7;

  --sombra-hoja: 0 1px 0 rgba(0, 0, 0, .45);
  --sombra-alta: 0 18px 48px rgba(0, 0, 0, .6);

  --ancho: 1180px;
  --fuente-titulo: 'Montserrat', system-ui, sans-serif;
  --fuente-ui: 'Montserrat', system-ui, sans-serif;
  --fuente-texto: 'Lisu Bosa', Georgia, serif;

  /* La madera del propio cartel, muy apagada: un velo oscuro encima de la foto
     del cliente. Si algún día se quita, el menú sigue teniendo su color. */
  --madera: url('assets/img/fotos/madera.jpg');
}
/* ==== PALETA: FIN ==== */

/* ==== ESCALA TIPOGRÁFICA: INICIO ====
 *
 * SEIS tamaños y ningún otro. --t-2 y --t-3 valen lo mismo a propósito: un
 * escalón de 2 px no se distingue y lo único que hace es ruido. Tener los dos
 * nombres deja el código legible sin inventar un tamaño que no se ve.
 */
:root {
  --t-1: .8125rem;    /* 13 px · etiquetas, pies, datos menudos */
  --t-2: 1rem;        /* 16 px · recetas, botones */
  --t-3: 1rem;        /* 16 px · cuerpo */
  --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: 9rem; }
@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: linear-gradient(rgba(23, 16, 14, .9), rgba(23, 16, 14, .94)), var(--madera);
  background-size: auto, 900px auto;
  background-attachment: fixed, fixed;
  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(--acento); color: var(--acento-tinta); padding: 12px 20px;
  border-radius: 0 0 2px 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);
  backdrop-filter: saturate(110%) blur(10px);
  border-bottom: 1px solid var(--borde-tenue);
}
.cabecera__interior {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding-block: 8px;
}
/* La barandilla del rótulo, dibujada en SVG: se ve nítida a cualquier tamaño y
   no pesa ni un byte de más. Es adorno: quien no la ve no pierde nada. */
.cabecera__emblema { width: 34px; height: 28px; flex: none; color: var(--acento); }
.cabecera__nombre {
  font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-4);
  letter-spacing: .14em; margin: 0; line-height: 1.1; text-transform: uppercase;
}
.cabecera__bajada {
  margin: 0; font-family: var(--fuente-texto); font-size: var(--t-1);
  color: var(--acento-texto); letter-spacing: .04em;
}
.cabecera__acciones { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ── Botones: etiquetas de papel, 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: .02em; text-decoration: none;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.boton--principal {
  background: var(--acento-fondo); color: var(--acento-tinta);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}
.boton--principal:hover { background: var(--acento-fondo-vivo); }
.boton--linea { background: transparent; border-color: var(--borde); color: var(--tinta); }
.boton--linea:hover { background: var(--fondo-hueso); border-color: var(--acento); color: var(--tinta); }
.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; white-space: nowrap; }
.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: el rótulo del local, colgado de la pared ──────────── */
.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.02fr .98fr; 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: .2em; text-transform: uppercase; color: var(--acento-texto); margin: 0 0 8px;
}
.portada__etiqueta:empty { display: none; }
.portada__titulo {
  font-family: var(--fuente-titulo); font-weight: 600;
  font-size: var(--t-6);
  letter-spacing: .04em; line-height: 1.04; 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-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: baseline; gap: 8px; }
.portada__datos strong { color: var(--acento-texto); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* El rótulo va en un marco negro con un filo dorado, como un letrero colgado.
   La fotografía es la del propio cartel del restaurante: no se inventa nada. */
.portada__marco {
  position: relative; margin: 0;
  background: #0E0908; padding: 12px;
  border: 1px solid var(--borde-fuerte);
  box-shadow: var(--sombra-alta);
}
.portada__marco::after {
  content: ''; position: absolute; inset: 6px; border: 1px solid rgba(233, 178, 75, .28);
  pointer-events: none;
}
.portada__foto {
  width: 100%; height: auto; aspect-ratio: 1400 / 714; object-fit: cover;
  filter: saturate(.95) contrast(1.02);
}
.portada__pie {
  font-family: var(--fuente-ui); font-size: var(--t-1); color: var(--tinta-suave);
  padding: 12px 4px 4px; text-align: right; letter-spacing: .08em; text-transform: uppercase;
}
.portada__sello { width: 100%; height: auto; }

/* ── Buscador y recomendados ──────────────────────────────────────
   El campo es un bloque editable y no un formulario: el menú no recoge ni
   envía datos de nadie, busca en la carta que ya está cargada. */
.buscador { padding: 24px 0 0; }
.buscador__fila { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.buscador__etiqueta {
  flex: 0 0 auto; font-family: var(--fuente-ui); font-weight: 600;
  font-size: var(--t-1); letter-spacing: .16em; text-transform: uppercase;
  color: var(--acento-texto);
}
.buscador__campo {
  flex: 1 1 240px; min-height: 48px; padding: 12px 20px;
  border: 1px solid var(--borde); border-radius: 2px;
  background: var(--fondo-claro); color: var(--tinta);
  font-family: var(--fuente-texto); font-size: var(--t-2);
  cursor: text; line-height: 1.4;
}
.buscador__campo:empty::before { content: attr(data-vacio); color: var(--tinta-suave); pointer-events: none; }
.buscador__campo:focus { outline: none; }
.buscador__campo:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }
.buscador__limpiar {
  min-height: 48px; padding: 0 20px; border: 1px solid var(--borde);
  border-radius: 2px; background: transparent; color: var(--tinta);
  font-family: var(--fuente-ui); font-size: var(--t-2); cursor: pointer;
}
.buscador__limpiar:hover { background: var(--fondo-hueso); }
.buscador__estado { margin: 8px 0 0; min-height: 24px; color: var(--tinta-suave); font-size: var(--t-2); }
.buscador__resultados { margin-top: 16px; }

.recomendados { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--borde-tenue); }
.recomendados__cabecera {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.recomendados__titulo {
  margin: 0; font-family: var(--fuente-titulo); font-weight: 600;
  font-size: var(--t-4); letter-spacing: .1em; color: var(--acento);
  text-transform: uppercase;
}
.recomendados__nota { margin: 0; font-size: var(--t-2); color: var(--tinta-suave); }

/* ── Navegación de categorías ────────────────────────────────────── */
.navegacion {
  position: sticky; top: 64px; z-index: 50;
  background: var(--fondo-velado);
  backdrop-filter: saturate(110%) blur(10px);
  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: .1em; 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 dorado bajo el título: una raya fina, la misma que la carta usa para
   separar secciones. Va en el CSS, así que no es ni una petición más. */
.seccion__cabecera::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--acento) 0, rgba(233, 178, 75, .12) 100%);
}
.seccion__numero {
  font-family: var(--fuente-ui); font-weight: 600; font-size: var(--t-2);
  color: var(--acento); line-height: 1; letter-spacing: .08em;
}
.seccion__titulo {
  font-family: var(--fuente-titulo); font-weight: 600;
  font-size: var(--t-5); margin: 0; letter-spacing: .06em;
  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: .1em;
  text-transform: uppercase;
}
.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(--acento);
}
.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 ─────────────────────────────────────────── */
.rejilla {
  display: grid; gap: 24px 24px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.rejilla--continuacion { margin-top: 24px; }
.tarjeta,
.reco {
  position: relative;
  background: var(--fondo-claro);
  border: 1px solid rgba(246, 236, 220, .16);
  border-radius: 2px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.tarjeta:hover,
.reco:hover { border-color: var(--borde); transform: translateY(-2px); }
.tarjeta__marco {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--fondo-hueso);
  border-bottom: 1px solid var(--borde-tenue);
}
.tarjeta__foto { width: 100%; height: 100%; object-fit: cover; }
.tarjeta__velo {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 16, 14, 0) 55%, rgba(23, 16, 14, .5) 100%);
  pointer-events: none;
}
/* El precio, como las etiquetas doradas de la carta: fondo dorado, tinta oscura.
   Sobre la fotografía no hay fondo garantizado, así que el color se trae puesto. */
.tarjeta__precio-flotante {
  position: absolute; right: 10px; bottom: 10px;
  background: var(--acento); color: var(--acento-tinta);
  font-family: var(--fuente-ui); font-weight: 700; font-size: var(--t-2);
  padding: 4px 12px; border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.tarjeta__cuerpo { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

/* ── Tarjeta de texto, para los platos que aún no tienen fotografía ────
   Nombre y precio en la misma línea, lo demás debajo. Se lee de un vistazo y no
   ocupa media pantalla con un hueco gris. */
.tarjeta--texto .tarjeta__cuerpo { padding: 20px; gap: 4px; }
/* La tarjeta sin fotografía no estira el hueco hasta abajo: si el plato solo
   tiene nombre y precio, los botones van debajo y la tarjeta queda corta. Una
   rejilla de cajas grandes y vacías parece una plantilla, no una carta. */
.tarjeta--texto .tarjeta__pie { margin-top: 16px; }
.tarjeta__linea {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 4px 16px; flex-wrap: wrap;
}
.tarjeta__precio {
  flex: 0 0 auto; font-family: var(--fuente-ui); font-weight: 700;
  font-size: var(--t-4); color: var(--acento); white-space: nowrap;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.tarjeta--texto .tarjeta__pie { margin-top: auto; }
.tarjeta .boton,
.reco .boton { white-space: nowrap; }

.tarjeta__nombre {
  font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-4);
  margin: 0; line-height: 1.26; letter-spacing: .01em;
  flex: 1 1 auto; min-width: 0;
  /* Reparte las líneas en vez de dejar una palabra sola al final: «Pollo en
     salsa / de / champiñones» es lo que pasa cuando el navegador corta a lo
     bruto. */
  text-wrap: balance;
}
.tarjeta__nombre-en,
.tarjeta__detalle {
  display: block; font-family: var(--fuente-texto); font-weight: 400;
  font-size: var(--t-2); color: var(--acento-texto); margin: 4px 0 0;
  line-height: 1.3;
}
.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;
}
.tarjeta__elige {
  margin: 0; font-size: var(--t-1); color: var(--acento-texto); line-height: 1.3;
  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: una franja dorada fina, sin
   marco gris ni cartel que no informa de nada. */
.tarjeta__marco--pendiente {
  height: 3px; aspect-ratio: auto; background-image: none;
  background: linear-gradient(90deg, var(--acento) 0%, rgba(233, 178, 75, .25) 100%);
  border-bottom: 0;
}

.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);
  color: var(--tinta-clara-suave);
  padding-block: 40px 32px; font-size: var(--t-2);
}
.pie a { color: var(--tinta-clara); }
/* La barandilla del rótulo, como separador: es de su marca, no un adorno de
   plantilla. */
.pie__baranda {
  width: 156px; height: 20px; margin: 0 0 24px;
  fill: none; stroke: var(--acento); stroke-width: 1.4;
  stroke-linecap: round; opacity: .75;
}
.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: .14em; 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-texto);
}
.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(246, 236, 220, .16);
  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(8, 5, 4, .66);
  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-claro);
  display: flex; flex-direction: column;
  box-shadow: var(--sombra-alta);
  /* Cerrado no basta con sacarlo de la pantalla: sigue en el árbol de accesibilidad
     y el Tab llega a sus botones. Con visibility:hidden deja de existir para el
     lector y para el teclado. */
  visibility: hidden;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), visibility .3s;
}
.panel[data-abierto="true"] { visibility: visible; }
@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); }
  .panel[data-abierto="false"] { visibility: hidden; }
}
@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-hueso);
}
.panel__titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: var(--t-4); margin: 0; letter-spacing: .04em; }
.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-vivo); }
.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-hueso); }

.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); 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: 44px; height: 44px; font-size: var(--t-3); line-height: 1; }
.cantidad button:hover { background: var(--fondo-hueso-vivo); }
.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: .08em; text-transform: uppercase; }
.subtotal__valor { margin-left: auto; font-family: var(--fuente-ui); font-weight: 700; font-size: var(--t-4); color: var(--acento); }
.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; flex-wrap: wrap; }
.dividir__modo {
  border: 1px solid var(--borde); background: var(--fondo-hueso); color: var(--tinta); border-radius: 2px;
  padding: 8px 12px; min-height: 44px;
  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: 44px; height: 44px; border-radius: 2px; border: 1px solid var(--borde);
  background: var(--fondo-hueso); color: var(--tinta);
  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 fondo oscuro. */
.dividir__asignacion select {
  font: inherit; color: var(--tinta); padding: 8px; min-height: 44px;
  border: 1px solid var(--borde); border-radius: 2px; background: var(--fondo-hueso); 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);
  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%);
    visibility: hidden; transition: transform .3s cubic-bezier(.22,.61,.36,1), visibility .3s; }
  .ficha[data-abierto="true"] { transform: translateY(0); visibility: visible; }
}
.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; }
.ficha__marco--pendiente {
  aspect-ratio: auto; height: 56px; background: var(--fondo-hueso); background-image: none;
}
.ficha__marco--pendiente::after { content: none; display: none; }
/* 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-texto); 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); 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, salsa o sabor ───────────────────────────── */
.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-hueso);
  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 { 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; }
  /* El nombre tiene que caber en UNA línea: si la cabecera crece, la barra de
     categorías se le monta encima. Con el emblema fuera y la letra en el escalón
     pequeño, cabe; el nombre ya está escrito, así que no se pierde nada. */
  .cabecera__emblema { display: none; }
  .cabecera__nombre { font-size: var(--t-1); letter-spacing: .1em; }
  .cabecera__interior { gap: 8px; }
  .carrito-boton { padding-inline: 12px; font-size: var(--t-1); }
  .portada__datos li { display: block; }
  .portada__datos strong { display: block; }
  .portada { padding-block: 24px 40px; }
  .seccion { padding-block: 40px 12px; }
  .seccion__meta { margin-left: 0; }
  .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; }
  }
}
