/* =============================================================
   PIZZERIA POST — Speisekarte (Look wie Startseite / Mittagsmenü)
   ============================================================= */

/* Vertikale Seiten-Scrollbar (rechts) ausblenden — Scrollen bleibt aktiv */
html.speisekarte-html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.speisekarte-html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.menu-page {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.menu-page::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Anker-Sprünge: Ziel erscheint unter fixem Header + Kategorienleiste (inkl. horiz. Scrollbereich) */
@media (min-width: 960px) {
  html.speisekarte-html {
    scroll-padding-top: calc(88px + 1rem);
  }
}

@media (max-width: 959px) {
  html.speisekarte-html {
    scroll-padding-top: calc(88px + env(safe-area-inset-top, 0px) + 5.5rem + 14px);
  }
}

@media (max-width: 899px) {
  html.speisekarte-html {
    scroll-padding-top: calc(92px + env(safe-area-inset-top, 0px) + 5.5rem + 14px);
  }
}

.menu-page {
  background: var(--bg);
  /* Kein overflow-x auf body/main — sonst funktioniert position:sticky für die Kategorienleiste nicht */
}

.menu-page .hero {
  min-height: clamp(260px, 46svh, 480px);
}

.menu-page .site-header.scrolled {
  background: rgba(15, 15, 15, 0.95);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ── Layout: TOC + Inhalt ─────────────────────────────────── */
.menu-catalog {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.menu-layout {
  min-width: 0;
  max-width: 100%;
}

/* Flex statt Grid-Zeilen: sonst endet der Sticky-Bereich der Kategorienleiste mit Zeile 1 */
.menu-body {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 960px) {
  .menu-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }

  .menu-body .menu-toc-wrap {
    flex: 0 0 240px;
    width: 240px;
    max-width: 240px;
    align-self: flex-start;
  }

  .menu-body .menu-content {
    flex: 1;
    min-width: 0;
  }
}

/* Inhaltsverzeichnis: Desktop = Spalte; Handy = unter Header fixiert beim Scrollen */
.menu-toc-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.75rem 0 1rem;
  max-width: 100%;
  min-width: 0;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 70%, transparent 100%);
}

@media (max-width: 959px) {
  .menu-toc-wrap {
    /* Unter dem fixierten Site-Header (Hamburger: ~92px, Tablet-Nav: ~88px) */
    top: calc(88px + env(safe-area-inset-top, 0px));
    z-index: 200;
    padding: 0.65rem 0 0.75rem;
    background: rgba(15, 15, 15, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  }

  .menu-toc-title {
    font-size: 1rem;
    margin-bottom: 0.45rem;
  }
}

@media (max-width: 899px) {
  .menu-toc-wrap {
    top: calc(92px + env(safe-area-inset-top, 0px));
  }
}

@media (min-width: 960px) {
  .menu-toc-wrap {
    top: 88px;
    padding: 0;
    background: transparent;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.menu-toc-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(245, 234, 216, 0.85);
  margin-bottom: 0.65rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.menu-toc {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (max-width: 959px) {
  .menu-toc {
    gap: 0.45rem;
    padding-bottom: 0.5rem;
    max-width: 100%;
    scroll-padding-inline: max(0.5rem, env(safe-area-inset-left));
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  .menu-toc::after {
    content: '';
    flex: 0 0 max(0.75rem, env(safe-area-inset-right));
    width: max(0.75rem, env(safe-area-inset-right));
    height: 1px;
    align-self: center;
  }
}

@media (min-width: 960px) {
  .menu-toc {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 0;
    padding-bottom: 0;
  }

  .menu-toc::after {
    display: none;
  }
}

.menu-toc a {
  display: block;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(240, 232, 216, 0.65);
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

@media (min-width: 960px) {
  .menu-toc a {
    white-space: normal;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--line);
    padding: 0.55rem 0.25rem 0.55rem 0;
  }
}

.menu-toc a:hover {
  background: var(--surface);
  color: #f0f0f0;
}

@media (min-width: 960px) {
  .menu-toc a:hover {
    background: transparent;
    color: #f5ead8;
    padding-left: 0.35rem;
  }
}

.menu-toc a.is-active {
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 960px) {
  .menu-toc a.is-active {
    border-bottom-color: rgba(255, 255, 255, 0.35);
    padding-left: 0.35rem;
  }

  .menu-toc a.is-active:hover {
    color: #ffffff;
  }
}

/* ── Kategorien ─────────────────────────────────────────────── */
.menu-content {
  min-width: 0;
  max-width: 100%;
  position: relative;
  z-index: 0;
}

.menu-group {
  scroll-margin-top: 0;
}

.menu-group + .menu-group {
  margin-top: 0;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-category {
  scroll-margin-top: 0;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.menu-group .menu-category:first-child {
  padding-top: 0;
}

.menu-group .menu-category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.menu-category-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-category-head h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.4rem);
  margin: 0;
  color: #f5ead8;
}

.menu-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.menu-sub {
  margin-top: 1.75rem;
}

.menu-sub:first-of-type {
  margin-top: 0;
}

.menu-sub h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  margin-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  color: rgba(245, 234, 216, 0.85);
}

.menu-sub h3 .menu-count {
  margin-left: 0;
}

.menu-note {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.menu-group-image {
  width: min(100%, 760px);
  margin: 0 auto 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.menu-group-image img {
  display: block;
  width: 100%;
  height: clamp(170px, 24vw, 260px);
  object-fit: cover;
  opacity: 0.92;
}

@media (max-width: 860px) {
  .menu-group-image img {
    height: 165px;
  }
}

/* ── Gerichte (Listen) ───────────────────────────────────── */
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.85rem;
  row-gap: 0.25rem;
  align-items: start;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-row:last-child {
  border-bottom: none;
}

.menu-name {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  font-size: 0.92rem;
  color: rgba(240, 232, 216, 0.88);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.menu-price {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  font-variant-numeric: tabular-nums;
}

.menu-desc {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.83rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
  padding-right: 0.5rem;
}

.menu-profile {
  grid-column: 1;
  grid-row: 3;
  margin-top: 0.5rem;
  display: grid;
  gap: 0.2rem;
}

.menu-profile-row {
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.64);
}

.menu-profile-label {
  color: rgba(255, 255, 255, 0.52);
}

.menu-profile-dots {
  color: rgba(245, 234, 216, 0.88);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.menu-wine-price {
  grid-column: 1;
  grid-row: 4;
  margin-top: 0.5rem;
  font-size: 0.83rem;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
}

#rotwein-flasche .menu-row {
  padding: 0.8rem 0;
}

/* Große Kategorien: Slots (Pizza, Aperitifs …) */
.menu-slot-wrap {
  margin-top: 0.5rem;
  max-width: 100%;
  min-width: 0;
}

.menu-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.35rem, 1fr));
  gap: 0.4rem;
  max-width: 100%;
  min-width: 0;
}

.menu-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.menu-load-error {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid rgba(255, 180, 100, 0.35);
  background: rgba(80, 40, 20, 0.35);
  color: rgba(255, 245, 235, 0.95);
  font-size: 0.9rem;
  line-height: 1.5;
}

.menu-footer-hint {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.4);
}

.menu-footer-hint a {
  color: rgba(240, 232, 216, 0.85);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: color var(--ease), border-color var(--ease);
}

.menu-footer-hint a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.45);
}
