/* ============================================
   MySoilType - Earth-Tones Responsive CSS
   ============================================ */

/* --- Variables --- */
:root {
    --primary: #2d6a4f;
    --primary-hover: #1b4332;
    --primary-light: #d8f3dc;
    --secondary: #8b5e3c;
    --bg: #fefcf9;
    --bg-alt: #f5f0eb;
    --bg-card: #ffffff;
    --text: #2d3436;
    --text-muted: #636e72;
    --border: #dfe6e9;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
    --max-width: 1100px;
    --header-h: 64px;
    --success: #27ae60;
    --warning: #f39c12;
    --info: #2980b9;
}

/* --- Skip to content --- */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 200;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
    color: #fff;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* --- Focus styles (accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}
input:focus-visible {
    outline-offset: 0;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary {
    background: var(--secondary);
    color: #fff;
}
.btn-secondary:hover { background: #73502f; color: #fff; }

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    box-shadow: var(--shadow);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo img { height: 32px; width: auto; }

/* --- Navigation (legacy .main-nav classes) --- */
.main-nav ul {
    display: flex;
    gap: 4px;
}
.main-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
}
.main-nav a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

/* Dropdown (legacy) */
.nav-dropdown {
    position: relative;
}
.nav-dropdown > a::after {
    content: "\25BE";
    margin-left: 4px;
    font-size: 0.75em;
}
.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 110;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    padding: 8px 16px;
    border-radius: 0;
}

/* --- Site Nav (BEM) - actual HTML uses these classes --- */
.site-nav {
    position: static;
}
.site-nav__list {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav__item {
    position: relative;
}
.site-nav__link {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
}
.site-nav__link:hover {
    background: var(--bg-alt);
    color: var(--primary);
}
.site-nav__link--dropdown::after {
    content: "\25BE";
    margin-left: 4px;
    font-size: 0.75em;
}
.site-nav__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 110;
    list-style: none;
    margin: 0;
}
.site-nav__item--dropdown:hover .site-nav__dropdown,
.site-nav__item--dropdown:focus-within .site-nav__dropdown,
.site-nav__item--dropdown.open .site-nav__dropdown {
    display: block;
}
.site-nav__dropdown--states {
    columns: 3;
    column-gap: 8px;
    min-width: 560px;
    padding: 8px 12px;
    max-height: 70vh;
    overflow-y: auto;
}
.site-nav__dropdown--states li {
    break-inside: avoid;
}
.site-nav__dropdown-link {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    font-size: 0.88rem;
    white-space: nowrap;
    border-radius: 0;
}
.site-nav__dropdown-link:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

/* Site header burger (BEM) */
.site-header__burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}
.site-header__burger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.2s;
}

/* Mobile toggle (legacy) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    color: var(--text);
}

/* --- Breadcrumb --- */
.breadcrumb {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-alt) 100%);
    padding: 60px 0 50px;
    text-align: center;
}
.hero h1 {
    font-size: 2.2rem;
    color: var(--primary-hover);
    margin-bottom: 12px;
}
.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 28px;
}
.hero-search {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}
.hero-search input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 120px;
    font-size: 1.1rem;
    border: 2px solid var(--primary);
    border-radius: 50px;
    outline: none;
    background: var(--bg-card);
    transition: box-shadow 0.2s;
}
.hero-search input:focus {
    box-shadow: 0 0 0 4px rgba(45,106,79,0.15);
}
.hero-search .btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    border-radius: 50px;
    padding: 0 24px;
}

/* --- Zip search results dropdown --- */
.zip-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 14px 18px;
    text-align: left;
    display: none;
    z-index: 50;
}
.zip-results.active { display: block; }
.zip-results .zip-preview { color: var(--text); }
.zip-results .zip-preview strong { color: var(--primary); }
.zip-results .zip-preview a {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
}
.zip-results .zip-error { color: var(--text-muted); }

