:root {
    --ink: #23261f;
    --text: #2a2a2a;
    --text-soft: #5c5952;
    --muted: #9c968a;
    --sand: #cdc6b3;
    --accent: #c86b5c;
    --accent-deep: #b15746;

    --bg: #fbfaf7;
    --bg-tint: #f2f0e8;
    --surface: #ffffff;
    --line: #ece8dd;

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;

    --sh-sm: 0 2px 8px rgba(35, 38, 31, .05);
    --sh-md: 0 8px 24px rgba(35, 38, 31, .07);
    --sh-lg: 0 18px 48px rgba(35, 38, 31, .10);

    --display: Comfortaa, "Trebuchet MS", system-ui, sans-serif;
    --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --wrap: 1200px;
    --gap: clamp(20px, 2.6vw, 34px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--text);
    font: 400 16px/1.65 var(--body);
    background:
        radial-gradient(1100px 620px at 85% -8%, #f6efe6 0%, rgba(246,239,230,0) 62%),
        radial-gradient(900px 520px at 5% 4%, #eef2ea 0%, rgba(238,242,234,0) 58%),
        var(--bg);
    background-attachment: fixed;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 36px); }

.label {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--ink); }

/* ─── шапка ─── */

.site-head {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: saturate(140%) blur(12px);
    background: rgba(251, 250, 247, .82);
    border-bottom: 1px solid var(--line);
}

.site-head__row { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); height: 74px; }

.logo {
    font: 600 22px/1 var(--display);
    letter-spacing: .06em;
    color: var(--ink);
    white-space: nowrap;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 26px; font-size: 14.5px; color: var(--text-soft); flex: 1; }
.nav a { padding: 6px 0; border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover { color: var(--ink); border-color: var(--sand); }

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 16px;
    box-shadow: var(--sh-sm);
    transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--sand); box-shadow: var(--sh-md); }
.search input { border: 0; background: none; font: inherit; font-size: 14px; width: 180px; color: var(--text); }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--muted); }
.search button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); line-height: 0; }
.search button:hover { color: var(--accent); }

/* ─── герой ─── */

.hero {
    padding: clamp(40px, 6vw, 84px) 0 clamp(32px, 4vw, 56px);
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    gap: clamp(28px, 4vw, 60px);
    align-items: center;
}

.hero h1 {
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.12;
    margin: 16px 0 0;
    letter-spacing: -.01em;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero p { margin: 20px 0 0; max-width: 46ch; color: var(--text-soft); font-size: 16.5px; }

.hero__actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero__art { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero__art img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
}
.hero__art img:first-child { grid-row: span 2; aspect-ratio: 3 / 4.2; border-radius: var(--r-xl); }

/* ─── кнопки ─── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font: 500 14.5px/1 var(--body);
    border: 1px solid transparent;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--sh-sm);
    transition: transform .16s, box-shadow .16s, background .16s, color .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-md); background: #2f342a; }

.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-deep); }

.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--sand); }

.btn[disabled] { background: var(--bg-tint); color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }

/* ─── секции ─── */

.section { padding: clamp(32px, 4.5vw, 64px) 0; }
.section--tight { padding-top: 0; }

.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: clamp(20px, 2.6vw, 32px); }
.section__head h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0; }
.section__head a { font-size: 14px; color: var(--accent); }
.section__head a:hover { color: var(--accent-deep); }

/* ─── карточки ─── */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--gap); }

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 12px 12px 18px;
    box-shadow: var(--sh-sm);
    transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }

.card__shot { position: relative; background: var(--bg-tint); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1; }
.card__shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.6,.2,1); }
.card:hover .card__shot img { transform: scale(1.04); }

.card__flag {
    position: absolute; left: 10px; top: 10px;
    background: rgba(255,255,255,.92);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

.card__brand { margin-top: 14px; padding: 0 4px; }
.card__title { margin: 6px 0 0; padding: 0 4px; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.card__meta { margin-top: 12px; padding: 0 4px; display: flex; align-items: baseline; gap: 9px; }
.card__price { font: 600 16px/1 var(--display); color: var(--ink); }
.card__old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.card__out { font: 600 16px/1 var(--display); color: var(--muted); }

/* ─── фильтры ─── */

.filters { display: grid; gap: 16px; margin-bottom: clamp(22px, 3vw, 36px); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row > .label { min-width: 96px; }

.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--text-soft);
    box-shadow: var(--sh-sm);
    transition: border-color .15s, color .15s, transform .15s;
}
.chip:hover { border-color: var(--sand); color: var(--ink); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__count { color: var(--muted); font-size: 12px; }
.chip[aria-pressed="true"] .chip__count { color: rgba(255,255,255,.6); }
.chip svg { width: 17px; height: 17px; opacity: .8; }

/* ─── карточка товара ─── */

.product {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
    gap: clamp(26px, 4vw, 60px);
    padding: clamp(24px, 3vw, 44px) 0 clamp(32px, 4vw, 64px);
}

.gallery { display: grid; gap: 12px; align-content: start; position: sticky; top: 98px; }
.gallery__main { background: var(--surface); border-radius: var(--r-xl); padding: 10px; box-shadow: var(--sh-md); }
.gallery__main img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); }
.gallery__strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery__strip img {
    aspect-ratio: 1; object-fit: cover; background: var(--surface);
    border-radius: var(--r-md); cursor: pointer; opacity: .55;
    box-shadow: var(--sh-sm); transition: opacity .2s, transform .2s;
}
.gallery__strip img:hover { transform: translateY(-2px); opacity: .85; }
.gallery__strip img[aria-current="true"] { opacity: 1; outline: 2px solid var(--sand); outline-offset: 2px; }

.product h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; margin: 10px 0 0; }
.product__sub { margin: 12px 0 0; color: var(--text-soft); font-size: 16.5px; }

.product__buy {
    margin: 26px 0;
    padding: 20px 22px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.product__price { font: 600 27px/1 var(--display); color: var(--ink); }
.product__old { color: var(--muted); text-decoration: line-through; }
.product__stock { font-size: 13px; color: #6f8a5f; }
.product__stock--out { color: var(--muted); }

.block { margin-top: 28px; }
.block > .label { display: block; margin-bottom: 12px; }

.prose { font-size: 15.5px; color: var(--text-soft); }
.prose p { margin: 0 0 12px; }
.prose h1, .prose h2, .prose h3 {
    font: 600 16px/1.4 var(--display);
    color: var(--ink);
    margin: 20px 0 8px;
}
.prose h1:first-child, .prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 5px; }
.prose strong { color: var(--ink); font-weight: 500; }

.ingredients { display: flex; flex-wrap: wrap; gap: 9px; }
.ingredient {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 5px 15px 5px 5px;
    background: var(--surface);
    border-radius: 999px;
    font-size: 13.5px;
    box-shadow: var(--sh-sm);
}
.ingredient img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.specs { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.specs td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 40%; }

/* ─── подвал ─── */

.site-foot { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.site-foot__row { display: flex; gap: var(--gap); flex-wrap: wrap; justify-content: space-between; }
.site-foot a:hover { color: var(--accent); }

.empty { padding: 64px 0; text-align: center; color: var(--muted); }
.empty a { color: var(--accent); }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero__art { order: -1; }
    .product { grid-template-columns: 1fr; }
    .gallery { position: static; }
    .nav { display: none; }
    .search input { width: 120px; }
}
