:root {
    /* Agricultural Palette - Fresh & Natural */
    --primary: #166534;      /* Forest Green */
    --primary-light: #65a30d; /* Lime Green */
    --primary-soft: #f0fdf4;  /* Very Light Green */
    --secondary: #3f6212;    /* Olive Green */
    --accent: #ca8a04;       /* Harvest Gold */
    --earth: #78350f;        /* Soil Brown */
    --earth-light: #fefce8;  /* Beige/Cream */
    
    --warning: #eab308;
    --danger: #ef4444;
    --success: #22c55e;
    
    /* Backgrounds (Clean & Airy) */
    --bg-light: #ffffff;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);
    
    /* Typography */
    --font-main: 'Outfit', 'Inter', system-ui, sans-serif;
    --text-main: #064e3b;     /* Deep Green for headers */
    --text-body: #334155;     /* Slate for body text */
    --text-muted: #64748b;    
    
    /* Transitions & Shadows */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-soft: 0 4px 20px rgba(22, 101, 52, 0.04);
    --shadow-medium: 0 12px 30px rgba(22, 101, 52, 0.08); /* Green tinted shadow */
    --radius: 20px;
}

[data-theme="dark"] {
    --bg-light: #052e16;     /* Deep Organic Dark Green */
    --bg-card: #064e3b;      /* Dark Forest Green */
    --bg-glass: rgba(5, 46, 22, 0.8);
    --text-main: #f0fdf4;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --primary: #bef264;      /* Lime accent for dark */
    --primary-light: #d9f99d;
    --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font-family: inherit;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s, color 0.4s;
    overflow-x: hidden;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

[data-theme="dark"] .glass-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.btn-premium {
    padding: 14px 28px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(22, 101, 52, 0.2);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.85rem;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(22, 101, 52, 0.3);
}

/* Base styles for the list cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* Responsive Utilities */
.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

@media (max-width: 768px) {
    .flex-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .flex-header > div {
        width: 100%;
    }
}

.product-card {
    padding: 24px;
    background: var(--bg-card);
}

.product-card-img-link {
    display: block;
    margin: 12px -24px 16px;
    overflow: hidden;
    cursor: pointer;
}

.product-card-img-link img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-img-link:hover img {
    transform: scale(1.08);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.category-badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(45, 90, 39, 0.08); /* Transparent Forest Green */
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Category Grid & Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
    padding: 30px 0;
}

.category-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
    padding: 24px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-soft);
}

.category-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.06);
}

.category-card img {
    width: 100%;
    aspect-ratio: 1.6;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
}

.category-card h3 {
    color: var(--text-main);
    font-size: 1.6rem;
    margin-bottom: 24px;
    font-weight: 700;
}

