/* ============================================================
   Mr. Döner Blanes — Digitale Speisekarte
   Mobile first. Entworfen fuer 360-430 px Bildschirmbreite.
   ============================================================ */

/* ---------- Farben & Masse an EINER Stelle ---------- */
:root {
  --bg:          #0d0d0d;   /* Seitenhintergrund, fast schwarz */
  --bg-soft:     #161616;   /* Seitenleiste */
  --card:        #1c1c1c;   /* Gerichtskarten */
  --card-hi:     #242424;   /* Karte beim Antippen */
  --line:        #2c2c2c;   /* Trennlinien */

  --red:         #e02b26;   /* Akzent: Preise, aktive Kategorie */
  --red-dark:    #b31f1b;
  --cream:       #f2ebe0;   /* Haupttext, wie im Logo */
  --muted:       #9a9a9a;   /* Zutaten, Nebentext */

  --radius:      14px;
  --radius-sm:   9px;
  --sidebar-w:   74px;      /* Breite der Kategorie-Spalte */
  --bar-h:       58px;      /* Hoehe der unteren Leiste */

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;                 /* nie seitlich scrollen */
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }


/* ============================================================
   Logo-Ersatz, solange img/logo.png fehlt
   ============================================================ */
.logo-fallback {
  white-space: pre-line;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.02;
  letter-spacing: -0.5px;
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--red);
  text-align: center;
}
.logo-fallback--sm { font-size: 23px; text-align: left; }


/* ============================================================
   SCREEN A — Sprachauswahl
   ============================================================ */
.lang-screen {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 18px calc(26px + env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 70% at 50% 0%, #241110 0%, var(--bg) 62%);
}

.lang-screen__inner { width: 100%; max-width: 460px; }

.lang-screen__brand { text-align: center; margin-bottom: 26px; }

.lang-screen__logo { width: 168px; margin: 0 auto 10px; }

.lang-screen__tagline {
  margin: 8px 0 12px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
}

.halal-badge {
  display: inline-block;
  padding: 4px 13px;
  border: 1px solid var(--red);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--red);
}

.lang-screen__title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
}

/* Drei Kacheln pro Reihe = 9 Sprachen in 3 sauberen Reihen */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.lang-tile {
  min-height: 84px;                   /* grosszuegig: an der Theke tippt man ungenau */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
}
.lang-tile:active { transform: scale(.95); background: var(--card-hi); }

/* Sprache des Handys wird dezent vorgeschlagen */
.lang-tile--suggested { border-color: var(--red); }

.lang-tile__flag { font-size: 30px; line-height: 1; }


/* ============================================================
   SCREEN B — Kopfbereich
   ============================================================ */
