/* Pizzeria Margherita – Branding nach Original-Logo (Gelb/Rot/Schwarz) */
:root {
  --giallo: #f5d312;       /* Logo-Gelb */
  --giallo-dark: #e3b90a;
  --rosso: #d42222;        /* Logo-Rot */
  --rosso-dark: #a51414;
  --arancio: #f08a24;      /* Kruste-Orange */
  --nero: #161311;         /* Logo-Schwarz */
  --bg: #fdf8ee;           /* warmer heller Grundton */
  --card: #fffdf8;
  --text: #241f1b;
  --muted: #8a7f72;
  --border: #efe4cf;
  --radius: 14px;
  --shadow: 0 3px 14px rgba(90, 62, 30, 0.10);
  --font-display: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 211, 18, 0.07), transparent 32%),
    radial-gradient(circle at 88% 72%, rgba(212, 34, 34, 0.05), transparent 32%),
    var(--bg);
  color: var(--text);
}

/* ---------- Splash beim App-Start ---------- */
.splash {
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(212, 34, 34, 0.30), transparent 62%),
    var(--nero);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
  transition: opacity 0.5s ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash-logo {
  width: min(48vw, 240px); height: auto;
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, 0.65));
  animation: splash-pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.splash-wordmark {
  width: min(72vw, 370px); height: auto;
  animation: splash-rise 0.7s ease 0.55s both;
}
@keyframes splash-pop {
  0%   { transform: scale(0) rotate(-14deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(3deg); opacity: 1; }
  80%  { transform: scale(0.97) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes splash-rise {
  0%   { transform: translateY(26px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--rosso); font-weight: 700; }
.row { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Brand-Streifen (rot/gelb/rot wie Logo-Band) ---------- */
.tricolore {
  display: flex; height: 6px;
  position: sticky; top: 0; z-index: 30;
}
.tricolore span { flex: 1; }
.tricolore span:nth-child(1) { background: var(--rosso); }
.tricolore span:nth-child(2) { background: var(--giallo); }
.tricolore span:nth-child(3) { background: var(--rosso); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 6px; z-index: 20;
  background: var(--card);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  height: 56px; width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}
.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rosso);
  letter-spacing: 0.3px;
}
.brand p { margin: 0; font-size: 0.78rem; }

.cart-btn {
  background: linear-gradient(160deg, var(--rosso), var(--rosso-dark));
  color: #fff; border: none;
  padding: 11px 18px; border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 10px rgba(212, 34, 34, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cart-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(212, 34, 34, 0.45); }

.cat-nav {
  display: flex; gap: 8px; overflow-x: auto;
  max-width: 1100px; margin: 0 auto; padding: 8px 16px 12px;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  white-space: nowrap; text-decoration: none;
  color: var(--nero);
  padding: 7px 14px; border-radius: 999px;
  background: #fdf3cd;
  border: 1px solid #f0dfa0;
  font-size: 0.9rem; font-weight: 700;
  transition: all 0.12s ease;
}
.cat-nav a:hover {
  background: var(--giallo); border-color: var(--giallo-dark); color: var(--nero);
}

/* ---------- Hero (schwarz wie das Schrift-Plakat) ---------- */
.hero {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(212, 34, 34, 0.25), transparent 60%),
    var(--nero);
  color: #fff;
  text-align: center;
  padding: 30px 16px 34px;
  border-bottom: 5px solid var(--giallo);
}
.hero-kicker {
  margin: 0 0 14px;
  text-transform: uppercase; letter-spacing: 3px;
  font-size: 0.75rem; font-weight: 800; color: var(--giallo);
}
.hero-wordmark {
  display: block;
  width: min(92%, 480px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}
.hero-sub { margin: 14px 0 0; opacity: 0.85; font-size: 1rem; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 22px;
  max-width: 1100px; margin: 26px auto; padding: 0 16px;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .cart {
    position: fixed; inset: auto 0 0 0; max-height: 70vh; overflow-y: auto;
    border-radius: 18px 18px 0 0; z-index: 30;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
  }
}

/* ---------- Menu ---------- */
.menu-cat { margin-bottom: 34px; }
.menu-cat h2 {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 600;
  color: var(--nero);
  margin: 0 0 2px;
  display: flex; align-items: center; gap: 10px;
}
.menu-cat h2::after {
  content: "";
  flex: 1; height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--rosso) 0 40%, var(--giallo) 40%);
  opacity: 0.7;
}
.menu-cat .cat-note { margin: 0 0 12px; font-style: italic; }

.menu-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.menu-item:hover {
  transform: translateX(3px);
  border-left-color: var(--giallo);
}
.menu-item h4 { margin: 0 0 2px; font-size: 1.02rem; font-weight: 800; }
.menu-item p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.item-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.price {
  font-weight: 800; color: var(--rosso-dark);
  font-variant-numeric: tabular-nums;
}

.add-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: none;
  background: linear-gradient(160deg, var(--rosso), var(--rosso-dark));
  color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer; font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 34, 34, 0.4);
  transition: transform 0.12s ease;
}
.add-btn:hover { transform: scale(1.12); }

