:root {
    --bg: #f2ede2;
    --bg-soft: #f8f3e9;
    --bg-elevated: #fbf7ee;
    --surface: #ffffff;
    --surface-soft: #f6f1e6;
    --surface-warm: #fbeadd;
    --line: #dcd0bb;
    --line-strong: #c0b199;
    --text: #1a1613;
    --text-soft: #3a322b;
    --muted: #6e6558;
    --muted-2: #8a8074;
    --accent: #b04a24;
    --accent-dark: #7a2f14;
    --accent-soft: #e88a5f;
    --sage: #4f6549;
    --shadow-sm: 0 2px 8px rgba(45, 30, 15, 0.05);
    --shadow-md: 0 12px 30px rgba(45, 30, 15, 0.08);
    --shadow-lg: 0 24px 60px rgba(45, 30, 15, 0.1);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 15% -10%, rgba(255,255,255,.85), transparent 55%),
        radial-gradient(900px 400px at 90% 5%, rgba(255, 230, 205, 0.6), transparent 60%),
        linear-gradient(180deg, #f8f3e9 0%, var(--bg) 100%);
    background-attachment: fixed;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }

.container {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: saturate(150%) blur(18px);
    -webkit-backdrop-filter: saturate(150%) blur(18px);
    background: rgba(248, 243, 233, 0.78);
    border-bottom: 1px solid rgba(192, 177, 153, 0.5);
}
.site-header-inner {
    display: grid;
    grid-template-columns: auto 1fr minmax(280px, 380px);
    gap: 28px;
    align-items: center;
    padding: 16px 0;
}
.brand-block { display: flex; flex-direction: column; gap: 2px; }
.logo {
    font-family: Georgia, "Times New Roman", "Times Cyr", serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
}
.brand-tagline {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}
.site-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--text-soft);
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,0.75); }

.search-form { position: relative; }
.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    min-height: 50px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.search-input-wrap:focus-within {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(176, 74, 36, 0.12), var(--shadow-sm);
}
.search-icon {
    color: var(--muted);
    font-size: 18px;
}
.search-form input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0;
    font-size: 15px;
}
.search-form input::placeholder { color: var(--muted-2); }
.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 40;
}
.search-results a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
}
.search-results a:hover { background: var(--surface-soft); }
.search-results .empty { padding: 14px; color: var(--muted); font-size: 14px; }

.site-main { padding: 40px 0 72px; flex: 1; }
.site-footer {
    border-top: 1px solid rgba(192, 177, 153, 0.5);
    background: rgba(255, 255, 255, 0.5);
    margin-top: auto;
}
.site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 0 40px;
}
.footer-brand {
    font-family: "Spectral", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.footer-text, .footer-links a { color: var(--muted); font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; align-content: flex-start; }
.footer-links a:hover { color: var(--text); }

/* ---------- Typography helpers ---------- */
.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--sage);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}
.text-link {
    font-weight: 600;
    color: var(--accent-dark);
    border-bottom: 1px dashed transparent;
    transition: border-color .2s var(--ease);
}
.text-link:hover { border-color: var(--accent-dark); }
.muted, .section-note, .card-footer-line, .rating-summary { color: var(--muted); }

/* ---------- Hero ---------- */
.hero-home {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 40px;
}
.hero-home-empty {
    grid-template-columns: 1fr;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}
