:root {
    --ink: #101110;
    --ink-soft: #4a4d49;
    --mute: #8b8f8a;
    --paper: #ffffff;
    --mist: #f3f4f1;
    --mist-deep: #e8eae5;
    --line: #e2e4df;
    --jade: #18453a;
    --jade-soft: #2c6b58;
    --lime: #d9f070;

    --display: Unbounded, "Helvetica Neue", Arial, sans-serif;
    --body: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --r: 6px;
    --wrap: 1440px;
    --col: 1120px;
    --col-form: 880px;
    --pad: clamp(16px, 3.4vw, 48px);
    --pad-top: clamp(22px, 3.2vw, 44px);
    --pad-bottom: clamp(56px, 7vw, 88px);
    --pad-section: clamp(28px, 4vw, 56px);
    --head-h: 62px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 15px/1.55 var(--body);
    letter-spacing: -.005em;
}

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.label {
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mute);
    font-weight: 500;
}

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

.site-head {
    position: sticky; top: 0; z-index: 40;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.site-head__row { --head-gap: clamp(14px, 2.6vw, 34px);
    display: flex; align-items: center; gap: var(--head-gap); height: var(--head-h); }
.head-user + .head-cart { margin-left: calc(2px - var(--head-gap)); }

.logo {
    font: 600 17px/1 var(--display);
    letter-spacing: -.02em;
    display: inline-flex; align-items: center; gap: 7px;
}
.logo::before {
    content: ""; width: 9px; height: 9px; border-radius: 50%;
    background: var(--jade);
}

.nav { display: flex; gap: 22px; font-size: 13.5px; color: var(--ink-soft); flex: 1; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.head-cta { font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.head-cta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

/* ─── поиск ─── */

.hunt {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1.5px solid var(--ink);
    padding: 14px 0;
    margin: var(--pad-top) 0 var(--pad-section);
}
.hunt__icon { width: 20px; height: 20px; color: var(--ink); flex: none; }
.hunt__input {
    flex: 1; border: 0; background: none; outline: none;
    font: 500 clamp(17px, 2.4vw, 25px)/1.2 var(--display);
    letter-spacing: -.02em; color: var(--ink);
    min-width: 0;
}
.hunt__input::placeholder { color: #b9bdb6; font-weight: 500; transition: color .2s ease; }
.hunt__input.is-fading::placeholder { color: transparent; }
.hunt__input::-webkit-search-cancel-button { display: none; }
.hunt__clear { color: var(--mute); font-size: 22px; line-height: 1; padding: 0 4px; }
.hunt__clear:hover { color: var(--ink); }
.hunt__cta { flex: none; white-space: nowrap; }
.hunt__cta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }

@media (min-width: 561px) {
    body:has(main.catalog) .head-cta { display: none; }
}
@media (max-width: 560px) {
    .hunt .hunt__cta { display: none; }
}

.hints {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: 0 20px 50px rgba(16,17,16,.10);
    overflow: hidden; z-index: 50;
}
.hint { display: flex; align-items: center; gap: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.hint:last-child { border-bottom: 0; }
.hint:hover { background: var(--mist); }
.hint img, .hint__gap { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; background: var(--mist); flex: none; }
.hint__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hint__text b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hint__text i { font-style: normal; font-size: 11px; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; }
.hint__price { font-size: 13.5px; font-weight: 600; white-space: nowrap; }

/* ─── каркас каталога ─── */

.catalog__body { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: clamp(24px, 3vw, 52px); padding-bottom: var(--pad-bottom); }

.facets { position: sticky; top: calc(var(--head-h) + 18px); align-self: start; display: grid; gap: 38px; padding-right: 8px; }
.facets__group { display: grid; gap: 14px; margin-bottom: 34px; }
.facets__group:last-of-type { margin-bottom: 26px; }
.facets__title {
    font: 600 11px/1 var(--display);
    letter-spacing: .04em; text-transform: uppercase; color: var(--mute);
    padding-bottom: 12px; border-bottom: 1px solid var(--line);
}

.facets__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.facets__list a {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 7px 0; font-size: 13.5px; line-height: 1.35; color: var(--ink-soft);
}
.facets__list a:hover { color: var(--ink); }
.facets__list a.is-on { color: var(--jade); font-weight: 600; }
.facets__list b { font-weight: 400; font-size: 11.5px; color: var(--mute); flex: none; }

.facets__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; line-height: 1.35; text-align: left;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px; color: var(--ink-soft);
    transition: border-color .14s, color .14s, background .14s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--jade); border-color: var(--jade); color: #fff; }
.chip__count { font-size: 11px; color: var(--mute); flex: none; }
.chip[aria-pressed="true"] .chip__count { color: rgba(255,255,255,.62); }
.chip svg { width: 15px; height: 15px; opacity: .75; flex: none; }

.facets__switch {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13.5px; color: var(--ink-soft); cursor: pointer;
}
.facets__knob {
    width: 34px; height: 20px; border-radius: 999px; background: var(--mist-deep);
    position: relative; transition: background .16s;
}
.facets__knob::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    transition: transform .16s;
}
.facets__switch.is-on { color: var(--ink); }
.facets__switch.is-on .facets__knob { background: var(--jade); }
.facets__switch.is-on .facets__knob::after { transform: translateX(14px); }

/* ─── результаты ─── */

.results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.results__head h1 { font: 600 clamp(26px, 3.6vw, 44px)/1.04 var(--display); letter-spacing: -.03em; margin: 0 0 6px; }

.sorter { display: flex; gap: 14px; font-size: 13px; color: var(--mute); }
.sorter a:hover { color: var(--ink); }
.sorter a.is-on { color: var(--ink); font-weight: 600; }

.applied { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; align-items: center; }
.applied__item {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--mist); border-radius: 999px; padding: 6px 12px; font-size: 12.5px;
}
.applied__item span { color: var(--mute); }
.applied__item:hover { background: var(--mist-deep); }
.applied__reset { font-size: 12.5px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.applied__reset:hover { color: var(--ink); }

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

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }

.card { display: flex; flex-direction: column; background: var(--paper); padding: 14px 14px 18px; position: relative; }
.card:hover { background: #fdfdfc; }

.card__shot { position: relative; background: var(--mist); overflow: hidden; aspect-ratio: 1; border-radius: 3px; }
.card__shot img { width: 100%; height: 100%; object-fit: cover; }
.card__shot img + img { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.card:hover .card__shot img + img { opacity: 1; }

.card__flag {
    position: absolute; left: 8px; top: 8px; z-index: 2;
    background: rgba(255,255,255,.94); border-radius: 999px;
    padding: 4px 9px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute);
}
.card__sale {
    position: absolute; right: 8px; top: 8px; z-index: 2;
    background: var(--lime); border-radius: 999px; padding: 4px 9px;
    font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
}

.card__brand { margin-top: 13px; }
.card__title { display: block; margin: 5px 0 0; font-size: 13.5px; line-height: 1.38; font-weight: 500; }
.card__title:hover { color: var(--jade); }
.card__meta { margin-top: auto; padding-top: 12px; display: flex; align-items: baseline; gap: 8px; }

.card__buy {
    margin-top: 12px; width: 100%;
    border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
    border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
    opacity: 0; transform: translateY(4px);
    transition: opacity .16s, transform .16s, background .14s, color .14s;
}
.card:hover .card__buy, .card__buy:focus-visible { opacity: 1; transform: none; }
.card__buy:hover { background: var(--ink); color: #fff; }
.card__price { font: 600 15px/1 var(--display); letter-spacing: -.02em; }
.card__old { font-size: 12px; color: var(--mute); text-decoration: line-through; }
.card__out { font: 600 15px/1 var(--display); color: var(--mute); }

.tile {
    grid-column: span 2;
    background: var(--jade); color: #fff;
    padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 14px;
    min-height: 220px;
}
.tile h3 { font: 600 clamp(19px, 1.6vw, 25px)/1.15 var(--display); letter-spacing: -.02em; margin: 0; }
.tile p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.72); max-width: 34ch; }
.tile__go { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--lime); }

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

