/* Digitale Speisekarte YIP – Weinrot und Gold wie das Logo, Text Schwarz auf Weiß.
   Nur logische Eigenschaften (start/end), damit Arabisch und Uigurisch
   von rechts nach links laufen. */

:root {
  --schwarz: #111111;
  --weinrot: #7a1420;
  --gold: #e9b44c;
  --weiss: #ffffff;
  --grau: #5f5f5f;
  --hellgrau: #eae8e3;
  --flaeche: #faf9f6;
  --schrift: 'AnarKarte', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

/* hidden muss greifen, auch wenn Elemente im CSS display bekommen
   (Warenkorb-Knopf und Panel). Ohne JavaScript bleibt so alles zu. */
[hidden] { display: none !important; }

html { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--weiss);
  color: var(--schwarz);
  font-family: var(--schrift);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: var(--weinrot); }
a:hover { text-decoration: underline; }

/* ---------- Sprachleiste ---------- */

.sprachleiste {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 8px 10px;
  background: var(--weiss);
  border-bottom: 1px solid var(--hellgrau);
}

.sprachleiste .sprache {
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hellgrau);
  color: var(--schwarz);
  background: var(--flaeche);
  text-decoration: none;
}

.sprachleiste .sprache.aktiv {
  background: var(--weinrot);
  border-color: var(--weinrot);
  color: var(--weiss);
  font-weight: 600;
}

/* ---------- Tischzeile ---------- */

.tischzeile {
  margin: 0;
  padding: 6px 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--weiss);
  background: var(--weinrot);
  border-bottom: 2px solid var(--gold);
}

/* ---------- Kopf ---------- */

.kopf {
  background: var(--weinrot);
  color: var(--weiss);
  text-align: center;
  padding: 22px 16px 18px;
}

.kopf .logo { height: 110px; width: auto; margin: 0 auto; }

/* Unterzeile als Text (im Logo selbst wäre sie bei dieser Größe unlesbar) */
.kopf .unterzeile {
  margin: 10px 0 0;
  color: var(--gold);
  font-size: clamp(13px, 3.8vw, 17px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---------- Kapitel-Leiste (bleibt beim Scrollen oben) ---------- */

.kapitel-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  background: var(--weinrot);
  padding: 8px 10px;
  scrollbar-width: none;
}

.kapitel-bar::-webkit-scrollbar { display: none; }

.kapitel-bar a {
  flex: none;
  white-space: nowrap;
  color: var(--weiss);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13px;
  padding: 5px 12px;
  text-decoration: none;
}

.kapitel-bar a:hover { border-color: var(--gold); color: var(--gold); }

.kapitel-bar .sprache-knopf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Hauptinhalt ---------- */

main { max-width: 1100px; margin: 0 auto; padding: 0 0 8px; }

.kapitel { padding: 28px 16px 4px; }

.kapitel-kopf {
  border-inline-start: 4px solid var(--weinrot);
  padding-inline-start: 12px;
}

.kapitel-kopf h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.kapitel-kopf .untertitel {
  margin: 6px 0 0;
  color: var(--grau);
  font-size: 14px;
}

.kapitelbild {
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
}

img.kapitelbild {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.kapitelbild.platzhalter {
  aspect-ratio: 16 / 7;
  background: var(--weinrot);
  border-block: 4px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--weiss);
}

.kapitelbild.platzhalter span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0 10px;
  text-align: center;
}

/* ---------- Gerichte ---------- */

.gerichte { display: grid; gap: 10px; margin-top: 14px; }

.gericht {
  display: flex;
  gap: 12px;
  background: var(--flaeche);
  border: 1px solid var(--hellgrau);
  border-radius: var(--radius);
  padding: 12px;
}

.gericht .foto {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
}

.gerichts-inhalt { min-width: 0; flex: 1; }

.kopfzeile { display: flex; align-items: baseline; gap: 8px; }

.kopfzeile .nummer {
  color: var(--weinrot);
  font-weight: 800;
  font-size: 13px;
  flex: none;
}

.kopfzeile h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.kopfzeile .stoffe { font-size: 10px; color: var(--grau); }

.kopfzeile .preis {
  color: var(--weinrot);
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
}

.uigurisch { margin: 4px 0 0; font-size: 13px; color: var(--grau); }

.menge { margin: 4px 0 0; font-size: 13px; font-weight: 600; }

.beschreibung { margin: 4px 0 0; font-size: 13px; color: var(--grau); }

.kennzeichen {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kennzeichen span {
  font-size: 11px;
  color: var(--schwarz);
  border: 1px solid var(--hellgrau);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--weiss);
}

