/* Carta pública — mobile first. Los colores y tipografías llegan como variables desde la plantilla. */
:root {
  --bg: #f6f0e5; --surface: #fffaf2; --ink: #1d2a2f; --muted: #6b706c; --line: #e6dccb;
  --accent: #0f4c5c; --accent2: #c8963e; --onAccent: #fff;
  --display: Georgia, serif; --body: system-ui, sans-serif; --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -12px rgb(0 0 0 / .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.wrap { max-width: 720px; margin: 0 auto; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Cabecera ── */
.hero { position: relative; color: #fff; min-height: 300px; display: flex; align-items: flex-end; overflow: hidden; background: var(--accent); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .35) 0%, rgb(0 0 0 / .05) 35%, rgb(0 0 0 / .72) 100%); }
.hero.no-cover { background: radial-gradient(120% 90% at 10% 0%, color-mix(in srgb, var(--accent2) 55%, transparent), transparent 60%), var(--accent); min-height: 250px; }
.hero.no-cover::after { background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / .25)); }
.hero-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; padding: max(14px, env(safe-area-inset-top)) 16px 0; }
.glass { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 999px; background: rgb(255 255 255 / .16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgb(255 255 255 / .22); color: #fff; font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.glass svg { width: 17px; height: 17px; }
.hero-body { position: relative; z-index: 2; width: 100%; max-width: 720px; margin: 0 auto; padding: 72px 20px 22px; }
.logo { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 3px rgb(255 255 255 / .9), 0 8px 20px rgb(0 0 0 / .3); margin-bottom: 14px; }
.logo-mono { display: grid; place-items: center; font: 600 26px/1 var(--display); color: var(--accent); }
.hero h1 { font: 600 clamp(30px, 8.4vw, 44px)/1.04 var(--display); margin: 0 0 6px; letter-spacing: -.01em; text-wrap: balance; }
.hero p.tag { margin: 0; font-size: 15px; opacity: .92; }
/* Los datos del local bajan a otra fila cuando no caben: nunca se cortan. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 12.5px; font-weight: 500; color: #fff; text-decoration: none; white-space: nowrap; max-width: 100%; }
.chip > span { overflow: hidden; text-overflow: ellipsis; }
.chip-reviews svg { color: #ffd166; fill: #ffd166; }
.chip svg { width: 14px; height: 14px; opacity: .9; }

.notice { margin: 16px 16px 0; padding: 13px 15px; border-radius: calc(var(--radius) - 4px); background: color-mix(in srgb, var(--accent2) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent2) 35%, transparent); display: flex; gap: 11px; align-items: flex-start; font-size: 14px; }
.notice svg { flex: none; width: 20px; height: 20px; color: var(--accent2); margin-top: 1px; }

/* ── Navegación de categorías ── */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.nav.stuck { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgb(0 0 0 / .4); }
.nav-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px; max-width: 720px; margin: 0 auto; }
.nav-title { display: none; font: 600 17px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav.stuck .nav-title { display: block; }
.icon-btn { flex: none; position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--onAccent); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.nav.stuck .search { display: none; }
.nav.stuck.searching .search { display: flex; }
.nav.stuck.searching .nav-title { display: none; }
.only-stuck { display: none; }
.nav.stuck:not(.searching) .only-stuck { display: grid; }
.search-x { color: var(--muted); display: none; }
.search.has-value .search-x { display: grid; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 16px 10px; max-width: 720px; margin: 0 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 34px; padding: 0 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: transparent; transition: background .2s, color .2s, border-color .2s; }
.tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── Destacados ── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 26px 20px 12px; }
.section-head h2 { margin: 0; font: 600 24px/1.15 var(--display); letter-spacing: -.01em; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent2); }
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.feat { flex: none; width: 214px; scroll-snap-align: start; text-align: left; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.feat-img { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: var(--line); }
.feat-body { padding: 11px 13px 13px; }
.feat-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.feat-price { margin-top: 6px; font-weight: 700; color: var(--accent); font-size: 14.5px; }

/* ── Categorías y platos ── */
.cat { padding: 6px 0 4px; scroll-margin-top: 112px; }
.cat-head { padding: 22px 20px 6px; }
.cat-head h2 { margin: 0; font: 600 26px/1.15 var(--display); letter-spacing: -.01em; }
.cat-desc { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.badge-time { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 4px 10px; border-radius: 999px; }
.badge-time svg { width: 13px; height: 13px; }
.list { padding: 0 12px; }
.item { width: 100%; display: flex; gap: 14px; text-align: left; padding: 15px 8px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.item:last-child { border-bottom: 0; }
.item-main { flex: 1; min-width: 0; }
.item-top { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.item-name { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.item-price { flex: none; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.item-price small { font-weight: 500; color: var(--muted); font-size: 11.5px; margin-right: 3px; }
.item-desc { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 9px; }
.algs { display: inline-flex; gap: 3px; }
.algs .alg { width: 20px; height: 20px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .01em; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.thumb { flex: none; position: relative; width: 96px; height: 96px; border-radius: calc(var(--radius) - 4px); overflow: hidden; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.item.out { opacity: .55; }
.item.out .item-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.out-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #8c2f2f; padding: 3px 7px; border-radius: 6px; }
.thumb .out-badge { position: absolute; left: 6px; bottom: 6px; }
.empty { text-align: center; padding: 60px 30px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .5; margin-bottom: 10px; }
.search-count { padding: 18px 20px 0; color: var(--muted); font-size: 13px; }

/* ── Pie ── */
.foot { margin-top: 28px; padding: 28px 20px calc(120px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.foot h3 { margin: 0 0 12px; font: 600 18px/1.2 var(--display); }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; margin-bottom: 14px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.legend .alg { width: 22px; height: 22px; flex: none; }
.foot-note { font-size: 12.5px; color: var(--muted); margin: 0 0 20px; }
.info-list { display: grid; gap: 2px; margin: 18px 0 24px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.info-row svg { width: 19px; height: 19px; flex: none; color: var(--accent); margin-top: 1px; }
.info-row small { display: block; color: var(--muted); font-size: 12px; }
.powered { text-align: center; font-size: 12px; color: var(--muted); }
.powered b { font-weight: 800; letter-spacing: .04em; color: var(--ink); }

/* ── Barra de mesa ── */
.tablebar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); width: min(92vw, 520px); display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: 0 18px 40px -12px rgb(0 0 0 / .45); animation: rise .5s cubic-bezier(.2,.8,.2,1) both .4s; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 30px); } }
.tablebar .tb-label { padding: 0 8px 0 12px; font-size: 12px; line-height: 1.15; opacity: .8; white-space: nowrap; }
.tablebar .tb-label b { display: block; font-size: 16px; opacity: 1; font-weight: 700; }
.tb-btn { flex: 1; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 13.5px; background: color-mix(in srgb, var(--bg) 12%, transparent); color: var(--bg); white-space: nowrap; }
.tb-btn.primary { background: var(--accent); color: var(--onAccent); }
.tb-btn svg { width: 17px; height: 17px; }

/* ── Hojas inferiores ── */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgb(10 10 14 / .5); opacity: 0; transition: opacity .25s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 24px 24px 0 0; transform: translateY(105%); transition: transform .36s cubic-bezier(.2,.8,.2,1); padding-bottom: calc(18px + var(--safe-b)); max-width: 720px; margin: 0 auto; }
.sheet.open { transform: none; }
.grab { position: sticky; top: 0; z-index: 2; height: 22px; display: grid; place-items: center; }
.grab::before { content: ""; width: 42px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-x { position: absolute; z-index: 3; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / .45); color: #fff; backdrop-filter: blur(8px); }
.sheet-x svg { width: 18px; height: 18px; }
.sheet-pad { padding: 4px 22px 8px; }
.sheet h3 { margin: 0 0 4px; font: 600 26px/1.15 var(--display); letter-spacing: -.01em; }
.detail-img { width: 100%; aspect-ratio: 16/11; object-fit: cover; margin-top: -22px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.detail-desc { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.variants { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.variants div { display: flex; justify-content: space-between; padding: 12px 15px; font-size: 15px; }
.variants div + div { border-top: 1px solid var(--line); }
.variants b { color: var(--accent); font-variant-numeric: tabular-nums; }
.big-price { font-size: 22px; font-weight: 700; color: var(--accent); margin-top: 14px; }
.block-title { margin: 22px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.alg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.alg-list div { display: flex; gap: 9px; align-items: center; font-size: 14px; }
.alg-list .alg { width: 26px; height: 26px; flex: none; }
.muted { color: var(--muted); font-size: 14px; }
.legal { margin-top: 18px; font-size: 12px; color: var(--muted); }
.soldout-banner { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #8c2f2f14; color: #8c2f2f; font-weight: 600; font-size: 14px; }

.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opt { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 12px; border: 1px solid var(--line); text-align: left; font-size: 13.5px; font-weight: 500; transition: border-color .15s, background .15s; }
.opt .alg { width: 24px; height: 24px; flex: none; }
.opt[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.opt .check { margin-left: auto; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; }
.opt[aria-pressed="true"] .check { background: var(--accent); border-color: var(--accent); color: var(--onAccent); }
.opt .check svg { width: 12px; height: 12px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.btn { flex: 1; height: 50px; border-radius: 14px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); }
.btn.primary { background: var(--accent); color: var(--onAccent); border-color: var(--accent); }
.lang-list { display: grid; gap: 6px; }
.lang-opt { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line); font-weight: 600; }
.lang-opt[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.lang-opt small { color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.confirm-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 6px auto 14px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.confirm-icon svg { width: 30px; height: 30px; }
.center { text-align: center; }

.toast { position: fixed; z-index: 60; left: 50%; top: calc(16px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -140%); max-width: 92vw; padding: 13px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; display: flex; gap: 9px; align-items: center; box-shadow: 0 16px 40px -14px rgb(0 0 0 / .5); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.toast.show { transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: var(--accent2); flex: none; }

.unavailable { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.unavailable h1 { font: 600 28px/1.2 var(--display); margin: 14px 0 6px; }

@media (min-width: 720px) {
  .hero { min-height: 360px; }
  .list { padding: 0 16px; }
  .thumb { width: 112px; height: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Aviso "Carta actualizada" ── */
.fresh { display: flex; align-items: center; justify-content: center; gap: 9px; padding: max(8px, env(safe-area-inset-top)) 16px 8px; font-size: 12.5px; line-height: 1.35; text-align: center; color: var(--ink); background: color-mix(in srgb, #2fa36b 12%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, #2fa36b 25%, transparent); }
.fresh b { font-weight: 600; }
.fresh-note { color: var(--muted); }
.fresh-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 3px color-mix(in srgb, #2fa36b 25%, transparent); }
@media (max-width: 380px) { .fresh-sep { display: none; } .fresh-note { display: block; } .fresh > span:last-child { text-align: left; } }

.foot .legal { margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--muted); }
.foot .legal a { color: var(--muted); text-decoration: none; }