.hero-home-empty .hero-copy {
    text-align: center;
}
.hero-home-empty .hero-copy h1,
.hero-home-empty .hero-copy p {
    margin-left: auto;
    margin-right: auto;
}
.hero-home-empty .hero-actions {
    justify-content: center;
}
.hero-copy,
.feature-card,
.surface-card,
.empty-state-card,
.recipe-hero-card,
.ingredients-box,
.card,
.catalog-hero {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(192, 177, 153, 0.55);
    box-shadow: var(--shadow-md);
}
.hero-copy { padding: 44px; border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.hero-copy::before {
    content: "";
    position: absolute;
    inset: auto -60px -100px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 138, 95, 0.25), transparent 70%);
    pointer-events: none;
}
.hero-copy h1,
.recipe-hero-copy h1,
.section-head h1,
.section-head h2,
.empty-state-card h2 {
    font-family: Georgia, "Times New Roman", "Times Cyr", serif;
    letter-spacing: -0.035em;
    line-height: 1.02;
    margin: 0;
    color: var(--text);
    font-weight: 700;
}
.hero-copy h1 {
    font-size: clamp(42px, 6.2vw, 68px);
    max-width: 12ch;
    margin-bottom: 22px;
}
.hero-copy p {
    max-width: 56ch;
    font-size: 18px;
    color: var(--text-soft);
    margin: 0 0 28px;
    line-height: 1.55;
}
.hero-actions,
.recipe-actions,
.rating-stars,
.ingredients-header,
.cooking-mode-head,
.cooking-controls,
.section-head,
.meta-pills,
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.hero-actions { margin-bottom: 8px; }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    transition: transform .15s var(--ease),
                background-color .2s var(--ease),
                color .2s var(--ease),
                border-color .2s var(--ease),
                box-shadow .2s var(--ease);
}
.button:hover, .star-button:hover, .page-link:hover, .chip:hover { transform: translateY(-1px); }
.button-primary {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
    box-shadow: 0 8px 24px rgba(26, 22, 19, 0.18);
}
.button-primary:hover { background: #000; box-shadow: 0 12px 30px rgba(26, 22, 19, 0.25); }
.button-ghost, .star-button {
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
}
.button.is-active, .star-button.is-active {
    background: var(--surface-warm);
    border-color: var(--accent-soft);
    color: var(--accent-dark);
}

.hero-stats {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.stat-card {
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: rgba(246, 241, 230, 0.75);
    border: 1px solid rgba(192, 177, 153, 0.55);
}
.stat-card strong { display: block; font-size: 24px; line-height: 1.1; margin-bottom: 6px; letter-spacing: -0.02em; }
.stat-card span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }

.feature-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-image.placeholder { background: linear-gradient(135deg, #ecd6bd, #f6ebd9 55%, #d5dfcd); }
.feature-body { padding: 26px; }
.feature-body .eyebrow { margin-bottom: 8px; }
.feature-body h2 {
    font-family: "Spectral", Georgia, serif;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.08;
    margin: 0 0 14px;
    letter-spacing: -0.03em;
}
.feature-body a { color: var(--text); }
.feature-body a:hover { color: var(--accent-dark); }

/* ---------- Sections ---------- */
.section-block { margin-top: 40px; }
.section-head { justify-content: space-between; margin-bottom: 22px; align-items: end; }
.section-head-tight { margin-bottom: 16px; }
.section-head-stack { align-items: flex-start; }
.section-head h1 { font-size: clamp(36px, 4.6vw, 54px); }
.section-head h2 { font-size: clamp(28px, 3.2vw, 40px); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chips-large .chip { min-height: 52px; padding: 0 20px; font-size: 15px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(192, 177, 153, 0.7);
    padding: 10px 16px;
    color: var(--text-soft);
    transition: transform .15s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { border-color: var(--accent-soft); color: var(--accent-dark); background: #fff; }
.chip-label { font-weight: 600; }
.chip-count {
    min-width: 28px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- Cards ---------- */
.grid.cards { display: grid; gap: 22px; }
.cards-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.recipe-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 0;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.recipe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-media-link { display: block; overflow: hidden; }
.card-media-link .card-image { transition: transform .5s var(--ease); }
.recipe-card:hover .card-media-link .card-image { transform: scale(1.04); }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.card h2, .card h3 {
    font-family: "Spectral", Georgia, serif;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
    font-weight: 700;
}
.card h2 { font-size: 26px; }
.card h3 { font-size: 22px; }
.card h2 a, .card h3 a { color: var(--text); transition: color .2s var(--ease); }
.card h2 a:hover, .card h3 a:hover { color: var(--accent-dark); }

.card-image, .recipe-main-image, .placeholder {
    width: 100%;
    object-fit: cover;
}
.card-image { aspect-ratio: 16 / 11; }
.recipe-main-image { aspect-ratio: 5 / 4; border-radius: var(--radius-lg); }
.placeholder {
    aspect-ratio: 16 / 11;
    background: linear-gradient(135deg, #eed3b5, #f4e6d1 55%, #d9e3d1);
}
.card-footer-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    padding-top: 4px;
    border-top: 1px dashed rgba(192, 177, 153, 0.45);
}

/* ---------- Meta pills ---------- */
.meta-pills span, .page-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid rgba(192, 177, 153, 0.6);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
}
.meta-pills-small span { min-height: 30px; font-size: 13px; padding: 0 12px; }
.meta-pills-large span {
    min-height: 42px;
    padding: 0 18px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.85);
}

.search-hero { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(251,234,221,.85)); border-left: 4px solid var(--accent); }
.search-hero h1 { color: var(--accent-dark); }

/* ---------- Surfaces ---------- */
.catalog-hero,
.search-hero,
.empty-state-card,
.surface-card,
.ingredients-box,
.recipe-hero-card {
    border-radius: var(--radius-xl);
    padding: 32px;
}
.empty-state-card { text-align: center; padding: 48px 32px; }
.empty-state-card h2 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 8px; }
.empty-state-card p { max-width: 48ch; margin: 6px auto 24px; color: var(--muted); font-size: 16px; }
.empty-state-search {
    max-width: 520px;
    margin: 0 auto 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}
.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
@media (max-width: 560px) {
    .empty-state-search { grid-template-columns: 1fr; }
}

/* ---------- Recipe page ---------- */
.recipe-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 32px;
    margin-bottom: 24px;
    align-items: center;
}
.recipe-hero-copy { display: flex; flex-direction: column; justify-content: center; }
.recipe-hero-copy h1 { font-size: clamp(38px, 5.2vw, 60px); margin-bottom: 16px; }
.recipe-excerpt { margin: 0 0 22px; font-size: 19px; color: var(--text-soft); max-width: 52ch; }
.recipe-hero-media .recipe-main-image { box-shadow: var(--shadow-md); }

.recipe-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}
.recipe-aside { position: relative; }
.ingredients-sticky { position: sticky; top: 96px; }
.ingredients-header { justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 16px; }
.servings-label { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 500; }
.servings-label input {
    width: 82px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    text-align: center;
    font-weight: 600;
}
.ingredients-list-clean, .tips-list, .faq-list, .steps-list-modern {
    margin: 0; padding: 0; list-style: none;
}
.ingredients-list-clean li {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid rgba(192, 177, 153, 0.4);
    font-size: 15px;
}
.ingredients-list-clean li:last-child { border-bottom: 0; padding-bottom: 0; }
.ingredient-amount, .ingredient-unit {
    color: var(--accent-dark);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ingredient-name { font-weight: 500; color: var(--text); }

.steps-list-modern { display: grid; gap: 16px; }
.recipe-step-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 22px;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    border: 1px solid rgba(192, 177, 153, 0.45);
    transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.recipe-step-item:hover { border-color: var(--accent-soft); }
.step-number {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--text);
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    font-family: "Spectral", Georgia, serif;
}
.step-text { font-size: 17px; line-height: 1.65; color: var(--text-soft); padding-top: 12px; }

.tips-list { display: grid; gap: 12px; }
.tips-list li, .faq-item {
    padding: 20px 22px;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    border: 1px solid rgba(192, 177, 153, 0.45);
    font-size: 16px;
    line-height: 1.6;
}
.faq-list { display: grid; gap: 12px; }
.faq-item h3 {
    margin: 0 0 10px;
    font-family: "Spectral", Georgia, serif;
    font-size: 22px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.faq-item p { margin: 0; color: var(--text-soft); }

.rating-summary { margin: 0 0 14px; font-size: 15px; }
.rating-summary strong { color: var(--text); font-size: 20px; font-weight: 700; }
.star-button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--text-soft);
    font-weight: 600;
    font-size: 14px;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.star-button:hover { background: var(--surface-warm); border-color: var(--accent-soft); color: var(--accent-dark); }
.star-button.is-selected {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.star-button:disabled { opacity: .6; cursor: not-allowed; }
.star-button:disabled.is-selected { opacity: 1; }
.success { color: #256a38; }
.error { color: #a3362f; }

.cooking-step-card {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
    border: 1px solid rgba(192, 177, 153, 0.55);
    font-size: 22px;
    line-height: 1.7;
    color: var(--text);
}
.recipe-page.is-cooking-mode .no-print { display: none !important; }

.pagination { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 6px; }
.page-link {
    color: var(--text-soft);
    font-weight: 600;
    padding: 0 16px;
    min-height: 40px;
    transition: transform .15s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.page-link.is-current {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.page-link:not(.is-current):hover { background: #fff; border-color: var(--accent-soft); color: var(--accent-dark); }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 4px 0 20px;
    color: var(--muted);
    font-size: 13px;
}
.breadcrumbs a { color: var(--muted); transition: color .2s var(--ease); }
.breadcrumbs a:hover { color: var(--accent-dark); }

.related-section { margin-top: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
    .site-header-inner { grid-template-columns: 1fr 1fr; gap: 16px 24px; }
    .site-header-inner .search-form { grid-column: 1 / -1; }
    .site-nav { justify-content: flex-start; }
    .hero-home,
    .recipe-hero-card,
    .recipe-layout { grid-template-columns: 1fr; }
    .cards-home { grid-template-columns: repeat(3, 1fr); }
    .cards-catalog { grid-template-columns: repeat(2, 1fr); }
    .ingredients-sticky { position: static; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
    .container { width: min(100%, calc(100% - 24px)); }
    .site-header-inner { padding: 12px 0; gap: 12px; }
    .brand-tagline { display: none; }
    .site-nav { gap: 6px; }
    .site-nav a { padding: 7px 10px; font-size: 14px; }
    .hero-copy,
    .catalog-hero,
    .empty-state-card,
    .surface-card,
    .ingredients-box,
    .recipe-hero-card { padding: 24px; border-radius: 22px; }
    .hero-copy { padding: 30px 24px; }
    .cards-home, .cards-catalog { grid-template-columns: repeat(2, 1fr); }
    .card h2, .card h3, .faq-item h3 { font-size: 20px; }
    .recipe-step-item { grid-template-columns: 44px 1fr; padding: 16px 18px; gap: 14px; }
    .step-number { width: 44px; height: 44px; font-size: 15px; }
    .step-text { padding-top: 6px; font-size: 16px; }
    .site-footer-inner { flex-direction: column; padding: 24px 0 32px; }
    .hero-stats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .logo { font-size: 26px; }
    .site-header-inner { grid-template-columns: 1fr; }
    .cards-home, .cards-catalog { grid-template-columns: 1fr; }
    .hero-copy h1, .recipe-hero-copy h1, .section-head h1, .section-head h2 { line-height: 1.08; }
    .hero-copy p, .recipe-excerpt, .cooking-step-card { font-size: 16px; }
    .search-input-wrap { min-height: 46px; }
    .button { min-height: 44px; padding: 0 18px; font-size: 14px; }
    .ingredients-list-clean li { grid-template-columns: 1fr; gap: 2px; padding: 10px 0; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}


/* ---------- September fixes ---------- */
.site-nav-button,
.footer-link-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: rgba(255,255,255,0.65);
    color: var(--text-soft);
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
}
.site-nav-button:hover,
.footer-link-button:hover { color: var(--text); background: rgba(255,255,255,0.9); }
.footer-link-button { padding: 0; background: transparent; }
.footer-link-button:hover { background: transparent; }
.chip.is-active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}
.chip.is-active .chip-count { background: rgba(255,255,255,0.14); color: #fff; }
.section-block-tight { margin-top: 20px; }
.card-media-link,
.recipe-hero-media,
.feature-card > a { background: var(--surface-soft); }
.feature-image,
.card-image,
.recipe-main-image {
    display: block;
    object-fit: contain;
    background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
}
.card-image,
.feature-image { padding: 10px; }
.recipe-main-image { padding: 12px; }
.recipe-category-chips { margin-top: 16px; }
.ingredients-list-clean li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}
.ingredient-name {
    font-weight: 600;
    color: var(--text);
    min-width: 0;
}
.ingredient-meta {
    color: var(--accent-dark);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    justify-self: end;
    white-space: nowrap;
}
.favorites-drawer {
    position: fixed;
    inset: 0;
    z-index: 80;
}
.favorites-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 22, 19, 0.36);
    backdrop-filter: blur(2px);
}
.favorites-panel {
    position: absolute;
    right: 16px;
    top: 16px;
    bottom: 16px;
    width: min(560px, calc(100vw - 32px));
    overflow: auto;
    box-shadow: var(--shadow-lg);
}
.favorites-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 20px;
}
.favorites-list {
    display: grid;
    gap: 14px;
}
.favorites-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(192, 177, 153, 0.45);
}
.favorites-card-media { display: block; }
.favorites-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    display: block;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, var(--surface-soft) 100%);
    padding: 8px;
}
.favorites-card-body { display: grid; gap: 10px; align-content: start; }
.favorites-card-body h3 { margin: 0; font-size: 22px; }
.favorites-empty,
.favorites-loading {
    padding: 24px;
    text-align: center;
    color: var(--muted);
}
body.favorites-open { overflow: hidden; }
@media (max-width: 820px) {
    .site-nav a,
    .site-nav-button { padding: 7px 10px; font-size: 14px; }
    .favorites-panel {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 12px;
        width: auto;
        max-height: calc(100vh - 24px);
    }
    .favorites-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ingredients-list-clean li { grid-template-columns: 1fr auto; gap: 12px; }
    .ingredient-meta { font-size: 14px; }
}


