@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-wood:      #1C1008;
    --deep-brown:     #2E1A0E;
    --medium-brown:   #4A2C17;
    --warm-amber:     #8B5E3C;
    --gold:           #C9982A;
    --gold-light:     #E8C56A;
    --gold-pale:      #F5E4B0;
    --cream:          #FAF3E0;
    --ivory:          #FDF8EE;
    --warm-white:     #FFFDF7;
    --text-main:      #1C1008;
    --text-muted:     #6B4C30;
    --text-light:     #9B7B5A;
    --shadow-warm:    rgba(28, 16, 8, 0.25);
    --shadow-gold:    rgba(201, 152, 42, 0.20);
    --border-gold:    rgba(201, 152, 42, 0.35);
}

body {
    font-family: 'Lato', 'Segoe UI', sans-serif;
    background-color: var(--deep-brown);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(201,152,42,0.03) 2px,
            rgba(201,152,42,0.03) 4px
        ),
        linear-gradient(160deg, #2E1A0E 0%, #1C1008 60%, #3A2010 100%);
    min-height: 100vh;
    color: var(--text-main);
    padding: 20px;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    background: var(--ivory);
    border-radius: 4px;
    padding: 40px 36px;
    box-shadow:
        0 0 0 1px var(--border-gold),
        0 0 0 4px rgba(201,152,42,0.08),
        0 20px 60px rgba(0,0,0,0.5);
}

/* ── HEADER ── */
header {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--gold);
    position: relative;
}

header::after {
    content: '✦ ─────── ✦ ─────── ✦';
    display: block;
    margin-top: 16px;
    color: var(--gold);
    font-size: 0.75em;
    letter-spacing: 0.15em;
}

header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8em;
    font-weight: 700;
    color: var(--deep-brown);
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-bottom: 6px;
}

.subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.table-info {
    font-size: 1em;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.favorites-toggle {
    background: transparent;
    border: 1.5px solid var(--gold);
    padding: 10px 24px;
    border-radius: 2px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gold);
    font-weight: 600;
}

.favorites-toggle:hover {
    background: var(--gold);
    color: var(--ivory);
    box-shadow: 0 4px 14px var(--shadow-gold);
}

.heart {
    color: var(--gold);
}

/* ── NAVIGATION ── */
.category-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 9px 16px;
    border: 1px solid var(--border-gold);
    border-radius: 2px;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Lato', sans-serif;
    font-size: 0.82em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 600;
}

.category-btn:hover {
    background: var(--gold-pale);
    color: var(--deep-brown);
    border-color: var(--gold);
}

.category-btn.active {
    background: var(--deep-brown);
    color: var(--gold-light);
    border-color: var(--deep-brown);
    box-shadow: 0 3px 10px var(--shadow-warm);
}

/* ── MENU SECTIONS ── */
.menu-section {
    display: none;
    animation: fadeIn 0.35s ease;
}

.menu-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.menu-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--deep-brown);
    font-size: 1.9em;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.menu-section h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--gold);
    margin: 8px 0 22px 0;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── MENU ITEM ── */
.menu-item {
    background: transparent;
    border-bottom: 1px solid rgba(201,152,42,0.18);
    padding: 16px 12px;
    transition: background 0.2s ease;
}

.menu-item:first-child {
    border-top: 1px solid rgba(201,152,42,0.18);
}

.menu-item:hover {
    background: var(--cream);
}

.item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.item-info h3 {
    font-family: 'Lato', sans-serif;
    color: var(--text-main);
    font-size: 1.05em;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 3px;
}

.description {
    color: var(--text-light);
    font-size: 0.85em;
    font-style: italic;
    margin-bottom: 4px;
    line-height: 1.4;
}

.price {
    color: var(--warm-amber);
    font-weight: 700;
    font-size: 1.05em;
    font-family: 'Lato', sans-serif;
    white-space: nowrap;
}

