/* ==========================================================================
   Bacalar · Cocina Mexicana — Carta digital
   Identidad tomada de Carta_Bacalar.pdf: paleta, tipografías, grabados,
   títulos verticales con regla y fotos recortadas que rompen la columna.
   ========================================================================== */

/* ---------- Tipografía ---------- */
/* Alegreya Sans se declara en fuentes.css (incrustada).
   Carilliantine y Capires NO se cargan como fuente: sus títulos son trazos SVG (data/titulos.js). */

/* ---------- Tokens ---------- */
:root {
  --naranja: #CF541B;
  --oxido: #A63C12;
  --verde: #18433F;
  --verde-hondo: #12332F;
  --durazno: #FEEADA;
  --durazno-2: #FBDCC5;
  --durazno-3: #F7CDAE;
  --crema: #FAE4B1;
  --mostaza: #F7AD1A;
  --naranja-tinta: #A9410F;

  --texto: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;

  /* Escala de los títulos SVG: px por punto del PDF (los títulos de sección miden 50 pt) */
  --escala-titulo: 0.92;
  --escala-salsas: 0.9;
  --escala-rotulo: 1.2;
  --escala-lema: 1.55;

  --margen: 16px;
  --riel: 56px;
  --nav-h: 54px;
  --radio: 18px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Mundo por defecto: cocina (verde sobre durazno) */
  --tinta: var(--verde);
  --tinta-suave: var(--verde);
  --accion: var(--verde);
  --accion-texto: var(--crema);
  --grabado: var(--mostaza);
  --foco: var(--verde);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--durazno);
  color: var(--verde);
  font-family: var(--texto);
  font-size: 16px;
  line-height: 1.45;
  overflow-x: clip;
  font-variant-numeric: lining-nums;
}

img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }

::selection { background: var(--mostaza); color: var(--verde); }

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 6px;
}

button, a, [role="button"], label.chip, .check {
  touch-action: manipulation;
}
button, .chip, .check, .categorias a, .barra-pedido {
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, select { font-size: 16px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

[hidden]:not(.barra-pedido) { display: none !important; }
[tabindex="-1"]:focus { outline: none; }

.visualmente-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.saltar {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--verde);
  color: var(--crema);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.saltar:focus { top: 12px; }

/* Grabados: siluetas con transparencia, coloreadas con la tinta de cada superficie */
.grabado {
  display: block;
  background: var(--img) center / contain no-repeat;
  pointer-events: none;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accion);
  color: var(--accion-texto);
  font-family: var(--texto);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 160ms ease;
}
.boton:active { transform: scale(0.97); }
.boton svg { width: 22px; height: 22px; flex: none; }
.boton--crema { background: var(--crema); color: var(--verde); }
.boton--bloque { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .boton:hover { background: var(--verde-hondo); }
  .boton--crema:hover { background: #FFF0CC; }
}

.icono-boton {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--verde);
  transition: transform 120ms var(--ease-out), background-color 160ms ease;
}
.icono-boton svg { width: 22px; height: 22px; }
.icono-boton:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) {
  .icono-boton:hover { background: var(--durazno-2); }
}

/* ==========================================================================
   Portada
   ========================================================================== */
.portada {
  --grabado: var(--oxido);
  --foco: var(--crema);
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: min(92svh, 820px);
  padding: calc(env(safe-area-inset-top, 0px) + 28px) var(--margen) 28px;
  background: var(--naranja);
  color: var(--crema);
  overflow: hidden;
  isolation: isolate;
}
.portada__grabados { position: absolute; inset: 0; z-index: -1; }
.portada .grabado { position: absolute; translate: 0 var(--prof, 0px); }
.grabado--guerrero {
  --img: url('../img/grabados/guerrero-oxido.webp');
  width: 52vw; max-width: 330px; aspect-ratio: 598 / 760;
  left: -6vw; top: -2%;
}
.grabado--sombrero {
  --img: url('../img/grabados/sombrero-oxido.webp');
  width: 66vw; max-width: 460px; aspect-ratio: 760 / 421;
  right: -22vw; top: 15%;
  transform: rotate(-24deg);
}
.portada .grabado--jaguar {
  --img: url('../img/grabados/jaguar-oxido.webp');
  width: 112vw; max-width: 820px; aspect-ratio: 760 / 714;
  left: 50%; bottom: 7%;
  translate: -50% var(--prof, 0px);
}

.portada__marca {
  display: grid;
  place-items: end center;
  padding-bottom: 6svh;
}
.portada__logo img {
  width: min(56vw, 290px);
  height: auto;
}

.portada__accion {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}
.portada__texto {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--crema);
  max-width: 30ch;
  text-wrap: balance;
}

/* Entrada de la portada: la marca aparece primero, después los grabados */
@keyframes aparece-sube {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
}
@keyframes aparece {
  from { opacity: 0; }
}
.portada__logo img { animation: aparece-sube 760ms var(--ease-out) both; }
.portada__accion { animation: aparece-sube 760ms var(--ease-out) 160ms both; }
.portada .grabado--jaguar { animation: aparece 1100ms var(--ease-out) 120ms both; }
.portada .grabado--guerrero { animation: aparece 1100ms var(--ease-out) 260ms both; }
.portada .grabado--sombrero { animation: aparece 1100ms var(--ease-out) 360ms both; }

