/* ============================================================
   Herbal CMS — Frontend Stylesheet
   Mobile-first, no frameworks
   ============================================================ */

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

:root {
    --green-dark:    #1a4028;
    --green-mid:     #2e7d52;
    --green-light:   #4caf7d;
    --green-pale:    #e8f5ee;
    --green-subtle:  #f2faf5;
    --cream:         #f9f5ed;
    --cream-dark:    #ede8dc;
    --brown-light:   #c8b89a;
    --text-dark:     #1c1c1c;
    --text-mid:      #444;
    --text-muted:    #777;
    --white:         #ffffff;
    --border:        #ddd;
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --shadow-sm:     0 2px 8px rgba(0,0,0,.07);
    --shadow-md:     0 4px 20px rgba(0,0,0,.10);
    --shadow-lg:     0 8px 40px rgba(0,0,0,.14);
    --max-width:     1200px;
    --header-height: 70px;
    --transition:    .25s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--white);
}

/* Sans-serif for UI elements */
nav, button, input, select, textarea, label,
.btn, .badge, .card-meta, .tag-pill, footer {
    font-family: system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4 {
    font-family: 'Georgia', serif;
    line-height: 1.3;
    color: var(--green-dark);
}

a { color: var(--green-mid); text-decoration: none; }
a:hover { color: var(--green-dark); }

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

.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: 11px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--green-mid);
    color: var(--white);
    border-color: var(--green-mid);
}
.btn-primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--white);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.7);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--green-dark);
    border-color: var(--white);
}
.btn-outline-green {
    background: transparent;
    color: var(--green-mid);
    border-color: var(--green-mid);
}
.btn-outline-green:hover {
    background: var(--green-mid);
    color: var(--white);
}
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--green-dark);
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo img {
    height: 42px;
    width: auto;
}
.site-logo-text {
    font-family: 'Georgia', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .3px;
}
.site-logo-text span {
    color: var(--green-light);
}

/* Desktop nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}
.site-nav a {
    display: block;
    padding: 8px 14px;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.site-nav a:hover,
.site-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,.1);
}
.site-nav .nav-login {
    margin-left: 8px;
    padding: 7px 16px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: var(--radius-sm);
}
.site-nav .nav-login:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.7);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,.1); }
.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--green-dark);
    padding: 16px 20px 24px;
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    border-top: 1px solid rgba(255,255,255,.1);
}
.mobile-nav.open { display: block; }
.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mobile-nav a {
    display: block;
    padding: 12px 16px;
    color: rgba(255,255,255,.9);
    font-size: 16px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.mobile-nav a:hover { background: rgba(255,255,255,.1); color: var(--white); }

/* ── Hero Slider ──────────────────────────────────────────── */
.hero {
    margin-top: var(--header-height);
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--green-dark);
}

.hero-slides {
    display: flex;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

.hero-slide {
    min-width: 100%;
    position: relative;
    height: min(90vh, 680px);
    display: flex;
    align-items: center;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15,35,20,.72) 0%,
        rgba(15,35,20,.45) 60%,
        rgba(15,35,20,.2) 100%
    );
}

/* Fallback when no image */
.hero-slide-bg.no-image {
    background: linear-gradient(135deg, var(--green-dark) 0%, #0f4d2a 100%);
}
.hero-slide-bg.no-image::after { display: none; }

.hero-slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 60px 0;
}

.hero-slide-inner {
    max-width: 640px;
}

.hero-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(76,175,125,.3);
    border: 1px solid rgba(76,175,125,.5);
    color: #9de8be;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 16px;
    font-family: system-ui, sans-serif;
}

.hero-title {
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 18px;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
    line-height: 1.15;
}

.hero-desc {
    font-size: clamp(15px, 2vw, 18px);
    color: rgba(255,255,255,.88);
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 520px;
    font-family: system-ui, sans-serif;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Slider dots */
.hero-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
}
.hero-dot.active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

