/* ============================================================
   PALTO — Carta QR
   Identidad: manual de marca oficial (docs/decisiones.md, 3 sep 2026).
   Paleta y tipografías extraídas del PDF, NO a ojo — ver
   material-cliente/marca/TOKENS-MARCA.md.
   Feed OSCURO (marca) + grilla CLARA (manual, pág. 31-34).
   Tipografía: Bodoni Moda (serif didone, equivalente libre de Bauer
   Bodoni) para nombre de plato / categorías / precios. Jost (sans
   geométrica, equivalente libre de Brandon Light) para textos de
   apoyo (botones, chips, pie).
   ============================================================ */

/* ============================= utilidades =============================
   28 sep 2026 — SEO on-page lanzamiento §3.2. Idéntica a la de
   palto-home/index.html, no existía en este archivo. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---------- Paleta real del manual (TOKENS-MARCA.md) ----------
     Nombres de variable conservados donde el mapeo cae natural (menos
     riesgo de romper referencias); dos variables nuevas para lo que
     el manual tiene y la carta no usaba: --gris (gris neutro) y
     --beige (beige/tan). marron-950 y --paper son las únicas DERIVADAS
     (no están como swatch en el manual): marron-950 es el isologotipo
     oscurecido matemáticamente al 48% — fondo estructural del stage/
     backdrop, nunca contenido; --paper es 80% blanco + 20% crema
     (#DED5BF) — el "papel" sobre el que el manual imprime sus 3
     propuestas de menú (pág. 31 y 33 son blancas, no crema pura). */
  --marron-950: #22120c;       /* derivado — backdrop estructural (antes #26110a) */
  --marron-900: #462519;       /* ISOLOGOTIPO — dominante feed (antes #4e220f, no era de marca) */
  --marron-800: #462519;       /* alias de compatibilidad */
  --marron-700: #553324;       /* marrón tierra — color dominante de la paleta del manual (antes #6e361c) */
  --marron-600: #876b4b;       /* marrón medio / madera del manual — texto muted, hover (antes #886653) */
  --crema-050: #ded5bf;        /* arena/crema del manual — texto claro sobre oscuro (antes #fdfbf2, no era de marca) */
  --crema-100: #ded5bf;        /* alias */
  --crema-200: #dbd8d4;        /* gris claro del manual — el gris que la carta no usaba (antes #efe6cc) */
  --gris-500: #acaeae;         /* gris neutro del manual — NUEVO, filetes/bordes decorativos */
  --beige-500: #c2ad99;        /* beige/tan del manual — NUEVO, detalle */
  --acento-500: #876b4b;       /* alias de --marron-600, mismo rol que antes (acento) */
  --acento-400: #69533a;       /* derivado, acento-500 oscurecido 22% — hover/press */
  --acento-glow: #dbd8d4;      /* gris claro — detalle sutil sobre foto/video (antes salvia #b0ba99) */
  --ink: #462519;              /* = marron-900, fondo base del feed */
  --paper: #f8f7f2;            /* derivado — 80% blanco + 20% crema, fondo de la grilla clara */
  --scrim-top: rgba(70, 37, 25, 0.55);
  --scrim-bottom: rgba(34, 18, 12, 0.92);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --font-body: "Jost", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: var(--font-display); /* precios: Bodoni Moda desde el 3 sep (antes Bricolage) */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}
body {
  background: var(--marron-950);
  font-family: var(--font-body);
  color: var(--crema-050);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible {
  outline: 2px solid var(--acento-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Stage / phone frame (desktop) ---------- */
.stage {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--marron-950);
}
.phone-frame {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--ink);
  overflow: hidden;
}

@media (min-width: 701px) {
  .stage {
    padding: 1.5rem;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(135, 107, 75, 0.16), transparent 60%),
      var(--marron-950);
  }
  .phone-frame {
    width: 412px;
    height: min(860px, calc(100dvh - 3rem));
    border-radius: 46px;
    border: 10px solid #150b06;
    box-shadow:
      0 0 0 1px rgba(135, 107, 75, 0.2),
      0 40px 90px -20px rgba(0, 0, 0, 0.75),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
  .phone-frame::before {
    /* notch */
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 46%;
    height: 26px;
    background: #150b06;
    border-radius: 0 0 18px 18px;
    z-index: 40;
  }
}

/* ---------- App shell ---------- */
.app {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--ink);
}

