/* Щипка сол — mobile-first stylesheet */

:root {
    --red: #e2231a;
    --red-dark: #b9160f;
    --red-soft: #fdecea;
    --ink: #2a2321;
    --muted: #6e625c;
    --line: #ece3dc;
    --bg: #fffdfb;
    --surface: #ffffff;
    --tint: #f8f2ec;
    --gold: #f2a900;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(42, 35, 33, .06), 0 6px 20px rgba(42, 35, 33, .07);
    --shadow-hover: 0 2px 4px rgba(42, 35, 33, .08), 0 14px 32px rgba(42, 35, 33, .12);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: Georgia, "Times New Roman", serif;
    --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font: 16px/1.6 var(--font);
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.7rem); }
h3 { font-size: 1.1rem; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(226, 35, 26, .45); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    min-height: 44px; padding: 0 18px; border-radius: 999px;
    border: 1.5px solid transparent; background: none; cursor: pointer;
    font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--red); color: var(--red-dark); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--red-dark); background: var(--red-soft); }
.btn-block { display: flex; width: 100%; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 253, 251, .92);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { text-decoration: none; display: inline-flex; }
.logo { display: inline-flex; align-items: stretch; font: 600 1.3rem/1 var(--font); letter-spacing: .01em; }
.logo-a { background: var(--red); color: #fff; padding: 6px 9px 7px; border-radius: 4px 0 0 4px; }
.logo-b { color: #6b6b6b; padding: 6px 8px 7px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
    padding: 8px 10px; border-radius: 8px; text-decoration: none;
    color: var(--ink); font-weight: 500; font-size: .95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--red-dark); background: var(--red-soft); }
.header-search { display: none; }
@media (max-width: 520px) {
    .logo { font-size: 1.12rem; }
    .nav a[href="/#kategorii"] { display: none; }
    .nav { margin-left: auto; }
    .nav a { padding: 8px; font-size: .9rem; }
    .header-search {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 50%; color: var(--ink);
    }
    .header-search:hover { background: var(--red-soft); color: var(--red-dark); }
    .header-search svg { width: 22px; height: 22px; }
}

