/* Die Pizzerei – Online bestellen (Demo). Warmer Italiener-Look: Terracotta,
 * Olivgrün, Creme, elegante Serifen-Überschriften. */

:root {
  --terracotta: #c0532d;
  --terracotta-dark: #9c4223;
  --terracotta-soft: #fbe9e1;
  --olive: #4a5d3a;
  --olive-soft: #e8ede4;
  --cream: #fdf6ec;
  --card: #ffffff;
  --ink: #2b241f;
  --muted: #83786c;
  --line: #ece3d6;
  --r: 16px;
  --shadow: 0 3px 14px rgba(43, 36, 31, .08);
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
}

.demo-ribbon {
  background: var(--ink); color: #fff;
  text-align: center; font-size: 12.5px; font-weight: 600;
  padding: 7px 10px;
}

/* ---------- Kopf ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--terracotta); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 16px;
}
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); }

.btn-icon {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); cursor: pointer;
}
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--terracotta); color: #fff;
  font-size: 10.5px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 3px;
}
.cart-badge.hidden { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(43,36,31,.72), rgba(192,83,45,.55)),
    repeating-linear-gradient(45deg, #7a3a22 0 26px, #6c331e 26px 52px);
  color: #fff;
  padding: 46px 24px;
}
.hero-text { max-width: 640px; margin: 0 auto; text-align: center; }
.hero-kicker { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin-bottom: 8px; }
.hero h1 { font-family: var(--serif); font-size: 34px; font-weight: 700; margin-bottom: 10px; }
.hero p { font-size: 15px; opacity: .92; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 24px;
  max-width: 1180px; margin: 0 auto;
  padding: 26px 24px 60px;
  align-items: start;
}
.menu-pane { min-width: 0; }

.search-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; margin-bottom: 16px;
  color: var(--muted);
}
.search-row input {
  border: none; outline: none; background: none; flex: 1;
  font-family: inherit; font-size: 14px; color: var(--ink);
}

.cats {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px;
  scrollbar-width: thin;
}
.cat-chip {
  flex: none;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.cat-chip.active { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }

.menu-section { margin-bottom: 30px; }
.menu-section-title {
  font-family: var(--serif); font-size: 21px; font-weight: 700;
  color: var(--olive);
  margin-bottom: 4px;
  padding-bottom: 8px; border-bottom: 2px solid var(--olive-soft);
}
.menu-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item-main { flex: 1; min-width: 0; }
.menu-item-name { font-weight: 700; font-size: 15px; }
.menu-item-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.menu-item-price { font-weight: 700; color: var(--terracotta-dark); margin-top: 6px; font-size: 14px; }
.menu-item-add {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--olive-soft); color: var(--olive);
  border: none; font-size: 19px; font-weight: 700; cursor: pointer;
  display: grid; place-items: center; margin-top: 2px;
}
.menu-empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- Warenkorb ---------- */
.cart-pane {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
  position: sticky; top: 82px;
  max-height: calc(100vh - 100px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.cart-head h2 { font-family: var(--serif); font-size: 18px; }
#btnCartClose { display: none; }

.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 18px 0; }
.mode-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 8px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--cream); color: var(--ink);
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.mode-btn small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); }
.mode-btn.active { border-color: var(--olive); background: var(--olive-soft); color: var(--olive); }
.mode-btn.active small { color: var(--olive); }

.cart-items { flex: 1; overflow-y: auto; padding: 14px 18px; min-height: 60px; }
.cart-empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 13.5px; }
.cart-empty span { display: block; margin: 0 auto 10px; opacity: .5; }

.cart-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cart-row:last-child { border-bottom: none; }
.cart-row-main { flex: 1; min-width: 0; }
.cart-row-name { font-size: 13.5px; font-weight: 700; }
.cart-row-note { font-size: 11.5px; color: var(--muted); font-style: italic; }
.cart-row-qtyrow { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-qty-btn {
  width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--cream);
  font-weight: 700; cursor: pointer; font-size: 13px;
}
.cart-row-price { font-weight: 700; font-size: 13.5px; white-space: nowrap; color: var(--terracotta-dark); }

.cart-foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.cart-sumline { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.cart-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 800; margin: 8px 0 12px; }
.cart-hint { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; line-height: 1.4; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; border-radius: 12px;
  font-family: inherit; font-size: 14.5px; font-weight: 700;
  padding: 12px 18px; cursor: pointer;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-go { background: var(--terracotta); color: #fff; width: 100%; }
.btn-go:hover:not(:disabled) { background: var(--terracotta-dark); }
.btn-plain { background: var(--cream); border: 1px solid var(--line); color: var(--ink); }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(43,36,31,.5);
  display: grid; place-items: center; padding: 16px;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--card); border-radius: 18px; padding: 22px;
  width: min(420px, 100%); max-height: 92vh; overflow-y: auto;
  box-shadow: 0 16px 50px rgba(0,0,0,.22);
}
.modal-wide { width: min(640px, 100%); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.item-modal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.item-modal-head h3 { font-family: var(--serif); font-size: 19px; }
.item-modal-price { font-weight: 800; color: var(--terracotta-dark); white-space: nowrap; }
.item-modal-desc { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
.note-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.note-label input {
  display: block; width: 100%; margin-top: 6px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px;
}
.qty-row { display: flex; align-items: center; justify-content: center; gap: 18px; }
.qty-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--cream);
  font-size: 19px; font-weight: 700; cursor: pointer;
}
.qty-val { font-size: 19px; font-weight: 800; min-width: 24px; text-align: center; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 12px 0 6px; }
.field-label:first-child { margin-top: 0; }
.checkout-grid input, .checkout-grid select {
  display: block; width: 100%; margin-bottom: 8px;
  padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 13.5px; background: var(--cream); color: var(--ink);
}
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.pay-seg {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--cream); color: var(--ink);
  font-family: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.pay-seg.active { border-color: var(--terracotta); background: var(--terracotta-soft); color: var(--terracotta-dark); }
.co-summary { font-size: 12.5px; color: var(--muted); background: var(--cream); border-radius: 10px; padding: 10px 12px; }
.co-summary div { display: flex; justify-content: space-between; padding: 2px 0; }
.co-summary .co-total { font-weight: 800; color: var(--ink); font-size: 14px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* Bestätigung */
.modal-confirm { text-align: center; }
.confirm-icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  background: var(--olive-soft); color: var(--olive);
  border-radius: 50%; display: grid; place-items: center;
}
.modal-confirm h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 8px; }
.modal-confirm p { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; line-height: 1.5; }
.confirm-order-no { font-weight: 800; font-size: 15px; margin-bottom: 18px; color: var(--terracotta-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; padding: 18px 14px 40px; }
  .hero h1 { font-size: 26px; }
  .hero { padding: 32px 18px; }
  .cart-pane {
    position: fixed; inset: 0; z-index: 50;
    border-radius: 0; max-height: none;
    transform: translateX(100%); transition: transform .25s ease;
  }
  .cart-pane.open { transform: translateX(0); }
  #btnCartClose { display: inline-flex; }
  .checkout-grid { grid-template-columns: 1fr; }
}
@media (min-width: 881px) {
  #btnCartMobile { display: none; }
}