.btn-outline-success {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-outline-success:hover {
    background: var(--secondary);
    color: white;
}

/* Navbar Enhancements */
/* Navbar Enhancements */
.navbar-main {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: var(--bg-glass) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 0 !important;
    padding: 15px 0 !important;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.nav-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2.2rem;
    text-decoration: none;
}

.logo-precios {
    color: var(--primary);
    font-weight: 800;
}

.logo-peru {
    color: var(--text-muted); /* #64748b */
    font-weight: 500;
    margin-left: 5px;
}

.flag-icon {
    width: 32px;
    height: 20px;
    background: linear-gradient(to right, #d91023 33.33%, #fff 33.33%, #fff 66.66%, #d91023 66.66%);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle, .dropdown-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle:after, .dropdown-link:after {
    content: "▾";
    font-size: 0.75rem;
    opacity: 0.5;
    color: var(--text-muted);
}

.dropdown-toggle:hover, .dropdown-link:hover {
    color: var(--primary);
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 240px;
    box-shadow: var(--shadow-medium);
    border-radius: 16px;
    padding: 12px 0;
    z-index: 2000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu a {
    color: var(--text-muted);
    padding: 12px 24px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: rgba(45, 90, 39, 0.04);
    color: var(--primary);
    padding-left: 28px;
}

/* Bulletin Table Styles */
.bulletin-warning {
    background: rgba(249, 168, 37, 0.1);
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

[data-theme="dark"] .bulletin-warning {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255,255,255,0.8);
}

.bulletin-category-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.bulletin-category-title::before {
    content: '';
    width: 8px;
    height: 32px;
    background: var(--primary);
    border-radius: 4px;
}

.table-container {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow-x: auto;
}

[data-theme="dark"] .table-container {
    border-color: rgba(255,255,255,0.1);
}

.bulletin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.bulletin-table th {
    background: rgba(45, 90, 39, 0.03);
    padding: 18px 24px;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .bulletin-table th {
    background: rgba(255,255,255,0.02);
    border-bottom-color: rgba(255,255,255,0.1);
}

.bulletin-table td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    color: var(--text-main);
    font-size: 0.95rem;
}

[data-theme="dark"] .bulletin-table td {
    border-bottom-color: rgba(255,255,255,0.05);
}

.bulletin-table tr:last-child td {
    border-bottom: none;
}

.bulletin-table tr:hover {
    background: rgba(45, 90, 39, 0.02);
}

[data-theme="dark"] .bulletin-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.prod-name {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.prod-name:hover {
    color: var(--primary-light);
}

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section Base */
.hero {
    background: radial-gradient(circle at top right, #0d254b, #061021); /* Premium gradient */
    padding: 100px 40px;
    text-align: center;
    border-radius: 24px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #bef264; /* Lime green from image */
    line-height: 1.1;
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-hero-primary {
    padding: 16px 36px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 40px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(22, 101, 52, 0.4);
    transition: var(--transition);
}

.btn-hero-primary:hover {
    transform: translateY(-4px);
    background: var(--primary-light);
    box-shadow: 0 15px 30px rgba(22, 101, 52, 0.6);
}

.btn-hero-secondary {
    padding: 16px 36px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 40px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

/* Dashboard / Content Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

#searchInput {
    padding: 14px 28px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: var(--bg-card);
    color: var(--text-main);
    width: 380px;
    max-width: 100%;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

[data-theme="dark"] #searchInput {
    border: 1px solid rgba(255,255,255,0.1);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1);
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2001;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-controls {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* Responsive Header / Navbar */
@media (max-width: 1024px) {
    .nav-top-row {
        margin-bottom: 0;
    }
    
    .navbar-main {
        padding: 5px 0 !important;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        overflow-y: auto;
        gap: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-toggle, .dropdown-link {
        width: 100%;
        padding: 15px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .dropdown-toggle:after, .dropdown-link:after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: block; /* Show all on mobile for simplicity */
        max-height: none;
        background: transparent;
    }

    .nav-controls {
        margin-top: 20px;
        margin-left: 0;
    }
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero {
        height: auto;
        padding: 120px 20px 80px;
        margin-bottom: 40px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Responsive Grids & Components */
@media (max-width: 768px) {
    .category-grid, .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }

    .page-title {
        font-size: 2rem;
    }

    #searchInput {
        width: 100% !important;
        margin-top: 20px;
    }

    header[style*="display: flex"] {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .about-card {
        padding: 30px;
    }

    .about-card h1 {
        font-size: 2rem;
    }

    .stats-card {
        flex-direction: column;
        gap: 30px;
    }
}

/* Responsive Tables */
@media (max-width: 600px) {
    .table-container {
        border-radius: 12px;
        margin-top: 20px;
    }

    .price-table th, .price-table td {
        padding: 12px 15px;
    }

    .price-cell {
        font-size: 1.1rem;
    }

    .bulletin-category-title {
        font-size: 1.8rem;
        margin-top: 40px;
    }
}

/* Product Detail Styles */
.price-label {
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
}

.unit-info {
    font-weight: bold;
    color: white;
}

.unit-info strong {
    color: white !important;
}