/* ---------- Cart ---------- */
.cart {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--giallo);
  border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  align-self: start; position: sticky; top: 120px;
}
.cart h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 600; color: var(--nero);
}
.cart-items { max-height: 45vh; overflow-y: auto; }
.cart-line {
  border-bottom: 1px dashed var(--border);
  padding: 9px 0; font-size: 0.92rem;
}
.cart-line .row { gap: 8px; }
.cart-line .extras { color: var(--muted); font-size: 0.8rem; margin: 2px 0 0 24px; }
.qty-controls { display: flex; align-items: center; gap: 6px; }
.qty-controls button {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--rosso);
  background: #fff; color: var(--rosso-dark);
  cursor: pointer; line-height: 1; font-weight: 800;
}
.qty-controls button:hover { background: var(--rosso); color: #fff; }
.cart-summary { margin-top: 12px; border-top: 2px solid var(--border); padding-top: 12px; }
.cart-summary .row { font-size: 1.05rem; }

.btn-primary {
  width: 100%; padding: 13px; margin-top: 10px;
  background: linear-gradient(160deg, var(--rosso), var(--rosso-dark));
  color: #fff; border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1.02rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 10px rgba(212, 34, 34, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary:disabled { background: #cfc6b6; box-shadow: none; cursor: not-allowed; }
.btn-ghost {
  padding: 13px 16px; background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700; color: var(--muted);
}
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(22, 19, 17, 0.60);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  background: var(--card);
  border-top: 5px solid var(--giallo);
  border-radius: 18px; padding: 22px;
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.modal-box h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 600; color: var(--nero);
}
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn-primary { margin-top: 0; }

.extras-list label {
  display: flex; justify-content: space-between; padding: 8px 4px;
  border-bottom: 1px dashed var(--border); font-size: 0.95rem; cursor: pointer;
}
.extras-list label:hover { background: #fdf3cd; }
.extras-list label span.exname { display: flex; gap: 8px; align-items: center; }
.extras-list input[type="checkbox"] { accent-color: var(--rosso); width: 17px; height: 17px; }

.field { display: block; margin: 12px 0; }
.field span {
  display: block; font-size: 0.8rem; margin-bottom: 4px;
  color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.field input {
  width: 100%; padding: 11px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 1rem;
  font-family: var(--font-body);
  background: #fff;
}
.field input:focus { outline: none; border-color: var(--rosso); box-shadow: 0 0 0 3px rgba(212, 34, 34, 0.15); }

.seg { display: flex; gap: 8px; margin: 12px 0; }
.seg label {
  flex: 1; text-align: center; padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; font-weight: 800;
  transition: all 0.12s ease;
}
.seg label:has(input:checked) {
  border-color: var(--rosso);
  background: #fdf3cd;
  color: var(--nero);
}
.seg input { display: none; }

.checkout-sum { font-size: 1.15rem; margin-top: 12px; }
.checkout-sum strong { color: var(--rosso-dark); }

.success-box { text-align: center; border-top-color: var(--giallo); }
.success-icon { font-size: 3.2rem; }

/* ---------- Footer mit App-QR ---------- */
.app-footer {
  background: var(--nero); color: #fff;
  border-top: 5px solid var(--giallo);
  margin-top: 40px; padding: 30px 16px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 26px;
  flex-wrap: wrap; text-align: left;
}
.footer-qr {
  width: 140px; height: 140px;
  border-radius: 14px; border: 4px solid var(--giallo);
  background: #fff;
}
.app-footer h3 {
  margin: 0 0 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  color: var(--giallo);
}
.app-footer p { margin: 0 0 8px; opacity: 0.85; line-height: 1.5; }
.qr-link { color: #fff; font-weight: 800; }
.qr-link:hover { color: var(--giallo); }
