/* ===== Variables & Reset ===== */
:root {
    --primary-color: #10b981; /* Emerald 500 */
    --primary-dark: #047857; /* Emerald 700 */
    --primary-light: #d1fae5; /* Emerald 100 */
    --secondary-color: #f59e0b; /* Amber 500 */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.39);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo i {
    color: var(--primary-color);
}

.logo-text {
    font-size: 1.2rem;
    white-space: normal;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: var(--transition);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu a {
    display: block;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 8rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.image-blob {
    width: 100%;
    height: 500px;
    background: var(--primary-light);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    animation: blob-bounce 8s infinite alternate;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.image-blob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes blob-bounce {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    75% { border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* ===== Products Section ===== */
.products-section {
    padding: 5rem 2rem;
    background-color: var(--white);
}

.products-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}

.categories-sidebar {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius-xl);
    height: fit-content;
    position: sticky;
    top: 100px;
    min-width: 0;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.categories-sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-light);
}

.category-item:hover, .category-item.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

/* Main Products Area */
.products-main {
    min-width: 0;
}
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.products-header h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.products-header span {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.product-image {
    height: 200px;
    width: 100%;
    position: relative;
    background-color: var(--bg-color);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.veg {
    background-color: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid #16a34a;
}

.badge.nonveg {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid #dc2626;
}

.badge.discount {
    background-color: var(--secondary-color);
    color: white;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

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

.product-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
}

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

.mrp {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.loading-state, .error-state, .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    background-color: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.contact-info {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-card .icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-card h3 {
    color: var(--white);
    font-size: 1.1rem;
}

.info-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.contact-form-wrapper {
    padding: 3rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-success {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
}

/* ===== Footer ===== */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-content p {
    color: var(--text-light);
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 1rem;
}

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

.modal-content {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background-color: var(--bg-color);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: #ef4444;
    color: white;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#modal-main-image {
    width: 100%;
    height: 350px;
    object-fit: contain;
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.modal-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumbnail {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    object-fit: contain;
    background-color: var(--bg-color);
    cursor: pointer;
    padding: 0.2rem;
    transition: var(--transition);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-tags {
    display: flex;
    gap: 0.5rem;
}

#modal-title {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.modal-category {
    color: var(--text-light);
    font-size: 0.9rem;
}

.modal-price-box {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
}

.modal-price-box .current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.modal-price-box .mrp-price {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.modal-price-box .discount-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.modal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.meta-item i {
    color: var(--primary-color);
}

.modal-description h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.modal-description p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text p {
        margin: 0 auto 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .products-container {
        grid-template-columns: 1fr;
    }
    
    .categories-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .category-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .category-item {
        white-space: nowrap;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .logo-text {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .products-section {
        padding: 3rem 1rem;
    }
    
    .product-image {
        height: 120px;
        padding: 0.5rem;
    }
    
    .product-info {
        padding: 0.8rem;
    }
    
    .product-title {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
    }
    
    .product-price-row {
        gap: 0.4rem;
    }
    
    .price {
        font-size: 1.1rem;
    }
    
    .mrp {
        font-size: 0.8rem;
    }
    
    .product-badges {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.4rem;
    }
    
    .modal-price-box .current-price {
        font-size: 1.5rem;
    }
    
    .modal-price-box .mrp-price {
        font-size: 1rem;
    }
}