.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); padding: var(--pad-top) 0 var(--pad-section); align-items: start; }

.gallery { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; position: sticky; top: calc(var(--head-h) + 18px); }
.gallery__strip { display: grid; gap: 8px; }
.gallery__strip img { aspect-ratio: 1; object-fit: cover; background: var(--mist); border-radius: 3px; cursor: pointer; opacity: .5; transition: opacity .18s; }
.gallery__strip img:hover { opacity: .8; }
.gallery__strip img[aria-current="true"] { opacity: 1; box-shadow: inset 0 0 0 1.5px var(--ink); }
.gallery__main { background: var(--mist); border-radius: var(--r); overflow: hidden; }
.gallery__main:only-child { grid-column: 1 / -1; }
.gallery__main img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.crumbs { font-size: 12px; color: var(--mute); padding: var(--pad-top) 0 0; display: flex; gap: 8px; }
.crumbs a:hover { color: var(--ink); }

.pane { align-self: start; }
.pane h1 { font: 600 clamp(22px, 2.6vw, 32px)/1.14 var(--display); letter-spacing: -.03em; margin: 10px 0 0; max-width: 20ch; }
.pane__sub { margin: 12px 0 0; color: var(--ink-soft); font-size: 15.5px; max-width: 44ch; }
.pane__lead { font-size: 14.5px; line-height: 1.68; color: var(--ink-soft); max-width: 50ch; }
.pane__lead p { margin: 0 0 10px; }
.pane__lead strong { color: var(--ink); font-weight: 600; }
.pane__block { margin-top: 24px; }
.pane__block > .label { display: block; margin-bottom: 11px; }