/* ---------- Getränke ---------- */

.getraenke { padding: 28px 16px 4px; }

.getraenke-kopf {
  border-inline-start: 4px solid var(--weinrot);
  padding-inline-start: 12px;
}

.getraenke-kopf h2 { margin: 0; font-size: 26px; line-height: 1.15; }

.getraenke-kopf .untertitel { margin: 6px 0 0; color: var(--grau); font-size: 14px; }

.getraenke-gruppe {
  margin: 20px 0 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Legende und Hinweise ---------- */

.legende { padding: 28px 16px 4px; }

.legende h2, .hinweise h2 { font-size: 20px; margin: 0 0 8px; }

.stoff-reihen { font-size: 13px; color: var(--grau); margin: 6px 0 0; }

.stoff-eintrag bdi { color: var(--schwarz); font-weight: 700; }

.stoff-eintrag .trenner { opacity: 0.6; }

.allergene-deutsch { margin-top: 10px; font-size: 13px; }

.hinweise { padding: 28px 16px 4px; }

.hinweise p { font-size: 13px; color: var(--grau); margin: 6px 0; }

/* ---------- Fußzeile ---------- */

.fuss {
  margin-top: 36px;
  background: var(--weinrot);
  color: var(--weiss);
  padding: 28px 16px calc(96px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
}

.fuss a { color: var(--gold); }

.fuss-name {
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 20px;
}

.fuss-adresse { margin: 0; }
.fuss-telefon { margin: 6px 0 0; }

.oeffnungszeiten { margin-top: 18px; }

.oeffnungszeiten h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin: 0 0 6px;
}

.oeffnungszeiten p { margin: 2px 0; color: #d8d6d2; }

.fuss-links {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.fuss-links a {
  color: var(--weiss);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  text-decoration: none;
}

.fuss-links a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Rechtliches ---------- */

.recht { max-width: 660px; margin: 0 auto; padding: 24px 16px 8px; }

.recht h1 {
  font-size: 24px;
  border-inline-start: 4px solid var(--weinrot);
  padding-inline-start: 12px;
}

.recht h2 { font-size: 17px; margin: 22px 0 6px; }

.recht p { font-size: 14px; margin: 8px 0; }

.recht a { overflow-wrap: anywhere; }

.zurueck { margin-top: 24px; font-weight: 600; }

/* ---------- Warenkorb ---------- */

/* Runder „+“-Knopf auf jeder Gericht- und Getränkekarte: Weinrot, weißes
   Plus, mindestens 44 × 44 px. Im Markup ausgeblendet, karte.js zeigt ihn. */
.warenkorb-karte-zeile {
  margin: 10px 0 0;
  display: flex;
  justify-content: flex-end;
}

.warenkorb-hinzu {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--weinrot);
  color: var(--weiss);
  font-size: 26px;
  line-height: 1;
  font-family: var(--schrift);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.warenkorb-hinzu.bestaetigt {
  background: var(--gold);
  color: var(--schwarz);
}

/* Warenkorb-Knopf unten rechts (im RTL-Modus unten links). */
.warenkorb-knopf {
  position: fixed;
  inset-inline-end: calc(16px + env(safe-area-inset-right));
  inset-block-end: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  min-height: 48px;
  padding: 6px 16px;
  border: none;
  border-radius: 999px;
  background: var(--weinrot);
  color: var(--weiss);
  font-family: var(--schrift);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.warenkorb-symbol {
  width: 20px;
  height: 20px;
  color: var(--gold);
}

.warenkorb-anzahl {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--schwarz);
  font-size: 13px;
  font-weight: 800;
}

.warenkorb-anzahl.springt {
  animation: warenkorb-spring 0.4s ease;
}

@keyframes warenkorb-spring {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.warenkorb-summe {
  white-space: nowrap;
}

/* Panel: am Handy von unten, ab 768 px rechts als Seitenleiste. */
.warenkorb-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: block;
}

.warenkorb-abdunkelung {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.warenkorb-seite {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  margin-inline: auto;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--weiss);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.warenkorb-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--weinrot);
  color: var(--weiss);
}

.warenkorb-kopf h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  flex: 1;
}

.warenkorb-tisch {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.warenkorb-schliessen {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--weiss);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.warenkorb-posten {
  margin: 0;
  padding: 4px 16px 12px;
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.warenkorb-posten li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hellgrau);
}

.warenkorb-nummer {
  flex: none;
  color: var(--weinrot);
  font-weight: 800;
  font-size: 12px;
}

.warenkorb-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.warenkorb-menge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--schwarz);
}