/* ---------- Header ---------- */
.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.85rem + var(--safe-top)) 1rem 0.6rem;
  background: linear-gradient(to bottom, rgba(34, 18, 12, 0.65) 0%, transparent 100%);
  pointer-events: none;
}
.app-header > * { pointer-events: auto; }
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--crema-050);
}
.back-chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}
/* 3 sep 2026 — logo oficial del manual, ya provisto en crema (#DED5BF) para
   fondo oscuro: se saca el filter invert() que se usaba sobre el logo viejo
   (que además no era del color de marca). */
.brand-logo {
  height: 22px;
  width: auto;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  opacity: 0.98;
}
.grid-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  height: 44px;
  padding: 0 1rem 0 0.85rem;
  border-radius: 999px;
  background: rgba(34, 18, 12, 0.55);
  border: 1px solid rgba(222, 213, 191, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--crema-050);
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, transform 140ms ease;
}
.grid-toggle-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.grid-toggle-label {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.grid-toggle-btn:hover,
.grid-toggle-btn:focus-visible {
  background: rgba(34, 18, 12, 0.8);
  border-color: rgba(222, 213, 191, 0.5);
}
.grid-toggle-btn:active { transform: scale(0.96); }

@keyframes grid-hint-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(222, 213, 191, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(222, 213, 191, 0.22); }
}
.grid-toggle-btn.is-hinting { animation: grid-hint-pulse 1.6s ease-in-out 3; }
@media (prefers-reduced-motion: reduce) {
  .grid-toggle-btn.is-hinting { animation: none; }
}

/* ---------- Category pills ---------- */
.pills-row {
  position: absolute;
  top: calc(4.35rem + var(--safe-top));
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  gap: 0.5rem;
  padding: 0.2rem 1.15rem 0.5rem 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 1rem;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 90%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 90%, transparent 100%);
}
.pills-row::after { content: ""; flex: 0 0 0.5rem; }
.pills-row::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  background: rgba(34, 18, 12, 0.42);
  border: 1px solid rgba(222, 213, 191, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(222, 213, 191, 0.9);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
/* Activa: marron-900 (isologotipo) sólido — 9.3:1 con texto crema, el acento
   madera (--acento-500) no alcanza AA a este tamaño (medido: 3.4:1) así que
   se reserva para detalle decorativo, no para fondo+texto. */
.pill.is-active {
  background: var(--marron-900);
  border-color: var(--marron-900);
  color: var(--crema-050);
}

/* ---------- Feed ---------- */
.feed {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.card {
  position: relative;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--marron-900);
}
.card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--marron-900);
}
.card-media.is-video { background: #000; }

.card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--scrim-bottom) 0%,
    rgba(34, 18, 12, 0.55) 32%,
    rgba(34, 18, 12, 0.08) 58%,
    transparent 72%
  );
  pointer-events: none;
}

.card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(1.35rem + var(--safe-bottom));
  padding: 0 1.25rem;
  z-index: 10;
}
/* Categoría: serif (el manual usa serif para "nombre del plato / categorías
   / precios"), en gris claro del manual (--crema-200) en vez de un beige más
   claro: sobre scrim oscuro con foto/video de fondo, el beige mide 4.99:1 de
   contraste (AA raspa el mínimo) y el gris claro mide 7.59:1 — mismo espíritu
   tierra, más margen real en el peor caso (foto muy clara). */