/* ---------- v6 modern redesign ---------- */
.recipe-card {
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(26, 22, 19, 0.14);
}
.card-title {
    font-size: 21px;
    line-height: 1.25;
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent-dark); }
.card-meta-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
}
.meta-icon { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.meta-icon i { font-style: normal; font-size: 15px; line-height: 1; }
.meta-rating { letter-spacing: 1px; }
.star { font-size: 17px; line-height: 1; }
.star-full { color: #e8a020; }
.star-empty { color: #ddd3c2; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    padding: 16px 18px;
    margin: 0 0 14px;
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.filter-field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; flex: 0 1 auto; }
.filter-field > span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    color: var(--muted);
}
.filter-field input,
.filter-field select {
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
}
.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(176, 74, 36, 0.12);
}
.filter-apply { min-height: 42px; padding: 0 20px; font-size: 14px; }
.sort-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--muted);
}
.sort-link {
    color: var(--text-soft);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    padding-bottom: 1px;
}
.sort-link:hover { color: var(--accent-dark); }
.sort-link.is-active {
    color: var(--accent-dark);
    font-weight: 700;
    border-bottom-color: var(--accent-soft);
}
.catalog-chips { margin-bottom: 22px; }

.header-tools { display: flex; align-items: center; gap: 12px; }
.search-input-icon {
    min-height: 46px;
    padding: 0 14px;
}
.search-input-icon input { width: 170px; }
.favorites-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.95);
    color: var(--text-soft);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: color .2s var(--ease), transform .15s var(--ease);
}
.favorites-icon-button:hover { color: var(--accent); transform: translateY(-1px); }
.favorites-icon-button.has-items { color: var(--accent); }
.favorites-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(176,74,36,.4);
}
.favorites-badge.is-visible { display: inline-flex; }