.warenkorb-menge-knopf {
  width: 36px;
  height: 36px;
  border: 1px solid var(--hellgrau);
  border-radius: 10px;
  background: var(--flaeche);
  color: var(--weinrot);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  font-family: var(--schrift);
  cursor: pointer;
}

.warenkorb-menge-zahl {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.warenkorb-zeilenpreis {
  flex: none;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.warenkorb-entfernen {
  flex: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--grau);
  font-size: 22px;
  line-height: 1;
  font-family: var(--schrift);
  cursor: pointer;
}

.warenkorb-fuss {
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--flaeche);
  border-top: 1px solid var(--hellgrau);
}

.warenkorb-summe-zeile {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: 16px;
}

.warenkorb-hinweis {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--grau);
}

.warenkorb-leeren {
  width: 100%;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--weinrot);
  border-radius: 999px;
  background: var(--weiss);
  color: var(--weinrot);
  font-family: var(--schrift);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.warenkorb-leeren.bestaetigt {
  background: var(--weinrot);
  color: var(--weiss);
}

@media (min-width: 768px) {
  .warenkorb-seite {
    inset-block: 0;
    inset-inline-start: auto;
    inset-inline-end: 0;
    width: 400px;
    max-height: none;
    margin-inline: 0;
    border-radius: 16px 0 0 16px;
  }
}

/* ---------- schmale Geräte (360 px) ---------- */

@media (max-width: 380px) {
  .gericht { padding: 10px; gap: 10px; }
  .gericht .foto { width: 84px; height: 84px; }
  .kopfzeile h3 { font-size: 15px; }
  .kopfzeile .preis { font-size: 15px; }
}

/* ---------- ab 820 px: zwei Spalten, Kapitelbild maximal 320 px hoch ---------- */

@media (min-width: 820px) {
  .gerichte {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  img.kapitelbild,
  .kapitelbild.platzhalter {
    max-height: 320px;
  }
}

/* Intro beim Ankommen von außen (karte.js) */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #7a1420;
  cursor: pointer;
  transition: opacity 0.4s ease;
}
.intro iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.intro-aus {
  opacity: 0;
}

/* Hinweis auf den neuen Namen und Kontakt im Kopf */
.umbenennung {
  max-width: 420px;
  margin: 0 auto 18px;
  padding: 10px 14px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.4;
}
.umbenennung p { margin: 0; }
.umbenennung .umbenennung-titel {
  color: var(--gold);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}
.kopf-info {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.kopf-info p { margin: 0; }
.kopf-telefon a {
  color: var(--gold);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.kopf-zeiten span {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 6px;
}
.kopf-zeiten p { margin: 0; }

/* So bestellen Sie (oben in der Karte) */
.bestellhinweis {
  margin: 18px 16px 4px;
  padding: 14px 16px;
  background: var(--flaeche);
  border: 1px solid var(--hellgrau);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.45;
}
.bestellhinweis h2 { margin: 0 0 6px; font-size: 17px; color: var(--weinrot); }
.bestellhinweis p { margin: 0; }
.bestellhinweis .frisch {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 10px; color: var(--grau); font-size: 14px;
}
.bestellhinweis svg, .wartezeit svg { width: 18px; height: 18px; flex: none; color: var(--weinrot); margin-top: 1px; }

/* Zubereitungszeit am Gericht, gut sichtbar */
.wartezeit {
  display: inline-flex; gap: 6px; align-items: center;
  margin: 8px 0 0; padding: 4px 10px;
  background: #fff4dc; color: var(--weinrot);
  border: 1px solid var(--gold); border-radius: 999px;
  font-size: 14px; font-weight: 700;
}

/* Nicht verfügbar: bleibt auf der Karte, aber blass und ohne „+“ */
.gericht.nicht-verfuegbar .foto { filter: grayscale(1); opacity: 0.5; }
.gericht.nicht-verfuegbar .gerichts-inhalt > *:not(.nv-zeile) { opacity: 0.55; }
.nv-zeile { margin: 10px 0 0; }
.nv-marke {
  display: inline-block; padding: 4px 12px;
  background: var(--grau); color: var(--weiss);
  border-radius: 999px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* Varianten (z. B. Samsa 1 / 3 Stück): je Zeile Nummer, Menge, Preis, eigenes „+“ */
.variante {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0 0; padding-top: 10px;
  border-top: 1px solid var(--hellgrau);
}
.variante span { flex: 1; font-weight: 600; }
.variante .preis { font-weight: 700; color: var(--weinrot); }
.variante .nummer { font-weight: 700; color: var(--weinrot); font-size: 14px; min-width: 26px; }
