        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
            background-color: #f5f5f5;
            overflow-x: hidden;
            padding-bottom: 140px; /* Extra space so bottom bar never covers content */
        }

        /* --- NEW HEADER STYLES --- */
        .header {
            background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
            color: white;
            padding: 20px;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            text-align: center;
        }

        .restaurant-title {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 12px;
        }
        
        #tableNumberDisplay {
            font-size: 20px;
            font-weight: 700;
            background: rgba(0,0,0,0.2);
            padding: 8px 25px;
            border-radius: 25px;
            display: inline-block;
            border: 1px solid rgba(255,255,255,0.3);
        }

        /* Main Container */
        .main-container {
            display: flex;
            max-width: 1400px;
            margin: 20px auto;
            gap: 20px;
            padding: 0 20px;
        }

        /* --- UPDATED SIDEBAR STYLES --- */
.sidebar {
    width: 200px;
            background: white;
            border-radius: 12px;
            padding: 10px 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            height: fit-content;
            position: sticky;
            top: 130px; /* Adjusted for new header height */
}

.sidebar-category-list {
    display: flex;
    flex-direction: column;
}

.sidebar-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.sidebar-item {
    padding: 15px 20px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 16px;
            font-weight: 500;
            color: #333;
            border-left: 4px solid transparent;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .sidebar-item:hover {
            background: #fff5f5;
            color: #d32f2f;
            border-left-color: #ffcdd2;
        }

        .sidebar-item.active {
            background: #ffebee;
            color: #d32f2f;
            font-weight: 700;
            border-left-color: #d32f2f;
        }

        /* Product Grid */
.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 160px; /* Keep last card visible above the bottom bar */
}

.product-grid .menu-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #ddd;
}