.card-cat {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crema-200);
  margin-bottom: 0.55rem;
}
/* 1 sep 2026, ronda 2 — Juan rechazó la escala por tiers: un solo tamaño de
   título para las 36 cards del feed, calibrado por el nombre MÁS LARGO
   ("Muslitos Dorados con Ensalada de Espinaca, Tomates Cherry y Gajos de
   Naranja", 76 car.). 3 sep 2026 — recalibrado para Bodoni Moda (otra
   métrica que Bricolage): valores medidos en runtime, ver docs/decisiones.md. */
.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  color: var(--crema-050);
  text-wrap: balance;
  max-width: 94%;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  margin-bottom: 0.6rem;
  font-size: clamp(1rem, 5vw, 1.3rem);
  line-height: 1.16;
}
.card-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(222, 213, 191, 0.9);
  max-width: 36ch;
  margin-bottom: 1.05rem;
}
.card-price-row {
  display: flex;
  align-items: center;
}
.price-pill {
  font-family: var(--font-mono);
  font-weight: 700;
  font-style: normal;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  color: var(--marron-900);
  background: var(--crema-050);
  padding: 0.48rem 1.05rem;
  border-radius: 999px;
}
.price-pill.is-label {
  background: rgba(222, 213, 191, 0.14);
  color: var(--crema-050);
  border: 1px solid rgba(222, 213, 191, 0.32);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.44rem 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Swipe hint ---------- */
.swipe-hint {
  position: absolute;
  left: 50%;
  bottom: 42%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: rgba(222, 213, 191, 0.95);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(20, 10, 6, 0.95),
    0 2px 6px rgba(20, 10, 6, 0.8),
    0 4px 16px rgba(20, 10, 6, 0.6);
  pointer-events: none;
  transition: opacity 420ms ease;
}
.swipe-hint svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(20, 10, 6, 0.95)) drop-shadow(0 2px 7px rgba(20, 10, 6, 0.7));
  animation: hint-bounce 1.5s ease-in-out infinite;
}
.swipe-hint.is-hidden { opacity: 0; }
@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50% { transform: translateY(7px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-hint svg { animation: none; }
}

/* ---------- Progress dots (left edge, subtle) ---------- */
.progress-rail {
  position: absolute;
  left: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.progress-dot {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: rgba(222, 213, 191, 0.25);
  transition: background 200ms ease, height 200ms ease;
}
.progress-dot.is-active { background: var(--crema-200); height: 22px; }

/* ============================================================
   GRID OVERLAY — "la carta", clara, siguiendo el manual pág. 31-34:
   logo centrado arriba, barra de 4 colores como remate, categoría en
   serif caja alta con filetes, line-art botánico en las esquinas,
   pie con wifi/IG. Adaptado a pantalla: grilla de fotos con scroll,
   no una hoja A4.
   ============================================================ */
.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  /* 4 sep 2026 — cerrada, la grilla sólo estaba desplazada fuera de cuadro:
     sus 87 ítems seguían existiendo en el layout, alcanzables por foco de
     teclado y lectores de pantalla. Ahora se saca con display:none y se
     conserva la animación con allow-discrete + @starting-style. En un
     navegador sin ese soporte la grilla abre sin deslizar, que es la
     degradación correcta: se ve, simplemente no anima. */
  display: none;
  transition: transform 320ms cubic-bezier(.2,.8,.25,1), display 320ms allow-discrete;
}
.grid-overlay.is-open {
  display: flex;
  transform: translateY(0);
  @starting-style { transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) {
  /* 4 sep 2026 — con reduced-motion la grilla cerrada quedaba con opacity:0
     pero seguía siendo "visible" para el árbol de accesibilidad y para el
     gate de QA (que mide la opacidad PROPIA del nodo, no la heredada), y
     daba FAIL recurrente por el <p> del WIFI. visibility:hidden la saca de
     verdad: mismo resultado visual, y el contenido oculto deja de ser
     alcanzable por teclado y lectores de pantalla. */
  .grid-overlay { transition: opacity 200ms ease, display 200ms allow-discrete; transform: none; opacity: 0; pointer-events: none; }
  .grid-overlay.is-open { opacity: 1; pointer-events: auto; @starting-style { opacity: 0; } }
}

.grid-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(0.95rem + var(--safe-top)) 3.6rem 0.55rem;
  background: var(--paper);
  overflow: hidden;
}
/* Line-art botánico extraído del manual (pág. 33, objetos vectoriales del
   PDF — no recreado a ojo). Un solo archivo, espejado por CSS para la
   esquina derecha. Sutil (opacity), decorativo: no compite con el logo. */
.grid-corner-leaf {
  position: absolute;
  top: -0.6rem;
  width: 92px;
  height: auto;
  opacity: 0.55;
  pointer-events: none;
}
.grid-corner-leaf.is-left { left: -1.1rem; }
.grid-corner-leaf.is-right { right: -1.1rem; transform: scaleX(-1); }
.grid-header-logo {
  position: relative;
  height: 26px;
  width: auto;
  z-index: 1;
}
.grid-header-sub {
  position: relative;
  z-index: 1;
  margin-top: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* marron-700, no marron-600: medido 4.62:1 con madera (raspa AA), 10.4:1 con
     marron-700 — mismo criterio que el resto de las etiquetas del pie. */
  color: var(--marron-700);
}
.grid-close-btn {
  position: absolute;
  top: calc(0.7rem + var(--safe-top));
  right: 0.85rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--crema-200);
  color: var(--marron-900);
  z-index: 2;
}
.grid-close-btn svg { width: 17px; height: 17px; }

