:root {
    --primary-orange: #d3752d;
    --bg-cream: #faf7f2;
    --text-dark: #333;
    --whatsapp-green: #25D366;
    --muted: #f3f4f6;
    --muted-foreground: #666;
    --border: #e5e7eb;
    --destructive: #ef4444;
    --card-bg: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    padding-bottom: 80px; /* Space for the bottom bar */
}

/* Navbar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { height: 35px; }
.logo-area h2 { margin: 0; font-size: 1.2rem; letter-spacing: 1px; color: var(--primary-orange); }

.nav-icons { display: flex; gap: 10px; align-items: center; }

.search-container {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    align-items: center;
    gap: 8px;
    background-color: var(--muted);
    border-radius: 9999px;
    padding: 8px 16px;
    z-index: 1001;
}

.search-container.active { display: flex; }

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.icon-btn { 
    background: var(--muted); border: none; padding: 10px; 
    border-radius: 50%; cursor: pointer; position: relative;
    display: flex; align-items: center; justify-content: center;
}

.cart-count {
    position: absolute; top: -5px; right: -5px;
    background: var(--primary-orange); color: white;
    font-size: 10px; padding: 2px 6px; border-radius: 10px;
}

/* Hero & Menu */
.hero { height: 300px; background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('hero-bg.jpg'); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: white; text-align: center; }
.container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }

.categories { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    padding-bottom: 20px; }
.cat-btn { padding: 10px 25px; border-radius: 30px; border: 1px solid #ddd; background: white; cursor: pointer; white-space: nowrap; }
.cat-btn.active { background: var(--primary-orange); color: white; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.card img { width: 100%; height: 160px; object-fit: cover; }
.card-info { padding: 15px; }
.price { color: var(--primary-orange); font-weight: bold; }
.add-btn { background: var(--primary-orange); color: white; border: none; padding: 6px 15px; border-radius: 15px; cursor: pointer; }

/* Order Summary Bar (Bottom Bar) */
.order-summary-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 1rem;
    display: none; /* Shown via JS */
    animation: slideUp 0.3s ease-out;
}

.summary-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Modal Styles */
.modal-overlay { 
    position: fixed; inset: 0; 
    background: rgba(0,0,0,0.5); 
    display: none; 
    justify-content: center; 
    align-items: flex-end; 
    z-index: 2000; 
}

@media (min-width: 640px) {
    .modal-overlay { align-items: center; padding: 1rem; }
}

.modal { 
    background: white; width: 100%; max-width: 450px; 
    border-radius: 1.5rem 1.5rem 0 0; overflow: hidden;
    display: flex; flex-direction: column; max-height: 85vh;
}

@media (min-width: 640px) { .modal { border-radius: 1.5rem; } }

.modal-header { padding: 1rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-content { padding: 1rem; overflow-y: auto; flex: 1; }

.input-group { margin-bottom: 1rem; }
.input-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.input-group input { width: 100%; background: var(--muted); border: none; padding: 0.75rem; border-radius: 0.5rem; outline: none; box-sizing: border-box; }

.error-msg { color: var(--destructive); font-size: 0.75rem; margin-top: 0.25rem; display: none; }

.checkout-btn {
    background: var(--whatsapp-green);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-send { 
    width: 100%; background: var(--whatsapp-green); color: white; border: none; 
    padding: 1rem; border-radius: 9999px; font-weight: 600; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 1rem;
}

@media (max-width: 600px) {
    .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .logo-area h2 { display: none; }
}

.summary-price {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: bold;
}