@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --bg-warm: #FAF8F5;        /* Warm cream white */
    --card-white: #FFFFFF;     /* White container cards */
    --text-dark: #2D1910;      /* Deep roasted coffee brown */
    --text-muted: #7E6F65;     /* Warm grey/brown */
    --primary-brown: #3E2723;  /* Espresso brown */
    --accent-gold: #8B5A2B;    /* Golden caramel/brown */
    --accent-gold-light: rgba(139, 90, 43, 0.1);
    --border-soft: #F0EAE1;    /* Very soft cream border */
    --success-green: #2E7D32;
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --shadow-sm: 0 4px 12px rgba(62, 39, 35, 0.03);
    --shadow-md: 0 8px 24px rgba(62, 39, 35, 0.06);
    --shadow-lg: 0 12px 35px rgba(139, 90, 43, 0.08);
    --primary-gradient: linear-gradient(135deg, #8B5A2B 0%, #A06F3C 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-warm);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 90px; /* Space for bottom actions bar */
}

/* Mobile container constraints */
.menu-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-warm);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(62, 39, 35, 0.05);
}

/* Hero Header Area */
.hero-header {
    position: relative;
    height: 220px;
    background: linear-gradient(180deg, rgba(45, 25, 16, 0.2) 0%, rgba(45, 25, 16, 0.8) 100%), 
                url('https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?q=80&w=600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    overflow: hidden;
}

.pdf-download-btn {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 10;
}

.pdf-download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.restaurant-info h1 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.35rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.restaurant-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    opacity: 0.95;
    font-weight: 500;
}

.restaurant-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.table-indicator {
    background: var(--primary-gradient);
    color: white;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.3);
    z-index: 10;
}

/* Sticky Search & Navigation Wrapper */
.sticky-nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
    padding: 0.9rem 1rem 0;
}

/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 0.85rem;
}

.search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.85rem;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: var(--card-white);
    color: var(--text-dark);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Horizontal Categories Scroller */
.categories-scroller {
    display: flex;
    overflow-x: auto;
    gap: 0.6rem;
    padding-bottom: 0.85rem;
    scrollbar-width: none;
}

.categories-scroller::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 0.6rem 1.35rem;
    background: var(--card-white);
    border: 1px solid var(--border-soft);
    color: var(--text-dark);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.category-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.2);
    transform: scale(1.03);
}

/* Menu Item Sections */
.menu-content {
    padding: 1.5rem 1rem;
}

.menu-section {
    margin-bottom: 2.2rem;
    scroll-margin-top: 130px; /* Offset for sticky header bar when auto-scrolling */
}

.section-header-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--primary-brown);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-header-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-soft) 0%, transparent 100%);
}

.items-grid {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Item Card */
.menu-item-card {
    background: var(--card-white);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 0.85rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.menu-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(139, 90, 43, 0.2);
}

/* Left Image Box */
.item-img-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-warm);
}

.item-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
}

/* Right Content Box */
.item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.item-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-brown);
}

.item-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-gold);
    white-space: nowrap;
}

.item-description {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-footer-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.meta-tag {
    font-size: 0.65rem;
    background: #FAF6F0;
    color: var(--accent-gold);
    border: 1px solid var(--border-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

/* Float Bottom Action Bar */
.bottom-actions-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-soft);
    padding: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    box-shadow: 0 -8px 30px rgba(62, 39, 35, 0.06);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.bottom-btn {
    flex-grow: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.2rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-waiter {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.25);
}

.btn-waiter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 90, 43, 0.3);
}

.btn-bill {
    background: var(--card-white);
    color: var(--primary-brown);
    border-color: var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.btn-bill:hover {
    background: var(--bg-warm);
    transform: translateY(-2px);
}

/* Modal Dialog Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 25, 16, 0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-white);
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    padding: 1.8rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid var(--border-soft);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    border: none;
    background: var(--bg-warm);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--primary-brown);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gold-light);
    border-radius: 50%;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-brown);
}

.modal-img-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    height: 200px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.allergen-box {
    background: #FFF5F5;
    color: #C53030;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    font-size: 0.8rem;
    text-align: left;
    width: 100%;
    display: none;
    border: 1px solid #FED7D7;
}

.modal-price-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    border-top: 1px solid var(--border-soft);
    padding-top: 1.2rem;
    margin-top: 0.4rem;
}

.price-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--primary-brown);
    color: white;
    padding: 0.85rem 1.6rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    z-index: 300;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.toast-notification.active {
    transform: translateX(-50%) translateY(0);
}

.toast-success-icon {
    color: #81C784;
}

/* No results state for search */
.no-results {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: none;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 0.85rem;
    color: #E6DFD5;
    display: block;
}

/* Print styles for generating a beautiful PDF menu */
@media print {
    body {
        background-color: #FFFFFF !important;
        color: #000000 !important;
        padding-bottom: 0 !important;
    }
    
    .menu-container {
        max-width: 100% !important;
        box-shadow: none !important;
        background: #FFFFFF !important;
    }
    
    /* Hide interactive elements */
    .pdf-download-btn,
    .table-indicator,
    .sticky-nav-wrapper,
    .bottom-actions-bar,
    .modal-overlay,
    .toast-notification {
        display: none !important;
    }
    
    .hero-header {
        height: auto !important;
        background: #FFFFFF !important;
        color: #000000 !important;
        border-bottom: 2px solid #2D1910 !important;
        padding: 1rem 0 !important;
        display: block !important;
        border-radius: 0 !important;
    }
    
    .restaurant-info h1 {
        color: #2D1910 !important;
        font-size: 2rem !important;
    }
    
    .restaurant-meta {
        color: #7E6F65 !important;
    }
    
    .restaurant-meta span i {
        display: none !important;
    }
    
    .menu-content {
        padding: 1rem 0 !important;
    }
    
    .menu-section {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 1.5rem !important;
    }
    
    .section-header-title {
        color: #2D1910 !important;
        font-size: 1.2rem !important;
        border-bottom: 1px solid #2D1910 !important;
        padding-bottom: 0.25rem !important;
        page-break-after: avoid;
        break-after: avoid;
    }
    
    .section-header-title::after {
        display: none !important;
    }
    
    .menu-item-card {
        box-shadow: none !important;
        border: none !important;
        border-bottom: 1px dashed #EDE8E2 !important;
        padding: 0.5rem 0 !important;
        border-radius: 0 !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .item-img-wrapper {
        width: 60px !important;
        height: 60px !important;
        border-radius: 6px !important;
    }
    
    .item-title {
        font-size: 0.95rem !important;
        color: #2D1910 !important;
    }
    
    .item-price {
        font-size: 0.95rem !important;
        color: #8B5A2B !important;
        font-weight: bold !important;
    }
    
    .item-description {
        font-size: 0.75rem !important;
        color: #555555 !important;
        -webkit-line-clamp: none !important;
        display: block !important;
    }
    
    .meta-tag {
        border: 1px solid #CCCCCC !important;
        color: #555555 !important;
        background: transparent !important;
    }
}