/* Barra de 4 colores — remate tal cual aparece al pie de cada página del
   manual (paleta operativa de TOKENS-MARCA.md, mismo orden). */
.grid-colorbar {
  display: flex;
  height: 5px;
  flex: 0 0 auto;
}
.grid-colorbar span { flex: 1 1 0; }
.grid-colorbar span:nth-child(1) { background: #876b4b; }
.grid-colorbar span:nth-child(2) { background: #462519; }
.grid-colorbar span:nth-child(3) { background: #c2ad99; }
.grid-colorbar span:nth-child(4) { background: #dbd8d4; }

.grid-filters {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(70, 37, 25, 0.12);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 92%, transparent 100%);
}
.grid-filters::-webkit-scrollbar { display: none; }
.grid-filter {
  flex: 0 0 auto;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(70, 37, 25, 0.28);
  color: var(--marron-900);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap; min-height:44px; display:inline-flex; align-items:center; }
.grid-filter.is-active { background: var(--marron-900); border-color: var(--marron-900); color: var(--crema-050); }

.grid-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 0.9rem calc(0.6rem + var(--safe-bottom));
}
.grid-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
/* Encabezado de sección por categoría, solo en la vista "Todo": serif caja
   alta centrada con filetes a los costados, calcado del manual (pág. 31-32,
   "ENTRADAS" / "CARNES"). Ocupa las 2 columnas de la grilla. */
.grid-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0.15rem;
}
.grid-section-header:first-child { margin-top: 0; }
.grid-section-header .filet {
  flex: 1 1 auto;
  height: 1px;
  background: var(--gris-500);
}
.grid-section-header .label {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marron-900);
}
.grid-item {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--crema-100);
  border: 1px solid rgba(70, 37, 25, 0.12);
  text-align: left;
}
.grid-item-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(155deg, var(--marron-700), var(--marron-900));
  overflow: hidden;
}
.grid-item-media img { width: 100%; height: 100%; object-fit: cover; }
.grid-item-media .no-photo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(222, 213, 191, 0.7);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  text-align: center;
  padding: 0.5rem;
}
.grid-item-info {
  padding: 0.55rem 0.6rem 0.7rem;
}
.grid-item-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.22;
  color: var(--marron-900);
  margin-bottom: 0.28rem;
}
/* Precio en itálica serif, igual que el manual (pág. 32-33 lo muestran así,
   en línea con la descripción). marron-700 en vez del acento madera: mide
   10.4:1 contra --paper (madera solo llega a 4.6:1, sin margen real). */