/* ==========================================================================
   Navegación de categorías
   ========================================================================== */
.categorias {
  --foco: var(--mostaza);
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--verde);
  padding-top: env(safe-area-inset-top, 0px);
}
.categorias__pista {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.categorias__pista::-webkit-scrollbar { display: none; }
/* Borde derecho que se desvanece: indica que la barra se puede deslizar. Desaparece al llegar al final. */
.categorias__pista:not([data-fin]) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
}
.categorias__lista {
  display: flex;
  width: max-content;
  padding: 0 calc(var(--margen) + 16px) 0 calc(var(--margen) - 10px);
}
.categorias a {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 10px;
  color: var(--crema);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}
.categorias a[aria-current="true"] { color: var(--mostaza); }
.categorias a:focus-visible { outline-offset: -6px; }
@media (hover: hover) and (pointer: fine) {
  .categorias a:hover { color: #FFF3D6; }
}
.categorias__indicador {
  position: absolute;
  left: 0; bottom: 8px;
  height: 4px;
  width: 1px;
  border-radius: 4px;
  background: var(--mostaza);
  transform-origin: left center;
  transform: translateX(var(--x, 0)) scaleX(var(--w, 0));
  transition: transform 320ms var(--ease-in-out);
}

/* ==========================================================================
   Salsas
   ========================================================================== */
.salsas {
  --grabado: #0F3531;
  --foco: var(--mostaza);
  position: relative;
  padding: 28px var(--margen) 54px;
  background: var(--verde);
  color: var(--crema);
  overflow: hidden;
  isolation: isolate;
}
.salsas::after {
  /* borde de pincelada, como la franja de la página 2 */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 26px;
  background: var(--durazno);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V14C40 9 70 16 112 13 160 9 190 4 240 8 290 12 330 19 372 12 386 10 394 9 400 9V26Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V14C40 9 70 16 112 13 160 9 190 4 240 8 290 12 330 19 372 12 386 10 394 9 400 9V26Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.salsas .grabado { position: absolute; z-index: -1; }
.salsas .grabado--campana {
  --img: url('../img/grabados/campana-sombra.webp');
  width: 150px; aspect-ratio: 697 / 556;
  left: -18px; top: 20px;
}
.salsas .grabado--chile-verde {
  --img: url('../img/grabados/chile-sombra.webp');
  width: 90px; aspect-ratio: 263 / 760;
  right: 4%; top: -20px;
  transform: rotate(-58deg);
}
.salsas__interior { max-width: 1360px; margin: 0 auto; }
/* ---------- Títulos de marca en SVG ---------- */
.titulo-svg {
  display: block;
  fill: currentColor;
  width: calc(var(--w) * var(--escala) * 1px);
  height: calc(var(--h) * var(--escala) * 1px);
  max-width: 100%;
  overflow: visible;
}
.salsas__titulo { --escala: var(--escala-salsas); color: var(--mostaza); line-height: 1; }
.salsas__titulo .titulo-svg { height: auto; aspect-ratio: calc(var(--w)) / calc(var(--h)); }
.salsas__lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 20px;
  margin-top: 16px;
}
.salsas__lista li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
}
.salsas__lista svg { width: 18px; height: 16px; color: var(--mostaza); flex: none; }
.salsas__nota {
  margin-top: 16px;
  font-size: 16px;
  color: var(--crema);
}

/* ==========================================================================
   Secciones de la carta
   ========================================================================== */
.disposicion { position: relative; }

.carta:focus { outline: none; }

.seccion {
  position: relative;
  display: grid;
  grid-template-columns: var(--riel) minmax(0, 1fr);
  column-gap: 14px;
  padding: 36px var(--margen);
  isolation: isolate;
}

.mundo-barra {
  --tinta: var(--naranja);
  --tinta-suave: var(--naranja-tinta);
  --accion: var(--naranja-tinta);
  --grabado: var(--naranja);
  --foco: var(--naranja-tinta);
}
.mundo-barra.inicio-barra { padding-top: 72px; } /* pausa deliberada al pasar de la cocina a la barra */
.mundo-barra .precio,
.mundo-barra .plato__nombre { color: var(--naranja-tinta); }
.carta { overflow-x: clip; }

.seccion__riel { position: relative; }
.seccion__riel::after {
  /* la regla vertical que agrupa los productos */
  content: '';
  position: absolute;
  top: 6px; bottom: 6px; right: 0;
  width: 3px;
  border-radius: 3px;
  background: var(--tinta);
}
/* El título vertical: dibujo del PDF, se lee de abajo hacia arriba como en la carta impresa */
.seccion__titulo {
  --escala: var(--escala-titulo);
  position: sticky;
  top: calc(var(--nav-h) + 18px);
  margin: 0;
  color: var(--tinta);
  line-height: 0;
}

.seccion__cuerpo { position: relative; min-width: 0; padding-top: 2px; }

