/* ==========================================================================
   MENU & CATEGORIES DEDICATED STYLESHEET (menu.css)
   Modular CSS for menu.php - Desktop 2-Column with Liquid Glass Sidebar
   & Responsive 3 or 4 Product Cards Grid (Matching index.php Style)
   ========================================================================== */

/* Universal Page Wrapper */
.menu-page-wrapper {
    min-height: 100vh;
    background: radial-gradient(circle at 10% 10%, rgba(255, 235, 235, 0.7) 0%, transparent 45%),
                radial-gradient(circle at 90% 15%, rgba(254, 243, 199, 0.6) 0%, transparent 40%),
                radial-gradient(circle at 50% 60%, rgba(255, 241, 242, 0.7) 0%, transparent 50%),
                #F8FAFC;
    padding: 24px 0 100px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.menu-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   1. UNIFIED TOP MENU NAV BAR: SINGLE CLEAN LINE (ARROW + TITLE + BREADCRUMBS)
   ========================================================================== */
.menu-top-nav-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 4px 0;
}

/* Circular Back Arrow Button */
.btn-menu-back-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0F172A;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.btn-menu-back-arrow:hover {
    background: #E11D48;
    color: #FFFFFF;
    border-color: #BE123C;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

/* Royal Menu Main Title */
.menu-royal-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.4px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* Subtle Slash Divider */
.menu-nav-divider {
    color: #CBD5E1;
    font-size: 1.2rem;
    font-weight: 300;
    user-select: none;
    line-height: 1;
}

/* Breadcrumbs Track in the Same Line */
.menu-breadcrumbs-track {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #64748B;
    font-family: 'Plus Jakarta Sans', sans-serif;
    flex-wrap: wrap;
    line-height: 1;
}

.menu-breadcrumbs-track .crumb-link {
    color: #64748B;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.menu-breadcrumbs-track .crumb-link:hover {
    color: #E11D48;
}

.menu-breadcrumbs-track .crumb-chevron {
    font-size: 0.7rem;
    color: #94A3B8;
}

.menu-breadcrumbs-track .crumb-active {
    color: #0F172A;
    font-weight: 800;
}

/* Hero Banner */
.menu-hero-banner {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-radius: 24px;
    padding: 24px 32px;
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
    margin-bottom: 24px;
}

.menu-hero-banner::before {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.menu-hero-text .menu-hero-title {
    font-size: 1.85rem;
    font-weight: 900;
    margin: 0 0 6px 0;
    letter-spacing: -0.4px;
    color: #FFFFFF !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.menu-hero-text p {
    font-size: 0.92rem;
    color: #E2E8F0 !important;
    margin: 0;
}

.menu-hero-badges {
    display: flex;
    gap: 12px;
    z-index: 2;
}

.menu-hero-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F8FAFC;
}

/* ==========================================================================
   2. MAIN 2-COLUMN LAYOUT: SIDEBAR + DISHES CONTENT
   ========================================================================== */
.menu-main-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 28px;
    align-items: start;
}

/* ==========================================================================
   3. LEFT CATEGORY LIST SIDEBAR (LIQUID GLASSMORPHISM & SHADOW)
   ========================================================================== */
.menu-category-sidebar {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(26px) saturate(190%);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 26px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.95);
    padding: 20px 16px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header-box {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header-box h3 {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-total-badge {
    background: #FFF1F2;
    color: #E50914;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 99px;
}

/* Search Input inside Sidebar */
.sidebar-search-box {
    position: relative;
    margin-bottom: 14px;
}

.sidebar-search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 14px;
    border: 1.5px solid #E2E8F0;
    background: rgba(248, 250, 252, 0.85);
    font-size: 0.84rem;
    font-family: inherit;
    font-weight: 600;
    color: #0F172A;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.sidebar-search-box input:focus {
    border-color: #E50914;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
}

.sidebar-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.86rem;
}

/* Scrollable Category List Container */
.sidebar-categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
    flex-grow: 1;
}

/* Custom Sleek Scrollbar */
.sidebar-categories-list::-webkit-scrollbar {
    width: 5px;
}
.sidebar-categories-list::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
    border-radius: 99px;
}
.sidebar-categories-list::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 99px;
}
.sidebar-categories-list::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Individual Category Item */
.cat-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    text-decoration: none;
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.cat-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #E2E8F0;
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.cat-sidebar-item.active {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.08) 0%, rgba(229, 9, 20, 0.14) 100%);
    border-color: rgba(229, 9, 20, 0.35);
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.12);
}

.cat-side-img-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: #F1F5F9;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-side-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cat-sidebar-item:hover .cat-side-img-box img,
.cat-sidebar-item.active .cat-side-img-box img {
    transform: scale(1.1);
}

.cat-side-details {
    flex: 1;
    min-width: 0;
}

.cat-side-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.cat-sidebar-item.active .cat-side-title {
    color: #E50914;
}

.cat-side-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #64748B;
}

.cat-side-count {
    font-weight: 700;
}

.cat-side-active-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #E50914;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    transform: scale(0);
}

.cat-sidebar-item.active .cat-side-active-dot {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.6);
}

/* ==========================================================================
   4. RIGHT CONTENT AREA: FILTERS & PRODUCT DISHES GRID
   ========================================================================== */