.recipe-hero-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 6px 0 14px;
}
.rating-stars-inline { display: inline-flex; align-items: center; gap: 10px; }
.rating-stars-view { display: inline-flex; gap: 2px; }
.rating-stars-input { display: inline-flex; gap: 2px; }
.star-button-icon {
    background: none;
    border: none;
    padding: 2px;
    font-size: 22px;
    line-height: 1;
    color: #ddd3c2;
    cursor: pointer;
    transition: color .15s var(--ease), transform .15s var(--ease);
    box-shadow: none;
    min-height: 0;
}
.star-button-icon:hover,
.star-button-icon.is-selected { color: #e8a020; transform: scale(1.12); }
.rating-stars.is-disabled .star-button-icon { cursor: default; opacity: .55; }
.rating-value { font-size: 17px; color: var(--text); }
.rating-message-inline { margin: 0 0 10px; font-size: 13px; }
.favorite-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: #b9ac97;
    cursor: pointer;
    transition: color .2s var(--ease), transform .15s var(--ease), border-color .2s var(--ease);
}
.favorite-heart:hover { color: var(--accent); transform: scale(1.06); }
.favorite-heart.is-active { color: var(--accent); border-color: var(--accent-soft); }
.favorite-heart.is-active svg { fill: var(--accent); }

