/* 
   New Haryana Supermart - Premium Retail Theme 
   Author: Antigravity
*/

:root {
    /* Color Palette */
    --primary-color: #054d44;
    /* Deep Jungle Green */
    --primary-light: #0a6c5f;
    --primary-dark: #022c26;
    --accent-color: #c5a059;
    /* Gold/Amber */
    --accent-hover: #b08d4b;
    --bg-light: #f9fdfa;
    /* Off-white/Mint hint */
    --bg-white: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --text-light: #f0f0f0;
    --border-color: #e5e5e5;
    --success-color: #2e7d32;
    --error-color: #d32f2f;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    padding-top: var(--header-height);
    /* Prevent content hiden behind fixed header */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

section {
    padding: 4rem 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
}

/* Header & Navigation */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    font-size: 1.25rem;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-contact li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: 0.3s ease-in-out;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        left: 0;
    }
}

/* --- Home Page Specific Styles --- */

/* Hero Section */
.hero {
    background: linear-gradient(rgba(5, 77, 68, 0.8), rgba(5, 77, 68, 0.8)), url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    height: 80vh;
    /* Full viewport height minus header roughly */
    display: flex;
    align-items: center;
    color: var(--bg-white);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--bg-white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.category-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0;
}

/* Featured Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.product-image {
    height: 250px;
    background-color: #f1f1f1;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
    /* Zoom effect */
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--error-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: auto;
    /* Push to bottom of content area */
}

.product-price span.original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Offers Section */
.offers-section {
    background-color: #fcefe9;
    /* Light warm background */
    padding: 5rem 0;
}

.offers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.offer-card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
}

.offer-text h3 {
    color: var(--error-color);
    margin-bottom: 0.5rem;
}

.offer-text p {
    margin-bottom: 1rem;
}

/* Why Choose Us */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-item {
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* Testimonials */
.testimonials-section {
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
}

.testimonials-section .section-title h2 {
    color: white;
}

.testimonials-section .section-title p {
    color: rgba(255, 255, 255, 0.7);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 0 50px;
    /* Space for buttons */
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    min-width: 100%;
    /* Show one at a time */
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.customer-info h4 {
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.customer-info span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
}

.slider-btn:hover {
    color: var(--accent-color);
    opacity: 1;
    /* --- Products Page Specific Styles --- */

    .page-header {
        background-color: var(--primary-dark);
        color: white;
        padding: 3rem 0;
        text-align: center;
        margin-bottom: 2rem;
    }

    .products-layout {
        display: flex;
        gap: 2rem;
        padding-bottom: 4rem;
    }

    .filters-sidebar {
        width: 250px;
        flex-shrink: 0;
        background-color: white;
        padding: 1.5rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
        height: fit-content;
    }

    .filter-group {
        margin-bottom: 2rem;
    }

    .filter-group h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.5rem;
    }

    .filter-checkbox {
        display: block;
        margin-bottom: 0.5rem;
        cursor: pointer;
        font-size: 0.95rem;
    }

    .filter-checkbox input {
        margin-right: 0.5rem;
        accent-color: var(--primary-color);
    }

    .price-slider {
        width: 100%;
        margin-bottom: 0.5rem;
        accent-color: var(--primary-color);
    }

    .price-value {
        font-weight: 600;
        color: var(--primary-color);
    }

    .products-main {
        flex-grow: 1;
    }

    .products-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        background-color: white;
        padding: 1rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
    }

    .products-toolbar select {
        padding: 8px 16px;
        border-radius: 4px;
        border: 1px solid var(--border-color);
        outline: none;
        font-family: inherit;
    }

    /* Responsive Products Layout */
    @media (max-width: 768px) {
        margin-bottom: 1rem;
    }
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .hero {
        height: 60vh;
    }
}