.allergens {
    color: var(--text-light);
    font-size: 0.78em;
    margin-top: 4px;
    letter-spacing: 0.03em;
}

/* ── FAVORITEN-BUTTON ── */
.favorite-btn {
    background: transparent;
    border: 1.5px solid var(--border-gold);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4em;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--border-gold);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    
}

.favorites-toggle-floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1100;

    /* optische Anpassung für den Floating-Button */
    border-radius: 999px;
    padding: 12px 20px;
    box-shadow: 0 8px 24px var(--shadow-warm);
    background: var(--deep-brown);
    color: var(--gold-light);
    border-color: var(--gold);
}

.favorites-toggle-floating:hover {
    background: var(--gold);
    color: var(--deep-brown);
}

/* Favoriten-Button: sanft ausblenden wenn Menü offen */
.favorites-toggle-floating {
    transition: opacity 0.25s ease, visibility 0.25s ease,
                background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.favorites-btn--hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


.favorite-btn:hover {
    background: var(--gold-pale);
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.08);
}

.favorite-btn.active {
    background: var(--gold);
    color: var(--ivory);
    border-color: var(--gold);
}

/* ── FAVORITEN OVERLAY ── */
.favorites-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(28, 16, 8, 0.72);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
}

.favorites-overlay.hidden {
    display: none;
}

.favorites-modal {
    background: var(--ivory);
    border-radius: 4px 4px 0 0;
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
    animation: slideUpModal 0.3s ease;
    border-top: 3px solid var(--gold);
}

@keyframes slideUpModal {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-gold);
    background: var(--cream);
    border-radius: 4px 4px 0 0;
    flex-shrink: 0;
}

.favorites-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--deep-brown);
    font-size: 1.5em;
    margin: 0;
}

.favorites-header h2::after {
    display: none;
}

.close-btn {
    background: transparent;
    border: 1.5px solid var(--border-gold);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.close-btn:hover {
    background: var(--gold);
    color: var(--ivory);
    border-color: var(--gold);
    transform: rotate(90deg);
}

.favorites-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
    min-height: 160px;
    max-height: calc(85vh - 240px);
}

.favorites-list::-webkit-scrollbar { width: 6px; }
.favorites-list::-webkit-scrollbar-track { background: var(--cream); }
.favorites-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

.favorite-item {
    border-bottom: 1px solid var(--border-gold);
    padding: 13px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.25s ease;
}

.favorite-item:last-child { border-bottom: none; }

.favorite-item-info { flex: 1; margin-right: 16px; }

.favorite-item-info h4 {
    font-family: 'Lato', sans-serif;
    color: var(--text-main);
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 3px;
}

.favorite-item-price {
    color: var(--warm-amber);
    font-weight: 700;
    font-size: 1em;
}

.remove-favorite {
    background: transparent;
    border: 1.5px solid rgba(180,80,60,0.35);
    color: #A04030;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-favorite:hover {
    background: #A04030;
    color: white;
    border-color: #A04030;
    transform: scale(1.1);
}

.empty-message {
    text-align: center;
    color: var(--text-light);
    padding: 50px 20px;
    font-style: italic;
    font-size: 1.05em;
}

/* ── FOOTER MODAL ── */
.favorites-footer {
    border-top: 1px solid var(--border-gold);
    padding: 20px 28px;
    background: var(--cream);
    flex-shrink: 0;
}

.total-price {
    display: flex;
    justify-content: space-between;
    font-size: 1.25em;
    margin-bottom: 16px;
    color: var(--text-main);
    font-family: 'Playfair Display', Georgia, serif;
}

