/* CSS Variables matching Design System */
:root {
    --color-primary: #2E5D32;
    /* Deep Earth Green */
    --color-primary-dark: #1e4221;
    --color-accent: #5D4037;
    /* Warm Soil Brown */
    --color-gold: #F9A825;
    /* Golden Ghee */
    --color-bg-light: #F9F7F0;
    /* Rice Beige */
    --color-white: #FFFFFF;
    --color-text-main: #333333;
    --color-text-light: #666666;

    --font-heading: 'Lora', serif;
    --font-body: 'Lato', sans-serif;

    --container-width: 1200px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 32px;
    --spacing-lg: 64px;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(46, 93, 50, 0.08);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    /* Force vertical scrollbar to prevent jumps */
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.logo-link {
    display: flex;
    align-items: center;
}

/* Leaf Divider Utility */
.leaf-divider {
    text-align: center;
    color: var(--color-gold);
    margin: var(--spacing-sm) 0;
    font-size: 1.5rem;
}

/* Header */
.site-header {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    /* Lock container height */
}

.logo {
    display: flex;
    align-items: center;
    color: var(--color-primary);
    width: 280px;
    /* Reserve space for logo */
}

.logo-icon {
    font-size: 1.8rem;
    margin-right: 10px;
    color: var(--color-primary);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

.main-nav ul {
    display: flex;
    gap: 30px;
    height: 100%;
    align-items: center;
}

.main-nav a {
    font-weight: 700;
    /* Match loaded font weight (700) to avoid synthesis */
    color: var(--color-text-main);
    font-size: 1rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    background-color: #e6e0d0;
    /* Fallback */
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('images/header-hero.png');
    /* Wheat field */
    background-size: cover;
    background-position: center;
    height: 600px;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-btns .btn-secondary {
    border-color: white;
    color: white;
}

.hero-btns .btn-secondary:hover {
    background-color: white;
    color: var(--color-primary);
}

/* Page Header (New for Inner Pages) */
.page-header {
    background-color: var(--color-primary);
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
    margin-bottom: var(--spacing-md);
}

.page-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Features Bar */
.features {
    padding: var(--spacing-md) 0;
    background-color: var(--color-white);
    border-bottom: 1px solid #eee;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.feature-item i {
    font-size: 2rem;
    color: var(--color-gold);
    margin-bottom: 10px;
}

.feature-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--color-text-main);
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Categories */
.categories {
    padding: var(--spacing-lg) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
    border-color: #e0e0e0;
}

.cat-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--color-primary);
}

.category-card h3 {
    margin-bottom: 10px;
}

.link-btn {
    display: inline-block;
    margin-top: 15px;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

/* Shop Grid Styles (New) */
.shop-section {
    padding: var(--spacing-lg) 0;
}

.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

.shop-sidebar h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.shop-sidebar ul li {
    margin-bottom: 12px;
}

.shop-sidebar ul li a {
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-sidebar ul li a:hover,
.shop-sidebar ul li a.active {
    color: var(--color-primary);
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    /* Fix for overlap issue: Enforce vertical layout */
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--box-shadow);
}

.product-img {
    /* height: 250px; REMOVED fixed height */
    aspect-ratio: 1 / 1;
    /* Force square shape for responsive width */
    width: 100%;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    /* Ensure nothing spills out */
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the square perfectly */
}

.placeholder-img-sm {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.product-info {
    padding: 20px;
    text-align: center;
    /* Fix for visibility: Ensure solid background and layering */
    background-color: var(--color-white);
    position: relative;
    z-index: 10;
    flex-grow: 1;
    /* Ensure equal height alignment if needed */
}

.category-tag {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info h4 {
    margin: 10px 0;
    font-size: 1.1rem;
}

.price {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* About/Organic/Contact Stories (New) */
.content-section {
    padding: var(--spacing-lg) 0;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.story-grid.reverse {
    direction: rtl;
    /* simple way to reverse cols visual order, ensure text-align is correct */
}

.story-grid.reverse .story-text {
    direction: ltr;
    /* reset text direction */
}

.story-grid.reverse .story-image {
    direction: ltr;
}

.story-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.placeholder-img {
    background-color: #fcebc5;
    height: 400px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cc8e35;
    font-weight: bold;
}

/* Contact Styles (New) */
.contact-section {
    padding: var(--spacing-lg) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    background: white;
    padding: 60px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-info h2 {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-top: 5px;
}

.contact-form-wrapper {
    background-color: var(--color-bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Spotlight */
.spotlight {
    padding: var(--spacing-lg) 0;
    background-color: white;
}

.spotlight-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.spotlight-image {
    flex: 1;
}

.spotlight-content {
    flex: 1;
}

.tag {
    display: inline-block;
    background-color: var(--color-gold);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.spotlight-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.benefits-list {
    margin: 20px 0 30px;
}

.benefits-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.benefits-list i {
    color: var(--color-primary);
    margin-right: 10px;
}

/* About Summary */
.about-summary {
    padding: 80px 0;
    background-color: var(--color-primary);
    color: white;
    text-align: center;
    position: relative;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    color: var(--color-gold);
    margin-bottom: 30px;
}

.about-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.signature {
    margin-top: 40px;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
}

/* Footer */
.site-footer {
    background-color: #212121;
    color: #e0e0e0;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid #333;
}

.footer-col h3,
.footer-col h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--color-gold);
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}

.social-icons a:hover {
    background-color: var(--color-gold);
    color: #212121;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #888;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 200;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .main-nav,
    .header-actions {
        display: none;
        /* simple hide for prototype */
    }

    .mobile-toggle {
        display: block;
    }

    /* Mobile Menu Active State */
    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #f0f0f0;
    }

    .main-nav.active ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-actions.active {
        display: flex;
        justify-content: center;
        width: 100%;
        background-color: var(--color-white);
        padding-bottom: 20px;
        position: absolute;
        top: calc(100% + 180px);
        /* Adjust based on menu height roughly, or better yet, put it in the nav flow */
    }

    /* Better approach: container relative positioning */
    .header-container {
        position: relative;
    }

    /* Override previous hidden state when active */
    .header-actions.active {
        display: flex;
        position: absolute;
        top: auto;
        /* Let it flow or push it down? */
        /* Actually, let's simplify. When active, we show them. 
            Since they are siblings, we might need a container or absolute positioning.
         */
        top: 260px;
        /* Approximate height of nav elements */
        left: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .spotlight-container {
        flex-direction: column;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* New Responsive Styles */
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .story-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}