/* --- Section spacing --- */
section { padding: 48px 0; }
section:nth-child(even) { background: var(--bg-alt); }
.section-title {
    font-size: 1.6rem;
    color: var(--primary-hover);
    margin-bottom: 8px;
}
.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* --- Soil Profile Card --- */
.soil-profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.soil-profile-card table {
    font-size: 0.95rem;
}
.soil-profile-card th,
.soil-profile-card td {
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.soil-profile-card th {
    width: 180px;
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text-muted);
}
.soil-profile-card tr:nth-child(even) td {
    background: #fafafa;
}
.soil-profile-card tr:last-child th,
.soil-profile-card tr:last-child td {
    border-bottom: none;
}

/* Soil type badge */
.soil-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--primary-light);
    color: var(--primary);
}
.soil-badge .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* --- Composition Bars --- */
.composition-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comp-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.comp-bar-label {
    width: 60px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
}
.comp-bar-track {
    flex: 1;
    height: 20px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.comp-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}
.comp-bar-fill.sand { background: #e2c07c; }
.comp-bar-fill.silt { background: #a8b89c; }
.comp-bar-fill.clay { background: var(--secondary); }
.comp-bar-value {
    width: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

/* --- Plant Cards Grid --- */
.plant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.plant-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.plant-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.plant-card .plant-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.plant-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}
.plant-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Planting Calendar Table --- */
.calendar-table {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.calendar-table table { min-width: 600px; }
.calendar-table th,
.calendar-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid var(--border);
    font-size: 0.85rem;
}
.calendar-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
.calendar-table td.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* --- Pros / Cons --- */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.pros-col, .cons-col {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}
.pros-col h3 { color: var(--success); margin-bottom: 12px; }
.cons-col h3 { color: #c0392b; margin-bottom: 12px; }
.pros-col li, .cons-col li {
    padding: 6px 0;
    padding-left: 22px;
    position: relative;
    font-size: 0.95rem;
    list-style: none;
}
.pros-col li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}
.cons-col li::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: #c0392b;
    font-weight: 700;
}

/* --- Soil Type Cards Grid --- */
.soil-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.soil-type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.soil-type-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.soil-type-card .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}
.soil-type-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}
.soil-type-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* --- State Grid --- */
.state-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.state-grid a {
    display: block;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}