.product-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            transition: all 0.3s;
            cursor: pointer;
        }

        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        }

        .product-image-wrapper {
            position: relative;
            width: 100%;
            height: 200px;
            overflow: hidden;
            background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
        }

        .product-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(0,0,0,0.15);
    font-weight: 600;
    width: 100%;
    height: 100%;
}

        .promo-badge {
            position: absolute;
            top: 10px;
            left: 10px;
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
            color: white;
            padding: 5px 12px;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 600;
            box-shadow: 0 2px 6px rgba(255,107,107,0.4);
        }

        .product-info {
            padding: 15px;
        }

        .product-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .product-description {
            font-size: 13px;
            color: #999;
            margin-bottom: 12px;
            line-height: 1.5;
            height: 36px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            line-clamp: 2; 
        }

        .product-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .product-price {
            display: flex;
            align-items: baseline;
            gap: 5px;
        }

        .price-symbol {
            font-size: 14px;
            color: #d32f2f;
            font-weight: 600;
        }

        .price-value {
            font-size: 24px;
            color: #d32f2f;
            font-weight: 700;
        }

        .price-original {
            font-size: 14px;
            color: #999;
            text-decoration: line-through;
        }

        .select-btn {
            background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 6px rgba(255,152,0,0.3);
        }

        .select-btn:hover {
            background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(255,152,0,0.5);
        }

        /* Fixed Bottom Bar */
        .bottom-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
            z-index: 1001;
            padding: 12px 20px;
        }
        
        .bottom-bar-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 46px; /* 70px total height - 12*2 padding */
        }
        
        #statusMessage {
            text-align: center;
            font-size: 12px;
            font-weight: 500;
            height: 15px; /* Reserve space */
            margin-top: 5px;
        }

        .cart-button {
            position: relative;
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
            box-shadow: 0 2px 8px rgba(255,107,107,0.3);
        }

        .cart-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255,107,107,0.5);
        }

        .cart-count {
            background: white;
            color: #ff6b6b;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
        }

        .total-price {
            flex: 1;
            text-align: center;
            font-size: 24px;
            font-weight: 700;
            color: #d32f2f;
        }

        .checkout-button {
            background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 8px rgba(76,175,80,0.3);
        }

        .checkout-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(76,175,80,0.5);
        }

        .checkout-button:disabled {
            background: #ccc;
            cursor: not-allowed;
            box-shadow: none;
        }

        .hidden {
            display: none !important;
        }

        .my-orders-button {
            position: fixed;
            top: 16px;
            left: 16px;
            background: #ffffff;
            color: #b71c1c;
            border: 1px solid rgba(0,0,0,0.08);
            border-radius: 999px;
            padding: 8px 18px;
            font-size: 14px;
            font-weight: 600;
            box-shadow: 0 6px 18px rgba(0,0,0,0.12);
            cursor: pointer;
            z-index: 1300;
            transition: background 0.2s ease;
        }

        .my-orders-button:hover {
            background: #ffe5e5;
        }

        .my-orders-panel {
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            width: 320px;
            background: #ffffff;
            box-shadow: 6px 0 24px rgba(0,0,0,0.18);
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            z-index: 1250;
            display: flex;
            flex-direction: column;
        }

        .my-orders-panel.open {
            transform: translateX(0);
        }

        .my-orders-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.25);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 1200;
        }

        .my-orders-overlay.open {
            opacity: 1;
            pointer-events: all;
        }

        .my-orders-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 20px;
            border-bottom: 1px solid #f3f3f3;
        }

        .my-orders-panel-header h3 {
            font-size: 18px;
            color: #b71c1c;
        }

        .close-panel {
            border: none;
            background: none;
            font-size: 22px;
            cursor: pointer;
            color: #555;
        }

        .my-orders-panel-body {
            flex: 1;
            overflow-y: auto;
            padding: 10px 0;
        }

        .my-order-item {
            padding: 12px 20px;
            border-bottom: 1px solid #f4f4f4;
            cursor: pointer;
            transition: background 0.2s ease;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .my-order-item:hover {
            background: #fff5f5;
        }

        .my-order-item.active {
            background: #ffebee;
        }

        .my-order-item strong {
            font-size: 14px;
            color: #333;
        }

        .my-order-meta {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: #777;
        }

        .my-order-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 12px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
        }

        .status-pill.status-pending {
            background: #fff3cd;
            color: #a15c00;
        }

        .status-pill.status-received {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .status-pill.status-preparing {
            background: #ffedd5;
            color: #c2410c;
        }

        .status-pill.status-finished {
            background: #dcfce7;
            color: #15803d;
        }

        .your-order-panel {
            background: #ffffff;
            border-radius: 18px;
            box-shadow: 0 18px 40px rgba(0,0,0,0.12);
            padding: 30px;
            max-width: 900px;
            margin: 30px auto;
        }

        .your-order-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
        }

        .status-steps {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 12px;
            margin: 25px 0 30px;
        }

        .status-step {
            text-align: center;
            padding: 14px 10px;
            border-radius: 14px;
            border: 1px solid #ececec;
            background: #fafafa;
            color: #888;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .status-step .step-circle {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 2px solid #d6d6d6;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 8px;
            font-weight: 600;
            color: #9c9c9c;
        }

        .status-step.completed {
            border-color: #2e7d32;
            background: #f0fff4;
            color: #2e7d32;
        }

        .status-step.completed .step-circle {
            background: #2e7d32;
            color: #fff;
            border-color: #2e7d32;
        }

        .status-step.active {
            border-color: #d32f2f;
            background: #fff5f5;
            color: #d32f2f;
        }

        .status-step.active .step-circle {
            background: #d32f2f;
            color: #fff;
            border-color: #d32f2f;
        }

        #currentOrderItems {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        #currentOrderItems li {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #f3f3f3;
            font-size: 14px;
            color: #444;
        }

        .current-order-meta {
            margin-top: 10px;
            font-size: 14px;
            color: #666;
        }

        .order-panel-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 20px;
        }

        .order-panel-btn {
            flex: 1 1 150px;
            padding: 10px 16px;
            border-radius: 12px;
            border: 1px solid #f0c5c5;
            background: #fff;
            color: #b71c1c;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
        }

        .order-panel-btn:hover {
            background: #fff1f1;
            transform: translateY(-1px);
        }

        #currentOrderComment {
            margin-top: 20px;
            padding: 14px;
            border-radius: 12px;
            background: #fff9e6;
            border: 1px solid #f5d49b;
            color: #8a5a00;
            font-style: italic;
        }

        .new-order-btn {
            margin-top: 30px;
            padding: 12px 18px;
            border-radius: 12px;
            border: none;
            background: #b71c1c;
            color: #fff;
            font-weight: 600;
            cursor: pointer;
            width: 100%;
        }

        .new-order-btn:hover {
            background: #9a0007;
        }

        .my-orders-empty {
            padding: 30px 20px;
            text-align: center;
            color: #888;
            font-size: 14px;
        }

        @media (max-width: 768px) {
            .my-orders-button {
                top: 12px;
                left: 12px;
            }

            .your-order-panel {
                margin: 20px;
                padding: 20px;
            }

            .status-step {
                font-size: 12px;
            }
        }

        /* Cart Modal */
        .cart-modal {
            position: fixed;
            bottom: 85px; /* Adjusted for new bottom bar height */
            left: 0;
            right: 0;
            background: white;
            max-height: 70vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
            transform: translateY(100%);
            transition: transform 0.3s ease;
            z-index: 1000;
        }

        .cart-modal.active {
            transform: translateY(0);
        }

        .cart-header {
            padding: 20px;
            border-bottom: 2px solid #f0f0f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background: white;
            z-index: 1;
            flex-shrink: 0;
        }

        .cart-header h2 {
            font-size: 20px;
            color: #333;
        }

        .close-cart {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #999;
        }
        
        .cart-comment-section {
            padding: 15px 20px;
            border-bottom: 1px solid #f0f0f0;
            background-color: #fafafa;
            flex-shrink: 0;
        }

        .cart-comment-section label {
            font-size: 14px;
            font-weight: 600;
            color: #555;
            display: block;
            margin-bottom: 8px;
        }

        .cart-comment-section textarea {
            width: 100%;
            padding: 10px;
            border-radius: 8px;
            border: 1px solid #ddd;
            font-family: inherit;
            font-size: 14px;
            resize: vertical;
            min-height: 60px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        
        .cart-comment-section textarea:focus {
            outline: none;
            border-color: #ff6b6b;
            box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
        }

        .cart-items {
            padding: 20px;
            padding-bottom: 110px; /* Extra space so last cart item clears the bottom bar */
            flex: 1;
            overflow-y: auto;
            min-height: 0;
            -webkit-overflow-scrolling: touch;
        }

        .cart-item {
            display: flex;
            gap: 15px;
            padding: 15px;
            background: #f9f9f9;
            border-radius: 12px;
            margin-bottom: 15px;
        }

.cart-item-image {
    font-size: 50px;
    width: 80px;
    height: 80px;
    background: white;
            border-radius: 8px;
            display: flex;
            align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

        .cart-item-info {
            flex: 1;
        }

        .cart-item-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 5px;
        }

        .cart-item-price {
            font-size: 18px;
            color: #d32f2f;
            font-weight: 700;
        }

        .cart-item-controls {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
        }

        .quantity-btn {
            background: white;
            border: 2px solid #ff6b6b;
            color: #ff6b6b;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .quantity-btn:hover {
            background: #ff6b6b;
            color: white;
        }

        .quantity-display {
            font-size: 16px;
            font-weight: 600;
            min-width: 30px;
            text-align: center;
        }

        .delete-btn {
            background: #f44336;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 12px;
            cursor: pointer;
            margin-left: auto;
        }

        .empty-cart {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .empty-cart-icon {
            font-size: 80px;
            margin-bottom: 20px;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .main-container { padding: 0 10px; gap: 10px; }
            .sidebar { width: 120px; position: fixed; left: 10px; top: 130px; bottom: 90px; overflow-y: auto; z-index: 900; padding: 5px 0; border-radius: 8px; }
            .sidebar::-webkit-scrollbar { width: 3px; }
            .sidebar::-webkit-scrollbar-track { background: #f1f1f1; }
            .sidebar::-webkit-scrollbar-thumb { background: #d32f2f; border-radius: 3px; }
            .sidebar-item { padding: 12px 10px; font-size: 12px; white-space: normal; word-wrap: break-word; }
            .product-grid { margin-left: 130px; grid-template-columns: 1fr; gap: 15px; }
            .product-image-wrapper { height: 180px; }
            .bottom-bar { padding: 10px 15px; }
            .bottom-bar-content { height: auto; flex-direction: column; gap: 10px; }
            .total-price { order: 1; }
            .cart-button { order: 2; }
            .checkout-button { order: 3; width: 100%; justify-content: center; }
        }

        @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        .product-card { animation: fadeIn 0.5s ease-out; }