.grid-item-price {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--marron-700);
}
.grid-item-price.is-label {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  /* marron-700: madera medía 3.39:1 sobre crema-100, no pasa AA. */
  color: var(--marron-700);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Pie de la grilla: wifi + IG, texto real del manual (pág. 31 y 33). */
.grid-footer {
  flex: 0 0 auto;
  padding: 0.75rem 1rem calc(0.9rem + var(--safe-bottom));
  text-align: center;
  border-top: 1px solid rgba(70, 37, 25, 0.12);
  background: var(--paper);
}
.grid-footer p {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--marron-700);
}

/* ---------- Quick view sheet (items sin foto) ---------- */
.quickview {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  background: rgba(34, 18, 12, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.quickview.is-open { opacity: 1; pointer-events: auto; }
.quickview-sheet {
  width: 100%;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding: 1.4rem 1.3rem calc(1.6rem + var(--safe-bottom));
  transform: translateY(16px);
  transition: transform 220ms ease;
}
.quickview.is-open .quickview-sheet { transform: translateY(0); }
.quickview-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--marron-900);
}
.quickview-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quickview-cat {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marron-700);
  margin-bottom: 0.4rem;
}
.quickview-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--marron-900);
  margin-bottom: 0.35rem;
}
.quickview-desc {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--marron-700);
  margin-bottom: 0.9rem;
}
.quickview-price {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--marron-900);
  margin-bottom: 1.1rem;
  display: block;
}
.quickview-actions { display: flex; }
.quickview-close-text {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(70, 37, 25, 0.35);
  color: var(--marron-900);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .feed { scroll-behavior: auto; }
}

/* ---------- Small phones ---------- */
@media (max-width: 359px) {
  .card-desc { font-size: 0.85rem; }
  .grid-header { padding-left: 3.1rem; padding-right: 3.1rem; }
  .grid-corner-leaf { width: 66px; }
}

/* ============================================================
   DESKTOP (≥1024px) — la carta sigue siendo el marco de teléfono
   (producto de celular), pero con backdrop de marca + panel lateral
   con logo, QR y vuelta al home. NO es un teléfono flotando en blanco.
   ============================================================ */
.carta-desktop-panel { display: none; }

@media (min-width: 1024px) {
  .stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(3rem, 7vw, 6.5rem);
    padding: 2rem;
    background:
      radial-gradient(ellipse 900px 640px at 12% 15%, rgba(135, 107, 75, 0.22), transparent 60%),
      radial-gradient(ellipse 760px 620px at 88% 85%, rgba(135, 107, 75, 0.18), transparent 55%),
      var(--marron-950);
  }

  .carta-desktop-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 360px;
    color: var(--crema-050);
  }
  .panel-logo-link { display: inline-block; }
  /* Logo oficial en crema, ya provisto para fondo oscuro: sin filter invert(). */
  .panel-logo { height: 38px; width: auto; }
  .panel-title {
    margin-top: 2.4rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.9rem;
    line-height: 1.05;
    color: var(--crema-050);
  }
  .panel-text {
    margin-top: 1.1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 34ch;
    color: rgba(222, 213, 191, 0.78);
  }
  .panel-qr {
    margin-top: 2.3rem;
    padding: 1rem;
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 24px 55px -20px rgba(0, 0, 0, 0.65);
  }
  .panel-qr img { display: block; width: 170px; height: 170px; }
  .panel-hint {
    margin-top: 1.1rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    max-width: 26ch;
    color: rgba(222, 213, 191, 0.6);
  }
  .panel-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(222, 213, 191, 0.18);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--crema-050);
    transition: color 0.2s ease;
  }
  .panel-back svg { width: 18px; height: 18px; flex: 0 0 auto; }
  .panel-back:hover, .panel-back:focus-visible { color: var(--beige-500); }

  .phone-frame { flex: 0 0 auto; }
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .panel-back { transition: color 0.2s ease, transform 0.2s ease; }
}