/* Slider arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    line-height: 1;
}
.hero-arrow:hover { background: rgba(255,255,255,.3); }
.hero-arrow-prev { left: 20px; }
.hero-arrow-next { right: 20px; }

/* ── Section commons ──────────────────────────────────────── */
.section {
    padding: 80px 0;
}
.section-alt {
    background: var(--cream);
}
.section-dark {
    background: var(--green-dark);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-label {
    display: inline-block;
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green-mid);
    margin-bottom: 10px;
}
.section-dark .section-label { color: var(--green-light); }
.section-title {
    font-size: clamp(26px, 3.5vw, 38px);
    margin-bottom: 14px;
}
.section-dark .section-title { color: var(--white); }
.section-subtitle {
    font-family: system-ui, sans-serif;
    font-size: 16px;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto;
}
.section-dark .section-subtitle { color: rgba(255,255,255,.7); }

.section-footer {
    text-align: center;
    margin-top: 48px;
}

/* ── Cards grid ───────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}
.card-img-placeholder {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--green-pale) 0%, var(--cream) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    flex-shrink: 0;
}

.card-body {
    padding: 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.tag-pill {
    display: inline-block;
    padding: 2px 10px;
    background: var(--green-pale);
    color: var(--green-mid);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.card-title {
    font-size: 19px;
    margin-bottom: 6px;
    color: var(--green-dark);
    line-height: 1.3;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--green-mid); }

.card-subtitle {
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

.card-excerpt {
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--green-mid);
    margin-top: auto;
    transition: gap var(--transition), color var(--transition);
}
.card-link:hover { color: var(--green-dark); gap: 8px; }
.card-link::after { content: '→'; }

/* Alt cards (on cream bg) */
.section-alt .card { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,.85);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

/* Footer col 1 — logo + tagline */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    text-decoration: none;
}
.footer-logo img { height: 38px; width: auto; }
.footer-logo-text {
    font-family: 'Georgia', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}
.footer-logo-text span { color: var(--green-light); }
.footer-tagline {
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,.6);
    line-height: 1.7;
}

/* Footer col 2 — subscribe */
.footer-col-title {
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--green-light);
    margin-bottom: 14px;
}
.footer-subscribe p {
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,.65);
    margin-bottom: 16px;
    line-height: 1.6;
}
.subscribe-form {
    display: flex;
    gap: 0;
}
.subscribe-form input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    font-family: system-ui, sans-serif;
    border: 1px solid rgba(255,255,255,.2);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: rgba(255,255,255,.08);
    color: var(--white);
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,.4); }
.subscribe-form input[type="email"]:focus {
    border-color: var(--green-light);
    background: rgba(255,255,255,.12);
}
.subscribe-form button {
    padding: 10px 18px;
    background: var(--green-mid);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    font-weight: 600;
    font-family: system-ui, sans-serif;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.subscribe-form button:hover { background: var(--green-light); }
.subscribe-msg {
    font-family: system-ui, sans-serif;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}
.subscribe-msg.success { color: #9de8be; }
.subscribe-msg.error   { color: #f48a8a; }

/* Footer col 3 — social */
.footer-social {
    display: flex;
    flex-direction: column;
}
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.8);
    font-size: 16px;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    border: 1px solid rgba(255,255,255,.15);
}
.social-link:hover {
    background: var(--green-mid);
    color: var(--white);
    border-color: var(--green-mid);
}

/* Copyright bar */
.footer-bottom {
    padding: 18px 0;
    text-align: center;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,.4);
}
.footer-bottom a {
    color: rgba(255,255,255,.5);
}
.footer-bottom a:hover { color: var(--white); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-social { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    :root { --header-height: 60px; }

    .site-nav { display: none; }
    .hamburger { display: flex; }

    .cards-grid { grid-template-columns: 1fr; gap: 20px; }

    .hero-slide { height: min(80vh, 520px); }
    .hero-arrow { display: none; }

    .section { padding: 56px 0; }
    .section-header { margin-bottom: 36px; }

    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .footer-social { grid-column: auto; }

    .subscribe-form { flex-direction: column; }
    .subscribe-form input[type="email"] {
        border-right: 1px solid rgba(255,255,255,.2);
        border-bottom: none;
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }
    .subscribe-form button {
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    }
}

@media (max-width: 420px) {
    .hero-title { font-size: 28px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { text-align: center; justify-content: center; }
}

/* ── Utility ──────────────────────────────────────────────── */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }

/* ============================================================
   Listing & Single Item pages
   ============================================================ */

/* ── Page hero (listing + single) ─────────────────────────── */
.page-hero {
    margin-top: var(--header-height);
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    background: var(--green-dark);
    overflow: hidden;
}
.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.page-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(15,35,20,.82) 0%,
        rgba(15,35,20,.55) 100%);
}
.page-hero-content {
    position: relative;
    z-index: 2;
    padding: 56px 0;
    width: 100%;
}
.page-hero-label {
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green-light);
    margin-bottom: 10px;
}
.page-hero h1 {
    color: var(--white);
    font-size: clamp(28px, 4vw, 48px);
    margin-bottom: 12px;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.page-hero-subtitle {
    font-family: system-ui, sans-serif;
    font-size: 16px;
    color: rgba(255,255,255,.8);
    max-width: 500px;
    line-height: 1.6;
}

/* ── Listing filter bar ────────────────────────────────────── */
.filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* Toggle button — always visible on all screen sizes */
.filter-toggle-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--green-subtle);
    border: 1px solid var(--green-pale);
    border-radius: var(--radius-sm);
    font-family: system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--green-dark);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.filter-toggle-btn:hover  { background: var(--green-pale); border-color: var(--green-mid); }
