/* =================================================================
   Lo Mejor del Herbolario - "Naturaleza Viva" Theme
   ================================================================= */

/* CSS Variables */
:root {
    /* Primary Colors - Natural Green */
    --primary: #2D5A3D;
    --primary-light: #4A7C59;
    --primary-dark: #1E3D2A;

    /* Accent Colors - Earth */
    --accent: #A67B5B;
    --accent-light: #C49A7C;
    --accent-dark: #8B6347;

    /* Background */
    --bg-light: #F7F4F0;
    --bg-cream: #FBF9F6;
    --bg-card: #FFFFFF;

    /* Text */
    --text-primary: #2E2E2E;
    --text-secondary: #5A5A5A;
    --text-light: #FFFFFF;
    --text-muted: #888888;

    /* Functional */
    --success: #4CAF50;
    --warning: #FF9800;
    --info: #2196F3;
    --error: #F44336;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;

    /* Container */
    --container-max: 1100px;
    --container-padding: 1.5rem;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    gap: var(--space-lg);
}

.logo {
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.25rem;
}

/* Navigation */
.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: var(--space-sm) 0;
    position: relative;
}

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

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

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

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0c1 10 10 20 30 20C50 30 40 40 30 60c-1-10-10-20-30-20C10 30 20 20 30 0z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.hero h1 {
    color: var(--text-light);
    margin-bottom: var(--space-md);
    position: relative;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    position: relative;
}

.hero-cta {
    display: inline-flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

/* Category Hero (smaller) */
.hero-category {
    padding: var(--space-2xl) 0;
}

.hero-category h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

/* Breadcrumb */
.breadcrumb {
    padding: var(--space-md) 0;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text-muted);
    margin: 0 var(--space-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-light);
}

/* Section */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-cream);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.card-title a {
    color: var(--text-primary);
}

.card-title a:hover {
    color: var(--primary);
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

/* Category Card */
.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    text-decoration: none;
    display: block;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
}

.category-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.product-image {
    aspect-ratio: 1;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.product-image img {
    max-height: 200px;
    object-fit: contain;
}

.product-info {
    padding: var(--space-lg);
}

.product-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.product-name {
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.product-name a {
    color: var(--text-primary);
}

.product-name a:hover {
    color: var(--primary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Trust Badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-2xl) 0;
    background: var(--bg-cream);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
}

.trust-badge-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.trust-badge-text h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0;
}

.trust-badge-text p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Content Article */
.article {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
}

.article-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--bg-light);
}

.article-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--space-md);
}

.article-content h2 {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--bg-light);
}

.article-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.article-content li {
    margin-bottom: var(--space-sm);
}

/* FAQ Section */
.faq-section {
    margin-top: var(--space-2xl);
}

.faq-item {
    border-bottom: 1px solid var(--bg-light);
    padding: var(--space-lg) 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-family: 'Merriweather', serif;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.faq-question::before {
    content: 'Q';
    background: var(--primary);
    color: var(--text-light);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.faq-answer {
    color: var(--text-secondary);
    padding-left: calc(24px + var(--space-sm));
}

/* Info Box */
.info-box {
    background: var(--bg-cream);
    border-left: 4px solid var(--primary);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.info-box h4 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Warning Box */
.warning-box {
    background: #FFF8E1;
    border-left: 4px solid var(--warning);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.warning-box h4 {
    color: #E65100;
    margin-bottom: var(--space-sm);
}

/* Table of Contents */
.toc {
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.toc h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: var(--space-sm);
}

.toc a {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.toc a:hover {
    color: var(--primary);
}

/* Related Products */
.related-products {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--bg-light);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-col h4 {
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
}

.footer-col a:hover {
    color: var(--text-light);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
}

.footer-legal a:hover {
    color: var(--text-light);
}

/* Schema Markup Hidden */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: var(--space-md);
        gap: 0;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid var(--bg-light);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: var(--space-md);
    }

    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .article {
        padding: var(--space-lg);
    }

    .trust-badges {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .hero,
    .trust-badges {
        display: none;
    }

    .article {
        box-shadow: none;
        padding: 0;
    }

    body {
        background: white;
    }
}