.state-grid a:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* --- Steps Section --- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}
.step {
    position: relative;
}
.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.step h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}
.step p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- FAQ Accordion --- */
.faq-list {
    max-width: 750px;
    margin: 0 auto;
}
.faq-list details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
}
.faq-list summary {
    padding: 14px 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
}
.faq-list summary:hover { background: var(--bg-alt); }
.faq-list summary::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.faq-list details[open] summary::after {
    content: "\2212";
}
.faq-list details .faq-body {
    padding: 0 18px 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- Amendment Step Cards --- */
.amendment-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.amendment-card {
    background: var(--bg-card);
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.amendment-card h4 {
    color: var(--secondary);
    margin-bottom: 8px;
}
.amendment-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Data Tables --- */
.data-table {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.data-table table { min-width: 500px; }
.data-table th,
.data-table td {
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.data-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafaf7; }

/* --- Ad Slots --- */
.ad-slot {
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
}

/* --- Footer --- */
.site-footer {
    background: var(--primary-hover);
    color: rgba(255,255,255,0.8);
    padding: 48px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 36px;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 14px;
    font-size: 1rem;
}
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    padding: 3px 0;
    transition: color 0.15s;
}
.footer-col a:hover { color: #fff; }
.footer-col p {
    font-size: 0.88rem;
    line-height: 1.6;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }

/* ========================================
   Responsive - Mobile (< 768px)
   ======================================== */
@media (max-width: 768px) {
    /* Nav */
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: -280px;
        width: 280px;
        height: calc(100vh - var(--header-h));
        background: var(--bg-card);
        box-shadow: var(--shadow-lg);
        transition: left 0.25s ease;
        overflow-y: auto;
        z-index: 120;
    }
    .main-nav.open { left: 0; }
    .main-nav ul {
        flex-direction: column;
        padding: 12px;
        gap: 2px;
    }
    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        display: none;
    }
    .nav-dropdown.open .dropdown-menu { display: block; }

    /* Site nav BEM mobile */
    .site-header__burger { display: inline-flex; }
    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: -280px;
        width: 280px;
        height: calc(100vh - var(--header-h));
        background: var(--bg-card);
        box-shadow: var(--shadow-lg);
        transition: left 0.25s ease;
        overflow-y: auto;
        z-index: 120;
    }
    .site-nav.open { left: 0; }
    .site-nav__list {
        flex-direction: column;
        padding: 12px;
        gap: 2px;
    }
    .site-nav__item { position: relative; }
    .site-nav__dropdown,
    .site-nav__dropdown--states {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        display: none;
        min-width: 0;
        columns: 1;
        max-height: none;
        overflow: visible;
    }
    .site-nav__item--dropdown:hover .site-nav__dropdown,
    .site-nav__item--dropdown:focus-within .site-nav__dropdown {
        display: none;
    }
    .site-nav__item--dropdown.open .site-nav__dropdown {
        display: block;
    }

    /* Hero */
    .hero { padding: 40px 0 36px; }
    .hero h1 { font-size: 1.6rem; }
    .hero-search input { padding-right: 100px; font-size: 1rem; }

    /* Grids */
    .pros-cons { grid-template-columns: 1fr; }
    .state-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; gap: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    /* Soil profile table */
    .soil-profile-card th { width: 120px; }

    /* Sections */
    section { padding: 32px 0; }
    .section-title { font-size: 1.3rem; }

    /* Images mobile */
    .page-hero-img { height: 180px; margin: 0 -20px 20px; border-radius: 0; }
    .soil-card__img { height: 120px; }

    /* Touch targets - minimum 48px */
    .site-nav__link { min-height: 48px; display: flex; align-items: center; }
    .site-nav__dropdown-link { min-height: 44px; display: flex; align-items: center; }
    .header-search__btn { min-width: 48px; min-height: 48px; }
    .site-header__burger { min-width: 48px; min-height: 48px; }
    .state-grid a { min-height: 48px; display: flex; align-items: center; justify-content: center; }
    .faq-list summary { min-height: 48px; }
    .site-footer__links a { min-height: 44px; display: flex; align-items: center; }
}

/* ============================================
   Page Images
   ============================================ */

/* Hero image banner on soil/state/zone/plant pages */
.page-hero-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 16px 0 28px;
    box-shadow: var(--shadow);
}

/* Soil card with thumbnail image */
.soil-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    color: var(--text);
}
.soil-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: var(--text);
}
.soil-card__img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.soil-card__body {
    padding: 16px 18px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.soil-card__name {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--primary-hover);
}
.soil-card__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    flex: 1;
}
.soil-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}
.soil-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* County grid on state pages */
.state-counties__heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}
.state-counties__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.state-counties__item {
    display: block;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
}
.state-counties__item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.county-back-link {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.county-back-link a {
    color: var(--primary);
    font-weight: 500;
}

/* Affiliate product blocks */
.affiliate-products {
    margin: 32px 0;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.affiliate-products__heading {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.affiliate-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.affiliate-products__item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    color: var(--text);
}
.affiliate-products__item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.affiliate-products__name {
    font-weight: 600;
    margin-bottom: 6px;
}
.affiliate-products__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 10px;
}
.affiliate-products__cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}
.affiliate-products__disclosure {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

/* All-soils card with image */
.all-soils-card__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Zip page soil thumbnail */
.soil-profile__img {
    width: 100%;
    max-width: 300px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 0 0 16px;
}

/* Plant guide category image */
.plant-guide-page__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 12px 0 24px;
}
