/* ============================================
   KitchenWiseHub — Custom Design Override
   Theme: Warm Kitchen — Sage Green & Terracotta
   Fonts: Playfair Display (headings) + Source Sans 3 (body)
   ============================================ */

:root {
    /* Theme's original variable names (used by style.css selectors) */
    --primary-color: #5B7C5A;
    --primary-dark: #4A6649;
    --secondary-color: #C87941;
    --accent-color: #D4956A;
    --text-dark: #2C2A26;
    --text-light: #6B695F;
    --bg-light: #FBF9F4;
    --bg-white: #FFFFFF;
    --border-color: #E0D9CE;

    /* Custom variable names (used in custom selectors) */
    --color-primary: #5B7C5A;
    --color-primary-dark: #4A6649;
    --color-primary-light: #7FA07E;
    --color-secondary: #C87941;
    --color-accent: #D4956A;
    --color-bg: #FBF9F4;
    --color-bg-warm: #F5EDE0;
    --color-text: #2C2A26;
    --color-text-light: #6B695F;
    --color-border: #E0D9CE;
    --color-white: #FFFFFF;
    --color-dark: #2C2A26;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #5B7C5A 0%, #4A6649 50%, #3A5238 100%);
    --gradient-warm: linear-gradient(135deg, #C87941 0%, #D4956A 100%);
    --gradient-glass: linear-gradient(135deg, rgba(91, 124, 90, 0.08) 0%, rgba(200, 121, 65, 0.05) 100%);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(91, 124, 90, 0.08);
    --shadow-md: 0 4px 12px rgba(91, 124, 90, 0.12);
    --shadow-lg: 0 8px 30px rgba(91, 124, 90, 0.15);
    --shadow-glow: 0 0 20px rgba(91, 124, 90, 0.2);

    /* Layout */
    --border-radius: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Typography
   ============================================ */

body {
    font-family: var(--font-body);
    color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
body { font-size: clamp(1rem, 1.5vw, 1.1rem); }

/* ============================================
   Header & Navigation
   ============================================ */

.header {
    background: var(--color-white);
    border-bottom: 2px solid var(--color-border);
}

.nav-link {
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.nav-link:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: var(--gradient-hero);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(200, 121, 65, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 600px;
}

.btn-primary {
    background: var(--color-secondary);
    color: white;
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* ============================================
   Trust / Features Section
   ============================================ */

.features-section {
    padding: 5rem 0;
    background: var(--color-bg);
}

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

.feature-card {
    background: var(--color-white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

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

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
}

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Post Cards & Article Grid
   ============================================ */

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

.article-card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.article-category {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.article-card .post-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.article-card .post-title a {
    color: var(--color-dark);
    transition: var(--transition);
}

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

.article-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.article-card .read-more {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.article-card .read-more:hover {
    color: var(--color-primary-dark);
}

/* ============================================
   Category Cards
   ============================================ */

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

.category-card {
    display: block;
    background: var(--color-white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: var(--transition);
}

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

.category-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

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

/* ============================================
   How We Test / Methodology Section
   ============================================ */

.methodology-section {
    padding: 5rem 0;
    background: var(--color-bg);
}

.methodology-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.step-card {
    background: var(--color-white);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-hero);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.step-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--color-text-light);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ============================================
   Blog Post Table of Contents
   ============================================ */

.toc-details {
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    padding: 0;
}

.toc-summary {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
    cursor: pointer;
    padding: 1rem 1.5rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toc-summary::-webkit-details-marker {
    display: none;
}

.toc-summary::after {
    content: '\25B8';
    font-size: 1rem;
    transition: transform 0.25s ease;
    color: var(--color-primary);
}

.toc-details[open] .toc-summary::after {
    transform: rotate(90deg);
}

.toc-details[open] .toc-summary {
    border-bottom: 1px solid var(--color-border);
}

.table-of-contents {
    padding: 1rem 1.5rem 1.5rem;
    margin: 0;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    line-height: 1.5;
}

.table-of-contents a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ============================================
   Blog Post Meta & Content
   ============================================ */

.post-header {
    background: var(--gradient-hero);
    color: white;
    padding: 4rem 0 3rem;
}

.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-body h2 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
}

.post-body h3 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}

.affiliate-notice {
    background: var(--color-bg-warm);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--color-secondary);
    margin-bottom: 2rem;
}

/* ============================================
   Related Posts Section
   ============================================ */

.related-posts {
    background: var(--color-bg);
    padding: 4rem 0;
}

.related-posts .post-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    overflow: hidden;
}

.related-posts .post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--color-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-heading);
    color: white;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--color-accent);
}

.affiliate-disclosure {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* ============================================
   Page Header (non-blog pages)
   ============================================ */

.page-header {
    background: var(--gradient-hero);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-title {
    font-family: var(--font-heading);
}

/* ============================================
   Section Titles
   ============================================ */

.section-title {
    font-family: var(--font-heading);
    text-align: center;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 3rem;
    color: var(--color-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-secondary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* ============================================
   Affiliate Disclosure Section
   ============================================ */

.disclosure-section {
    padding: 2.5rem 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.disclosure-section p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   Scroll Animations (safe — visible by default)
   ============================================ */

.post-card,
.feature-card,
.article-card,
.category-card,
.step-card {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.post-card.visible,
.feature-card.visible,
.article-card.visible,
.category-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .features-grid,
    .article-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .methodology-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        padding: 3rem 0;
    }

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

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

    .feature-card {
        padding: 1.5rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .header,
    .footer,
    .hero-buttons,
    .post-navigation,
    .related-posts {
        display: none;
    }
    .product-table {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    .check-price-btn {
        background: #f0f0f0;
        color: #000;
    }
}