.recipe-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 16px 0 4px;
    padding: 14px 18px;
    background: var(--surface-soft);
    border-radius: 14px;
    font-size: 14px;
    color: var(--text-soft);
}
.fact { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fact i { font-style: normal; font-size: 16px; }
.fact b { color: var(--text); font-variant-numeric: tabular-nums; }
.fact-nutri { color: var(--muted); }

.ingredients-wide { margin-bottom: 28px; }
.ingredients-table {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
}
.ingredients-table li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: baseline;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--line);
}
.ingredients-table .ingredient-name { font-weight: 500; color: var(--text); }
.ingredients-table .ingredient-meta {
    color: var(--accent-dark);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .ingredients-table { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-field { min-width: 0; }
    .search-input-icon input { width: 110px; }
    .recipe-facts { gap: 8px 14px; padding: 12px 14px; }
}

/* ---------- September hotfixes 2 ---------- */
.catalog-notice {
    margin: 14px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(176, 74, 36, 0.08);
    border: 1px solid rgba(176, 74, 36, 0.16);
    color: var(--accent-dark);
}
.rating-stars-inline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.rating-stars-input {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.star-button-icon {
    min-height: auto;
    min-width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #cfc8bb;
    font-size: 28px;
    line-height: 1;
    border-radius: 0;
    box-shadow: none;
    transition: color .18s var(--ease), transform .18s var(--ease);
}
.star-button-icon:hover,
.star-button-icon:focus-visible,
.star-button-icon.is-selected {
    background: transparent;
    border: 0;
    color: #e0a126;
    transform: translateY(-1px);
}
.rating-stars.is-disabled .star-button-icon {
    cursor: default;
    opacity: 1;
}
.rating-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    min-width: 40px;
}
.recipe-hero-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px;
}
.legal-page h1 {
    font-size: clamp(36px, 4.8vw, 54px);
    margin-bottom: 6px;
}
.legal-card {
    display: block;
}
.legal-sections {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}
.legal-sections section {
    padding: 22px 24px;
    border-radius: var(--radius-md);
    background: rgba(246, 241, 230, 0.76);
    border: 1px solid rgba(192, 177, 153, 0.45);
}
.legal-sections h2 {
    margin: 0 0 10px;
    font-family: "Spectral", Georgia, serif;
    font-size: 26px;
    line-height: 1.15;
}
.legal-sections p,
.legal-list {
    margin: 0;
    color: var(--text-soft);
    font-size: 16px;
}
.legal-list {
    padding-left: 18px;
}
.contact-form {
    display: grid;
    gap: 14px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.field {
    display: grid;
    gap: 8px;
}
.field span {
    font-weight: 600;
    color: var(--text-soft);
}
.field input,
.field textarea,
.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    outline: none;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea {
    resize: vertical;
    min-height: 180px;
}
.field input:focus,
.field textarea:focus,
.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 4px rgba(176, 74, 36, 0.12);
}
.alert {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 500;
}
.alert-success {
    background: rgba(37, 106, 56, 0.08);
    border-color: rgba(37, 106, 56, 0.18);
    color: #256a38;
}
.alert-error {
    background: rgba(163, 54, 47, 0.08);
    border-color: rgba(163, 54, 47, 0.18);
    color: #a3362f;
}
.form-note {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
@media (max-width: 820px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}


/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 0 16px 16px; pointer-events: none; }
.cookie-banner-inner { pointer-events: auto; max-width: 720px; margin: 0 auto; display: flex; gap: 16px; align-items: center; padding: 16px 20px; background: var(--surface, #fff); border-radius: 16px; box-shadow: 0 12px 32px rgba(23, 18, 12, .18); }
.cookie-banner-inner p { margin: 0; font-size: 14px; line-height: 1.5; }
.cookie-banner-inner .button { flex-shrink: 0; }
@media (max-width: 560px) { .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; } }

/* ---------- Consent checkbox ---------- */
.field-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; margin: 12px 0 4px; }
.field-consent input { margin-top: 3px; flex-shrink: 0; }


