/* Order-Web — Gäste-Seite (Etappe 1: Karte ansehen, read-only).
 * Farbe/Schrift/Bilder/Listenstil kommen zur Laufzeit aus „Aussehen"
 * und werden per CSS-Variablen auf :root gesetzt (app.js). */

:root {
  --accent: #7A2E36;              /* Aussehen-Default */
  --bg: #F7F1E7;                  /* Aussehen-Default */
  --font: Georgia, 'Times New Roman', serif;
  --ink: #23201B;
  --muted: #8B857A;
  --card: #FFFFFF;
  --border: #ECE6DA;
  --amber: #B5771C;
  --amber-soft: #F7ECD6;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh;
}
img { max-width: 100%; display: block; }

.wrap { max-width: 640px; margin: 0 auto; padding-bottom: 48px; }

/* ── Header ─────────────────────────────────────────────── */
.ghead {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.glogo {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  object-fit: cover; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 16px;
}
.gname { font-weight: 600; font-size: 19px; letter-spacing: -.2px; line-height: 1.1; }
.gmode { font-size: 12px; color: var(--muted); margin-top: 3px;
  font-family: 'DM Sans', system-ui, sans-serif; }
.gtable {
  margin-left: auto; flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
  background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 9px;
}

/* Optionales Kopfbild */
.ghero { width: 100%; height: 160px; object-fit: cover; background: #e9e3d6; }

/* ── Zeitfenster / Geschlossen ─────────────────────────── */
.gband { padding: 16px 18px 4px; }
.gpill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
}
.gpill svg { width: 14px; height: 14px; }
.gclosed {
  display: flex; align-items: flex-start; gap: 10px; margin: 4px 18px 0;
  background: var(--amber-soft); border: 1px solid #EAD9B6; border-radius: 13px;
  padding: 13px 15px; font-family: 'DM Sans', system-ui, sans-serif;
}
.gclosed .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--amber);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px; }
.gclosed .tx { font-size: 13px; line-height: 1.5; }
.gclosed .tx b { font-weight: 600; }

/* ── Menü-Sektionen ────────────────────────────────────── */
.gsection { padding: 22px 18px 0; }
.gsection > h2 {
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  font-family: 'DM Sans', system-ui, sans-serif; color: var(--accent);
  padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}

/* Liste (Default) */
.gitems { display: flex; flex-direction: column; }
.gitem {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 0; border-bottom: 1px solid var(--border);
}
.gitem:last-child { border-bottom: 0; }
.gthumb { width: 66px; height: 66px; border-radius: 13px; object-fit: cover;
  flex-shrink: 0; background: #e9e3d6; }
.gitem .body { flex: 1; min-width: 0; }
.gitem .nm { font-weight: 600; font-size: 16px; letter-spacing: -.1px; line-height: 1.25; }
.gitem .ds { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45;
  font-family: 'DM Sans', system-ui, sans-serif; }
.gitem .pr { font-family: 'JetBrains Mono', monospace; font-size: 13.5px; font-weight: 500;
  margin-top: 8px; white-space: nowrap; }
.gitem.sold { opacity: .55; }
.gsold { display: inline-block; font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px; font-weight: 600; color: var(--amber); background: var(--amber-soft);
  padding: 2px 8px; border-radius: 999px; margin-top: 8px; }

/* Kacheln */
.gitems.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gitems.tiles .gitem { flex-direction: column; gap: 10px; padding: 0;
  border: 1px solid var(--border); border-radius: 15px; overflow: hidden;
  background: var(--card); }
.gitems.tiles .gthumb { width: 100%; height: 120px; border-radius: 0; }
.gitems.tiles .body { padding: 0 13px 14px; width: 100%; }
.gitems.tiles.noimg .gitem { padding: 14px; }

/* Bilder aus → keine Thumbs */
.noimg .gthumb, .gitems.noimg .gthumb { display: none; }

/* ── Zustände ──────────────────────────────────────────── */
.gstate { padding: 80px 30px; text-align: center; font-family: 'DM Sans', system-ui, sans-serif; }
.gstate h2 { font-family: var(--font); font-size: 22px; margin-bottom: 8px; }
.gstate p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.gspin { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: gspin .7s linear infinite; }
@keyframes gspin { to { transform: rotate(360deg); } }

/* Sanftes Einblenden der Sektionen (dekorativ, nur beim Laden) */
.gsection { opacity: 0; transform: translateY(10px); animation: gfade .4s var(--ease-out) forwards; }
.gsection:nth-child(1) { animation-delay: .02s; }
.gsection:nth-child(2) { animation-delay: .08s; }
.gsection:nth-child(3) { animation-delay: .14s; }
.gsection:nth-child(4) { animation-delay: .20s; }
.gsection:nth-child(n+5) { animation-delay: .24s; }
@keyframes gfade { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .gsection { animation: gfadeplain .3s ease forwards; transform: none; }
  @keyframes gfadeplain { to { opacity: 1; } }
}

/* ── Bestellen (Etappe 2) ──────────────────────────────── */
:root { --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); }
body.has-cart .wrap { padding-bottom: 96px; }

/* + / Stepper am Artikel */
.gctrl { margin-left: auto; flex-shrink: 0; align-self: center; }
.gadd {
  width: 34px; height: 34px; border-radius: 11px; border: 0;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 34%, transparent);
  transition: transform 140ms var(--ease-out); cursor: pointer;
}
.gadd:active { transform: scale(0.92); }
.gadd svg { width: 17px; height: 17px; }
.gstep { display: inline-flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 11px; padding: 3px; }
.gstep button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent;
  color: var(--accent); font-size: 19px; line-height: 1; display: grid; place-items: center;
  cursor: pointer; transition: transform 120ms var(--ease-out); }