.filter-toggle-btn.open   { background: var(--green-pale); border-color: var(--green-mid); }
.filter-toggle-btn .toggle-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--green-mid);
}
.filter-toggle-btn .toggle-arrow {
    display: inline-block;
    transition: transform .25s ease;
}
.filter-toggle-btn.open .toggle-arrow { transform: rotate(180deg); }

/* Collapsible panel — hidden by default on all screen sizes */
.filter-collapsible {
    overflow: hidden;
    max-height: 0;
    transition: max-height .32s ease;
}
.filter-collapsible.open {
    max-height: 700px;
}

/* Inner layout — stacked: search on top, tags below */
.filter-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0 4px;
}
.filter-search {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 480px;
}
.filter-search input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 14px;
    font-family: system-ui, sans-serif;
    outline: none;
    transition: border-color var(--transition);
}
.filter-search input:focus { border-color: var(--green-mid); }
.filter-search button {
    padding: 9px 18px;
    background: var(--green-mid);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 14px;
    font-weight: 500;
    font-family: system-ui, sans-serif;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.filter-search button:hover { background: var(--green-dark); }

.filter-tags-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.filter-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-mid);
    background: var(--white);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}
.filter-tag:hover,
.filter-tag.active {
    background: var(--green-mid);
    border-color: var(--green-mid);
    color: var(--white);
}
.filter-clear {
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: underline;
    white-space: nowrap;
    margin-left: 4px;
}
.filter-clear:hover { color: var(--green-mid); }


/* ── Listing grid section ──────────────────────────────────── */
.listing-section {
    padding: 48px 0 64px;
}
.listing-count {
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: var(--text-mid);
    text-decoration: none;
    transition: all var(--transition);
}
.pagination-wrap a:hover { border-color: var(--green-mid); color: var(--green-mid); }
.pagination-wrap span.current {
    background: var(--green-mid);
    border-color: var(--green-mid);
    color: var(--white);
    font-weight: 600;
}
.pagination-wrap .pg-dots {
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: default;
}

/* ── Single item layout ────────────────────────────────────── */
.single-layout {
    padding: 56px 0 80px;
}
.single-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

/* Main content */
.single-main {}
.single-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-mid);
}
.single-content h2 {
    font-size: 24px;
    color: var(--green-dark);
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--green-pale);
}
.single-content h3 {
    font-size: 19px;
    color: var(--green-dark);
    margin: 28px 0 10px;
}
.single-content p {
  margin-bottom: 18px;
  text-align: justify;
  line-height: 1.5;
}
.single-content ul,
.single-content ol {
    padding-left: 24px;
    margin-bottom: 18px;
}
.single-content li { margin-bottom: 6px; }
.single-content strong, .single-content b, .single-content i { color: var(--green-dark); }
.single-content a { color: var(--green-mid); text-decoration: underline; }
.single-content blockquote {
    border-left: 4px solid var(--green-mid);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--green-pale);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--green-dark);
    font-style: italic;
}

