:root {
    --primary: #ff4757;
    --primary-dark: #e84118;
    --secondary: #2ed573;
    --dark: #1e272e;
    --slate: #2f3542;
    --muted: #747d8c;
    --light: #f4f6f8;
    --white: #ffffff;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--light);
    color: var(--dark);
    padding-bottom: 70px;
}

/* Header & Navigation */
header {
    background: var(--white);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.brand {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-link {
    text-decoration: none;
    color: var(--slate);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: 0.2s;
}

.nav-link:hover {
    background: #f1f2f6;
}

.cart-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    transition: transform 0.2s;
}

.cart-btn:hover {
    transform: translateY(-1px);
}

/* Hero Banner */
.hero {
    background: linear-gradient(135deg, #1e272e 0%, #2f3542 100%);
    color: var(--white);
    padding: 36px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.hero p {
    color: #ced6e0;
    max-width: 600px;
    margin: 0 auto 18px;
}

.search-bar {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.search-bar input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 30px;
    border: none;
    font-size: 0.95rem;
    outline: none;
}

/* Category Pills */
.container {
    max-width: 1140px;
    margin: 24px auto;
    padding: 0 16px;
}

.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.cat-btn {
    background: var(--white);
    border: 1px solid #dfe4ea;
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.cat-btn.active, .cat-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Product Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card img {
    width: 100%;
    height: 175px;
    object-fit: cover;
}

.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.badge-veg {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border-radius: 3px;
    border: 2px solid #1eae57;
    margin-right: 6px;
}

.badge-nonveg {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 3px;
    margin-right: 6px;
}

.desc {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 6px;
    line-height: 1.4;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f1f2f6;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
}

.btn-add {
    background: #fff0f1;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 7px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-add:hover {
    background: var(--primary);
    color: var(--white);
}

/* Cart Drawer */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 199;
    display: none;
}

.drawer-overlay.open {
    display: block;
}

.drawer {
    position: fixed;
    top: 0;
    right: -440px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    padding: 18px 20px;
    background: var(--dark);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f2f6;
}

.qty-box {
    display: flex;
    align-items: center;
    background: #f1f2f6;
    border-radius: 6px;
    padding: 2px;
}

.qty-box button {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--white);
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
    margin-top: 12px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 4px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced6e0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.gps-btn {
    margin-top: 10px;
    width: 100%;
    background: #eef2ff;
    color: #3742fa;
    border: 1px dashed #3742fa;
    padding: 9px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.checkout-btn {
    width: 100%;
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 16px;
    box-shadow: 0 4px 14px rgba(46, 213, 115, 0.35);
}

@media (max-width: 600px) {
    .hero h1 { font-size: 1.5rem; }
    header { padding: 12px 14px; }
    .nav-link { display: none; }
}
