:root {
  --red: #8f1d1d;
  --red-d: #6e1414;
  --char: #231f1c;
  --char-2: #4a423c;
  --cream: #fbf5ea;
  --card: #fffdf8;
  --line: #e8dcc8;
  --gold: #e0a23a;
  --wa: #128c4a;
  --r: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--char);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--red); color: #fff;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; }
.brand-sub { font-size: .78rem; opacity: .85; }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: var(--cream); color: var(--red-d); font-weight: 700; white-space: nowrap;
}
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--gold); color: var(--char); font-size: .8rem; line-height: 22px; text-align: center;
}
.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.1); } }

/* Kategorien */
.cats {
  position: sticky; top: 64px; z-index: 15;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 16px; background: var(--char);
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: none; padding: 8px 14px; border-radius: 999px; min-height: 36px;
  color: #f3e9d8; text-decoration: none; font-size: .92rem; font-weight: 600; border: 1px solid #5a514a;
}
.cats a.active { background: var(--cream); color: var(--char); border-color: var(--cream); }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 24px; }
.search { padding: 14px 0 4px; }
.search input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line);
  border-radius: var(--r); background: var(--card);
}
.empty { text-align: center; color: var(--char-2); padding: 24px 0; }

.cat { scroll-margin-top: 124px; }
.cat h2 { margin: 22px 0 10px; font-size: 1.25rem; color: var(--red-d); }
.item {
  position: relative; display: flex; gap: 12px; width: 100%; margin-bottom: 10px; padding: 14px 52px 14px 14px;
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(35, 31, 28, .05);
}
.item:active { transform: scale(.99); }
.item-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-name { font-weight: 700; font-size: 1.02rem; }
.item-desc { font-size: .88rem; color: var(--char-2); }
.item-price { font-weight: 700; color: var(--red); white-space: nowrap; }
.item img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; flex: none; }
.plus {
  position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 1.3rem; line-height: 32px; text-align: center;
}

/* Footer */
.foot { background: var(--char); color: #f3e9d8; padding: 24px 16px 40px; }
.foot > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.foot h2 { margin: 0 0 8px; }
.foot h3 { margin: 18px 0 6px; font-size: 1rem; }
.foot address { font-style: normal; line-height: 1.5; }
.foot a { color: var(--gold); }
.hours { list-style: none; padding: 0; margin: 0; }
.hours li { display: flex; justify-content: space-between; max-width: 260px; }
.small { font-size: .82rem; opacity: .85; }

/* Dialoge als Bottom-Sheet */
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 20px 20px 0 0; background: var(--cream); color: var(--char);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
}
.sheet[open] { animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet::backdrop { background: rgba(20, 16, 14, .55); }
.sheet-in { padding: 0 16px 16px; }
.sheet-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 0 10px; background: var(--cream);
}
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--line); font-size: 1.6rem; line-height: 1; }
#itemImg { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r); }
.desc { color: var(--char-2); margin: 4px 0 8px; }
.group { border: 0; margin: 0 0 12px; padding: 0; }
.group legend { font-weight: 700; padding: 8px 0 6px; }
.group legend small { font-weight: 500; color: var(--char-2); margin-left: 6px; }
.opt {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin-bottom: 6px;
}
.opt:has(input:checked) { border-color: var(--red); background: #fff4ee; }
.opt input { width: 20px; height: 20px; accent-color: var(--red); margin: 0; }
.opt span:first-of-type { flex: 1; }
.opt-price { color: var(--char-2); white-space: nowrap; }
.sheet-foot {
  position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center;
  padding: 12px 0 max(4px, env(safe-area-inset-bottom)); background: var(--cream); border-top: 1px solid var(--line);
}
.qty { display: flex; align-items: center; gap: 6px; }
.qty button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--red); background: var(--card);
  color: var(--red); font-size: 1.3rem; font-weight: 700;
}
.qty button:disabled { opacity: .35; cursor: default; }
.qty output { min-width: 24px; text-align: center; font-weight: 700; }
.qty.small button { width: 36px; height: 36px; font-size: 1.1rem; }
.primary {
  flex: 1; min-height: 50px; padding: 12px 16px; border: 0; border-radius: var(--r);
  background: var(--red); color: #fff; font-weight: 700; font-size: 1rem;
}
.primary:active { background: var(--red-d); }
.primary.wa { width: 100%; background: var(--wa); margin-top: 6px; }
.link { border: 0; background: none; color: var(--red-d); text-decoration: underline; padding: 8px; min-height: 36px; }

.lines { list-style: none; margin: 0; padding: 0; }
.line { padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-main { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.line-price { white-space: nowrap; }
.line-opt { font-size: .86rem; color: var(--char-2); padding-left: 10px; }
.line .qty { margin-top: 8px; }
.qty.small button.link { width: auto; height: auto; margin-left: auto; border: 0; border-radius: 0; background: none; font-size: .9rem; font-weight: 600; }
.total { display: flex; justify-content: space-between; font-size: 1.15rem; padding: 14px 0; }
.mode { display: flex; gap: 8px; border: 0; padding: 0; margin: 0 0 10px; }
.mode label {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px;
  border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); font-weight: 600;
}
.mode label:has(input:checked) { border-color: var(--red); background: #fff4ee; color: var(--red-d); }
.mode input { accent-color: var(--red); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: .9rem; font-weight: 600; }
.field input, .field textarea {
  min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); font-weight: 400; font-size: 1rem;
}
.field [aria-invalid="true"] { border-color: #b3261e; }
.error { color: #b3261e; font-weight: 600; margin: 4px 0; min-height: 1em; }
.hint { font-size: .8rem; color: var(--char-2); margin: 8px 0 0; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }
.sheet-foot .primary { padding: 12px 10px; font-size: .95rem; min-width: 0; }
