* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b74c2c; /* Rich sambar red/brown */
    --secondary-color: #f39c12; /* Turmeric yellow */
    --accent-color: #27ae60; /* Curry leaf green */
    --text-color: #2c3e50; /* Dark blue-gray */
    --light-bg: #fdf5e6; /* Creamy white */
    --white: #ffffff;
    --shadow: 0 5px 20px rgba(183, 76, 44, 0.1);
    --shadow-hover: 0 10px 30px rgba(183, 76, 44, 0.15);
    --gradient: linear-gradient(135deg, #b74c2c 0%, #e67e22 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-bg);
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.nav-logo span {
    color: var(--secondary-color);
}

.logo-tagline {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-color);
    display: inline-block;
    margin-left: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 600;
}

.auth-btn-nav {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(183, 76, 44, 0.3);
}

.auth-btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(183, 76, 44, 0.4);
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--light-bg);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    border: 1px solid var(--primary-color);
}

.user-welcome span {
    color: var(--primary-color);
    font-weight: 500;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}

.mobile-auth {
    display: none;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.mobile-cart {
    padding: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s;
}

.mobile-cart:hover {
    color: var(--secondary-color);
}

.mobile-cart i {
    font-size: 1.1rem;
}

.mobile-auth .auth-btn-nav {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.mobile-auth .user-welcome {
    flex-direction: column;
    align-items: flex-start;
    margin: 0.5rem 0;
    gap: 0.5rem;
}

.mobile-auth .logout-btn {
    width: 100%;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 2rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient);
    color: var(--white);
}

.cart-header h3 {
    font-size: 1.3rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--white);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
}

.cart-item-price {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: none;
    border: 1px solid #ddd;
    width: 25px;
    height: 25px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.cart-footer {
    padding: 2rem;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 76, 44, 0.3);
}

/* Main Content */
#main-content {
    margin-top: 90px;
    min-height: calc(100vh - 90px - 400px);
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1589302168068-964664d93dc0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 6rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 50px;
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-bar button {
    padding: 1rem 2rem;
    background: var(--gradient);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

/* Category Pills */
.category-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.category-pill {
    padding: 0.8rem 2rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.category-pill:hover,
.category-pill.active {
    background: var(--gradient);
    color: var(--white);
    border-color: transparent;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-category {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.9);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-details {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.rating {
    color: var(--secondary-color);
    font-weight: 500;
}

.rating i {
    color: #f1c40f;
    margin-right: 0.3rem;
}

.add-to-cart-btn {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(183, 76, 44, 0.3);
}

/* About Page */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 2rem 0;
}

.about-text h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-text h1 span {
    color: var(--secondary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.about-stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 4px solid var(--secondary-color);
    border-radius: 20px;
    z-index: -1;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 2rem 0;
}

.contact-info {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.info-item i {
    font-size: 1.3rem;
    color: var(--secondary-color);
    width: 30px;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
}

.consent-checkbox label {
    color: #666;
    line-height: 1.5;
}

.consent-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.consent-checkbox a:hover {
    text-decoration: underline;
}

.submit-btn {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 76, 44, 0.3);
}

/* Auth Modal - Scrollable */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    max-width: 550px;
    margin: 50px auto;
    border-radius: 20px;
    animation: slideDown 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.scrollable-modal {
    max-height: 80vh;
    overflow-y: auto;
}

/* Custom scrollbar for modal */
.scrollable-modal::-webkit-scrollbar {
    width: 8px;
}

.scrollable-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scrollable-modal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.scrollable-modal::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: sticky;
    top: 1rem;
    right: 1.5rem;
    float: right;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    z-index: 1;
    background: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.close-modal:hover {
    color: var(--primary-color);
}

.auth-container {
    padding: 2rem 2rem 2.5rem;
}

.auth-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 600;
}

.toggle-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-btn {
    width: 100%;
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 76, 44, 0.3);
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--white);
    padding: 4rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 0 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section h3::after,
.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.2rem;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-section i {
    color: var(--secondary-color);
    width: 25px;
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* Terms & Privacy Pages */
.legal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.legal-content h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    text-align: center;
}

.legal-content .last-updated {
    color: #999;
    font-style: italic;
    margin-bottom: 2rem;
    text-align: right;
}

.legal-content h2 {
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.legal-content h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.2rem;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #444;
}

.legal-content ul {
    margin: 1rem 0 1.5rem 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
        border-top: 2px solid var(--primary-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-auth {
        display: block;
    }

    .nav-actions {
        display: none;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 1rem;
    }

    .nav-link::after {
        display: none;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .auth-container {
        padding: 1.5rem;
    }
}