@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("../../fuentes/barlow-condensed-800.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../../fuentes/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../../fuentes/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../../fuentes/barlow-600.woff2") format("woff2"); }
/* Layout: una sola columna tipo carta de papel; cabecera de cartel enlozado, solapas fijas por rubro, renglones con puntos hasta el precio. */
:root {
  --bg: #f1f5ef;          /* azulejo blanco */
  --surface: #ffffff;
  --ink: #15231c;
  --muted: #55665c;
  --line: #c9d4cb;
  --accent: #0e5a3b;      /* verde sifón */
  --accent-ink: #ffffff;
  --hot: #b8301c;         /* rojo de cartel */
  --sun: #f2b632;         /* amarillo de pizarra del día */
  --sun-ink: #2a1e00;
  --shade: rgba(21, 35, 28, .5);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131f1a; --surface: #1a2923; --ink: #edf2ea; --muted: #a1b2a7; --line: #2f4238;
    --accent: #7dd3a3; --accent-ink: #0c1912; --hot: #ff8d75; --sun: #f2c14e; --sun-ink: #2a1e00;
    --shade: rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131f1a; --surface: #1a2923; --ink: #edf2ea; --muted: #a1b2a7; --line: #2f4238;
  --accent: #7dd3a3; --accent-ink: #0c1912; --hot: #ff8d75; --sun: #f2c14e; --sun-ink: #2a1e00;
  --shade: rgba(0, 0, 0, .6); color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--body); margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.demo-note { background: var(--ink); color: var(--bg); font-size: 13px; padding: 8px 16px; text-align: center; }
.wrap { max-width: 680px; margin: 0 auto; padding-inline: 16px; }

/* Cabecera */
.head { padding-block: 28px 20px; display: grid; gap: 12px; }
.head h1 { font: 800 clamp(52px, 17vw, 96px)/.86 var(--display); letter-spacing: .01em; text-transform: uppercase; margin: 0; color: var(--accent); text-wrap: balance; }
.head .sub { margin: 0; color: var(--muted); font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.status i { width: 10px; height: 10px; border-radius: 50%; background: var(--hot); flex: none; }
.status.open i { background: var(--accent); }

/* Plato del día */
.today { background: var(--sun); color: var(--sun-ink); padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: end; }
.today h2 { font: 800 34px/1 var(--display); text-transform: uppercase; margin: 0; min-width: 0; }
.today p { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.today .price { font: 800 30px/1 var(--display); font-variant-numeric: tabular-nums; }

/* Solapas */
.tabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 2px solid var(--ink); margin-top: 20px; }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs .wrap::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 14px 10px 12px; font: 700 19px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 4px solid transparent; margin-bottom: -2px; }
.tabs a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Carta */
section.rubro { padding-top: 28px; scroll-margin-top: calc(56px + env(safe-area-inset-top, 0px)); }
section.rubro h2 { font: 800 40px/1 var(--display); text-transform: uppercase; margin: 0 0 4px; }
section.rubro .aside { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.item .top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.item .name { font-weight: 600; }
.item .dots { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.item .price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item .desc { margin: 0; color: var(--muted); font-size: 14px; }
.item .marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mark { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border: 1.5px solid currentColor; padding: 1px 6px; color: var(--accent); }
.item .qty { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: flex; align-items: center; gap: 2px; }
.qty button { width: 40px; height: 40px; border: 2px solid var(--ink); background: var(--surface); font-size: 22px; line-height: 1; cursor: pointer; }
.qty button.add { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.qty output { min-width: 26px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Datos del local */
.info { margin-top: 36px; border-top: 2px solid var(--ink); padding-block: 24px 32px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.info h3 { font: 700 18px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; color: var(--muted); }
.info p, .info dl { margin: 0; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-variant-numeric: tabular-nums; }
.info dd { margin: 0; }
.info a { color: var(--accent); font-weight: 600; }
.credit { color: var(--muted); font-size: 13px; padding-bottom: 24px; }
body.has-order .credit { padding-bottom: 96px; }

/* Barra del pedido */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--accent); color: var(--accent-ink); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.bar button { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; max-width: 648px; margin: 0 auto; font-weight: 600; }
.bar button:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }
.bar b { font: 800 26px/1 var(--display); font-variant-numeric: tabular-nums; }

/* Pedido */
dialog { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); }
dialog::backdrop { background: var(--shade); }
.sheet { padding: 20px; display: grid; gap: 14px; }
.sheet h2 { font: 800 36px/1 var(--display); text-transform: uppercase; margin: 0; }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet li { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sheet .total { display: flex; justify-content: space-between; font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.sheet label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.sheet select, .sheet textarea { border: 2px solid var(--ink); background: var(--bg); padding: 10px; width: 100%; }
.sheet .actions { display: grid; gap: 8px; }
.btn { display: block; text-align: center; padding: 14px; font-weight: 600; text-decoration: none; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sheet .fine { margin: 0; color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
