/* --- CSS VARIABLES & RESET --- */
:root {
    --primary-yellow: #FFD700;
    --bg-black: #050505;
    --card-bg: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --whatsapp-green: #25D366;
}


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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-black);
    color: var(--text-white);
    padding-bottom: 50px;
}

/* --- STICKY HEADER --- */
header {
    background-color: #000;
    padding: 15px 20px;
    border-bottom: 2px solid var(--primary-yellow);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo h1 { font-size: 1.4rem; text-transform: uppercase; margin: 0; }
.logo span { color: var(--primary-yellow); }

.cart-wrapper { position: relative; cursor: pointer; padding: 5px; }
.cart-icon { font-size: 1.8rem; }
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    display: none;
}

/* --- NAVIGATION --- */
/* Find this section in Caffe_Menuf/style.css */
nav {
    background-color: #111;
    white-space: nowrap;
    overflow-x: auto;
    padding: 20px;
    text-align: center;
    
    /* --- ADD THESE LINES --- */
    position: sticky;  /* Makes the nav stick to the viewport */
    top: 70px;         /* Positions it below the header (Header is approx 60-70px high) */
    z-index: 990;      /* Keeps it visible above menu items */
    border-bottom: 1px solid #333; /* Optional: Adds a separator line */
}
nav a {
    display: inline-block;
    text-decoration: none;
    color: #000;
    background-color: var(--primary-yellow);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0 5px;
}

/* --- MENU LAYOUT --- */
/* Find this block in Caffe_Menuf/style.css */
.container { 
    /* Change max-width from 800px to 1200px (or 100% for full width) */
    max-width: 1200px; 
    
    margin: 0 auto; 
    padding: 20px;
    
    /* Keep this to prevent the sidebar from covering content */
    padding-right: 160px; 
}
section { 
    margin-bottom: 40px; 
    /* Fix: Added 'px' unit which was missing in your file */
    scroll-margin-top: 160px; 
    
    /* --- NEW GRID SETTINGS --- */
    display: grid;
    grid-template-columns: 1fr 1fr; /* Creates 2 equal columns */
    gap: 15px; /* Space between the cards */
    align-items: stretch; /* Makes sure side-by-side cards are same height */
}
.category-title {
    /* --- MAKE TITLE SPAN FULL WIDTH --- */
    grid-column: 1 / -1; 
    
    /* Keep your existing styles */
    color: var(--primary-yellow);
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px; /* Reduced slightly */
    border-bottom: 1px solid #333;
}

.menu-item {
    background-color: var(--card-bg);
    padding: 15px;
    
    /* Changed: Remove margin-bottom, let grid gap handle it */
    margin-bottom: 0; 
    
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary-yellow);
    
    /* New: Ensures the card fills the height of the grid row */
    height: 100%; 
}

.item-details h3 { font-size: 1.1rem; font-weight: 500; }
.item-details p { color: var(--primary-yellow); font-weight: bold; margin-top: 4px; }

/* --- ACTION CONTAINER --- */
.action-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2a2a2a;
    padding: 5px;
    border-radius: 8px;
}

.qty-selector {
    display: flex;
    align-items: center;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    color: var(--primary-yellow);
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
}

.qty-value {
    padding: 0 5px;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

.add-btn {
    background-color: var(--primary-yellow);
    color: #000;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

/* --- MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #1a1a1a;
    width: 90%; max-width: 500px;
    border-radius: 10px; padding: 20px;
    border: 2px solid var(--primary-yellow);
    max-height: 95vh; 
    display: flex; 
    flex-direction: column;
}

.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px; }
.close-btn { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

.cart-items-list { 
    flex-grow: 1; 
    overflow-y: auto; 
    margin-bottom: 10px; 
    max-height: 150; /* Limits height so checkout form is visible */
}

.cart-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #333; }
.cart-total { text-align: right; font-size: 1.2rem; font-weight: bold; color: var(--primary-yellow); margin-top: 10px;}

/* --- CHECKOUT FORM --- */
.checkout-section {
    display: none; /* Hidden by default, shown via JS */
    border-top: 2px dashed #333;
    padding-top: 15px;
    margin-top: 10px;
}

.checkout-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #333;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
    outline: none;
}

.checkout-input:focus { border-color: var(--primary-yellow); }

.whatsapp-btn {
    width: 100%;
    background-color: var(--whatsapp-green);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
}

.whatsapp-btn:hover { opacity: 0.9; }

/* Enhanced Cart Controls */
.cart-qty-controls {
    display: flex;
    align-items: center;
    background: #333;
    border: 1px solid var(--primary-yellow);
    border-radius: 20px;
    padding: 2px 8px;
    gap: 10px;
}

.cart-qty-btn {
    background: none;
    border: none;
    color: var(--primary-yellow);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.delete-icon {
    font-size: 0.9rem;
    color: #ff4d4d; /* Red for delete */
}

/* Add to style.css */
/* ... Keep existing CSS variables and base styles ... */

.clear-cart-btn {
    background: none;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.clear-cart-btn:hover {
    background: #ff4d4d;
    color: white;
}

.cart-items-list {
    max-height: 250px; /* Limit height to show form */
    overflow-y: auto;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #333;
    padding: 2px 8px;
    border-radius: 15px;
}
/* ... Rest of your existing CSS ... */


/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    section {
        grid-template-columns: 1fr; /* Switch back to single column on phones */
    }
}