@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #E53935; /* Deep Red / Tomato Red */
    --primary-dark: #C62828;
    --secondary: #FB8C00; /* Orange */
    --bg-color: #FFF9F5; /* Very light warm background */
    --card-bg: #FFFFFF;
    --text-main: #2C3E50; /* Dark charcoal */
    --text-muted: #7F8C8D; /* Gray */
    --success: #2E7D32; /* Green */
    --warning: #F57C00; /* Orange */
    --danger: #D32F2F; /* Red */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --btn-radius: 12px;
}

html { font-size: 16px; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

::placeholder { color: var(--text-muted); opacity: 1; }
input::placeholder { color: var(--text-muted); opacity: 1; }

body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.5; padding-bottom: 70px; }

/* Header */
.navbar { position: sticky; top: 0; z-index: 1000; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.brand { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 600; transition: 0.2s; }
.nav-links a:hover { color: var(--primary); }
.search-bar { flex-grow: 1; max-width: 400px; margin: 0 2rem; }
.search-bar input { width: 100%; padding: 0.75rem 1.5rem; border-radius: 30px; border: 1px solid #E0E0E0; background: #F5F5F5; font-size: 1rem; }
.search-bar input:focus { outline: none; border-color: var(--primary); background: #FFF; }
.cart-icon { position: relative; font-size: 1.5rem; text-decoration: none; color: var(--text-main); }
.cart-count { position: absolute; top: -5px; right: -10px; background: var(--primary); color: white; font-size: 0.75rem; font-weight: 700; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Hero */
.hero { display: flex; align-items: center; justify-content: center; padding: 4rem 2rem; background: url('https://placehold.co/1200x400/FFF9F5/E53935?text=Food+Banner') center/cover; position: relative; border-radius: 24px; margin: 2rem auto; max-width: 1200px; box-shadow: var(--shadow); }
.hero-content { background: rgba(255,255,255,0.9); padding: 3rem; border-radius: 20px; text-align: center; max-width: 600px; }
.hero h1 { font-size: 3rem; font-weight: 800; color: var(--text-main); margin-bottom: 1rem; line-height: 1.2; }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2rem; }

/* Buttons */
.btn-primary { background: var(--primary); color: white; border: none; padding: 0.8rem 1.5rem; font-size: 1rem; font-weight: 700; border-radius: var(--btn-radius); cursor: pointer; text-decoration: none; transition: 0.2s; display: inline-block; text-align: center; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-secondary { background: #F5F5F5; color: var(--text-main); border: 1px solid #E0E0E0; padding: 0.8rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: var(--btn-radius); cursor: pointer; text-decoration: none; transition: 0.2s; display: inline-block; text-align: center; }
.btn-secondary:hover { background: #E0E0E0; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.section-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--text-main); }

/* Horizontal Categories */
.category-scroll { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; scrollbar-width: none; margin-bottom: 2rem; }
.category-scroll::-webkit-scrollbar { display: none; }
.cat-pill { color: var(--text-main);  padding: 0.75rem 1.5rem; background: white; border: 1px solid #E0E0E0; border-radius: 30px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--text-main); box-shadow: 0 2px 5px rgba(0,0,0,0.02); transition: 0.2s; }
.cat-pill.active, .cat-pill:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Grid (Desktop: 4, Tablet: 3, Mobile: 2) */
.food-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Food Card */
.food-card { background: var(--card-bg); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); transition: 0.2s; display: flex; flex-direction: column; position: relative; }
.food-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.food-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; margin-bottom: 1rem; background: #F5F5F5; }
.food-info { flex-grow: 1; display: flex; flex-direction: column; }
.food-name { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.food-rating { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.25rem; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price { font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.price-strike { font-size: 0.9rem; text-decoration: line-through; color: var(--text-muted); margin-left: 0.5rem; font-weight: normal; }
.btn-add { background: var(--primary); color: white; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-add:hover { background: var(--primary-dark); transform: scale(1.1); }
.veg-badge { position: absolute; top: 1.5rem; right: 1.5rem; width: 16px; height: 16px; border: 2px solid #2E7D32; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: white; }
.veg-badge::after { content: ''; width: 8px; height: 8px; background: #2E7D32; border-radius: 50%; }
.veg-badge.non-veg { border-color: #D32F2F; }
.veg-badge.non-veg::after { background: #D32F2F; }

/* Sticky Cart / Bottom Nav for Mobile */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: white; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); z-index: 1000; padding: 0.5rem 0; justify-content: space-around; align-items: center; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); text-decoration: none; font-size: 0.75rem; font-weight: 600; gap: 0.25rem; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a .icon { font-size: 1.5rem; }

.sticky-cart-btn { display: none; position: fixed; bottom: 70px; left: 5%; width: 90%; background: var(--primary); color: white; padding: 1rem; border-radius: var(--btn-radius); box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4); justify-content: space-between; align-items: center; text-decoration: none; z-index: 999; font-weight: 700; }

/* Responsive */
@media (max-width: 1024px) {
    .food-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    
::placeholder { color: var(--text-muted); opacity: 1; }
input::placeholder { color: var(--text-muted); opacity: 1; }

body { padding-bottom: 140px; }
    .navbar { padding: 1rem; }
    .nav-links, .search-bar { display: none; }
    .hero { margin: 1rem; padding: 2rem 1rem; border-radius: 16px; }
    .hero h1 { font-size: 2rem; }
    .food-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .container { padding: 1rem; }
    .bottom-nav { display: flex; }
    .sticky-cart-btn { display: flex; }
    .food-card { padding: 0.75rem; }
    .food-img { height: 120px; }
    .food-name { font-size: 0.95rem; }
    .price { font-size: 1.1rem; }
    .btn-add { width: 32px; height: 32px; font-size: 1.1rem; }
}

/* Forms & Cart */
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid #EEE; }
.qty-btn { background: #F5F5F5; border: none; width: 30px; height: 30px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-main); font-size: 0.9rem; }
.form-control { width: 100%; padding: 0.8rem 1rem; border: 1px solid #E0E0E0; border-radius: var(--btn-radius); font-size: 1rem; background: #FAFAFA; transition: 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary); background: #FFF; box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1); }
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --card-bg: #1E1E1E;
        --text-main: #FFFFFF;
        --text-muted: #B0BEC5;
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    
    .navbar { background: rgba(30, 30, 30, 0.95); box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
    .search-bar input { background: #2C2C2C; border-color: #424242; color: white; }
    .search-bar input:focus { background: #383838; }
    .cat-pill { color: var(--text-main);  background: #1E1E1E; border-color: #424242; color: white; }
    .food-img { background: #2C2C2C; }
    .bottom-nav { background: #1E1E1E; border-top: 1px solid #333; }
    .form-control { background: #1E1E1E; border-color: #424242; color: white; }
    .form-control:focus { background: #2C2C2C; }
    .btn-secondary { background: #2C2C2C; color: white; border-color: #424242; }
    .btn-secondary:hover { background: #383838; }
    .qty-btn { background: #2C2C2C; color: white; }
}
