/* chläbi storefront — retro palette, mobile-first
   Palette: Blau #134686 · Rot #ED3F27 · Gelb #FEB21A · Creme #FDF4E3 */

:root {
  --blue: #134686;
  --blue-deep: #0F3A6F;
  --ink: #113F73;        /* Text auf Creme */
  --ink-soft: #566A86;   /* Sekundärtext auf Creme */
  --ink-faint: #6A7890;  /* Labels */
  --red: #ED3F27;
  --yellow: #FEB21A;
  --cream: #FDF4E3;
  --line: #E7DECB;
  --radius: 22px;
  --sheet-radius: 28px;
  --shadow: 0 10px 24px rgba(0, 0, 0, .22);
  --ff: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* hidden muss immer gewinnen, auch gegen display:flex/grid der Klassen. */
[hidden] { display: none !important; }

html { background: var(--blue); }
html, body {
  margin: 0;
  color: var(--ink);
  font-family: var(--ff);
  -webkit-font-smoothing: antialiased;
}
body { max-width: 520px; margin: 0 auto; }

.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ---------- Explore (blaues Feld) ---------- */
.app { background: var(--blue); color: var(--cream);
  min-height: 100dvh; padding: 18px 18px 44px; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.wordmark { font-size: 28px; font-weight: 600; color: var(--cream); letter-spacing: -.5px; }

.icon-btn { position: relative; background: none; border: 0; color: var(--cream);
  font-size: 22px; padding: 4px; cursor: pointer; }
.cart-count { position: absolute; top: -2px; right: -4px; background: var(--red);
  color: var(--cream); font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px;
  display: grid; place-items: center; padding: 0 4px; }

.hero h1 { font-size: 34px; font-weight: 600; line-height: 1.05; letter-spacing: -.6px;
  margin: 4px 0 8px; color: var(--cream); }
.hero p { font-size: 14px; color: rgba(253, 244, 227, .74); line-height: 1.5; margin: 0 0 20px; }

.search { display: flex; align-items: center; gap: 9px; background: var(--cream);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.search .i { font-size: 18px; color: var(--ink-faint); flex: none; }
.search input { border: 0; outline: 0; background: none; font: inherit; font-size: 14px;
  color: var(--ink); width: 100%; }
.search input::placeholder { color: var(--ink-faint); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 22px;
  scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font: inherit; font-size: 13px; padding: 8px 15px; border-radius: 999px;
  border: 1.5px solid rgba(253, 244, 227, .45); background: none; color: var(--cream); cursor: pointer;
  white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--cream); }
.chip:focus-visible { outline: 2.5px solid var(--yellow); outline-offset: 2px; }

.grid { list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 460px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

.card { background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 12px 12px; text-align: center; cursor: pointer; border: 0; width: 100%;
  font: inherit; color: var(--ink);
  animation: rise .4s ease both; transition: transform .15s ease; }
.card:hover { transform: translateY(-3px); }
.card:active { transform: translateY(-1px) scale(.99); }
.card:focus-visible { outline: 2.5px solid var(--yellow); outline-offset: 2px; }
.card-img { height: 86px; display: grid; place-items: center; }
.card-img svg, .card-img img { max-height: 86px; max-width: 100%; }
.card-name { font-size: 13.5px; font-weight: 500; margin: 8px 0 1px; }
.card-hint { font-size: 11px; color: var(--red); }
.card.special .card-hint { color: var(--ink-faint); }

.card.wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; text-align: left; }
.card.wide .card-img { height: 48px; width: 48px; flex: none; }
.card.wide .badge { flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--yellow); color: var(--blue); display: grid; place-items: center; font-size: 24px; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; color: rgba(253, 244, 227, .8); font-size: 13.5px; margin-top: 30px; }

/* ---------- Overlays / Blatt ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; background: var(--blue); animation: fade .2s ease; }
.overlay.center { justify-content: center; align-items: center; padding: 24px;
  background: rgba(15, 58, 111, .6); backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet-top { padding: 16px 16px 0; }
.sheet-top-bar { display: flex; align-items: center; justify-content: space-between; }
.sheet-top-bar.plain { padding: 16px; }
.sheet-title { color: var(--cream); font-size: 15px; font-weight: 500; }
.round { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(253, 244, 227, .18); color: var(--cream); font-size: 20px;
  display: grid; place-items: center; }
.round-spacer { width: 38px; }
.round .heart { transition: fill .15s, stroke .15s; }
.round[aria-pressed="true"] .heart { fill: var(--red); stroke: var(--red); }
.round:focus-visible { outline: 2.5px solid var(--yellow); outline-offset: 2px; }

.hero-img { height: 200px; display: grid; place-items: center; }
.hero-img svg, .hero-img img { max-height: 190px; max-width: 70%; }

.sheet { background: var(--cream); border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  margin-top: -18px; padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  flex: 1; overflow-y: auto; color: var(--ink);
  display: flex; flex-direction: column;
  animation: slideup .32s cubic-bezier(.22,.61,.36,1); }
.sheet-full { margin-top: 0; border-radius: 0; }
@keyframes slideup { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }

.handle { width: 40px; height: 4px; border-radius: 2px; background: #D6CBB4; margin: 2px auto 16px; }

.sheet h2 { font-size: 25px; font-weight: 600; letter-spacing: -.3px; margin: 0 0 4px; color: var(--ink); }
.sheet .lead { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 18px; }
.sheet h3 { font-size: 14px; font-weight: 500; margin: 0 0 8px; color: var(--ink); }

.details { margin-bottom: 18px; }
.details dl { margin: 0; }
.details dl > div { display: flex; font-size: 13px; margin: 8px 0; }
.details dt { color: var(--ink-faint); width: 96px; flex: none; }
.details dd { margin: 0; color: var(--ink); font-weight: 500; }

.pack { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 6px; }
.pack-row { display: flex; gap: 9px; }
.pack-opt { flex: 1; padding: 11px 0; border-radius: 13px; border: 1.5px solid #C4CEDD;
  background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s, color .15s; }
.pack-opt small { display: block; font-size: 11px; opacity: .72; margin-top: 1px; }
.pack-opt[aria-checked="true"] { background: var(--red); border-color: var(--red); color: var(--cream); }
.pack-opt:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }

.buy { margin-top: auto; background: var(--cream); padding-top: 14px; }
.price { display: flex; flex-direction: column; margin-bottom: 12px; }
.price-label { font-size: 11px; color: var(--ink-faint); }
.price-value { font-size: 27px; font-weight: 600; color: var(--red); }

.cta { width: 100%; background: var(--red); color: var(--cream); border: 0; border-radius: 14px;
  padding: 15px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: transform .1s ease, background .15s; }
.cta:hover { background: #d8371f; }
.cta:active { transform: scale(.985); }
.cta:disabled { background: #C4CEDD; color: #fff; cursor: default; }
.cta.ghost { background: none; color: var(--ink); border: 1.5px solid var(--line); }
.cta:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }

/* ---------- Checkout ---------- */
.summary { background: rgba(253, 244, 227, .14); color: var(--cream); margin: 0 16px 4px;
  border-radius: 14px; padding: 12px 14px; font-size: 13px; display: none; }
.sheet-full .summary { display: block; }
#orderForm { padding: 8px 20px 40px; background: var(--cream); flex: 1; }
#orderForm label { display: block; font-size: 12px; color: var(--ink-faint); margin: 14px 0 0; }
#orderForm .opt { color: #B7B09E; }
#orderForm input, #orderForm textarea { width: 100%; margin-top: 5px; font: inherit; font-size: 15px;
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 13px; outline: 0; }
#orderForm input:focus, #orderForm textarea:focus { border-color: var(--blue); }
#orderForm .two { display: flex; gap: 10px; }
#orderForm .two label:first-child { width: 38%; }
#orderForm .two label:last-child { flex: 1; }
#orderForm .cta { margin-top: 22px; }
.form-error { color: var(--red); font-size: 13px; margin: 14px 0 0; font-weight: 500; }
.fineprint { text-align: center; font-size: 11.5px; color: var(--ink-faint); margin: 10px 0 0; }