.menu-screen { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

.hero {
  position: relative;
  padding: 18px 16px 20px;
  background: linear-gradient(105deg, #0d0d0d 0%, #0d0d0d 48%, #1d0e0d 100%);
  border-bottom: 2px solid var(--red);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0 0 0 42%;
  background: url("../img/hero.jpg") center/cover no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
          mask-image: linear-gradient(90deg, transparent, #000 55%);
}

.hero__content { position: relative; max-width: 62%; }

.hero__logo { width: 132px; }

.hero__tagline {
  margin: 7px 0 0;
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
}

.hero__flag { position: absolute; top: 12px; right: 14px; font-size: 25px; }

.hero__halal {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 3px 10px;
  background: var(--red);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}


/* ============================================================
   Layout: Seitenleiste + Inhalt
   ============================================================ */
.layout { display: flex; align-items: flex-start; }


/* ---------- Vertikale Kategorie-Navigation ---------- */
.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  max-height: 100svh;
  overflow-y: auto;
  padding: 8px 0 calc(var(--bar-h) + 16px);
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.cat-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 11px 3px;
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .2px;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s, background .15s;

  /* Sicherheitsnetz: bricht notfalls auch mitten im Wort um, statt
     seitlich abzuschneiden. Greift bei langen Begriffen wie
     "Atıştırmalık" oder "Hamburguesas". */
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.cat-btn__icon { font-size: 21px; line-height: 1; }

.cat-btn.is-active {
  color: var(--cream);
  background: linear-gradient(90deg, rgba(224,43,38,.2), transparent);
  border-left-color: var(--red);
}


/* ---------- Gerichtsliste ---------- */
.content {
  flex: 1 1 auto;
  min-width: 0;                       /* verhindert Ueberbreite durch lange Woerter */
  padding: 4px 12px 26px;
}

.cat-section { scroll-margin-top: 8px; padding-top: 14px; }

.cat-title {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.cat-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 5px;
  background: var(--red);
  border-radius: 2px;
}

/* Untergruppe, z.B. alkoholfrei / alkoholisch */
.sub-title {
  margin: 18px 0 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}


/* ---------- Einzelne Gerichtskarte ---------- */
.dish {
  display: flex;
  gap: 11px;
  margin-bottom: 9px;
  padding: 9px;
  background: var(--card);
  border-radius: var(--radius);
}

.dish__thumb {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, #262626, #1a1a1a);
  object-fit: cover;
}

/* Platzhalter, solange kein Foto vorliegt */
.dish__thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  opacity: .3;
}

.dish__body { flex: 1 1 auto; min-width: 0; }

.dish__name {
  margin: 0 0 2px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
}

.dish__desc {
  margin: 0 0 5px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}

.dish__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.dish__price {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
  white-space: nowrap;
}

/* Staffelpreise: 6 / 9 / 12 Stueck nebeneinander */
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }

.size {
  padding: 3px 9px;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  white-space: nowrap;
}
.size b { color: var(--red); font-weight: 800; }


/* ---------- Badges & Allergen-Ziffern ---------- */
.badge {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--veg     { background: #1d3b21; color: #7fd48b; }
.badge--popular { background: var(--red); color: #fff; }
.badge--alcohol { background: #3a2d10; color: #e2b44b; }

.allergens {
  display: flex;
  gap: 3px;
  padding: 2px 7px 2px 5px;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.allergens::before { content: "ⓘ"; margin-right: 1px; }
.allergens:active { border-color: var(--red); color: var(--cream); }


/* ============================================================
   Fussbereich
   ============================================================ */
.footer {
  margin-top: 8px;
  padding: 22px 16px 26px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 13px;
}

.footer h3 {
  margin: 15px 0 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
}
.footer p { margin: 0; color: var(--muted); }
.footer a { text-decoration: underline; }

/* Adresse steht als "Straße \n Ort" in menu.js */
#fAddress { white-space: pre-line; }

.hours { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.hours li { display: flex; justify-content: space-between; gap: 12px; }
.hours li.is-today { color: var(--cream); font-weight: 700; }

.footer__vat   { margin-top: 18px; font-size: 11px; }
.footer__legal { margin-top: 6px;  font-size: 11px; }
.footer__brand {
  margin-top: 16px;
  font-size: 11px;
  text-align: center;
  letter-spacing: 1px;
  opacity: .4;
}

/* Allergen-Legende */
.legend {
  margin-bottom: 6px;
  padding: 11px 13px;
  background: var(--card);
  border-radius: var(--radius-sm);
}
.legend__summary {
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.legend__summary::after { content: " ▾"; color: var(--red); }
.legend[open] .legend__summary::after { content: " ▴"; }
.legend__summary::-webkit-details-marker { display: none; }

.legend__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px 10px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
  font-size: 11.5px;
  color: var(--muted);
}
.legend__list b { color: var(--red); }

.legend__note {
  margin: 11px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
  opacity: .85;
}


/* ============================================================
   Untere Aktionsleiste
   ============================================================ */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);  /* iPhone Home-Leiste */
  background: rgba(18,18,18,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.actionbar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  cursor: pointer;
}
.actionbar__btn:active { color: var(--red); }

/* Strichzeichnungen: erben die Textfarbe des Knopfs mit */
.actionbar__icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ============================================================
   Allergen-Dialog
   ============================================================ */
.pop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.72);
}

.pop__box {
  width: 100%;
  max-width: 420px;
  max-height: 76svh;
  overflow-y: auto;
  margin-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding: 19px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pop__title { margin: 0 0 12px; font-size: 16px; font-weight: 800; }

.pop__list { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.pop__list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.pop__list li:last-child { border-bottom: 0; }
.pop__list b { color: var(--red); margin-right: 7px; }

.pop__note {
  margin: 12px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
}

.pop__close {
  width: 100%;
  margin-top: 15px;
  padding: 13px;
  background: var(--red);
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}


/* ============================================================
   Groessere Bildschirme — mittig, breitere Seitenleiste
   ============================================================ */
@media (min-width: 620px) {
  :root { --sidebar-w: 150px; }

  .menu-screen { max-width: 780px; margin: 0 auto; }

  .cat-btn {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 13px 12px;
    font-size: 12px;
  }
  .cat-btn__icon { font-size: 19px; }

  .content { padding: 4px 18px 30px; }
  .dish__thumb { flex-basis: 96px; width: 96px; height: 96px; }
  .dish__name { font-size: 16px; }
  .dish__desc { font-size: 12.5px; }

  .actionbar {
    max-width: 780px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}


/* Bewegungsempfindliche Nutzer */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