/* Content sections */
.content-section {
    margin-bottom: 40px;
}
.content-section-title {
    font-size: 22px;
    color: var(--green-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--green-pale);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Recipe specifics */
.recipe-meta-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    background: var(--green-pale);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    margin-bottom: 32px;
    font-family: system-ui, sans-serif;
}
.recipe-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.recipe-meta-item .meta-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--green-mid);
}
.recipe-meta-item .meta-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--green-dark);
}

/* Sidebar */
.single-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}
.sidebar-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 22px;
    margin-bottom: 20px;
}
.sidebar-card-title {
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--green-mid);
    margin-bottom: 14px;
}
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sidebar-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--green-pale);
    color: var(--green-dark);
    border-radius: 12px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.sidebar-tag:hover {
    background: var(--green-mid);
    color: var(--white);
}

/* Gallery grid in sidebar */
.gallery-grid-sidebar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.gallery-grid-sidebar a {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.gallery-grid-sidebar img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}
.gallery-grid-sidebar a:hover img { transform: scale(1.05); }

/* Related items */
.related-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background var(--transition);
}
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item:first-child { padding-top: 0; }
.related-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.related-item-placeholder {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: var(--green-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.related-item-text {}
.related-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1.3;
    margin-bottom: 2px;
}
.related-item:hover .related-item-title { color: var(--green-mid); }
.related-item-sub {
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* Prev/Next navigation */
.item-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.item-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition);
    background: var(--white);
}
.item-nav-link:hover {
    border-color: var(--green-mid);
    background: var(--green-subtle);
}
.item-nav-link.next { text-align: right; }
.item-nav-label {
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.item-nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1.3;
}
.item-nav-link:hover .item-nav-title { color: var(--green-mid); }