/* ---------- hero & search ---------- */
.hero {
    position: relative; color: #fff;
    background: linear-gradient(180deg, rgba(25, 15, 10, .55), rgba(25, 15, 10, .72)), url('/images/hero.jpg') center / cover;
    padding: 44px 0 36px;
    scroll-margin-top: 60px;
}
.hero h1 { color: #fff; margin-bottom: .3em; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.hero-sub { margin: 0 0 22px; font-size: 1.05rem; opacity: .92; }
@media (min-width: 768px) {
    .hero { padding: 84px 0 72px; text-align: center; }
    .hero-sub { font-size: 1.15rem; }
    .hero .search { margin: 0 auto; }
}

.search { max-width: 860px; }
.search-main {
    display: flex; gap: 6px; padding: 6px;
    background: var(--surface); border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.search-main input {
    flex: 1; min-width: 0; border: 0; background: none; outline: none;
    padding: 0 14px; font-size: 1.05rem; color: var(--ink);
}
.search-main input::placeholder { color: #9a8f89; }
.search-main input::-webkit-search-cancel-button { cursor: pointer; }
.search-main .btn { padding: 0 20px; }
@media (max-width: 420px) {
    .search-main .btn span { display: none; }
    .search-main .btn { width: 46px; padding: 0; }
}
.search-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
@media (min-width: 768px) { .search-filters { grid-template-columns: repeat(4, 1fr); } }
.search-filters select, .results-tools select {
    width: 100%; min-height: 42px; padding: 0 34px 0 14px;
    border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 14px no-repeat;
    color: #fff; font-size: .92rem; appearance: none; -webkit-appearance: none; cursor: pointer;
    text-overflow: ellipsis;
}
.search-filters select option { color: var(--ink); }
.search-filters select.is-set { background-color: rgba(226, 35, 26, .85); border-color: transparent; }

.search-inline .search-main { box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ---------- sections ---------- */
.section { padding: 40px 0; }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: 20px; }
.section-head h2 { margin-bottom: .15em; }
.section-head p { margin: 0; color: var(--muted); }
@media (min-width: 768px) {
    .section { padding: 60px 0; }
    .section-head { text-align: center; margin-bottom: 32px; }
}
.section.wrap, .results.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.cat {
    position: relative; display: block; overflow: hidden; border-radius: var(--radius);
    aspect-ratio: 4 / 3; color: #fff; text-decoration: none; background: #3a2c26;
    box-shadow: var(--shadow);
}
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .7)); }
.cat-text { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; }
.cat-name { font: 700 1.15rem/1.2 var(--font-head); }
.cat-count { font-size: .85rem; opacity: .9; }
.cat:hover { color: #fff; }
.cat:hover img { transform: scale(1.06); }

/* ---------- recipe cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
    color: var(--ink); text-decoration: none; transition: box-shadow .2s, transform .2s;
}
.card:hover { color: var(--ink); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.card-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red-dark); }
.card-title { font: 700 1rem/1.3 var(--font-head); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 4px; font-size: .82rem; color: var(--muted); }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-rating svg { fill: var(--gold); stroke: var(--gold); }
@media (min-width: 720px) {
    .card-body { padding: 12px 16px 16px; }
    .card-title { font-size: 1.08rem; }
}

/* ---------- search results ---------- */
.results { padding-top: 28px; padding-bottom: 40px; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.results-bar h2 { margin: 0; }
.results-tools { display: flex; gap: 8px; align-items: center; }
.results-tools select {
    width: auto; border-color: var(--line); color: var(--ink); background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a2321' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.empty { padding: 30px; text-align: center; color: var(--muted); background: var(--tint); border-radius: var(--radius); }
.more { text-align: center; margin-top: 26px; }
.results-loading .grid { opacity: .5; }

/* ---------- breadcrumbs, tags, chips ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 18px 0 14px; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: #b9aea7; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red-dark); text-decoration: underline; }
.crumbs li[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag, .chip {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    background: var(--red-soft); color: var(--red-dark); text-decoration: none;
    font-size: .82rem; font-weight: 600;
}
.tag:hover, .chip:hover { background: var(--red); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0; margin: 0 calc(var(--gutter) * -1) 4px; padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 7px 14px; font-size: .9rem; }
.chip[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- category page ---------- */
.cat-hero {
    color: #fff; padding: 4px 0 28px;
    background: linear-gradient(180deg, rgba(25, 15, 10, .6), rgba(25, 15, 10, .8)), var(--cat-img) center / cover #3a2c26;
}
.cat-hero h1 { color: #fff; margin-bottom: .2em; }
.cat-hero p { margin: 0; opacity: .9; }
.cat-hero .crumbs ol, .cat-hero .crumbs a { color: rgba(255, 255, 255, .8); }
.cat-hero + .wrap { padding-bottom: 50px; }
@media (min-width: 768px) { .cat-hero { padding: 10px 0 44px; } }

/* ---------- recipe page ---------- */
.recipe { padding-bottom: 50px; }
.recipe-head h1 { margin-bottom: .35em; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0 0 18px; color: var(--muted); font-size: .92rem; }
.byline > span, .byline-rating { display: inline-flex; align-items: center; gap: 6px; }
.byline-rating { color: var(--muted); text-decoration: none; }
.recipe-layout { display: grid; gap: 28px; }
@media (min-width: 960px) {
    .recipe-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; }
    .recipe-aside { position: sticky; top: 80px; align-self: start; }
}
.recipe-photo { margin: 0 calc(var(--gutter) * -1); background: var(--tint); }
.recipe-photo img { width: 100%; max-height: 72vh; object-fit: cover; aspect-ratio: 4 / 3; }
@media (min-width: 640px) {
    .recipe-photo { margin: 0; border-radius: var(--radius); overflow: hidden; }
}
.gallery { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; }
.gallery-thumb { flex: none; width: 92px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .7; }
.gallery-thumb img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-thumb.is-active, .gallery-thumb:hover { border-color: var(--red); opacity: 1; }

.facts {
    list-style: none; padding: 0; margin: 18px 0 0;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 640px) { .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.facts li { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--tint); border-radius: var(--radius-sm); line-height: 1.3; font-weight: 600; font-size: .95rem; }
.facts svg { width: 22px; height: 22px; color: var(--red); }
.facts small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }

.recipe-section { margin-top: 34px; }
.recipe-section h2 { padding-bottom: 10px; border-bottom: 2px solid var(--line); position: relative; }
.recipe-section h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--red); }
.products { list-style: none; padding: 0; margin: 0; }
.products li { border-bottom: 1px dashed var(--line); }
.products label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; cursor: pointer; }
.products input {
    appearance: none; -webkit-appearance: none; flex: none;
    width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid #cdbfb6; border-radius: 6px; cursor: pointer;
    display: grid; place-content: center; transition: background .15s, border-color .15s;
}
.products input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.products input:checked { background: var(--red); border-color: var(--red); }
.products input:checked::after { opacity: 1; }
.products input:checked + span { color: #a59a94; text-decoration: line-through; }
.prep p { margin: 0 0 1em; font-size: 1.04rem; line-height: 1.75; }
.notes { margin-top: 20px; padding: 16px 18px; background: #fff8e6; border-left: 4px solid var(--gold); border-radius: var(--radius-sm); }
.notes h3 { margin-bottom: .3em; }
.notes p:last-child { margin-bottom: 0; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.stars { position: relative; display: inline-block; width: 86px; height: 16px; vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e4dad3' d='m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z'/%3E%3C/svg%3E") 0 0 / 17.2px 16px repeat-x; }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2a900' d='m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z'/%3E%3C/svg%3E") 0 0 / 17.2px 16px repeat-x; }

.reviews .count { color: var(--muted); font-weight: 400; }
.review { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review header > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.3; margin-right: auto; }
.review time { font-size: .82rem; color: var(--muted); }
.review p { margin: 0 0 .5em; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red-dark); font-weight: 700; flex: none; }

.related h2 { font-size: 1.2rem; }
.related-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
@media (min-width: 720px) and (max-width: 959px) { .related-list { grid-template-columns: repeat(4, 1fr); } }

.ad { margin: 0 0 28px; padding: 10px; background: var(--tint); border-radius: var(--radius-sm); text-align: center; min-height: 120px; }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }

/* ---------- about / 404 ---------- */
.prose { max-width: 760px; padding-bottom: 40px; font-size: 1.06rem; }
.prose p { margin: 0 0 1em; }
.not-found { text-align: center; padding-top: 40px; }
.not-found .big { font: 700 5rem/1 var(--font-head); color: var(--red); margin: 0 0 10px; }
.not-found .search { margin: 24px auto 0; text-align: left; }

/* ---------- footer ---------- */
.site-footer { background: #231c1a; color: #cfc4be; padding: 44px 0 20px; font-size: .95rem; }
.site-footer a { color: #f1e9e4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-inner { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { font: 700 .82rem/1 var(--font); text-transform: uppercase; letter-spacing: .1em; color: #8f837c; margin-bottom: 14px; }
.footer-links, .footer-social { display: flex; flex-direction: column; gap: 8px; }
.site-footer .logo-b { color: #bdb3ad; }
.site-footer blockquote { margin: 16px 0 0; font-style: italic; max-width: 420px; }
.site-footer cite { display: block; margin-top: 4px; font-style: normal; font-size: .85rem; color: #8f837c; }
.copyright { margin-top: 30px; padding-top: 18px; border-top: 1px solid #3a302d; font-size: .85rem; color: #8f837c; }

/* ---------- print: just the recipe ---------- */
@media print {
    .site-header, .site-footer, .recipe-aside, .recipe-actions, .crumbs, .gallery, .reviews, .skip, .ad { display: none !important; }
    body { background: #fff; font-size: 12pt; }
    .recipe-photo { margin: 0; max-width: 60%; }
    .recipe-layout { display: block; }
    .products input { display: none; }
    a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
