/* =====================================================================
   Comments — recipes theme (warm, editorial, pantry aesthetic)
   ===================================================================== */
.comments-section {
    padding: 72px 0 96px;
    background: var(--c-warm-white, #FFFAF5);
    border-top: 1px solid rgba(0,0,0,.06);
}
.comments-section .section-header { margin-bottom: 32px; }

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.comment-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 18px;
    padding: 22px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.comment-avatar {
    width: 52px; height: 52px;
    object-fit: cover;
    border-radius: 9999px;
    background: var(--c-accent, #7D8F69);
}
.comment-avatar--initial {
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    background: var(--c-primary, #C45D3A);
}
.comment-body { min-width: 0; }
.comment-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.comment-head strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text, #3D3229);
}
.comment-head time {
    font-size: 12px;
    color: var(--c-text-muted, #8A7E74);
}
.comment-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--c-text, #3D3229);
}
.comments-empty {
    margin: 20px 0 40px;
    color: var(--c-text-muted, #8A7E74);
    font-style: italic;
}

/* Comment form */
.comment-form {
    background: #fff;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.comment-form__heading {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--c-text);
}
.comment-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    color: var(--c-text);
    transition: border-color .15s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--c-primary);
}
.comment-form textarea {
    margin-bottom: 18px;
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}
.comment-form button {
    padding: 12px 28px;
    background: var(--c-primary, #C45D3A);
    color: #fff;
    border: 0;
    border-radius: 9999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.comment-form button:hover {
    background: var(--c-primary-dark, #9E4A2E);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .comment-form__row { grid-template-columns: 1fr; }
    .comment-item { grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; }
    .comment-avatar { width: 44px; height: 44px; }
}

[data-theme="dark"] .comments-section { background: #1a1511; }
[data-theme="dark"] .comment-item,
[data-theme="dark"] .comment-form { background: #24201a; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea {
    background: #1a1511;
    border-color: #3a3630;
    color: #f5ede3;
}

/* =====================================================================
   Single closer — Newsletter strip + Prev/Next pager (f2.jpg ref)
   ===================================================================== */
.single-closer { background: #fff; }

/* Newsletter band — faded food-image bg, centered card */
.single-closer__newsletter {
    position: relative;
    padding: 96px 24px;
    background-color: #F9F4EE;
    /* Softer white veil — 0.55/0.60 lets the process photo come through.
       The photo itself is the main visual; text still stays readable because
       of the inner card shadow + the lighter gradient on the text band. */
    background-image: linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.60)), var(--bg-img, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}
.single-closer__newsletter-inner {
    max-width: 640px;
    margin: 0 auto;
    background: rgba(255,255,255,0.88);
    padding: 36px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.single-closer__newsletter-title {
    font-family: var(--font-heading, Georgia, serif);
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 700;
    color: var(--c-text, #3D3229);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}
.single-closer__newsletter-body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-text, #3D3229);
    margin: 0 0 24px;
}
.single-closer__newsletter-form {
    display: inline-flex;
    align-items: stretch;
    width: 100%;
    max-width: 520px;
    border-radius: 9999px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    margin-bottom: 14px;
}
.single-closer__newsletter-form input[type="email"] {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 14px 22px;
    font-family: inherit;
    font-size: 15px;
    color: var(--c-text);
    outline: none;
}
.single-closer__newsletter-form button {
    padding: 0 28px;
    border: 0;
    background: #2ECC71;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .14em;
    cursor: pointer;
    transition: background .15s;
}
.single-closer__newsletter-form button:hover { background: #27AE60; }

.single-closer__terms {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--c-text-muted, #8A7E74);
    cursor: pointer;
}
.single-closer__terms input { accent-color: var(--c-primary, #C45D3A); }
.single-closer__terms a { color: var(--c-text, #3D3229); text-decoration: underline; }
.single-closer__terms a:hover { color: var(--c-primary, #C45D3A); }

/* Prev / Next pager */
.single-closer__pager {
    padding: 56px 0 72px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.05);
}
.single-closer__pager .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.pager-link {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--c-text, #3D3229);
    min-height: 80px;
    transition: transform .15s;
}
.pager-link:hover { transform: translateY(-2px); }
.pager-link--next { flex-direction: row-reverse; text-align: right; justify-self: end; }
.pager-link--prev { justify-self: start; }
.pager-link--disabled { pointer-events: none; opacity: 0; }

.pager-link__thumb {
    width: 80px; height: 80px;
    border-radius: 9999px;
    background-size: cover;
    background-position: center;
    background-color: var(--c-bg-alt, #F3EDE5);
    flex-shrink: 0;
}
.pager-link__thumb--empty {
    background: linear-gradient(135deg, #E5DACE, #D6C5B4);
}
.pager-link__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pager-link__kicker {
    font-size: 11px;
    letter-spacing: .2em;
    font-weight: 700;
    color: var(--c-text-muted, #8A7E74);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pager-link--next .pager-link__kicker { justify-content: flex-end; }
.pager-arrow { font-size: 14px; opacity: .7; transition: transform .15s, opacity .15s; }
.pager-link:hover .pager-arrow { opacity: 1; transform: translateX(2px); }
.pager-link--prev:hover .pager-arrow { transform: translateX(-2px); }
.pager-link__title {
    font-family: var(--font-heading, Georgia, serif);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--c-text, #3D3229);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 720px) {
    .single-closer__pager .container { grid-template-columns: 1fr; gap: 20px; }
    .pager-link,
    .pager-link--next { flex-direction: row; text-align: left; justify-self: start; }
    .pager-link--next .pager-link__kicker { justify-content: flex-start; }
    .single-closer__newsletter { padding: 64px 24px; }
    .single-closer__newsletter-form { flex-direction: column; border-radius: 8px; padding: 8px; }
    .single-closer__newsletter-form button { padding: 14px; border-radius: 6px; }
}

[data-theme="dark"] .single-closer__newsletter {
    background-color: #1a1511;
    background-image: linear-gradient(rgba(26,21,17,0.82), rgba(26,21,17,0.86)), var(--bg-img, none);
}
[data-theme="dark"] .single-closer__newsletter-title,
[data-theme="dark"] .single-closer__newsletter-body,
[data-theme="dark"] .single-closer__terms a { color: #f5ede3; }
[data-theme="dark"] .single-closer__newsletter-form {
    background: #24201a; border-color: #3a3630;
}
[data-theme="dark"] .single-closer__newsletter-form input[type="email"] { color: #f5ede3; }
[data-theme="dark"] .single-closer__pager { background: #1a1511; border-color: #2a251f; }
[data-theme="dark"] .pager-link,
[data-theme="dark"] .pager-link__title { color: #f5ede3; }

/* =====================================================================
   RECIPES dark-mode polish — catch components that hardcode light colors
   or ship their own backgrounds. Variable overrides alone can't cover
   backgrounds that use literal hex values.
   ===================================================================== */
html[data-theme="dark"] body { background: var(--c-surface) !important; color: var(--c-text) !important; }

/* Recipe sidebar cards (Stay in Touch, In This Recipe, etc.) */
html[data-theme="dark"] .single-sidebar,
html[data-theme="dark"] .recipe-sidebar,
html[data-theme="dark"] .sidebar-card,
html[data-theme="dark"] .sidebar-widget,
html[data-theme="dark"] .stay-in-touch,
html[data-theme="dark"] .toc-widget,
html[data-theme="dark"] .single-toc {
    background: var(--c-surface-alt) !important;
    border-color: var(--c-border) !important;
    color: var(--c-text) !important;
}
html[data-theme="dark"] .single-sidebar a,
html[data-theme="dark"] .sidebar-widget a,
html[data-theme="dark"] .single-toc a { color: var(--c-text-muted) !important; }
html[data-theme="dark"] .single-sidebar a:hover,
html[data-theme="dark"] .single-toc a:hover { color: var(--c-primary) !important; }

/* Nutrition card — ships with hardcoded warm-white bg */
html[data-theme="dark"] .nutrition-card,
html[data-theme="dark"] .recipe-nutrition,
html[data-theme="dark"] .nutrition-facts,
html[data-theme="dark"] .recipe-card,
html[data-theme="dark"] .ingredients-card,
html[data-theme="dark"] .instructions-card {
    background: var(--c-surface-alt) !important;
    border-color: var(--c-border) !important;
    color: var(--c-text) !important;
}
html[data-theme="dark"] .nutrition-card h3,
html[data-theme="dark"] .nutrition-card h4,
html[data-theme="dark"] .recipe-card h3,
html[data-theme="dark"] .recipe-card h4 { color: var(--c-text) !important; }
html[data-theme="dark"] .nutrition-value,
html[data-theme="dark"] .nutrition-number { color: var(--c-primary) !important; }
html[data-theme="dark"] .nutrition-cell,
html[data-theme="dark"] .nutrition-item {
    background: var(--c-surface-dark) !important;
    border-color: var(--c-border) !important;
}

/* Share / social buttons in sidebar */
html[data-theme="dark"] .share-btn,
html[data-theme="dark"] .social-icon,
html[data-theme="dark"] .sidebar-share a {
    background: var(--c-surface-dark) !important;
    border-color: var(--c-border) !important;
    color: var(--c-text) !important;
}
html[data-theme="dark"] .share-btn:hover,
html[data-theme="dark"] .sidebar-share a:hover {
    background: var(--c-primary) !important;
    border-color: var(--c-primary) !important;
    color: #fff !important;
}

/* Newsletter widget (sidebar, not the big closer band) */
html[data-theme="dark"] .newsletter-widget,
html[data-theme="dark"] .newsletter-card,
html[data-theme="dark"] .stay-in-touch {
    background: var(--c-surface-alt) !important;
    color: var(--c-text) !important;
}
html[data-theme="dark"] .newsletter-widget input,
html[data-theme="dark"] .newsletter-card input {
    background: var(--c-surface-dark) !important;
    color: var(--c-text) !important;
    border-color: var(--c-border) !important;
}
html[data-theme="dark"] .newsletter-widget input::placeholder { color: var(--c-text-soft) !important; }

/* Byline + meta */
html[data-theme="dark"] .single-title,
html[data-theme="dark"] .single-excerpt,
html[data-theme="dark"] .single-body,
html[data-theme="dark"] .single-body p,
html[data-theme="dark"] .single-body h2,
html[data-theme="dark"] .single-body h3,
html[data-theme="dark"] .single-body li,
html[data-theme="dark"] .single-body blockquote { color: var(--c-text) !important; }
html[data-theme="dark"] .single-body a { color: var(--c-primary) !important; }

/* Header + footer surfaces */
html[data-theme="dark"] .site-header { background: var(--c-surface) !important; border-bottom-color: var(--c-border-soft) !important; }
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .newsletter-strip { background: var(--c-surface-dark) !important; color: var(--c-text) !important; }

/* Category/tag chips */
html[data-theme="dark"] .category-badge,
html[data-theme="dark"] .tag-chip,
html[data-theme="dark"] .recipe-badge {
    background: var(--c-surface-alt) !important;
    border-color: var(--c-border) !important;
    color: var(--c-text-muted) !important;
}

/* Recipe card grid (homepage, archive) */
html[data-theme="dark"] .recipe-card,
html[data-theme="dark"] .post-card {
    background: var(--c-surface-alt) !important;
    border-color: var(--c-border-soft) !important;
}

/* Header nav link underlines (if any in recipes theme) */
html[data-theme="dark"] .primary-nav a,
html[data-theme="dark"] .nav-link { color: var(--c-text) !important; }
html[data-theme="dark"] .primary-nav a:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active { color: var(--c-primary) !important; }
