:root {
    --blinkit-yellow: #f8cb46;
    --blinkit-green: #318616;
    --blinkit-green-light: #f3fdf8;
    --bg-main: #f4f6f9;
    --bg-card: #ffffff;
    --text-dark: #1c1c1c;
    --text-light: #666666;
    --border: #e8e8e8;
    --shadow-nav: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-card: 0 4px 6px rgba(0,0,0,0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 2rem;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 80px;
    box-shadow: var(--shadow-nav);
}

.nav-left, .nav-center, .nav-right {
    display: flex;
    align-items: center;
}

.nav-left {
    margin-right: 1.5rem;
    min-width: 150px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--blinkit-yellow);
    letter-spacing: -1px;
}

.logo span {
    color: var(--text-dark);
}

.location-box {
    margin-left: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--border);
    padding-left: 1rem;
    cursor: pointer;
}

.location-box .delivery-time {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-dark);
}

.location-box .delivery-address {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-center {
    flex: 1;
    max-width: 600px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    width: 100%;
    border: 1px solid #eeeeee;
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding-left: 0.5rem;
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-bar .fa-magnifying-glass {
    color: var(--text-light);
    font-size: 1.1rem;
}

.mic-btn {
    background: none;
    border: none;
    border-left: 1px solid #ddd;
    padding-left: 0.75rem;
    margin-left: 0.5rem;
    color: var(--blinkit-green);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.mic-btn:hover {
    color: #1a5e0b;
}

.nav-right {
    margin-left: 2rem;
    gap: 1.5rem;
}

.nav-icon {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--blinkit-green);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
}

.nav-icon::after {
    content: 'My Cart';
}

.cart-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--blinkit-yellow);
    color: var(--text-dark);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 12px;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
}

.user-profile img {
    display: none;
}

.user-profile::after {
    content: 'Login';
}

/* Main Layout */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Horizontal Categories */
.horizontal-categories-container {
    background: white;
    padding: 1.5rem 2rem;
    margin: 0 auto 1rem auto;
    max-width: 1200px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow-x: auto;
    scrollbar-width: none;
}

.horizontal-categories-container::-webkit-scrollbar {
    display: none;
}

.horizontal-categories-container h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.category-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    justify-content: center;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 80px;
    text-align: center;
}

.category-img-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f6f9;
}

.category-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item:hover .category-name {
    color: var(--blinkit-green);
}

/* Hero Banner */
.hero-banner {
    background: var(--blinkit-yellow);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    min-height: 250px;
    width: 100%;
    box-shadow: var(--shadow-card);
}

.hero-collage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
    background: #ffffff;
}

.hero-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-width: 600px;
}

.badge-promo {
    background: white;
    color: var(--text-dark);
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1rem;
    color: #eeeeee;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--blinkit-green);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
}

/* Products Section */
.content-feed > .section-header {
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--bg-card);
    padding: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.product-time-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 2px;
}

.product-category {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.product-weight {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.product-price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.add-to-cart-btn {
    background: var(--blinkit-green-light);
    color: var(--blinkit-green);
    border: 1px solid var(--blinkit-green);
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-cart-btn i {
    display: none;
}
.add-to-cart-btn::after {
    content: 'ADD';
}

.add-to-cart-btn:hover {
    background: var(--blinkit-green);
    color: white;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: absolute;
    right: -400px;
    top: 0;
    width: 360px;
    height: 100%;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.cart-overlay.active .cart-sidebar {
    right: 0;
}

.cart-header {
    background: white;
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.cart-header h2 {
    font-size: 1.1rem;
    font-weight: 800;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    background: white;
    display: flex;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cart-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 0.25rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--blinkit-green);
    background: var(--blinkit-green-light);
    color: var(--blinkit-green);
    cursor: pointer;
    font-weight: 700;
}

.remove-item {
    margin-left: auto;
    color: #e02a2a;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-footer {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border);
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.cart-summary.total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--blinkit-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

/* Modals */
.payment-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
}

.payment-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.payment-modal {
    background: white;
    width: 95%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
}

.payment-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    color: var(--text-dark);
}

.payment-header h2 {
    font-size: 1.1rem;
    font-weight: 800;
}

.close-payment {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
}

.payment-body {
    padding: 1.5rem;
}

.payment-methods {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.method {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.method.active {
    border-color: var(--blinkit-green);
    color: var(--blinkit-green);
    background: var(--blinkit-green-light);
}

.payment-section {
    display: none;
}
.payment-section.active {
    display: block;
}

.qr-container {
    text-align: center;
    padding: 1rem 0;
}
.qr-container p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.qr-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem auto;
    display: block;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 8px;
}
.pay-amount-display {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
}

.form-group input:focus {
    border-color: var(--blinkit-green);
}

.card-input {
    position: relative;
}

.card-input i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.card-input input {
    padding-left: 2rem;
}

.form-row {
    display: flex;
    gap: 0.5rem;
}

.btn-pay {
    width: 100%;
    padding: 1rem;
    background: var(--blinkit-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 1rem;
}

/* Product Details Modal */
.product-details-layout {
    display: flex;
    flex-direction: column;
}

.product-details-img {
    width: 100%;
    height: 250px;
    background: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.product-details-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
.site-footer {
    background: #f8f8f8;
    color: var(--text-dark);
    padding: 3rem 5% 1rem 5%;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-dark);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    color: var(--text-light);
}

.footer-section ul li i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons i {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.keywords-section p {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-light);
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Mobile App Bottom Nav */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
        height: auto;
        flex-wrap: wrap;
        box-shadow: none;
        border-bottom: 1px solid var(--border);
    }
    .nav-left {
        flex: 1;
        margin-right: 0;
    }
    .location-box {
        display: none; /* Hide on small mobile to save space */
    }
    .nav-center {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 0.5rem 0 0 0;
    }
    .nav-right {
        margin-left: auto;
    }
    .user-profile {
        display: none;
    }
    .nav-icon::after {
        content: none;
    }
    .hero-banner {
        flex-direction: column;
        border-radius: 8px;
        min-height: 200px;
    }
    .hero-content {
        padding: 1.5rem;
        align-items: center;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 1.5rem;
    }
    .hero-collage {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        border-top: 1px solid var(--border);
        justify-content: space-around;
        align-items: center;
        padding: 0.5rem 0;
        z-index: 90;
    }
    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-light);
        font-size: 0.7rem;
        gap: 0.25rem;
    }
    .mobile-bottom-nav .nav-item.active {
        color: var(--blinkit-green);
    }
    .kart-badge-mobile {
        position: absolute;
        top: -4px;
        right: -8px;
        background: var(--blinkit-yellow);
        color: var(--text-dark);
        font-size: 0.6rem;
        padding: 1px 4px;
        border-radius: 50%;
    }
    .main-container {
        padding-bottom: 1rem;
    }
    .site-footer {
        padding-bottom: 5rem;
    }
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .product-card {
        padding: 0.5rem;
    }
    .add-to-cart-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    .payment-modal {
        max-height: 90vh;
        overflow-y: auto;
    }
    .product-details-img {
        height: 200px;
    }
}

@media (min-width: 600px) {
    .product-details-layout {
        flex-direction: row;
    }
    .product-details-img {
        width: 50%;
        height: 350px;
        border-bottom: none;
        border-right: 1px solid var(--border);
    }
    .product-details-info {
        width: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}