/* ---------- Header category dropdown ---------- */
.site-header-inner { display: flex; align-items: center; gap: 18px; }
.header-cat-dropdown { position: relative; flex-shrink: 0; }
.cat-dropdown-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--border, #d9d2c5); border-radius: 999px; background: var(--surface, #fff); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cat-dropdown-toggle:hover { border-color: var(--accent, #b04a24); }
.cat-dropdown-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 80; min-width: 260px; max-height: 70vh; overflow-y: auto; display: none; flex-direction: column; padding: 8px; background: var(--surface, #fff); border: 1px solid var(--border, #e3dccc); border-radius: 14px; box-shadow: 0 16px 40px rgba(23, 18, 12, .16); }
.cat-dropdown-menu.is-open { display: flex; }
.cat-dropdown-menu a { padding: 9px 12px; border-radius: 8px; text-decoration: none; color: inherit; font-size: 14px; }
.cat-dropdown-menu a:hover { background: rgba(176, 74, 36, .08); }
.cat-dropdown-menu .cat-dropdown-all { font-weight: 700; }
.header-tools { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.header-tools .search-form { flex: 1 1 auto; min-width: 160px; }
.header-tools .search-form input { width: 100%; }

/* ---------- Live search items with thumbnails ---------- */
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 85; background: var(--surface, #fff); border: 1px solid var(--border, #e3dccc); border-radius: 12px; box-shadow: 0 14px 34px rgba(23, 18, 12, .16); overflow-y: auto; max-height: 60vh; }
.search-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; text-decoration: none; color: inherit; }
.search-item:hover { background: rgba(176, 74, 36, .07); }
.search-thumb { width: 44px; height: 44px; flex-shrink: 0; object-fit: cover; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #f2ede2; font-size: 20px; }
.search-item-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.search-item-title { font-size: 14px; line-height: 1.3; }
.search-item-meta { font-size: 12px; color: var(--muted, #777); white-space: nowrap; }
.search-empty { padding: 12px; font-size: 14px; color: var(--muted, #777); }
.search-form { position: relative; }

/* ---------- Contact form layout fix ---------- */
.contact-form .field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.contact-form .field > span { font-size: 13px; font-weight: 600; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border, #d9d2c5); border-radius: 10px; font: inherit; background: #fff; }
.contact-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .field-consent { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 14px; line-height: 1.45; font-weight: 400; margin: 4px 0 16px; }
.contact-form .field-consent input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
@media (max-width: 560px) { .contact-form .form-grid { grid-template-columns: 1fr; } }

/* ---------- Header not sticky on smartphones ---------- */
@media (max-width: 860px) {
  .site-header { position: static !important; top: auto !important; }
  .site-header-inner { flex-wrap: wrap; }
  .header-tools { order: 3; flex-basis: 100%; }
}


/* ---------- Category dropdown: no page overflow on mobile ---------- */
.cat-dropdown-menu { max-width: calc(100vw - 32px); }
@media (max-width: 860px) {
  .site-header-inner { position: relative; }
  .header-cat-dropdown { position: static; }
  .cat-dropdown-menu { left: 12px; right: 12px; min-width: 0; }
}


/* ---------- Footer second row ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links-second { margin-top: 8px; font-size: 13px; opacity: .8; }

/* ---------- Themed 404 ---------- */
.error-404-hero { text-align: center; }
.error-404-icon { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.error-404-hero .empty-state-search { margin: 18px auto 0; max-width: 460px; display: flex; gap: 10px; }


/* ---------- Footer link-button must look like a plain link ---------- */
.footer-link-button { font-weight: 400 !important; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