.buy { margin: 22px 0 24px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.buy__row { display: flex; align-items: baseline; gap: 10px; }
.buy__price { font: 600 26px/1 var(--display); letter-spacing: -.03em; }
.buy__old { color: var(--mute); text-decoration: line-through; font-size: 15px; }
.buy__vol { font-size: 13px; color: var(--mute); }
.buy__stock { font-size: 12.5px; color: var(--jade-soft); }
.buy__stock--out { color: var(--mute); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 28px; border-radius: 999px; border: 1px solid var(--ink);
    background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background .16s, color .16s, border-color .16s;
}
.btn:hover { background: var(--jade); border-color: var(--jade); }
.btn[disabled] { background: var(--mist); border-color: var(--mist); color: var(--mute); cursor: not-allowed; }

.details { padding-bottom: var(--pad-section); }
.details__row {
    display: grid; grid-template-columns: 200px minmax(0, 68ch);
    gap: clamp(20px, 4vw, 56px);
    padding: 30px 0; border-top: 1px solid var(--line);
}
.details__row h2 { font: 600 12px/1.3 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); margin: 2px 0 0; }

.prose { font-size: 15px; line-height: 1.72; color: var(--ink-soft); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3 { font: 600 15px/1.35 var(--display); letter-spacing: -.01em; color: var(--ink); margin: 26px 0 9px; }
.prose ul { margin: 0 0 14px; padding-left: 18px; }
.prose li { margin-bottom: 5px; }
.prose strong { color: var(--ink); font-weight: 600; }

.ingredients { display: flex; flex-wrap: wrap; gap: 8px; }
.ingredient { display: inline-flex; align-items: center; gap: 8px; padding: 4px 13px 4px 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
.ingredient img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

.specs { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.specs tr:first-child td { padding-top: 0; }
.specs td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs tr:last-child td { border-bottom: 0; }
.specs td:first-child { color: var(--mute); width: 40%; }

.strip { border-top: 1px solid var(--line); padding-top: var(--pad-section); padding-bottom: var(--pad-bottom); }
.strip h2 { font: 600 clamp(18px, 2vw, 24px)/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 20px; }

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

.site-foot { border-top: 1px solid var(--line); padding: 44px 0 30px; font-size: 13px; color: var(--mute); background: var(--mist); }
.site-foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-foot__col { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.site-foot__col p { margin: 0; line-height: 1.6; }
.site-foot__col .logo { font-size: 15px; margin-bottom: 2px; }
.site-foot__col .label { margin-bottom: 3px; }
.site-foot a:hover { color: var(--ink); }
.site-foot__legal { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; }

.doc { max-width: var(--col-form); padding-top: var(--pad-top); padding-bottom: var(--pad-bottom); }
.doc h1 { font: 600 clamp(24px, 3vw, 36px)/1.1 var(--display); letter-spacing: -.03em; margin: 14px 0 26px; }
.doc__body { font-size: 15px; }
.doc__body h1 { display: none; }
.doc__body h2 { font: 600 17px/1.3 var(--display); margin: 32px 0 12px; }
.doc__body h3 { font: 600 14px/1.35 var(--display); margin: 22px 0 8px; }

.empty { padding: 70px 0; text-align: center; color: var(--mute); }
.empty a { color: var(--jade); text-decoration: underline; text-underline-offset: 3px; }

@media (hover: none) {
    .card__buy { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
    .catalog__body { grid-template-columns: 1fr; }
    .facets { position: static; grid-template-columns: 1fr; }
    .product { grid-template-columns: 1fr; }
    .gallery { position: static; grid-template-columns: 1fr; }
    .gallery__strip { grid-template-columns: repeat(5, 1fr); order: 2; }
    .details__row { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
    .site-foot__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .nav { display: none; }
    .tile { grid-column: span 1; }
}

.facets__toggle {
    display: none;
    cursor: pointer;
    font: 600 13px/1 var(--display);
    text-transform: uppercase;
    letter-spacing: .02em;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    list-style: none;
}
.facets__toggle::-webkit-details-marker { display: none; }
.facets__toggle::after { content: " +"; color: var(--mute); }
.facets[open] .facets__toggle::after { content: " −"; }

@media (max-width: 960px) {
    .facets__toggle { display: block; }
    .facets { gap: 18px; padding-bottom: 6px; }
}

.totop {
    position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ink); color: #fff; border: 0; cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s, background .16s;
    z-index: 60;
}
.totop.is-on { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--jade); }
.totop svg { width: 18px; height: 18px; }

/* ─── подбор ухода ─── */

.quiz { max-width: var(--col-form); padding-bottom: var(--pad-bottom); }
.quiz__head { padding: var(--pad-top) 0 var(--pad-section); }
.quiz__head h1 { font: 600 clamp(26px, 3.6vw, 40px)/1.1 var(--display); letter-spacing: -.03em; margin: 12px 0 0; }
.quiz__head h1 em { font-style: normal; color: var(--jade); }
.quiz__head p { color: var(--ink-soft); max-width: 58ch; margin: 16px 0 0; }

.quiz__form { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.q { background: var(--paper); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; padding: 26px clamp(16px, 3vw, 30px); }
.q__no { font: 600 12px/1 var(--display); color: var(--mute); padding-top: 5px; }
.q__body h2 { font: 600 17px/1.25 var(--display); letter-spacing: -.02em; margin: 0 0 14px; }
.q__hint { font-size: 12.5px; color: var(--mute); margin: -8px 0 12px; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt > span {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 13.5px; color: var(--ink-soft); transition: all .14s;
}
.opt > span svg { width: 16px; height: 16px; opacity: .7; }
.opt:hover > span { border-color: var(--ink); color: var(--ink); }
.opt input:checked + span { background: var(--jade); border-color: var(--jade); color: #fff; }
.opt input:checked + span svg { opacity: 1; }
.opt input:focus-visible + span { outline: 2px solid var(--jade); outline-offset: 2px; }

.opt--wide > span { flex-direction: column; align-items: flex-start; gap: 2px; border-radius: var(--r); padding: 12px 18px; }
.opt--wide b { font-weight: 600; font-size: 14px; }
.opt--wide i { font-style: normal; font-size: 12px; opacity: .72; }

.quiz__go { display: flex; align-items: center; gap: 16px; padding: 26px clamp(16px, 3vw, 30px); background: var(--paper); }
.quiz__go span { font-size: 12.5px; color: var(--mute); }

.routine { padding-bottom: var(--pad-bottom); max-width: var(--col); }
.routine__head { padding: var(--pad-top) 0 var(--pad-section); }
.routine__head h1 { font: 600 clamp(26px, 3.6vw, 40px)/1.1 var(--display); letter-spacing: -.03em; margin: 12px 0 0; }
.routine__sum { display: flex; align-items: baseline; gap: 14px; margin-top: 14px; }
.routine__total { font: 600 24px/1 var(--display); letter-spacing: -.03em; }
.routine__budget { font-size: 13px; color: var(--mute); }
.routine__note { font-size: 13.5px; color: var(--mute); margin: 12px 0 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--paper); display: grid; grid-template-columns: 132px 96px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 16px clamp(14px, 2vw, 22px); }
.step__mark { display: flex; flex-direction: column; gap: 5px; }
.step__label { font: 600 12px/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.step__match { font-size: 11.5px; color: var(--jade-soft); }
.step__shot { display: block; background: var(--mist); border-radius: var(--r); overflow: hidden; aspect-ratio: 1; }
.step__shot img { width: 100%; height: 100%; object-fit: cover; }
.step__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.step__title { font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.step__title:hover { color: var(--jade); }
.step__sub { margin: 0; font-size: 13px; color: var(--ink-soft); }
.step__why { margin: 2px 0 0; font-size: 12.5px; color: var(--mute); }
.step__buy { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.step__price { font: 600 16px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.btn--small { padding: 9px 18px; font-size: 13px; }

.routine__foot { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

@media (max-width: 760px) {
    .q { grid-template-columns: 1fr; gap: 10px; }
    .q__no { padding-top: 0; }
    .step { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
    .step__mark { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
    .step__buy { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ─── корзина и оформление ─── */

.head-cart { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); transition: background .14s; }
.head-cart:hover { background: var(--mist); }
.head-cart svg { width: 21px; height: 21px; }
.head-cart span {
    display: none; position: absolute; top: 1px; right: 0;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 999px; background: var(--jade); color: #fff;
    font-size: 10.5px; font-weight: 600; line-height: 17px; text-align: center;
    box-shadow: 0 0 0 2px var(--paper);
}
.head-cart span.is-on { display: block; }

.checkout { padding-top: var(--pad-top); padding-bottom: var(--pad-bottom); max-width: var(--col); }
.checkout h1 { font: 600 clamp(26px, 3.4vw, 38px)/1.1 var(--display); letter-spacing: -.03em; margin: 0 0 var(--pad-section); }
.checkout__body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(24px, 3vw, 44px); align-items: start; }

.alert { background: #fdf1ee; border: 1px solid #f0cfc6; color: #8d3a25; padding: 12px 16px; border-radius: var(--r); font-size: 14px; }

.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.line { background: var(--paper); display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto 28px; gap: 16px; align-items: center; padding: 12px 16px; }
.lines--static .line { grid-template-columns: 72px minmax(0, 1fr) auto; }
.line__shot { display: block; width: 72px; height: 72px; background: var(--mist); border-radius: 4px; overflow: hidden; }
.line__shot img { width: 100%; height: 100%; object-fit: cover; }
.line__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.line__title { font-size: 14px; font-weight: 500; line-height: 1.35; }
.line__title:hover { color: var(--jade); }
.line__warn { font-size: 12px; color: #b1604a; }
.line__qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.line__qty button { width: 26px; height: 26px; border: 0; background: none; cursor: pointer; border-radius: 50%; color: var(--ink-soft); font-size: 15px; line-height: 1; }
.line__qty button:hover { background: var(--mist); color: var(--ink); }
.line__qty span { min-width: 22px; text-align: center; font-size: 13.5px; font-weight: 500; }
.line__sum { font: 600 15px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.line__drop { border: 0; background: none; cursor: pointer; color: var(--mute); font-size: 19px; line-height: 1; }
.line__drop:hover { color: var(--ink); }

.order-form { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 2vw, 26px); position: sticky; top: calc(var(--head-h) + 18px); }
.order-form__total { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.order-form__total span { font-size: 13.5px; color: var(--mute); }
.order-form__total b { font: 600 22px/1 var(--display); letter-spacing: -.03em; }
.order-form .btn { width: 100%; margin-top: 6px; }
.order-form__note { font-size: 11.5px; color: var(--mute); line-height: 1.5; margin: 4px 0 0; }
.order-form__note a { text-decoration: underline; text-underline-offset: 2px; }

.field { display: grid; gap: 5px; }
.field > span { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.field input, .field textarea {
    font: inherit; font-size: 14px; color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 10px 12px; background: var(--paper); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--jade); }

.done { max-width: var(--col); padding-top: var(--pad-top); padding-bottom: var(--pad-bottom); }
.done h1 { font: 600 clamp(26px, 3.4vw, 38px)/1.1 var(--display); letter-spacing: -.03em; margin: 10px 0 14px; }
.done__lead { color: var(--ink-soft); margin: 0 0 26px; max-width: 60ch; }
.done__total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.done__total b { font: 600 22px/1 var(--display); letter-spacing: -.03em; }
.done__pay { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.done__pay span { font-size: 12.5px; color: var(--mute); }
.done__pay--done b { font: 600 15px/1 var(--display); color: var(--jade); letter-spacing: -.02em; }
.done__alert { margin: 0 0 22px; padding: 14px 16px; border: 1px solid var(--line);
    border-left: 3px solid var(--ink); background: var(--mist); font-size: 13.5px; }

@media (max-width: 860px) {
    .checkout__body { grid-template-columns: 1fr; }
    .order-form { position: static; }
    .line { grid-template-columns: 60px minmax(0, 1fr) auto; row-gap: 12px; column-gap: 12px; }
    .line__shot { width: 60px; height: 60px; }

    .lines:not(.lines--static) .line {
        grid-template-areas: "shot info drop" "shot qty sum";
        align-items: center;
    }
    .lines:not(.lines--static) .line__shot { grid-area: shot; align-self: start; }
    .lines:not(.lines--static) .line__info { grid-area: info; }
    .lines:not(.lines--static) .line__drop { grid-area: drop; justify-self: end; align-self: start; }
    .lines:not(.lines--static) .line__qty  { grid-area: qty; justify-self: start; }
    .lines:not(.lines--static) .line__sum  { grid-area: sum; justify-self: end; }

    .lines--static .line__sum { grid-column: 3; }
}

@media (max-width: 560px) {
    :root { --head-h: 56px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
    .card { padding: 10px 10px 14px; }
    .card__title { font-size: 12.5px; }
    .card__price, .card__out { font-size: 14px; }
    .card__buy { padding: 8px 10px; font-size: 12px; }
    .tile { grid-column: 1 / -1; min-height: 0; padding: 22px; }

    .hunt { gap: 8px; padding: 11px 0; }
    .hunt__input { font-size: 16px; }

    .results__head { align-items: flex-start; flex-direction: column; gap: 10px; }
    .sorter { gap: 12px; font-size: 12.5px; flex-wrap: wrap; }

    .site-head__row { --head-gap: 10px; }
    .head-cta { font-size: 12.5px; }
    .head-cta::before { display: none; }

    .step { grid-template-columns: 64px minmax(0, 1fr); }
    .step__shot { width: 64px; }
    .quiz__go { flex-direction: column; align-items: stretch; gap: 10px; }
    .quiz__go .btn { width: 100%; }

    .field input, .field textarea { font-size: 16px; }
    .line { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 10px 12px; gap: 10px; }
    .line__shot { width: 56px; height: 56px; }
    .line__sum { font-size: 14px; }

    .site-foot__grid { grid-template-columns: 1fr; gap: 20px; }
    .totop { width: 40px; height: 40px; }
}

.pvz { display: grid; gap: 9px; padding: 2px 0; }
.pvz .btn { width: 100%; }
.pvz__note { margin: 0; font-size: 12.5px; color: var(--mute); line-height: 1.5; }
.pvz__chosen { margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.pvz__cost { margin: 0; font-size: 12.5px; color: var(--jade-soft); }
.pvz__city { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.pvz__city:focus { outline: none; border-color: var(--jade); }
.pvz__map { width: 100%; min-height: 420px; border-radius: var(--r); overflow: hidden; }

.head-user { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink); transition: background .14s; }
.head-user:hover { background: var(--mist); }
.head-user svg { width: 21px; height: 21px; }

.auth { max-width: var(--col-form); padding-top: var(--pad-top); padding-bottom: var(--pad-bottom); }
.auth h1 { font: 600 clamp(24px, 3vw, 32px)/1.12 var(--display); letter-spacing: -.03em; margin: 10px 0 14px; }
.auth__lead { color: var(--ink-soft); margin: 0 0 22px; font-size: 15px; max-width: 52ch; }
.auth__form { display: grid; gap: 14px; max-width: 420px; }
.auth__form .btn { width: 100%; }
.auth__note { font-size: 12.5px; color: var(--mute); margin: 18px 0 0; }
.auth__again { margin-top: 14px; }
.auth__again button { border: 0; background: none; padding: 0; cursor: pointer; font-size: 13px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.auth__again button:hover { color: var(--ink); }

.account { padding-top: var(--pad-top); padding-bottom: var(--pad-bottom); max-width: var(--col); }
.account__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.account__head > div { min-width: 0; }
.account__head h1 { font: 600 clamp(18px, 2.4vw, 26px)/1.2 var(--display); letter-spacing: -.02em; margin: 8px 0 0; overflow-wrap: anywhere; }
.account__out { flex: none; }
.account__out { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer; color: var(--ink-soft); }
.account__out:hover { border-color: var(--ink); color: var(--ink); }
.account__count { margin-bottom: 12px; display: block; }

.orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.order { background: var(--paper); display: grid; grid-template-columns: 1.2fr 1fr 1fr .8fr auto; gap: 14px; align-items: center; padding: 14px 16px; font-size: 14px; }
.order__num { font-weight: 600; }
.order__num:hover { color: var(--jade); }
.order__date, .order__items { color: var(--mute); font-size: 13px; }
.order__status { font-size: 12.5px; color: var(--jade-soft); }
.order__status--cancelled { color: var(--mute); }
.order__sum { font: 600 15px/1 var(--display); letter-spacing: -.02em; text-align: right; }

@media (max-width: 640px) {
    .order { grid-template-columns: 1fr auto; row-gap: 6px; }
    .order__status, .order__items { grid-column: 1; }
    .order__sum { grid-column: 2; grid-row: 1; }
}

.field__err { display: block; font-style: normal; font-size: 12px; color: #b1442a; margin-top: 2px; }
.field input.is-bad, .field textarea.is-bad { border-color: #d98a72; background: #fdf6f4; }