.seccion__rotulo {
  --escala: var(--escala-rotulo);
  color: var(--tinta);
  margin-bottom: 12px;
  line-height: 0;
}
.seccion__desc {
  font-size: 16px;
  line-height: 1.4;
  color: var(--tinta-suave);
  max-width: 46ch;
}
.elige {
  --escala: var(--escala-rotulo);
  margin: 22px 0 8px;
  line-height: 0;
  color: var(--tinta);
}

/* ---------- Lista de platos ---------- */
.platos { display: grid; }
.plato {
  position: relative;
  padding: 12px 0;
}
.plato__abrir {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  width: calc(100% - 52px);
  padding: 2px 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--tinta);
  border-radius: 10px;
  transition: opacity 160ms ease;
}
.plato__abrir:active { opacity: 0.7; }
.precio {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--tinta);
  white-space: nowrap;
}
.plato__nombre {
  font-weight: 800;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--tinta);
  text-wrap: balance;
}
.plato__desc {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.38;
  color: var(--tinta-suave);
  text-wrap: pretty;
}
.plato__nota {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-weight: 800;
  font-size: 16px;
  color: var(--tinta);
}
.plato__sabores {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 16px;
  color: var(--tinta-suave);
}
.plato__sabores li::before { content: '– '; }
.plato--agotado .plato__abrir { opacity: 0.55; }
.etiqueta-agotado {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--verde);
  color: var(--crema);
  font-size: 15px;
  font-weight: 700;
  vertical-align: middle;
}

/* Botón de agregar */
.mas {
  position: absolute;
  top: 10px; right: 0;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accion);
  color: var(--accion-texto);
  transition: transform 140ms var(--ease-out), background-color 200ms ease;
}
.mas svg { grid-area: 1 / 1; width: 22px; height: 22px; transition: transform 220ms var(--ease-out), opacity 160ms ease; }
.mas .ico-check { opacity: 0; transform: scale(0.6); }
.mas:active { transform: scale(0.9); }
.mas.agregado { background: var(--mostaza); color: var(--verde); }
.mas.agregado .ico-mas { opacity: 0; transform: scale(0.6) rotate(90deg); }
.mas.agregado .ico-check { opacity: 1; transform: scale(1); }
.mas:disabled { opacity: 0.35; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .mas:hover { transform: scale(1.06); }
  .plato__abrir:hover .plato__nombre { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
}

/* ---------- Proteínas ---------- */
.proteinas { display: grid; gap: 2px; }
.proteina {
  display: grid;
  grid-template-columns: 4.6em auto 34px;
  align-items: center;
  column-gap: 12px;
  width: 100%;
  max-width: 300px;
  min-height: 48px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--tinta);
  text-align: left;
  border-radius: 10px;
}
.proteina .precio { font-size: 18px; }
.proteina__nombre { font-size: 20px; font-weight: 500; }
.proteina__mas {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--accion);
  color: var(--accion-texto);
  transition: transform 140ms var(--ease-out);
}
.proteina__mas svg { width: 18px; height: 18px; }
.proteina:active .proteina__mas { transform: scale(0.88); }
@media (hover: hover) and (pointer: fine) {
  .proteina:hover .proteina__nombre { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .proteina:hover .proteina__mas { transform: scale(1.08); }
}

/* ---------- Fotos de platos: recortes que rompen la columna ---------- */
.foto-plato {
  position: relative;
  width: min(82%, 380px);
  margin: 6px calc(-1 * var(--margen) - 18px) 6px auto;
}
/* Reserva espacio mientras carga (proporción provisional); al cargar usa la proporción real de la foto */
.foto-plato img { width: 100%; height: auto; aspect-ratio: auto 1.1; }
.foto-plato__abrir {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: zoom-in;
  transition: transform 160ms var(--ease-out);
}
.foto-plato__abrir:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .foto-plato__abrir { transition: transform 420ms var(--ease-out); }
  .foto-plato__abrir:hover { transform: scale(1.03) rotate(-1.5deg); }
}
/* Mientras la foto viaja a la ficha, el original y el destino quedan ocultos */
.en-vuelo { opacity: 0; }
.foto-plato img.en-vuelo { transition: opacity 200ms ease; }

/* ---------- Grabados que acompañan secciones ---------- */
.arte { position: absolute; z-index: -1; }
.arte--tacos {
  --img: url('../img/grabados/chile-mostaza.webp');
  width: 46px; aspect-ratio: 263 / 760;
  right: 10px; top: -78px;
  transform: rotate(28deg);
}
.arte--fin {
  position: relative;
  z-index: 0;
  margin: 10px -6px -12px auto;
}
.arte--tortas {
  --img: url('../img/grabados/guerrero-mostaza.webp');
  width: 116px; aspect-ratio: 598 / 760;
}
.arte--compartir {
  --img: url('../img/grabados/sombrero-mostaza.webp');
  width: 150px; aspect-ratio: 760 / 421;
  right: -24px; top: -54px;
  transform: rotate(-8deg);
}
.arte--extras {
  --img: url('../img/grabados/cactus-mostaza.webp');
  width: 84px; aspect-ratio: 475 / 760;
}
.arte--protein {
  --img: url('../img/grabados/jaguar-mostaza.webp');
  position: relative;
  width: min(62%, 260px);
  aspect-ratio: 760 / 714;
  margin: 10px -8px 0 auto;
}
.arte--cocteles {
  --img: url('../img/grabados/citrico-naranja.webp');
  width: 220px; aspect-ratio: 1;
  left: -150px; top: -40px;
  opacity: 0.22;
}
.arte--bebidas {
  --img: url('../img/grabados/piramide-naranja.webp');
  width: 330px; aspect-ratio: 664 / 392;
  right: calc(-1 * var(--margen) - 60px); bottom: -28px;
  opacity: 0.2;
}