/* Latin name */
.latin-name {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Blog post date + author */
.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,.75);
    margin-top: 12px;
}
.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Responsive additions ──────────────────────────────────── */
@media (max-width: 900px) {
    .single-grid {
        grid-template-columns: 1fr;
    }
    .single-sidebar {
        position: static;
    }
    .gallery-grid-sidebar {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 680px) {
    .filter-search { max-width: 100%; }
    .item-nav { grid-template-columns: 1fr; }
    .item-nav-link.next { text-align: left; }
    .recipe-meta-bar { gap: 16px; }
    .page-hero { min-height: 220px; }
}
/* ── Field access badges ───────────────────────────────────── */
.field-access-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 10px;
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    vertical-align: middle;
    margin-left: 8px;
    position: relative;
    top: -1px;
}
.badge-registered { background: #e8f5ee; color: #2e7d52; }
.badge-subscriber  { background: #e3f2fd; color: #1565c0; }
.badge-vip         { background: #fff3e0; color: #e65100; }

/* ============================================================
   Comments
   ============================================================ */

.comments-section {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 2px solid var(--green-pale);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
.comments-title {
    font-family: 'Georgia', serif;
    font-size: 22px;
    color: var(--green-dark);
}
.comments-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: var(--green-pale);
    color: var(--green-mid);
    border-radius: 12px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
}

/* ── Comment form ─────────────────────────────────────────── */
.comment-form-wrap {
    background: var(--green-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--green-pale);
    padding: 24px;
    margin-bottom: 36px;
}
.comment-form-title {
    font-family: system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 14px;
}

/* Mini toolbar for comment editor */
.comment-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.comment-tool-btn {
    padding: 4px 10px;
    font-size: 13px;
    font-family: system-ui, sans-serif;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    color: var(--text-mid);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1.4;
}
.comment-tool-btn:hover {
    background: var(--green-pale);
    border-color: var(--green-mid);
    color: var(--green-dark);
}

.comment-textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    resize: vertical;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.comment-textarea:focus {
    border-color: var(--green-mid);
    box-shadow: 0 0 0 3px rgba(46,125,82,.1);
}
.comment-char-count {
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
    margin-bottom: 12px;
}
.comment-char-count.warn  { color: #e67e22; font-weight: 600; }
.comment-char-count.limit { color: #e74c3c; font-weight: 600; }

.comment-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.comment-submit-btn {
    padding: 9px 22px;
    background: var(--green-mid);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.comment-submit-btn:hover { background: var(--green-dark); }
.comment-pending-note {
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.comment-login-prompt {
    padding: 20px 24px;
    background: var(--green-subtle);
    border-radius: var(--radius-md);
    border: 1px dashed var(--green-light);
    text-align: center;
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: var(--text-mid);
    margin-bottom: 32px;
}
.comment-login-prompt a { color: var(--green-mid); font-weight: 600; }

/* ── Comment list ─────────────────────────────────────────── */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comment-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.comment-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--green-pale);
    background: var(--green-pale);
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-body { flex: 1; min-width: 0; }

.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.comment-author-name {
    font-family: system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
}
.comment-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    border-radius: 8px;
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
}
.comment-date {
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.comment-content {
    font-family: system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-mid);
    word-break: break-word;
}
.comment-content a {
    color: var(--green-mid);
    text-decoration: underline;
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}
.comment-reply-btn {
    font-family: system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--green-mid);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}
.comment-reply-btn:hover { color: var(--green-dark); }

/* ── Replies ──────────────────────────────────────────────── */
.replies-wrap {
    margin-top: 16px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 2px solid var(--green-pale);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reply-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.reply-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--cream-dark);
    background: var(--cream);
}
.reply-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reply-body { flex: 1; min-width: 0; }

.replies-locked {
    margin-top: 12px;
    margin-left: 20px;
    padding: 12px 16px;
    border-left: 2px solid var(--green-pale);
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: var(--text-muted);
}
.replies-locked a { color: var(--green-mid); font-weight: 600; }

/* Inline reply form */
.reply-form-wrap {
    margin-top: 12px;
    margin-left: 20px;
    padding: 16px 20px;
    background: var(--cream);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: none;
}
.reply-form-wrap.open { display: block; }

/* Comment flash messages */
.comment-flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: system-ui, sans-serif;
    font-size: 14px;
    margin-bottom: 20px;
}
.comment-flash.success {
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    color: #155724;
}
.comment-flash.error {
    background: #fdf0f0;
    border: 1px solid #f5c6c6;
    color: #c0392b;
}
.comment-flash.pending {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #856404;
}

/* ── Pagination ───────────────────────────────────────────── */
.comment-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.comment-pagination a,
.comment-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: var(--text-mid);
    text-decoration: none;
    transition: all var(--transition);
}
.comment-pagination a:hover   { border-color: var(--green-mid); color: var(--green-mid); }
.comment-pagination span.curr { background: var(--green-mid); border-color: var(--green-mid); color: #fff; font-weight: 600; }

/* No comments state */
.no-comments {
    text-align: center;
    padding: 40px 0;
    font-family: system-ui, sans-serif;
    color: var(--text-muted);
    font-size: 15px;
}
.no-comments .nc-icon { font-size: 40px; margin-bottom: 10px; }

@media (max-width: 680px) {
    .comment-avatar { width: 36px; height: 36px; }
    .reply-avatar   { width: 30px; height: 30px; }
    .replies-wrap   { margin-left: 8px; padding-left: 12px; }
    .reply-form-wrap { margin-left: 8px; }
}

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img-wrap {
    position: relative;
    max-width: min(90vw, 1100px);
    max-height: 90vh;
    cursor: default;
}
.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10000;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10000;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,.3); }
.lightbox-caption {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-family: system-ui, sans-serif;
    font-size: 13px;
    white-space: nowrap;
}

/* Gallery thumbnails — pointer cursor to hint clickable */
.gallery-grid-sidebar a { cursor: zoom-in; }

/* ── Share buttons ─────────────────────────────────────────── */
.share-card {}
.share-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}
.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    line-height: 1.2;
    color: var(--white);
    position: relative;
}
.share-btn:hover { opacity: .88; transform: translateY(-1px); color: var(--white); }
.share-btn.done  { opacity: .55; cursor: default; }
.share-btn.done::after {
    content: '✓';
    position: absolute;
    top: 3px; right: 5px;
    font-size: 10px;
}
.share-btn svg  { flex-shrink: 0; }
.share-btn-fb   { background: #1877f2; }
.share-btn-tw   { background: #1da1f2; }
.share-btn-wa   { background: #25d366; }
.share-btn-tg   { background: #2ca5e0; }
.share-btn-pin  { background: #e60023; }
.share-btn-copy { background: var(--green-mid); }
.share-btn-copy.copied { background: var(--green-dark); }
.share-note {
    font-family: system-ui, sans-serif;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}
.share-note .pts { color: var(--green-mid); font-weight: 700; }