:root {
  color-scheme: light;
  --red: #E01E2B;
  --red-d: #B5121B;
  --ink: #17120F;
  --paper: #F4F1F0;
  --card: #FFFFFF;
  --line: #E6DFDD;
  --field: #DCD4D1;
  --muted: #5F5552;
  --yellow: #FFC72C;
  --photo: #2B2422;
  --photo-ink: #CFC6C3;
  --green: #14803F;
  --wa: #1FA855;
  --display: 'Bangers', 'Impact', sans-serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.35;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }

/* Encabezado */
.hero { position: relative; overflow: hidden; background: var(--red); color: #fff; padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-bottom: 26px; }
.wm { position: absolute; top: -34px; left: -70px; right: -70px; transform: rotate(-8deg); font-family: var(--display); font-size: 78px; line-height: 1; color: rgba(23,18,15,.10); white-space: nowrap; pointer-events: none; user-select: none; }
.wm span { display: block; }
.wm span:nth-child(even) { margin-left: -96px; }
.hero .wrap { position: relative; display: flex; flex-direction: column; gap: 12px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seg { display: flex; padding: 3px; border-radius: 999px; background: rgba(23,18,15,.30); }
.seg button { height: 38px; min-width: 50px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: #fff; font-weight: 800; font-size: 14px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.hero-body { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.logo { width: 220px; max-width: 58vw; height: auto; transform: rotate(-4deg); filter: drop-shadow(0 10px 14px rgba(23,18,15,.35)); margin-left: -4px; }
.hero h1 { margin: 0; font-size: 46px; line-height: .95; color: #fff; text-shadow: 3px 3px 0 var(--ink); text-wrap: balance; flex: 1 1 240px; }
.hero p { margin: 0; font-weight: 700; font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { padding: 8px 12px; border-radius: 999px; border: 2px solid rgba(255,255,255,.7); font-size: 13px; font-weight: 700; }
.banner { background: var(--ink); color: #fff; padding: 12px 0; font-weight: 700; font-size: 15px; }
.banner a { color: var(--yellow); }
.banner .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Categorías */
.cats { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.cats .wrap { display: flex; gap: 8px; padding-top: 10px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.cats .wrap::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 700; white-space: nowrap; }
.chip small { font-size: 12px; font-weight: 700; color: var(--muted); }
.chip[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 800; }
.chip[aria-current="true"] small { color: var(--yellow); }

/* Menú */
.sec { padding-top: 24px; scroll-margin-top: 72px; }
.sec h2 { margin: 0; font-size: 36px; line-height: 1; color: var(--red); text-shadow: 2px 2px 0 var(--ink); }
.sec .note { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 60ch; }
.list { display: grid; grid-template-columns: 1fr; column-gap: 28px; }
@media (min-width: 760px) { .list { grid-template-columns: 1fr 1fr; } }
.row { position: relative; border-bottom: 1px solid var(--line); }
.row-main { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; background: none; border: 0; padding: 14px 6px 14px 0; }
.row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-txt .name, .fav-txt .name { margin: 0; font-size: 17px; font-weight: 800; font-stretch: 92%; line-height: 1.2; }
.favs { display: flex; gap: 12px; overflow-x: auto; padding: 14px 0 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.favs::-webkit-scrollbar { display: none; }
.fav { position: relative; flex: none; width: 236px; border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: 0 1px 0 var(--line), 0 10px 24px rgba(23,18,15,.07); scroll-snap-align: start; }
.fav-main { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.fav-ph { position: relative; height: 168px; background: var(--photo); color: var(--photo-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; overflow: hidden; text-align: center; padding: 0 12px; }
.fav-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fav-tag { position: absolute; top: 10px; left: 10px; }
.fav-txt { display: flex; flex-direction: column; gap: 2px; padding: 12px 64px 14px 14px; }
.fav-plus { right: 10px; bottom: 10px; border-color: var(--card); }
.row-txt .sub { font-size: 12px; font-weight: 600; color: var(--muted); }
.row-txt .desc { margin: 2px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.meta { margin-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.tag.tag-fav { background: var(--yellow); color: var(--ink); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.tag.off { background: #E9E2E0; color: var(--muted); }
.ph { flex: none; width: 104px; height: 104px; border-radius: 16px; background: var(--photo); color: var(--photo-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plus { position: absolute; right: -6px; bottom: 8px; width: 44px; height: 44px; border-radius: 999px; border: 3px solid var(--paper); background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(23,18,15,.25); }
.plus:disabled { background: #9C918E; box-shadow: none; cursor: not-allowed; }
.row.off .ph, .row.off .row-txt h3 { opacity: .55; }
main.menu { padding-bottom: 130px; min-height: 60vh; }
.loading, .error-box { padding: 40px 0; font-weight: 700; color: var(--muted); }

/* Barra de pedido */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 0 max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.bar-in { pointer-events: auto; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 20px; background: var(--ink); color: #fff; box-shadow: 0 14px 30px rgba(23,18,15,.35); border: 0; width: 100%; text-align: left; }
.bar .count { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.bar .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar .txt strong { font-size: 16px; font-weight: 800; }
.bar .txt span { font-size: 12px; color: var(--photo-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .go { flex: none; height: 44px; padding: 0 14px; border-radius: 14px; background: #fff; color: var(--ink); display: flex; align-items: center; font-size: 14px; font-weight: 800; }

/* Hojas (detalle y pedido) */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(23,18,15,.55); }
.panel { position: relative; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--paper); border-radius: 26px 26px 0 0; display: flex; flex-direction: column; overscroll-behavior: contain; }
@media (min-width: 700px) { .sheet { align-items: center; } .panel { border-radius: 26px; } }
.panel .x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 0; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(23,18,15,.25); }
.pic { flex: none; height: 220px; background: var(--photo); color: var(--photo-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pbody { padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.pbody h2 { margin: 0; font-size: 40px; line-height: .95; }
.pbody .sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.pbody .big { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.grp { margin: 0; padding: 14px 14px 4px; border: 0; border-radius: 18px; background: #fff; }
.grp legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 800; }
.grp .req { padding: 4px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.grp.missing { outline: 3px solid var(--red); }
.opt { clear: both; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); cursor: pointer; font-weight: 700; }
.opt input { width: 22px; height: 22px; margin: 0; accent-color: var(--red); }
.opt .en { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .lbl { font-size: 15px; font-weight: 800; }
.input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--field); border-radius: 14px; background: #fff; font-size: 16px; }
textarea.input { min-height: 72px; resize: none; }
.hint { font-size: 12px; line-height: 1.4; color: var(--muted); }
.foot { position: sticky; bottom: 0; flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px max(16px, env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); }
.qty { flex: none; display: flex; align-items: center; height: 52px; padding: 0 4px; border-radius: 16px; background: var(--paper); }
.qty button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; display: flex; align-items: center; justify-content: center; }
.qty output { min-width: 24px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.btn { flex: 1; min-height: 52px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--red); color: #fff; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn:disabled { background: #9C918E; cursor: not-allowed; }
.btn.wa { background: var(--wa); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--field); }
.err { margin: 0; padding: 10px 12px; border-radius: 12px; background: #FDE7E8; color: #8A0E16; font-size: 14px; font-weight: 700; }

/* Pedido (hoja) */
.lines { display: flex; flex-direction: column; }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.line .t b { font-size: 16px; font-weight: 800; line-height: 1.2; }
.line .t span { font-size: 12px; color: var(--muted); }
.mini { flex: none; display: flex; align-items: center; height: 44px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.mini button { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.mini output { min-width: 18px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.types { display: flex; gap: 8px; border: 0; margin: 0; padding: 0; }
.types label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 15px; font-weight: 700; cursor: pointer; }
.types input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.types label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.types label:has(input:checked) input { accent-color: var(--yellow); }
.sum { padding: 14px 16px; border-radius: 18px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.sum b { font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--red); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 10px 24px rgba(23,18,15,.35); }

@media (prefers-reduced-motion: no-preference) {
  .panel { animation: up .22s ease-out; }
  .toast { animation: pop .18s ease-out; }
  .plus:active { transform: scale(.92); }
  @keyframes up { from { transform: translateY(24px); } to { transform: none; } }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
}

.sum .gt { padding-top: 8px; border-top: 1px solid var(--line); font-size: 17px; font-weight: 800; }