/* ---------- Para compartir ---------- */
.destacado {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 4px;
}
.destacado__fila {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.destacado .precio { font-size: 24px; }
.destacado__nombre {
  font-weight: 800;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 9ch;
}
.destacado__nota { font-weight: 800; font-size: 16px; }
.destacado__desc { font-size: 16px; line-height: 1.4; max-width: 42ch; }
.destacado .boton { justify-self: start; margin-top: 8px; }

/* ---------- Adiciones ---------- */
.adiciones { display: grid; gap: 6px; max-width: 270px; }
.adiciones li { display: flex; gap: 14px; align-items: baseline; font-size: 20px; }
.adiciones .precio { min-width: 4.6em; font-size: 18px; }
.adiciones__nota { margin-top: 14px; font-size: 16px; max-width: 30ch; color: var(--tinta); }

/* ==========================================================================
   Contraportada
   ========================================================================== */
.contraportada {
  --grabado: var(--oxido);
  --foco: var(--crema);
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 40px;
  min-height: 92svh;
  padding: 80px var(--margen) calc(130px + env(safe-area-inset-bottom, 0px));
  background: var(--naranja);
  color: var(--crema);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.grabado--nopal {
  --img: url('../img/grabados/nopal-oxido.webp');
  position: absolute;
  z-index: -1;
  width: min(108vw, 620px);
  aspect-ratio: 607 / 760;
  left: 50%; bottom: -16%;
  translate: -50% 0;
}
.contraportada__lema { --escala: var(--escala-lema); display: grid; justify-items: center; gap: 4px; }
.lema-a, .lema-c { line-height: 0; }
/* "encienden" va en Alegreya Sans, como en la contraportada del PDF (37 pt) */
.lema-b { font-size: calc(37px * var(--escala-lema)); font-weight: 400; line-height: 0.95; }
.contraportada__contacto { display: grid; gap: 12px; justify-items: center; }
.contraportada__contacto a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  color: var(--crema);
  font-size: 24px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .contraportada__contacto a:hover { background: rgba(166, 60, 18, 0.45); }
}
.icono-marca {
  width: 28px; height: 28px;
  background: var(--img) center / contain no-repeat;
}
.icono-marca--instagram { --img: url('../img/grabados/instagram-crema.webp'); }
.icono-marca--whatsapp { --img: url('../img/grabados/whatsapp-crema.webp'); }

/* ==========================================================================
   Barra de pedido (móvil)
   ========================================================================== */
.barra-pedido {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 22px 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--verde);
  color: var(--crema);
  box-shadow: 0 10px 28px rgba(18, 51, 47, 0.32), 0 2px 6px rgba(18, 51, 47, 0.2);
  text-align: left;
  transition: transform 340ms var(--ease-drawer), opacity 200ms ease;
}
.barra-pedido[hidden] { display: grid; transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none; }
.barra-pedido:active { transform: scale(0.98); }
.barra-pedido__cuenta {
  display: grid;
  place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--mostaza);
  color: var(--verde);
  font-weight: 800;
  font-size: 18px;
}
.barra-pedido__texto { font-size: 18px; font-weight: 800; }
.barra-pedido__total { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Panel del pedido (hoja en móvil, columna fija en escritorio)
   ========================================================================== */
.pedido {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  visibility: hidden;
  transition: visibility 0s linear 360ms;
}
.pedido[data-abierto="true"] { visibility: visible; transition: none; }
.pedido__fondo {
  position: absolute;
  inset: 0;
  background: rgba(18, 51, 47, 0.5);
  opacity: 0;
  transition: opacity 300ms ease;
}
.pedido[data-abierto="true"] .pedido__fondo { opacity: 1; }
.pedido__hoja {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px));
  background: var(--durazno);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(18, 51, 47, 0.25);
  transform: translateY(100%);
  transition: transform 360ms var(--ease-drawer);
}
.pedido[data-abierto="true"] .pedido__hoja { transform: translateY(var(--arrastre, 0px)); }
.pedido.arrastrando .pedido__hoja { transition: none; }

.pedido__cabecera {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px var(--margen) 12px 20px;
  touch-action: none;
}
.asa {
  position: absolute;
  left: 50%; top: 8px;
  width: 44px; height: 5px;
  margin-left: -22px;
  border-radius: 5px;
  background: var(--durazno-3);
}
.pedido__titulo {
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--verde);
}
.pedido__cuerpo {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--margen) calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
}

.pedido__vacio {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 12px 40px;
  text-align: center;
}
.pedido__vacio .grabado {
  --img: url('../img/grabados/sombrero-mostaza.webp');
  width: 170px; aspect-ratio: 760 / 421;
}
.pedido__vacio p { font-size: 18px; max-width: 26ch; }

