:root {
    --bg: #FAF7F2;
    --card-bg: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-mid: #6B6B6B;
    --text-light: #999999;
    --accent: #9B2D8B;
    /* rich magenta from QR */
    --accent-light: #C74BBF;
    /* lighter magenta */
    --accent-dark: #6A1B6A;
    /* deep purple */
    --green: #2E7D47;
    /* logo green */
    --wine: #8B1A1A;
    /* logo dark red */
    --cream: #D4B896;
    /* logo cream/gold */

    --font-heading: 'Inter', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --radius: 20px;
    --radius-sm: 14px;
    --gap: 12px;
    --page-pad: 20px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text-dark);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.45;
    padding-top: 60px;
    /* header */
}

img {
    display: block;
    max-width: 100%;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px var(--page-pad);
    /* Start padding */
    transition: inherit;
    position: relative;
    /* Base for centered logo */
    min-height: 140px;
    /* Space for large logo */
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: inherit;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: inherit;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    transition: inherit;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* Scrolled / Minimal state */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.header.scrolled .header-inner {
    padding: 8px var(--page-pad);
    min-height: 60px;
}

.header.scrolled .logo {
    flex-direction: row;
    gap: 10px;
}

.header.scrolled .logo-img {
    height: 34px;
}

.header.scrolled .logo-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.burger {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    padding: 8px;
    border-radius: 12px;
    transition: background 0.2s;
    margin-left: auto;
    /* Push to right */
    z-index: 51;
}

.burger:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Spacer for the large fixed header on load */
.header-spacer {
    height: 140px;
    /* Matching initial header min-height */
    width: 100%;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.scrolled+.header-spacer {
    height: 60px;
    /* Shrunk spacer */
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #fff;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 16px rgba(155, 45, 139, 0.2);
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(155, 45, 139, 0.25);
    transform: translateY(-3px);
}

/* ===== OVERLAY NAV ===== */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 247, 242, 0.97);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.nav-overlay a {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.2s;
}

.nav-overlay a:hover {
    color: var(--accent);
}

.nav-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 2.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}

/* ===== MAIN ===== */
main {
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PAGE HEADING ===== */
.page-heading {
    padding: 24px var(--page-pad) 10px;
    text-align: center;
}

.page-heading h1 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.page-sub {
    font-size: 0.82rem;
    color: var(--text-mid);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.page-sub::before,
.page-sub::after {
    content: '';
    width: 24px;
    height: 1.5px;
    background: var(--accent);
    opacity: 0.4;
    border-radius: 2px;
}

/* =========================================================
   CATEGORY RIBBON (horizontal scrollable tabs)
   ========================================================= */
.ribbon-wrapper {
    position: sticky;
    top: 60px;
    z-index: 40;
    background: var(--bg);
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.ribbon-arrow {
    display: none;
    /* hidden on mobile */
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #D8D3CC;
    background: var(--card-bg);
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}

.ribbon-arrow:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.ribbon-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.category-ribbon {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 14px 12px 10px;
    flex: 1;
}

.category-ribbon::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 30px;
    border: 1.5px solid #D8D3CC;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.cat-tab.active,
.cat-tab:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Drag cursor */
.carousel,
.category-ribbon {
    cursor: grab;
}

.carousel.dragging,
.category-ribbon.dragging {
    cursor: grabbing;
}

/* =========================================================
   CAROUSEL
   ========================================================= */
.carousel-section {
    padding: 10px 0 4px;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 var(--page-pad);
    gap: var(--gap);
    /* Ensure touch/mouse drag works */
    touch-action: pan-x;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-slide {
    flex: 0 0 calc(100% - 10px);
    scroll-snap-align: start;
}

.slide-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 195px;
}

.slide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.8) 100%);
}

.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.slide-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 5px;
}

.slide-content h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 260px;
    margin-top: auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.price-bubble {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.slide-card .ml-add-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    top: auto !important;
    /* Force override top from JS style */
}