.gstep button:active { transform: scale(0.9); }
.gstep .q { min-width: 20px; text-align: center; font-family: 'JetBrains Mono', monospace;
  font-weight: 500; font-size: 14px; }
.gitems.tiles .gctrl { align-self: flex-start; }

/* Warenkorb-Balken */
.gcart {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(35,32,27,.06);
  transform: translateY(100%); transition: transform 300ms var(--ease-drawer);
}
.gcart.show { transform: translateY(0); }
.gcart .ci { font-size: 12px; color: var(--muted); font-family: 'DM Sans', system-ui, sans-serif; }
.gcart .cs { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 15px; }
.gbtn {
  margin-left: auto; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
  font-family: 'DM Sans', system-ui, sans-serif;
  padding: 13px 22px; border-radius: 13px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 140ms var(--ease-out);
}
.gbtn:active { transform: scale(0.97); }
.gbtn svg { width: 16px; height: 16px; }
.gbtn.block { width: 100%; margin: 0; justify-content: center; padding: 15px; }
.gbtn[disabled] { opacity: .5; pointer-events: none; }

/* Bestell-Sheet (Bottom-Sheet) */
.gback {
  position: fixed; inset: 0; z-index: 30; background: rgba(20,18,15,.4);
  opacity: 0; transition: opacity 260ms var(--ease-out);
  display: flex; align-items: flex-end; justify-content: center;
}
.gback.show { opacity: 1; }
.gsheet {
  width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 340ms var(--ease-drawer);
  font-family: 'DM Sans', system-ui, sans-serif;
}
.gback.show .gsheet { transform: translateY(0); }
.gsheet .grip { width: 40px; height: 4px; border-radius: 999px; background: var(--border);
  margin: 8px auto 14px; }
.gsheet h3 { font-family: var(--font); font-size: 21px; margin-bottom: 4px; }
.gsheet .sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.grow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.grow .rn { flex: 1; font-weight: 500; font-size: 15px; }
.grow .rp { font-family: 'JetBrains Mono', monospace; font-size: 13.5px; }
.gfield { margin: 16px 0 0; }
.gfield label { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.gfield input, .gfield textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--card);
}
.gfield input:focus, .gfield textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.gfield textarea { resize: none; min-height: 60px; }
.gtot { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 14px; }
.gtot .l { font-weight: 600; }
.gtot .v { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 20px; }

/* Bestätigung */
.gconf { display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 90px 30px; gap: 4px; min-height: 80vh;
  font-family: 'DM Sans', system-ui, sans-serif; }
.gconf .ok { width: 78px; height: 78px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 13%, transparent); display: grid; place-items: center;
  margin-bottom: 16px; transform: scale(0.9); opacity: 0; animation: gpop .42s var(--ease-out) forwards; }
.gconf .ok svg { width: 38px; height: 38px; color: var(--accent); }
.gconf h2 { font-family: var(--font); font-size: 25px; margin-bottom: 4px; }
.gconf .t { font-size: 14px; color: var(--muted); }
.gconf .prep { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px;
  background: var(--card); border: 1px solid var(--border); padding: 9px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600; }
.gconf .prep svg { width: 14px; height: 14px; color: var(--accent); }
.gconf .num { margin-top: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
@keyframes gpop { to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .gcart, .gback, .gsheet, .gconf .ok { transition: opacity .2s ease; animation: none; transform: none; opacity: 1; }
}

/* ── Optionen (Grössen/Extras) ─────────────────────────── */
.gopthint { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600;
  font-family: 'DM Sans', system-ui, sans-serif; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 2px 8px; border-radius: 999px; }
.gadd { position: relative; }
.gqb { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; display: grid; place-items: center; }

.gset { margin-top: 18px; }
.gseth { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.gseth span:first-child { font-weight: 600; font-size: 15px; }
.greq, .gopt { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.greq { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.gopt { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.goptrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 13px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px;
  background: var(--card); font-family: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer;
  transition: border-color 140ms var(--ease-out), background 140ms var(--ease-out); }
.goptrow[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.gmark { width: 20px; height: 20px; flex-shrink: 0; border: 2px solid #cfc8ba; }
.gmark.dot { border-radius: 50%; }
.gmark.box { border-radius: 6px; }
.goptrow[aria-pressed="true"] .gmark { border-color: var(--accent); }
.goptrow[aria-pressed="true"] .gmark.dot { background: radial-gradient(circle at center, var(--accent) 0 5px, transparent 6px); }
.goptrow[aria-pressed="true"] .gmark.box { background: var(--accent); }
.gon { flex: 1; }
.gpm { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--muted); }
.gstep2 { display: flex; align-items: center; gap: 18px; justify-content: center; margin: 20px 0; }
.gstep2 button { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); font-size: 21px; display: grid; place-items: center; cursor: pointer;
  transition: transform 120ms var(--ease-out); }
.gstep2 button:active { transform: scale(0.9); }
.gstep2 .q { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 18px; min-width: 24px; text-align: center; }

/* Options-Zusammenfassung in der Kasse */
.growo { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Combo-„Menü"-Abzeichen */
.gdeal { display: inline-block; font-family: 'DM Sans', system-ui, sans-serif; font-size: 10px;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle;
  color: #fff; background: var(--accent); padding: 2px 7px; border-radius: 999px; margin-left: 4px; }