.lineas { display: grid; }
.linea {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 14px 0;
}
.linea + .linea { box-shadow: inset 0 2px 0 var(--durazno-2); }
.linea--nueva { animation: linea-entra 360ms var(--ease-out) 120ms backwards; }
@keyframes linea-entra { from { opacity: 0; transform: translateY(-8px); } }
.linea__nombre { grid-column: 2; grid-row: 1; font-weight: 800; font-size: 18px; line-height: 1.2; align-self: center; }
.linea__detalle { grid-column: 2 / -1; font-size: 15px; line-height: 1.35; color: var(--verde); }
.linea__detalle:empty { display: none; }
.linea__detalle span { display: block; }
.linea__precio { grid-column: 3; grid-row: 1; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; align-self: center; }

/* Miniatura del plato en el pedido */
.miniatura {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: relative;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  overflow: hidden;
}
.miniatura--foto { background: var(--durazno-3); }
.miniatura--foto img { width: 116%; max-width: none; height: auto; }
.miniatura .grabado { width: 78%; height: 78%; }
.linea__controles {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.linea__editar {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--verde);
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.contador {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  background: var(--durazno-2);
}
.contador button {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--verde);
  transition: transform 120ms var(--ease-out), background-color 160ms ease;
}
.contador button:active { transform: scale(0.88); background: var(--durazno-3); }
.contador svg { width: 20px; height: 20px; }
.contador output {
  min-width: 26px;
  text-align: center;
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.cuentas {
  display: grid;
  gap: 6px;
  margin: 8px 0 22px;
  padding: 16px 18px;
  border-radius: var(--radio);
  background: var(--durazno-2);
}
.cuentas div { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.cuentas dd, .cuentas dt { margin: 0; }
.cuentas dd { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.cuentas .cuentas__total { font-size: 20px; font-weight: 800; padding-top: 6px; }
.cuentas .cuentas__total dd { font-weight: 800; }
.cuentas__aclara { font-size: 15px; }

.entrega h3, .bloque-titulo {
  font-size: 20px;
  font-weight: 800;
  margin: 6px 0 12px;
}
.segmentado {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--durazno-2);
  margin-bottom: 18px;
}
.segmentado label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.segmentado input { position: absolute; opacity: 0; pointer-events: none; }
.segmentado input:checked + span { color: var(--crema); }
.segmentado label:has(input:checked) { background: var(--verde); color: var(--crema); }
.segmentado label:has(input:focus-visible) { outline: 3px solid var(--mostaza); outline-offset: 2px; }

.campos { display: grid; gap: 14px; }
.campo { display: grid; gap: 6px; }
.campo label, .campo legend { font-weight: 700; font-size: 16px; }
.campo input, .campo textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid var(--durazno-3);
  border-radius: 14px;
  background: #FFF7F0;
  color: var(--verde);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.campo textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.campo input::placeholder, .campo textarea::placeholder { color: #5C716E; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--verde); background: #FFFBF7; }
.campo [aria-invalid="true"] { border-color: #B3261E; }
.campo__error { font-size: 15px; font-weight: 700; color: #9E1F17; }
.campo__ayuda { font-size: 15px; color: var(--verde); }

.opciones-pago { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.enviar { margin-top: 22px; display: grid; gap: 12px; }
.enviar .boton { min-height: 58px; font-size: 18px; }
.enviar__nota { font-size: 15px; line-height: 1.4; }
.enviar__estado { font-size: 16px; font-weight: 700; }
.enviar__estado a { color: var(--verde); }
.vaciar {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 700;
  font-size: 16px;
  color: var(--verde);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ==========================================================================
   Ficha de producto (diálogo)
   ========================================================================== */
.ficha {
  width: 100%;
  max-width: 100%;
  max-height: 100dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--verde);
  overflow: visible;
}
.ficha::backdrop {
  background: rgba(18, 51, 47, 0.5);
  animation: aparece 260ms ease both;
}
.ficha.cerrando::backdrop { opacity: 0; transition: opacity 220ms ease; }
.ficha__hoja {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px));
  background: var(--durazno);
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  animation: hoja-entra 380ms var(--ease-drawer) backwards;
}
.ficha.cerrando .ficha__hoja { animation: hoja-sale 240ms var(--ease-out) forwards; }
.ficha.arrastrando .ficha__hoja { animation: none; }
@keyframes hoja-entra { from { transform: translateY(100%); } }
@keyframes hoja-sale { to { transform: translateY(100%); } }

html.bloqueado { overflow: hidden; }

.ficha__desplazable {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 20px;
}
.ficha__cabecera {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  height: 0;
  touch-action: none;
}
.ficha__cerrar {
  margin: 12px 12px 0 0;
  background: rgba(254, 234, 218, 0.94);
  box-shadow: 0 2px 10px rgba(18, 51, 47, 0.12);
}
.ficha .asa { top: 8px; z-index: 3; }
.ficha__media {
  position: relative;
  margin: 0 -20px 4px;
  isolation: isolate;
}
.ficha__titulo-bloque { padding-top: 34px; }
.ficha__media + .ficha__titulo-bloque { padding-top: 14px; }

/* Con foto: el plato se apoya sobre un campo de color y lo desborda por abajo */
.ficha__media--foto {
  display: grid;
  place-items: center;
  padding: 34px 20px 0;
}
.ficha__media--foto::before {
  content: '';
  position: absolute;
  inset: 0 0 18% 0;
  z-index: -1;
  background: var(--durazno-2);
}
.ficha__media--foto img {
  width: min(86%, 400px);
  height: auto;
  animation: foto-asienta 560ms var(--ease-out) 60ms backwards;
}
@keyframes foto-asienta { from { opacity: 0; transform: translateY(14px) scale(1.06); } }

/* Sin foto: lámina de la casa con el título y el grabado de la categoría */
.lamina--verde { background-color: var(--verde); --grabado: var(--mostaza); color: var(--crema); }
.lamina--naranja { background-color: var(--naranja); --grabado: var(--oxido); color: var(--crema); }
.ficha__media--lamina {
  height: clamp(200px, 56vw, 260px);
  overflow: hidden;
}
.lamina__titulo {
  position: absolute;
  left: 22px; top: 26px; bottom: 26px;
  line-height: 0;
  animation: lamina-titulo 640ms var(--ease-out) 90ms backwards;
}
.lamina__titulo .titulo-svg { width: auto; height: 100%; aspect-ratio: calc(var(--w)) / calc(var(--h)); }
@keyframes lamina-titulo { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
.lamina__arte {
  position: absolute;
  right: -6%; bottom: -8%;
  width: 72%; height: 116%;
  background-position: right bottom;
  animation: lamina-arte 760ms var(--ease-out) 140ms backwards;
}
@keyframes lamina-arte { from { opacity: 0; transform: translateY(18px) scale(1.04); } }
.lamina__arte--chile { width: 30%; right: 14%; bottom: -4%; height: 104%; rotate: 22deg; }
/* Color del grabado según el fondo de la lámina: mostaza sobre verde, óxido sobre naranja */
.lamina--verde .lamina__arte--chile { --img: url('../img/grabados/chile-mostaza.webp'); }
.lamina--verde .lamina__arte--jaguar { --img: url('../img/grabados/jaguar-mostaza.webp'); }
.lamina--verde .lamina__arte--guerrero { --img: url('../img/grabados/guerrero-mostaza.webp'); }
.lamina--verde .lamina__arte--nopal { --img: url('../img/grabados/nopal-mostaza.webp'); }
.lamina--verde .lamina__arte--sombrero { --img: url('../img/grabados/sombrero-mostaza.webp'); }
.lamina--naranja .lamina__arte--jaguar { --img: url('../img/grabados/jaguar-oxido.webp'); }
.lamina--naranja .lamina__arte--citrico { --img: url('../img/grabados/citrico-oxido.webp'); }
.lamina--naranja .lamina__arte--piramide { --img: url('../img/grabados/piramide-oxido.webp'); }
.miniatura .lamina__arte--chile { width: 78%; rotate: 22deg; }

/* Foto en vuelo desde la carta hasta la ficha */
.foto-vuelo {
  position: fixed;
  z-index: 10;
  margin: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
}

/* Plato que viaja al pedido */
.bola-vuelo,
.bola-vuelo[popover] {
  position: fixed;
  inset: auto;
  left: 0; top: 0;
  width: 0; height: 0;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  overflow: visible;
  z-index: 90;
  pointer-events: none;
}
.bola-vuelo__punto {
  display: block;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--durazno-3) center / 128% no-repeat;
  box-shadow: 0 6px 18px rgba(18, 51, 47, 0.28);
}
.bola-vuelo--sello .bola-vuelo__punto { background: var(--mostaza); box-shadow: inset 0 0 0 4px var(--verde), 0 6px 18px rgba(18, 51, 47, 0.28); }
.ficha__nombre {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  padding-right: 56px;
  text-wrap: balance;
}
.ficha__categoria { margin-top: 4px; font-size: 16px; font-weight: 500; }
.ficha__precio { margin-top: 10px; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ficha__desc { margin-top: 10px; font-size: 18px; line-height: 1.42; }
.ficha__nota { margin-top: 8px; font-weight: 800; }

.grupo { margin-top: 24px; }
.grupo legend {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
}
.grupo__req { font-size: 15px; font-weight: 500; }
.grupo__error {
  display: none;
  margin: -4px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #9E1F17;
}
.grupo.con-error .grupo__error { display: block; }
.grupo.con-error .chips { animation: sacude 320ms var(--ease-out); }
@keyframes sacude {
  20% { transform: translateX(-6px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--durazno-2);
  color: var(--verde);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 120ms var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--verde); color: var(--crema); }
.chip:has(input:focus-visible) { outline: 3px solid var(--verde); outline-offset: 2px; }
.chip svg { width: 16px; height: 14px; color: var(--naranja); flex: none; }
.chip:has(input:checked) svg { color: var(--mostaza); }
.chip__precio { font-weight: 500; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .chip:hover { background: var(--durazno-3); }
  .chip:has(input:checked):hover { background: var(--verde-hondo); }
}

.checks { display: grid; gap: 6px; }
.check {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 14px;
  border-radius: 14px;
  background: var(--durazno-2);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__caja {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: #FFF7F0;
  box-shadow: inset 0 0 0 2px var(--verde);
  color: var(--crema);
  transition: background-color 160ms ease;
}
.check__caja svg { width: 18px; height: 18px; opacity: 0; transform: scale(0.6); transition: opacity 140ms ease, transform 200ms var(--ease-out); }
.check:has(input:checked) .check__caja { background: var(--verde); }
.check:has(input:checked) .check__caja svg { opacity: 1; transform: scale(1); }
.check:has(input:focus-visible) { outline: 3px solid var(--verde); outline-offset: 2px; }
.check__precio { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .check:hover { background: var(--durazno-3); }
}

.ficha__pie {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--durazno);
  box-shadow: 0 -2px 0 var(--durazno-2);
}
.ficha__pie .boton { flex: 1; min-height: 54px; padding: 0 18px; }
.ficha__pie .boton span:last-child { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Diálogo de confirmación (vaciar pedido)
   ========================================================================== */
.confirmar {
  width: calc(100% - 32px);
  max-width: 380px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--durazno);
  color: var(--verde);
  box-shadow: 0 24px 60px rgba(18, 51, 47, 0.3);
  overflow: visible;
}
.confirmar[open] { animation: confirmar-entra 200ms var(--ease-out) both; }
.confirmar::backdrop { background: rgba(18, 51, 47, 0.5); animation: aparece 200ms ease both; }
.confirmar.cerrando { animation: confirmar-sale 150ms var(--ease-out) forwards; }
.confirmar.cerrando::backdrop { opacity: 0; transition: opacity 150ms ease; }
@keyframes confirmar-entra { from { opacity: 0; transform: scale(0.96); } }
@keyframes confirmar-sale { to { opacity: 0; transform: scale(0.97); } }

.confirmar__caja { padding: 26px 22px 22px; }
.confirmar__titulo {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.confirmar__texto { margin-top: 8px; font-size: 16px; line-height: 1.4; }
.confirmar__acciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.confirmar .boton { min-height: 50px; padding: 0 16px; }
.boton--suave { background: var(--durazno-2); color: var(--verde); }
.boton--eliminar { background: var(--naranja-tinta); color: var(--crema); }
@media (hover: hover) and (pointer: fine) {
  .boton--suave:hover { background: var(--durazno-3); }
  .boton--eliminar:hover { background: #8F360C; }
}
@media (prefers-reduced-motion: reduce) {
  .confirmar[open] { animation-name: aparece; }
  .confirmar.cerrando { animation-name: desaparece; }
}

/* ==========================================================================
   Aviso flotante
   ========================================================================== */
.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--verde-hondo);
  color: var(--crema);
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(18, 51, 47, 0.3);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 200ms ease, transform 260ms var(--ease-out);
  pointer-events: none;
}
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }

.aviso-nojs, .carta-error {
  margin: 40px var(--margen);
  font-size: 18px;
}
.carta-error .boton { margin-top: 14px; }

/* ==========================================================================
   Aparición por scroll (solo con JavaScript; sin él todo se ve)
   ========================================================================== */
.js .revela .seccion__titulo {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 700ms var(--ease-out);
}
.js .revela [data-r] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease-out), transform 620ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms + 120ms);
}
.js .revela.visto .seccion__titulo { clip-path: inset(0); }
.js .revela.visto [data-r] { opacity: 1; transform: none; }

/* Fotos de platos: se descubren de abajo hacia arriba y se asientan */
.js .revela .foto-plato[data-r] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 820ms var(--ease-out) 80ms; }
.js .revela .foto-plato[data-r] img { transform: scale(1.1); transition: transform 1100ms var(--ease-out) 80ms, opacity 200ms ease; }
.js .revela.visto .foto-plato[data-r] { clip-path: inset(-20% -20% -20% -20%); }
.js .revela.visto .foto-plato[data-r] img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .portada__logo img, .portada__accion, .portada .grabado { animation-name: aparece; }
  .js .revela .seccion__titulo { clip-path: none; transition: none; }
  .js .revela [data-r] { transform: none; transition: opacity 300ms ease; transition-delay: 0ms; }
  .ficha__hoja { animation-name: aparece; animation-duration: 200ms; }
  .ficha.cerrando .ficha__hoja { animation: desaparece 180ms ease forwards; }
  @keyframes desaparece { to { opacity: 0; } }
  .pedido__hoja { transform: none; opacity: 0; transition: opacity 220ms ease; }
  .pedido[data-abierto="true"] .pedido__hoja { opacity: 1; transform: none; }
  .barra-pedido[hidden] { transform: none; }
  .categorias__indicador { transition: none; }
  .grupo.con-error .chips { animation: none; }
  .js .revela .foto-plato[data-r] { clip-path: none; transition: none; }
  .js .revela .foto-plato[data-r] img { transform: none; transition: none; }
  .ficha__media--foto img, .lamina__titulo, .lamina__arte { animation-name: aparece; }
  .linea--nueva { animation-name: aparece; }
  .foto-plato__abrir:hover { transform: none; }
}