/* Legal links in footer */
.footer-legal-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(155, 45, 139, 0.3);
    transition: all 0.2s;
}

.footer-legal-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    opacity: 0.8;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 0 6px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #D5D0C8;
    transition: all 0.3s;
}

.dot.active {
    width: 20px;
    border-radius: 4px;
    background: var(--accent);
}

/* =========================================================
   MENU SECTIONS
   ========================================================= */
.menu-section {
    padding: 24px var(--page-pad) 10px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 3px;
    flex-shrink: 0;
}

.section-note {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 14px;
    line-height: 1.4;
    padding-left: 14px;
    border-left: 2px solid rgba(155, 45, 139, 0.15);
    margin-left: 0;
}

/* ===== PRODUCT GRID (cards, 2 cols) ===== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.product-card:active {
    transform: scale(0.97);
}

.card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f0ea 0%, #e8e2d8 100%);
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .card-img img {
    transform: scale(1.04);
}

.card-body {
    padding: 12px 14px;
}

.card-body h3 {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.card-body .detail {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.price {
    display: inline-block;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--accent-dark);
    background: rgba(155, 45, 139, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 4px;
}

.highlight-card {
    border: 1.5px solid var(--accent);
}

/* ===== PRODUCT LIST (simple rows for drinks) ===== */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    background: var(--card-bg);
    font-size: 0.88rem;
}

.list-item span:first-child {
    flex: 1;
}

.list-item .size {
    font-size: 0.75rem;
    color: var(--text-light);
    flex-shrink: 0;
}

.list-item .price {
    flex-shrink: 0;
    text-align: right;
    min-width: 55px;
    background: none;
    padding: 0;
    margin-top: 0;
}

/* ===== TORTEN BOX ===== */
.torte-box {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    border: 1.5px dashed #D8D3CC;
}

.torte-box p {
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.5;
    margin-bottom: 12px;
}

.torte-cta {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
}

/* ===== ALLERGEN NOTICE ===== */
.allergen-notice {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px var(--page-pad);
    text-align: center;
}

.allergen-notice p {
    font-size: 0.78rem;
    color: var(--text-light);
}

.allergen-notice .small {
    font-size: 0.68rem;
    margin-top: 4px;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 28px var(--page-pad) 40px;
    max-width: 600px;
    margin: 0 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer p {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.5;
}

.footer-credit {
    margin-top: 16px;
    font-size: 0.7rem;
    color: var(--text-light);
    opacity: 0.7;
}

.footer-credit a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.detail-inline {
    font-style: normal;
    font-size: 0.78rem;
    color: var(--text-light);
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */

/* Tablet */
@media (min-width: 768px) {
    main {
        max-width: 720px;
    }

    .header-inner {
        max-width: 720px;
    }

    .page-heading h1 {
        font-size: 2.4rem;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 16px;
    }

    .slide-card {
        height: 240px;
    }

    .slide-content h2 {
        font-size: 1.7rem;
    }

    .card-body h3 {
        font-size: 1rem;
    }

    .footer {
        max-width: 720px;
    }

    .allergen-notice {
        max-width: 720px;
    }

    .ribbon-wrapper {
        max-width: 720px;
    }

    .ribbon-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    main {
        max-width: 900px;
    }

    .header-inner {
        max-width: 900px;
    }

    .page-heading h1 {
        font-size: 2.8rem;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 18px;
    }

    .slide-card {
        height: 280px;
    }

    .card-body {
        padding: 16px;
    }

    .card-body h3 {
        font-size: 1.05rem;
    }

    .list-item {
        padding: 16px 20px;
        font-size: 0.95rem;
    }

    .footer {
        max-width: 900px;
    }

    .allergen-notice {
        max-width: 900px;
    }

    .logo-name {
        font-size: 1.1rem;
    }

    .ribbon-wrapper {
        max-width: 900px;
    }
}