:root {
    --primary-color: #d4a574;
    --secondary-color: #1a1a1a;
    --accent-color: #ff6b35;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --light-bg: #f5f5f5;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: #333;
}

/* App Container */
.app-container {
    min-height: 100vh;
}

/* Universal Navbar */
.app-navbar {
    background: linear-gradient(135deg, var(--secondary-color), #2d2d2d);
    color: white;
    padding: 15px;
    box-shadow: var(--shadow);
    z-index: 100;
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    color: inherit;
    text-decoration: none;
    text-align: center;
}

.navbar-brand h1 {
    font-size: 24px;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.navbar-brand p {
    font-size: 12px;
    margin: 2px 0 0 0;
    letter-spacing: 2px;
}

.btn-hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin-right: 10px;
    transition: var(--transition);
}

.btn-hamburger:hover {
    color: var(--primary-color);
}

.navbar-actions {
    display: flex;
    gap: 15px;
}

.btn-search, .btn-cart {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.btn-search:hover, .btn-cart:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Search Bar */
.search-bar {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(212, 165, 116, 0.3);
}

.search-bar[hidden] {
    display: none;
}

.sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

#searchInput {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.search-results {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border-radius: var(--border-radius);
}

.search-item {
    align-items: flex-start;
    background: white;
    color: #333;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 3px;
    text-align: left;
    width: 100%;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--light-bg);
    transition: var(--transition);
}

.search-item:hover {
    background: var(--light-bg);
}

.search-empty {
    color: #666;
    margin: 0;
    padding: 12px 15px;
}

/* Main Content */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
    transition: var(--transition);
}

.food-hero {
    background: linear-gradient(90deg, rgba(20, 12, 7, .88), rgba(20, 12, 7, .28)), url('../../assets/menu-images/cafe-hero.png') center/cover;
    color: #fff;
    min-height: 220px;
    display: flex;
    align-items: end;
    padding: 28px 20px;
}
.food-hero-content { max-width: 520px; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.food-hero h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: 4px 0 8px; }
.food-hero p { line-height: 1.45; }
.eyebrow { color: #ffd29b; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.left-sidebar.active ~ .app-main {
    margin-left: 0;
}

/* Categories Scroll */
.categories-scroll {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    overflow-x: auto;
    border-bottom: 1px solid var(--light-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.category-btn {
    background: var(--light-bg);
    border: 2px solid transparent;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    font-weight: 500;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Menu Items Grid */
.menu-section {
    padding: 20px;
    max-width: 1320px;
    margin: 0 auto;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.menu-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.item-image {
    width: 100%;
    height: 150px;
    background: var(--light-bg);
    object-fit: cover;
    position: relative;
}

.veg-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #4caf50;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.nonveg-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #f44336;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.item-content {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    line-height: 1.2;
    color: #21140b;
}

.item-price {
    color: var(--primary-color);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.item-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-add {
    background: var(--primary-color);
    color: white;
}

.btn-add:hover {
    background: #c49463;
}

.btn-details {
    background: var(--light-bg);
    color: var(--secondary-color);
}

.btn-details:hover {
    background: #e0e0e0;
}

/* Left Sidebar Navigation */
.left-sidebar {
    width: 0;
    background: linear-gradient(180deg, var(--secondary-color), #2d2d2d);
    color: white;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    left: 0;
    height: 100vh;
    z-index: 250;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.left-sidebar.active {
    width: 250px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid rgba(212, 165, 116, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 22px;
    color: var(--primary-color);
}

.btn-close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.sidebar-menu {
    flex: 1;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
}

.menu-item {
    background: none;
    border: none;
    color: white;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(212, 165, 116, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.menu-item i {
    font-size: 18px;
    width: 20px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    text-align: center;
    font-size: 13px;
}

.sidebar-footer p {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-footer small {
    opacity: 0.7;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.sidebar-overlay.active {
    display: block;
}

/* Cart Sidebar */
.cart-sidebar {
    width: 320px;
    background: white;
    border-left: 1px solid var(--light-bg);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 200;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
}

.cart-sidebar.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--light-bg);
    background: var(--secondary-color);
    color: white;
}

.cart-header h3 {
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 30px 10px;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--light-bg);
    align-items: center;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: var(--light-bg);
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 13px;
}

.cart-item-price {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
}

.cart-item-qty {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-top: 5px;
}

.qty-btn {
    background: var(--light-bg);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.qty-btn:hover {
    background: #ddd;
}

.qty-value {
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 16px;
}

/* Cart Summary */
.cart-summary {
    border-top: 2px solid var(--light-bg);
    padding: 15px;
    background: var(--light-bg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    border-top: 1px solid #ddd;
    padding-top: 12px;
    margin-top: 8px;
}

.btn-checkout {
    width: 100%;
    padding: 12px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-checkout:hover:not(:disabled) {
    background: #45a049;
}

.btn-checkout:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-primary:hover {
    background: #c49463;
}

.btn-block {
    width: 100%;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    z-index: 10;
}

/* Item Detail Modal */
#itemDetail {
    padding: 40px 20px 20px;
}

.item-detail-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.item-detail-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.item-detail-desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.item-detail-price {
    font-size: 20px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.detail-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-qty label {
    font-weight: 600;
}

.detail-qty input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.btn-add-detail {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Checkout Form */
.checkout-form {
    max-width: 600px;
    padding: 40px 30px 30px;
}

.checkout-form h2 {
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.order-summary {
    background: var(--light-bg);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-total {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-color);
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

/* Success Modal */
.success-content {
    text-align: center;
    padding: 60px 30px 40px;
}

.success-icon {
    font-size: 80px;
    color: var(--success-color);
    margin-bottom: 20px;
}

.success-content h2 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.success-content p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Table Selection */
.table-selection {
    padding: 30px 20px;
}

.table-selection h2 {
    margin-bottom: 25px;
    text-align: center;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.table-btn {
    aspect-ratio: 1;
    background: white;
    border: 2px solid var(--light-bg);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-weight: 600;
}

.table-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.table-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.table-btn small {
    font-size: 11px;
    font-weight: 400;
    margin-top: 5px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .btn-hamburger {
        display: block;
    }

    .navbar-brand {
        flex: 1;
        text-align: center;
    }

    .navbar-brand h1 {
        font-size: 18px;
        margin: 0;
    }

    .navbar-brand p {
        font-size: 10px;
        margin: 2px 0 0 0;
    }

    .navbar-content {
        gap: 8px;
    }

    .menu-items {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 16px;
    }

    .cart-sidebar,
    .cart-sidebar.active {
        width: 100%;
    }

    .left-sidebar.active {
        width: 280px;
    }

    .app-main {
        padding-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .left-sidebar.active {
        width: 100%;
    }

    .navbar-content {
        padding: 10px 10px;
    }

    .navbar-brand h1 {
        font-size: 16px;
    }

    .navbar-brand p {
        font-size: 9px;
    }

    .navbar-actions {
        gap: 10px;
    }

    .btn-search, 
    .btn-cart {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .menu-section {
        padding: 14px;
    }

    .navbar-brand h1 {
        font-size: 18px;
    }

    .menu-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .item-image {
        height: 135px;
    }

    .item-content {
        padding: 12px;
    }

    .item-name {
        font-size: 15px;
    }

    .modal-content {
        max-width: 95%;
    }

    .item-detail-image {
        height: 200px;
    }
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c49463;
}