.menu-content-area {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Category Toolbar (Title + Veg/Nonveg Filter Pills) */
.menu-toolbar-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    padding: 16px 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.toolbar-heading-box h2 {
    font-size: 1.35rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0 0 2px 0;
    letter-spacing: -0.3px;
}

.toolbar-heading-box p {
    font-size: 0.78rem;
    color: #64748B;
    margin: 0;
}

.menu-filter-pills {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-pill-btn {
    border: 1.5px solid #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    padding: 7px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.filter-pill-btn:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
}

.filter-pill-btn.active {
    background: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
}

.diet-dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
}

.diet-dot-red {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
}

/* ==========================================================================
   5. RESPONSIVE PRODUCT DISH CARDS GRID (3 OR 4 CARDS)
   ========================================================================== */
.menu-dishes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1320px) {
    .menu-dishes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   6. PRODUCT ITEM CARD (IDENTICAL HIGH-AESTHETIC STYLE AS index.php)
   ========================================================================== */
.popular-dish-card {
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #F3F4F6;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.popular-dish-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(229, 9, 20, 0.12);
    border-color: #FFE0E0;
}

.popular-dish-img-box {
    height: 155px;
    position: relative;
    overflow: hidden;
    background: #F1F5F9;
}

.popular-dish-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.popular-dish-card:hover .popular-dish-img-box img {
    transform: scale(1.08);
}

/* Diet Badge on Image (Veg/Nonveg Symbol) */
.dish-diet-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #FFFFFF;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.dish-diet-pill.veg { border-color: #16A34A; }
.dish-diet-pill.veg::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16A34A;
}

.dish-diet-pill.non-veg { border-color: #DC2626; }
.dish-diet-pill.non-veg::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #DC2626;
}

/* Bestseller / Chef Special Tag */
.dish-badge-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    z-index: 2;
}

.dish-badge-pill.hot {
    background: linear-gradient(135deg, #FF1E38 0%, #E50914 100%);
}

.dish-badge-pill.chef {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* Card Body */
.popular-dish-body {
    padding: 14px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.popular-dish-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.popular-dish-sub {
    font-size: 0.74rem;
    color: #64748B;
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-dish-price {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: 12px;
}

.popular-dish-price .old-price {
    font-size: 0.8rem;
    color: #94A3B8;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 600;
}

.popular-dish-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #F8FAFC;
}

.rating-star-box {
    font-size: 0.82rem;
    font-weight: 800;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-star-box i {
    color: #F59E0B;
}

.btn-add-pill-red {
    background: #E50914;
    color: #FFFFFF;
    border: none;
    padding: 7px 18px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 0.84rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.28);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn-add-pill-red:hover {
    background: #C40812;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.38);
}

.btn-add-pill-red:active {
    transform: scale(0.95);
}

/* Empty State / Not Found */
.menu-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    border: 1.5px dashed #CBD5E1;
}

.menu-empty-state i {
    font-size: 3rem;
    color: #CBD5E1;
    margin-bottom: 12px;
}

.menu-empty-state h4 {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0 0 6px 0;
}

.menu-empty-state p {
    font-size: 0.84rem;
    color: #64748B;
    margin: 0;
}

/* ==========================================================================
   7. MOBILE RESPONSIVENESS (< 992px)
   ========================================================================== */
@media (max-width: 991px) {
    .menu-page-wrapper {
        padding: 14px 0 100px 0;
    }

    .menu-page-container {
        padding: 0 14px;
    }

    /* Top Bar Mobile Optimization */
    .menu-top-nav-bar {
        gap: 10px;
        margin-bottom: 14px;
    }

    .btn-menu-back-arrow {
        width: 34px;
        height: 34px;
        font-size: 0.88rem;
    }

    .menu-royal-heading {
        font-size: 1.25rem;
    }

    .menu-breadcrumbs-track {
        font-size: 0.78rem;
        gap: 6px;
    }

    .menu-hero-banner {
        padding: 18px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 16px;
    }

    .menu-hero-text .menu-hero-title {
        font-size: 1.4rem;
    }

    /* Stack on Mobile */
    .menu-main-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Horizontal Category Strip on Mobile */
    .menu-category-sidebar {
        position: static;
        max-height: none;
        padding: 12px;
        border-radius: 20px;
    }

    .sidebar-header-box,
    .sidebar-search-box {
        display: none;
    }

    .sidebar-categories-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        padding-bottom: 6px;
    }

    .cat-sidebar-item {
        flex-direction: column;
        padding: 8px 12px;
        min-width: 85px;
        text-align: center;
        gap: 6px;
    }

    .cat-sidebar-item:hover {
        transform: none;
    }

    .cat-side-details {
        text-align: center;
    }

    .cat-side-title {
        font-size: 0.74rem;
    }

    .cat-side-meta {
        display: none;
    }

    .cat-side-active-dot {
        display: none;
    }

    /* 2 Columns on Mobile */
    .menu-dishes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .popular-dish-img-box {
        height: 120px;
    }

    .popular-dish-body {
        padding: 10px;
    }

    .popular-dish-title {
        font-size: 0.84rem;
        min-height: 2.2em;
    }

    .popular-dish-price {
        font-size: 0.98rem;
        margin-bottom: 8px;
    }

    .btn-add-pill-red {
        padding: 5px 12px;
        font-size: 0.76rem;
    }

    .toolbar-heading-box {
        width: 100%;
    }

    .menu-filter-pills {
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .menu-dishes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .popular-dish-img-box {
        height: 110px;
    }
}
