/* --- CSS VARIABLES & GLOBAL STYLES --- */
:root {
    --color-primary: #c23e23; --color-accent: #db8f20; --color-background: #000000;
    --color-surface: #1e1e1e; --color-surface-light: #2e2e2e; --color-text-light: #ffffff;
    --color-text-secondary: #a0a0a0; --color-green-status: #22c55e;
}
body { background-color: var(--color-background); color: var(--color-text-light); font-family: 'Inter', sans-serif; margin: 0; }
.content-container { position: relative; width: 100%; max-width: 420px; margin: 0 auto; padding-top: 60px; }
.page, .view { display: none; flex-direction: column; padding: 1rem; gap: 1.5rem; box-sizing: border-box; }
.page.active, .view.active { display: flex; }
#mainPage { padding-bottom: 80px; }

/* --- LOGIN PAGE --- */
#loginPage { align-items: center; justify-content: center; text-align: center; height: 100vh; max-width: 420px; margin: 0 auto;}
.login-container h1 { font-size: 2.5rem; margin-bottom: 0.5rem; color: var(--color-primary); }
.login-container p { color: var(--color-text-secondary); margin-bottom: 2rem; }
.btn-primary { background-color: var(--color-primary); color: white; border: none; padding: 0.75rem 2rem; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; }