/* ==========================================================================
   Pantallas medianas
   ========================================================================== */
@media (min-width: 420px) {
  .plato__desc, .plato__nota, .plato__sabores { grid-column: 2; }
}

@media (min-width: 640px) {
  :root { --margen: 28px; --riel: 84px; }
  .seccion { column-gap: 26px; padding-top: 56px; padding-bottom: 56px; }
  .mundo-barra.inicio-barra { padding-top: 96px; }
  :root { --escala-titulo: 1.44; --escala-salsas: 1.1; --escala-rotulo: 1.25; --escala-lema: 2; }
  .portada__logo img { width: 300px; }
  .grabado--guerrero { left: 2vw; width: 300px; }
  .grabado--sombrero { right: -60px; width: 420px; }
  .portada .grabado--jaguar { width: 760px; }
  .seccion--protein .seccion__cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .seccion--protein .seccion__cuerpo > :not(.proteinas):not(.arte--protein):not(.foto-plato):not(.elige) { grid-column: 1 / -1; }
  .seccion--protein .elige { grid-column: 1; grid-row: 3; }
  .seccion--protein .proteinas { grid-column: 1; grid-row: 4; }
  .seccion--protein .foto-plato, .seccion--protein .arte--protein { grid-column: 2; grid-row: 3 / span 2; align-self: center; width: 100%; margin: 0 calc(-1 * var(--margen)) 0 0; }
  .arte--tacos { width: 64px; right: 6%; top: -96px; }
  .arte--tortas { width: 140px; margin-top: -56px; }
  .seccion--extras .seccion__cuerpo { min-height: 250px; }
  .arte--extras { position: absolute; width: 140px; right: 10%; top: 0; margin: 0; }
  .arte--compartir { width: 220px; right: 4%; top: -40px; }
  .arte--cocteles { left: -220px; width: 300px; }
  .ficha {
    max-width: 560px;
    margin: auto;
  }
  .ficha__hoja { border-radius: 24px; max-height: min(86dvh, 860px); animation: modal-entra 260ms var(--ease-out) backwards; }
  .ficha.cerrando .ficha__hoja { animation: modal-sale 180ms var(--ease-out) forwards; }
  .ficha .asa { display: none; }
  @keyframes modal-entra { from { opacity: 0; transform: scale(0.97) translateY(8px); } }
  @keyframes modal-sale { to { opacity: 0; transform: scale(0.97); } }
}