.order-btn {
    width: 100%;
    padding: 16px;
    background: var(--deep-brown);
    color: var(--gold-light);
    border: 1.5px solid var(--gold);
    border-radius: 2px;
    font-family: 'Lato', sans-serif;
    font-size: 1em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-btn:hover:not(:disabled) {
    background: var(--gold);
    color: var(--deep-brown);
    box-shadow: 0 4px 16px var(--shadow-gold);
}

.order-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── BESTÄTIGUNGS-MODAL ── */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(28, 16, 8, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--ivory);
    border-radius: 4px;
    padding: 44px 40px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 12px 50px rgba(0,0,0,0.45);
    animation: slideUp 0.3s ease;
    border-top: 3px solid var(--gold);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--deep-brown);
    margin-bottom: 14px;
    font-size: 1.8em;
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 10px;
    font-size: 1em;
    line-height: 1.6;
}

.order-number {
    color: var(--warm-amber);
    font-weight: 700;
    font-size: 1.1em;
    font-family: 'Playfair Display', Georgia, serif;
}

.btn-primary {
    background: var(--deep-brown);
    color: var(--gold-light);
    border: 1.5px solid var(--gold);
    padding: 12px 36px;
    border-radius: 2px;
    font-family: 'Lato', sans-serif;
    font-size: 0.95em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    margin-top: 22px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gold);
    color: var(--deep-brown);
}

/* Gruppen-Buttons Fallback (Getränke/Speisen) */
.main-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-gold);
}

.main-tab {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: -2px;
}

.main-tab:hover {
  color: var(--gold);
  background: var(--cream);
}

.main-tab.active {
  color: var(--deep-brown);
  border-bottom: 3px solid var(--gold);
  background: transparent;
}

/* Karussell-Optimierung */
.category-carousel {
  position: sticky;
  top: 20px;
  z-index: 100;
  background: var(--ivory);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 32px;
  box-shadow: 0 2px 12px var(--shadow-gold);
}


.category-carousel {
  position: sticky;
  top: 20px;
  z-index: 100;
  background: var(--ivory);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 32px;
  /* Schatten für Sticky-Effekt */
  box-shadow: 0 2px 12px var(--shadow-gold);
}

.category-nav {
  display: flex;
  gap: 8px;
  /* Karussell-Setup */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  scroll-behavior: smooth;
}

.category-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-btn {
  flex: 0 0 auto; /* Kein Wachstum, feste Breite */
  scroll-snap-align: start;
  white-space: nowrap;
  min-width: 80px;
}


/* Perfektes horizontales Karussell */
/* KARUSSELL: STRIKT EINE ZEILE, KEIN WRAP */
.category-carousel .category-nav {
    flex-wrap: nowrap !important;    /* KEINE Zeilenumbrüche */
    overflow-x: auto !important;     /* Horizontal scrollen */
    max-height: 60px;                /* Etwas mehr Spielraum */
    padding-inline: 8px !important;  /* Rand-Buttons nicht abgehackt */
    scroll-padding-inline: 8px;      /* Snap berücksichtigt Padding */
}

/* BUTTONS: Perfekte Einzeile, kein Overflow */
.category-carousel .category-btn {
    flex: 0 0 auto !important;       /* Breite richtet sich nach Textinhalt */
    min-width: 80px !important;      /* Mindestbreite für sehr kurze Labels */
    max-width: none !important;      /* Kein Limit – langer Text wird nicht abgehackt */
    padding: 8px 14px !important;    /* Ausreichend Luft links/rechts */
    font-size: 0.78em !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;  /* Einzeilig bleiben */
    overflow: visible !important;    /* Kein Textabschneiden */
    text-overflow: clip !important;
    min-height: 42px !important;     /* Mindesthöhe statt fester Höhe */
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Scrollbar unsichtbar/ dünn für Clean Look */
.category-carousel .category-nav::-webkit-scrollbar {
    height: 3px !important;
}
.category-carousel .category-nav::-webkit-scrollbar-thumb {
    background: var(--gold) !important;
    border-radius: 2px !important;
}


.category-btn {
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
  min-width: 90px; /* Etwas breiter für besseres Snappen */
}


/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .container {
        padding: 24px 18px;
        border-radius: 0;
    }

    header h1 { font-size: 2em; }

    .category-btn {
        font-size: 0.75em;
        padding: 8px 12px;
    }
}