/* ---------- Bestätigung ---------- */
.done-card { background: var(--cream); border-radius: 24px; padding: 30px 26px; text-align: center;
  width: 100%; max-width: 340px; box-shadow: var(--shadow); animation: slideup .3s ease; color: var(--ink); }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--yellow);
  color: var(--blue); display: grid; place-items: center; font-size: 30px; margin: 0 auto 14px; }
.done-card h2 { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.done-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 20px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Bottom-Navigation ---------- */
.app { padding-bottom: 92px; }
.botnav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 15;
  display: flex; justify-content: space-around; align-items: center;
  background: var(--blue-deep); padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(253, 244, 227, .12); }
.nav-item { position: relative; background: none; border: 0; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: rgba(253, 244, 227, .55); font-size: 10.5px; padding: 4px 14px; }
.nav-item .i { font-size: 21px; }
.nav-item.is-active { color: var(--cream); }
.nav-badge { position: absolute; top: -2px; right: 8px; background: var(--red); color: var(--cream);
  font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }

/* Custom-Karte: Icon-Box */
.ph-box { width: 56px; height: 56px; border: 2px dashed var(--red); border-radius: 14px;
  display: grid; place-items: center; color: var(--red); font-size: 26px; }

/* ---------- Warenkorb ---------- */
.cart-body { flex: 1; overflow-y: auto; background: var(--cream); }
.cart-list { list-style: none; margin: 0; padding: 8px 16px; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); }
.ci-shape { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.ci-sub { font-size: 12px; color: var(--ink-faint); }
.ci-price { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.ci-del { background: none; border: 0; color: var(--ink-faint); font-size: 18px; padding: 6px; cursor: pointer; }
.ci-del:hover { color: var(--red); }
.cart-empty { text-align: center; color: var(--ink-faint); font-size: 14px; line-height: 1.6; padding: 60px 24px; }
.cart-foot { background: var(--cream); padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px;
  font-size: 15px; color: var(--ink); }
.cart-total span:last-child { font-size: 22px; font-weight: 600; color: var(--red); }

/* ---------- Info ---------- */
.info-sheet .info-body { padding: 8px 22px 40px; background: var(--cream); flex: 1; overflow-y: auto; }
.info-body h2 { font-size: 27px; font-weight: 600; line-height: 1.1; letter-spacing: -.4px;
  margin: 8px 0 16px; color: var(--ink); }
.info-body h3 { font-size: 15px; font-weight: 500; margin: 24px 0 6px; color: var(--ink); }
.info-body p { font-size: 14px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 12px; }
.info-contact { font-size: 16px !important; font-weight: 500; color: var(--red) !important; }
.info-small { font-size: 12px !important; color: var(--ink-faint) !important; margin-top: 20px !important; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 12px);
  z-index: 40; max-width: 320px; width: calc(100% - 40px);
  background: var(--ink); color: var(--cream); font-size: 13.5px; line-height: 1.4;
  padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mengen-Zähler ---------- */
.qty { margin-bottom: 6px; }
.qty h3 { margin: 16px 0 8px; }
.stepper { display: inline-flex; align-items: center; gap: 4px;
  border: 1.5px solid #C4CEDD; border-radius: 13px; padding: 4px; }
.step { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none;
  color: var(--ink); font: inherit; font-size: 22px; cursor: pointer; line-height: 1;
  display: grid; place-items: center; }
.step:hover:not(:disabled) { background: rgba(19, 70, 134, .07); }
.step:disabled { color: #C4CEDD; cursor: default; }
.step:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }
.step-val { min-width: 44px; text-align: center; font-size: 17px; font-weight: 500; color: var(--ink); }

/* ---------- Detail-Blatt: ziehbarer Griff ---------- */
.grab { touch-action: none; cursor: grab; padding: 10px 0 10px; margin-bottom: 6px; }
.grab:active { cursor: grabbing; }
.grab .handle { width: 44px; height: 5px; border-radius: 3px; background: #D6CBB4; margin: 0 auto; }