/* ==========================================================================
   Escritorio: carta + pedido siempre visible
   ========================================================================== */
@media (min-width: 1080px) {
  :root { --riel: 110px; --margen: 40px; --nav-h: 60px; }
  .portada { min-height: min(86svh, 860px); padding-top: 40px; }
  .portada__marca { padding-bottom: 4svh; }
  .portada__logo img { width: clamp(340px, 28vw, 420px); }
  .portada__texto { font-size: 20px; }
  .grabado--guerrero { width: 380px; left: 5vw; top: 6%; }
  .grabado--sombrero { width: 400px; right: 1vw; top: 1%; transform: rotate(-16deg); }
  .portada .grabado--jaguar { width: 760px; bottom: -3%; }
  .categorias__lista { margin: 0 auto; padding: 0 30px; }
  .categorias a { font-size: 18px; padding: 0 12px; }

  .disposicion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 40px;
    max-width: 1360px;
    margin: 0 auto;
    padding-right: 32px;
  }
  .salsas__interior { padding-left: calc(var(--riel) + 26px); }
  :root { --escala-titulo: 1.84; --escala-salsas: 1.2; --escala-lema: 2.3; }
  .ficha__media--lamina { height: 280px; }
  .plato { padding: 16px 0; }
  /* El + queda cerca del nombre y el precio, no al otro extremo de la columna */
  .seccion__cuerpo { max-width: 700px; }
  .plato__nombre { font-size: 20px; }
  .plato__desc { font-size: 18px; max-width: 52ch; }
  .foto-plato { width: min(60%, 420px); margin-right: -10px; }

  .pedido {
    position: sticky;
    inset: auto;
    top: calc(var(--nav-h) + 20px);
    z-index: 5;
    display: block;
    align-self: start;
    height: calc(100dvh - var(--nav-h) - 40px);
    margin-top: 28px;
    visibility: visible;
    transition: none;
  }
  .pedido__fondo, .pedido__cerrar, .pedido .asa { display: none; }
  .pedido__hoja {
    height: 100%;
    max-height: none;
    border-radius: 24px;
    background: var(--durazno-2);
    box-shadow: none;
    transform: none;
    transition: none;
  }
  .pedido__cabecera { touch-action: auto; padding-top: 24px; }
  .pedido .cuentas, .pedido .segmentado, .pedido .contador { background: var(--durazno-3); }
  .pedido .campo input, .pedido .campo textarea { border-color: var(--durazno-3); }
  .pedido .linea + .linea { box-shadow: inset 0 2px 0 var(--durazno-3); }
  .barra-pedido { display: none; }
  .barra-pedido[hidden] { display: none; }
  .aviso { bottom: 32px; }
  .contraportada { min-height: 80svh; padding-bottom: 100px; }
}

@media (min-width: 1080px) and (prefers-reduced-motion: reduce) {
  .pedido__hoja { opacity: 1; }
}
