:root {
    --primary-color: #d2000d; /* Vapiano Red-ish */
    --secondary-color: #000;
    --accent-color: #6c757d;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--secondary-color);
}

/* Header */
.menu-header {
    background: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.restaurant-logo {
    max-height: 50px;
    object-fit: contain;
}

/* Category Nav */
.category-nav-wrapper {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 82px; /* Adjust based on header height */
    z-index: 1020;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.category-nav {
    display: flex;
    flex-wrap: nowrap;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    width: max-content; /* Force width to content */
    min-width: 100%; /* At least full width */
}

.category-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 50px; /* Pill shape */
    transition: all 0.2s;
    white-space: nowrap;
    flex: 0 0 auto; /* Prevent shrinking */
    background: #f8f9fa; /* Slight bg for unselected */
}

.category-link:hover, .category-link.active {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Hero Section */
.restaurant-hero-split {
    border-bottom: 1px solid #f0f0f0;
}

.hero-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.hero-img {
    transition: transform 0.5s ease;
    width: 100%;
    object-fit: cover;
    min-height: 300px;
}

.restaurant-hero-split:hover .hero-img {
    transform: scale(1.02);
}

.info-badge {
    background: #f8f9fa;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    text-align: center;
    min-width: 100px;
    border: 1px solid #e9ecef;
}

/* Menu Items */
.menu-section-title {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    font-size: 1.75rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.menu-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid transparent;
    border-radius: 16px; /* Keep rounded corners */
    overflow: visible; /* Allow button to overflow if needed, though now inside image wrapper */
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: auto; /* Allow auto height */
    cursor: pointer;
    box-shadow: none; /* Cleaner look for list */
    border-bottom: 1px solid #f0f0f0; /* Separator line */
    border-radius: 0; /* Flat list style */
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.5rem 0;
}

.product-card:last-child {
    border-bottom: none;
}

.product-card:hover {
    background-color: #fafafa;
    transform: none; /* Disable lift effect for list */
    box-shadow: none;
    border-color: transparent;
    border-bottom: 1px solid #f0f0f0;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-wrapper {
    width: 120px;
    height: 120px;
    padding-top: 0;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 1.5rem;
    order: 2; /* Image on right */
    position: relative;
    overflow: visible;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-body {
    padding: 0;
    flex-grow: 1;
    order: 1; /* Text on left */
}

.product-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.product-desc {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary-color);
    display: block;
}

.btn-add {
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-card:hover .btn-add {
    background-color: var(--primary-color);
    color: #fff;
    border-color: #fff;
    transform: scale(1.1);
}

/* Category Nav Enhanced */
.category-nav-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: sticky;
    top: 82px; /* Adjust based on header height */
    z-index: 1020;
    overflow-x: auto; /* Allow wrapper to scroll */
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.category-nav-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-nav {
    display: flex;
    flex-wrap: nowrap;
    padding: 0 1rem; /* Horizontal padding */
    gap: 1rem;
    width: max-content; /* Ensure content forces scroll */
    min-width: 100%;
}

.category-link {
    color: #6c757d;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    display: inline-block;
    text-transform: uppercase;
    flex-shrink: 0; /* Prevent shrinking */
}

.category-link:last-child {
    margin-right: 1rem; /* Extra space at the end */
}

.category-link:hover {
    color: var(--primary-color);
    background-color: rgba(210, 0, 13, 0.05);
}

/* Subcategory Pills */
.subcat-nav {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1rem 0;
    position: sticky;
    top: 135px; /* Sticky below category nav */
    z-index: 1010;
    background: transparent;
    margin: 0 -12px 1rem -12px;
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
    overflow-x: auto;
}

.subcat-nav::-webkit-scrollbar {
    display: none;
}

.subcat-pill {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    background-color: #fff;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.subcat-pill:last-child {
    margin-right: 1rem;
}

.subcat-pill:hover, .subcat-pill:focus {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 0, 13, 0.3);
}

.subcat-title {
    scroll-margin-top: 180px;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    color: #000;
}

/* Option Images in Modal */
.option-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.category-link.active {
    background-color: var(--secondary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Modal */
.modal-content {
    border-radius: 16px;
    border: none;
}

.modal-header {
    border-bottom: none;
    padding: 1.5rem 1.5rem 0.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.option-group-title {
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Mobile Bottom Bar */
.mobile-bottom-bar {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    z-index: 1040;
    pointer-events: none; /* Allow clicks through empty space */
}

/* Desktop Adjustments */
@media (min-width: 768px) {
    /* Container max-width for better reading experience */
    .container {
        max-width: 1000px;
    }

    /* Category Nav Desktop */
    .category-nav-wrapper {
        top: 88px; /* Adjust for desktop header */
        padding: 0;
        background: #fff;
        border-bottom: 1px solid #e9ecef;
    }

    .category-nav {
        justify-content: center; /* Center nav items */
        padding: 1rem 0;
        width: 100%;
        gap: 0.5rem;
    }

    .category-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        background: transparent; /* No pill bg on desktop until active */
        border-radius: 4px;
        color: #4a4a4a;
        text-transform: uppercase;
        font-weight: 700;
        letter-spacing: 0.5px;
    }

    .category-link:hover {
        background: transparent;
        color: #000;
    }

    .category-link.active {
        background: #000;
        color: #fff;
        border-radius: 50px;
        padding: 0.5rem 1.5rem;
        box-shadow: none;
    }

    /* Product Card Desktop */
    .product-card {
        padding: 2rem;
        border: 1px solid #f0f0f0;
        border-radius: 12px !important; /* Restore radius */
        margin-bottom: 1.5rem; /* Spacing between cards */
        background: #fff;
        height: 100%; /* Full height for grid */
        transition: box-shadow 0.3s ease, transform 0.3s ease;
    }
    
    .product-card:hover {
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        transform: translateY(-5px);
        border-color: transparent;
    }

    /* Subcategory Nav Desktop */
    .subcat-nav {
        top: 145px;
        background: transparent;
        padding: 1rem 0;
        margin: 0 0 2rem 0;
        border-bottom: none;
    }

    .subcat-pill {
        background: #fff;
        color: var(--primary-color);
        border: 1px solid var(--primary-color);
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
        font-weight: 700;
    }

    /* Cart Sidebar (if visible) */
    .offcanvas-end {
        width: 400px;
    }
}

/* Hero Desktop */
@media (min-width: 992px) {
    .restaurant-hero-split {
        padding: 4rem 0;
    }
    
    .hero-img {
        height: 400px;
        border-radius: 12px;
    }
}

.mobile-bottom-bar .container {
    pointer-events: auto; /* Re-enable clicks on buttons */
}

.cart-summary-pill {
    background-color: #e8e8e8;
    color: #4a4a4a;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 0.95rem;
}

.cart-summary-pill i {
    font-size: 1.1rem;
    color: #333;
}

.menu-circle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.menu-circle-btn:active {
    transform: scale(0.95);
}

.mobile-cart-btn:hover {
    color: #fff;
    transform: scale(1.05);
}

/* Cart Offcanvas */
.offcanvas-header {
    background-color: #f8f9fa;
}

.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Menu Offcanvas Styles */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.search-input {
    border-radius: 50px;
    padding: 0.8rem 1rem 0.8rem 3rem; /* Left padding for icon */
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    font-size: 1rem;
    width: 100%;
    background-color: #fff;
    transition: all 0.2s;
}

.search-input:focus {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #333;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 5;
}

/* Desktop Search Dropdown */
.desktop-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1050;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.05);
}

.desktop-search-dropdown .list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 1rem;
}

.desktop-search-dropdown .list-group-item:last-child {
    border-bottom: none;
}

.menu-categories-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 100px; /* More space for bottom button */
}

.category-card {
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    overflow: hidden;
    position: relative;
    min-height: 100px;
}

.category-card:active {
    transform: scale(0.98);
}

.category-card-content {
    flex: 1;
    z-index: 2;
    padding-right: 1rem;
}

.category-card-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 0.3rem;
}

.category-card-subtitle {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card-image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #fff;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