/* --- HEADER & NAV --- */
.main-header { background-color: var(--color-primary); color: var(--color-text-light); display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; z-index: 100; box-sizing: border-box; }
.hamburger-btn, .cart-btn { background: none; border: none; color: white; cursor: pointer; padding: 0.5rem; position: relative; }
.header-title { font-size: 1.25rem; font-weight: 700; }
.cart-count { position: absolute; top: 0; right: 0; background-color: var(--color-accent); color: black; font-size: 0.7rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.side-nav { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background-color: var(--color-primary); z-index: 200; transition: left 0.3s; display: flex; flex-direction: column; }
.side-nav.open { left: 0; }
.nav-overlay { position: fixed; inset: 0; background-color: rgba(0,0,0,0.6); z-index: 199; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.nav-overlay.visible { opacity: 1; pointer-events: auto; }
.nav-header { padding: 1.5rem 1rem; font-weight: 700; font-size: 1.1rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0 1rem; flex-grow: 1; }
.side-nav ul li a { display: block; color: var(--color-text-light); text-decoration: none; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.nav-footer { padding: 1.5rem; }
.btn-logout { width: 100%; padding: 0.75rem; background-color: var(--color-accent); color: black; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.bottom-nav { width: 95%; max-width: 380px; height: 55px; background: var(--color-primary); position: fixed; bottom: 15px; left: 50%; transform: translateX(-50%); border-radius: 10px; z-index: 90; }
.bottom-nav ul { display: flex; width: 100%; height: 100%; margin: 0; padding: 0; list-style: none; }
.bottom-nav .nav-item { flex: 1; text-align: center; font-weight: bold; font-size: 0.9rem; color: var(--color-text-light); cursor: pointer; transition: background 0.3s; display: flex; justify-content: center; align-items: center; }
.bottom-nav .nav-item.active { background: var(--color-accent); color: black; }

/* --- COMMON COMPONENTS --- */
.view-title, .page-title { font-size: 1.25rem; font-weight: 700; text-align: center; }
.section-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.btn-back { background-color: var(--color-primary); color: white; border: none; padding: 0.5rem 1.5rem; border-radius: 8px; font-weight: 700; cursor: pointer; align-self: flex-start; }
.dish-card { background-color: var(--color-surface); border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; }
.dish-card img { width: 100%; height: 100px; object-fit: cover; }
.price-tag { position: absolute; top: 8px; left: 8px; background-color: var(--color-primary); color: white; font-size: 0.8rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 6px; }
.dish-info { padding: 0.5rem 0.75rem; display: flex; justify-content: space-between; align-items: center; }
.dish-name { font-weight: 600; font-size: 0.9rem; }
.add-cart-btn { background: none; border: none; color: var(--color-text-secondary); font-size: 0.75rem; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.add-cart-btn svg { width: 16px; height: 16px; }

/* --- PAGE/VIEW SPECIFIC STYLES --- */
.coming-soon { text-align: center; font-size: 2rem; color: var(--color-text-secondary); margin-top: 4rem; }
.dish-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.canteen-list { display: flex; flex-direction: column; gap: 1rem; }
.canteen-card { border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; background-color: var(--color-surface); }
.canteen-card img { width: 100%; height: 120px; object-fit: cover; }
.canteen-info { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); padding: 1.5rem 1rem 0.75rem; color: white; font-weight: 700; }
.status-tag { position: absolute; top: 10px; right: 10px; background-color: var(--color-green-status); color: white; font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 6px; }
.status-tag.closed { background-color: var(--color-primary); }

/* --- THIS IS THE FIX --- */
/* Canteen Menu Page Header */
.canteen-menu-header { text-align: center; }
.canteen-menu-header img {
    width: 100%;
    height: 180px; /* Controls the height of the banner */
    object-fit: cover; /* Prevents the image from stretching */
    border-radius: 12px;
}
.canteen-menu-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-top: 1rem;
}
/* --- END OF FIX --- */

#dishDetailHeader img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }
#dishDetailHeader h2 { font-size: 1.5rem; font-weight: 700; margin: 1rem 0; text-align: center; }
.canteen-price-list { display: flex; flex-direction: column; gap: 0.5rem; }
.canteen-price-item { display: flex; justify-content: space-between; align-items: center; background-color: var(--color-surface); padding: 0.75rem; border-radius: 8px; cursor: pointer;}
.cart-items-container { max-height: 40vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.cart-item { display: flex; gap: 1rem; }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.cart-item-details { flex-grow: 1; }
.cart-item-title { font-weight: 600; }
.cart-item-canteen { font-size: 0.8rem; color: var(--color-text-secondary); }
.cart-item-notes { background: none; border: none; border-bottom: 1px dashed var(--color-text-secondary); color: white; width: 100%; font-size: 0.8rem; padding: 0.25rem 0; margin-top: 0.25rem; }
.quantity-stepper { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.quantity-btn { background-color: var(--color-surface-light); border: none; color: white; width: 24px; height: 24px; border-radius: 4px; cursor: pointer; }
.cart-section { border-top: 1px solid var(--color-surface-light); padding-top: 1.5rem; }
.eating-mode-options, .checkbox-label { display: flex; gap: 0.5rem; align-items: center;}
#paymentSummary { font-size: 0.9rem; line-height: 1.6; }
.payment-item { display: flex; justify-content: space-between; }
.payment-item.total { font-weight: 700; font-size: 1.1rem; margin-top: 1rem; }
.orders-header { display: flex; justify-content: space-between; align-items: center; }
.order-date { font-weight: 600; }
.order-group-title { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 1rem; }
.order-card { background-color: var(--color-surface); padding: 1rem; border-radius: 12px; }
.order-info-header { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 0.75rem; }
.order-items { font-size: 0.9rem; color: var(--color-text-secondary); margin-bottom: 1rem; }
.order-meta { display: flex; justify-content: space-between; align-items: center; }
.order-type-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.order-type-icon.parcel { background-color: var(--color-primary); }
.order-type-icon.takeaway { background-color: var(--color-accent); color: black; }
.veg-indicator-container { display: flex; gap: 4px; }
.veg-indicator { width: 16px; height: 16px; border-radius: 4px; }
.veg-indicator.veg { background-color: var(--color-green-status); }
.veg-indicator.non-veg { background-color: var(--color-primary); }
.tick-container { display: flex; gap: 0.5rem; }
.tick { width: 24px; height: 24px; border-radius: 50%; background-color: var(--color-surface-light); color: var(--color-text-secondary); display: flex; align-items: center; justify-content: center; font-weight: bold; }
.tick.active { background-color: var(--color-green-status); color: white; }
.order-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-surface-light); text-align: center; }
.btn-complete { background-color: var(--color-accent); color: black; border: none; padding: 0.5rem 1.5rem; border-radius: 8px; font-weight: 700; cursor: pointer; }
.completed-text { color: var(--color-green-status); font-weight: 700; }
.toast { position: fixed; bottom: 85px; left: 50%; transform: translate(-50%, 10px); background-color: var(--color-accent); color: black; padding: 0.75rem 1.5rem; border-radius: 9999px; font-weight: 600; z-index: 250; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- BURGER BUTTON STYLES (Your Code) --- */
.buy-now-wrapper { display: flex; justify-content: center; align-items: center; margin-top: 1.5rem; }
.burger { position: relative; width: 80px; height: 60px; cursor: pointer; }
.burger .part { position: absolute; left: 50%; transform: translateX(-50%); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease; }
.burger .top-bun { width: 70px; height: 20px; background: #f4a261; border-radius: 35px 35px 15px 15px; top: 0; z-index: 5; }
.burger .lettuce { width: 60px; height: 8px; background: #2a9d8f; border-radius: 4px; top: 22px; z-index: 4; }
.burger .tomato { width: 60px; height: 13px; background: tomato; z-index: 3; color: white; text-align: center; font-weight: bold; font-size: 9px; line-height: 13px; border-radius: 8px; position: absolute; top: 33px; left: 50%; transform: translateX(-50%); opacity: 1; }
.burger .patty { width: 60px; height: 8px; background: #8d5524; border-radius: 4px; top: 46px; z-index: 2; }
.burger .bottom-bun { width: 70px; height: 16px; background: #f4a261; border-radius: 15px 15px 35px 35px; top: 56px; z-index: 1; }
.burger.show .part { opacity: 1; }
.burger .top-bun { transform: translate(-50%, -50px); }
.burger .lettuce { transform: translate(-50%, -30px); }
.burger .patty { transform: translate(-50%, -10px); }
.burger .bottom-bun { transform: translate(-50%, 20px); }
.burger.show .top-bun, .burger.show .lettuce, .burger.show .patty, .burger.show .bottom-bun { transform: translate(-50%, 0); }
@keyframes tapBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.burger .tomato.tap-bounce { animation: tapBounce 0.4s ease; }
