/* Freeze Foods — демонстрационный B2B-магазин. Белая основа, тёмный текст, холодный бирюзово-синий акцент.
   IBM Plex Sans (OFL), файлы свои, внешних запросов нет. Минимум декоративных эффектов: важны читаемость и удобство закупки. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --bg: #fff; --soft: #f3f7fa; --ink: #0e1c26; --muted: #5a6a77; --line: #dfe6ec; --line-strong: #c3cfd9;
  --brand: #0a6f8f; --brand-dark: #07566f; --brand-tint: #e3f2f7;
  --ok: #17794d; --ok-tint: #e6f5ee; --danger: #b3261e; --danger-tint: #fdecea; --warn-tint: #fff6df;
  --radius: 8px; --radius-lg: 12px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pad: 20px; --hdr-top: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-underline-offset: .16em; }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol, dl { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.container { width: min(1240px, 100% - 2 * var(--pad)); margin-inline: auto; }
.container--narrow { width: min(860px, 100% - 2 * var(--pad)); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.ic { width: 20px; height: 20px; flex: none; }
.ic--lg { width: 32px; height: 32px; }
.ic--xl { width: 48px; height: 48px; color: var(--line-strong); }
.lead { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: var(--muted); max-width: 64ch; }
.section { padding: clamp(36px, 5vw, 64px) 0; }
.section--tight { padding: clamp(24px, 3.5vw, 44px) 0; }
.section--soft { background: var(--soft); }
.section__head { margin-bottom: 22px; }
.section__head h2 { margin-bottom: .3em; }
.section__more { margin: 24px 0 0; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform 160ms var(--ease-out); }
.btn--brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--lg { min-height: 50px; padding: 12px 24px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--soft); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn[disabled]:active { transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4rem 0 0; }
.actions--center { justify-content: center; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }

/* шапка */
.hdr { position: sticky; top: 0; z-index: 90; background: #fff; border-bottom: 1px solid var(--line); }
.hdr__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px 18px; min-height: var(--hdr-top); }
.hdr__burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; place-items: center; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.logo__mark { width: 36px; height: 36px; border-radius: 9px; }
.logo__t { display: grid; line-height: 1.1; }
.logo__name { font-size: 1.2rem; letter-spacing: -.01em; font-weight: 500; white-space: nowrap; }
.logo__name b { font-weight: 600; color: var(--brand-dark); }
.logo__city { font-size: .74rem; color: var(--muted); }
.search { position: relative; display: flex; min-width: 0; }
.search__input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: #fff; font-size: 1rem; }
.search__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.search__btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 1.5px solid var(--brand); background: var(--brand); color: #fff; font-weight: 500; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.search__btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.search__sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 10px 28px -12px rgba(14, 28, 38, .3); max-height: 360px; overflow: auto; padding: 6px; }
.search__sug[hidden] { display: none; }
.sug { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .94rem; }
.sug img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 4px; }
.sug__ph { width: 44px; height: 44px; display: grid; place-items: center; color: var(--line-strong); background: var(--soft); border-radius: 4px; }
.sug:hover, .sug[aria-selected="true"] { background: var(--brand-tint); color: var(--ink); }
.sug__price { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.sug__empty { padding: 12px; color: var(--muted); }
.hdr__phone { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.hdr__icon, .hdr__cart { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border-radius: var(--radius); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.hdr__icon:hover, .hdr__cart:hover { background: var(--soft); color: var(--ink); }
.hdr__cart { border-color: var(--line); }
.hdr__cart-t { display: grid; line-height: 1.1; font-size: .78rem; }
.hdr__cart-t b { font-size: .95rem; font-weight: 600; }
.hdr__cart-sum { color: var(--muted); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.badge[hidden] { display: none; }
.hdr__bar { border-top: 1px solid var(--line); }
.hdr__row { display: flex; align-items: center; gap: 22px; min-height: 48px; }
.cat-btn { min-height: 38px; padding: 6px 16px; }
.hdr__nav { display: flex; gap: 22px; }
.hdr__nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.hdr__nav a:hover { border-bottom-color: var(--line-strong); }
.hdr__nav a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--brand-dark); }
.hdr__delivery { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.mega { position: absolute; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -22px rgba(14, 28, 38, .4); }
.mega[hidden], .mmenu[hidden] { display: none; }
.mega__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px 28px; padding: 24px 0 28px; }
.mega__cat { display: block; font-weight: 600; color: var(--ink); text-decoration: none; margin-bottom: 6px; }
.mega__cat:hover { color: var(--brand-dark); }
.mega__sub { display: block; color: var(--muted); text-decoration: none; font-size: .92rem; padding: 2px 0; }
.mega__sub:hover { color: var(--brand-dark); }
.mmenu { display: none; }

@media (max-width: 1080px) {
  .hdr__phone span { display: none; }
  .hdr__delivery { display: none; }
}
@media (max-width: 899px) {
  :root { --pad: 14px; --hdr-top: 58px; }
  .hdr__top { grid-template-columns: auto 1fr auto auto; grid-template-areas: "burger logo fav cart" "search search search search"; gap: 8px 8px; padding-bottom: 10px; min-height: 0; padding-top: 8px; }
  .hdr__burger { display: inline-grid; grid-area: burger; }
  .logo { grid-area: logo; }
  .logo__city { display: none; }
  .search { grid-area: search; }
  .search__btn-t { display: none; }
  .search__btn { padding: 0 14px; }
  .search__input { height: 42px; } .search__btn { height: 42px; }
  .hdr__phone { display: none; }
  .hdr__icon { grid-area: fav; height: 44px; }
  .hdr__cart { grid-area: cart; height: 44px; }
  .hdr__bar { display: none; }
  .mega { display: none; }
  .mmenu { display: block; border-top: 1px solid var(--line); background: #fff; max-height: calc(100vh - 110px); overflow: auto; padding: 8px 0 18px; }
  .mmenu[hidden] { display: none; }
  .mmenu__label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 4px; }
  .mmenu nav { display: grid; }
  .mmenu a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
}

/* крошки */
.crumbs { padding: 14px 0 0; font-size: .86rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }

/* главная */
.hero { padding: clamp(20px, 3vw, 36px) 0 clamp(8px, 2vw, 20px); }
.hero__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.hero h1 { font-size: clamp(1.55rem, 1rem + 2vw, 2.35rem); margin-bottom: .45em; max-width: 24ch; }
.hero .lead { margin-bottom: 0; }
.hero__facts { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--brand-tint); padding: 18px 20px; }
.hero__facts-title { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 10px; color: var(--brand-dark); }
.hero__facts ul { list-style: none; display: grid; gap: 6px; margin-bottom: 10px; }
.hero__facts li { position: relative; padding-left: 18px; }
.hero__facts li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.hero__facts-note { font-size: .86rem; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } .hero__facts { display: none; } .hero .actions .btn { flex: 1 1 100%; } }
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat { display: grid; grid-template-rows: auto auto auto; justify-items: start; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s ease, transform 200ms var(--ease-out); }
.cat:hover { border-color: var(--brand); color: var(--ink); }
.cat__img { width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; background: #fff; border-radius: var(--radius); margin-bottom: 6px; }
.cat__img img { width: 100%; height: 100%; object-fit: contain; }
.cat__name { font-weight: 600; line-height: 1.25; min-height: 2.5em; }
.cat__count { font-size: .82rem; color: var(--muted); }
@media (max-width: 1000px) { .cats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; } .cat { padding: 10px; } }
.segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.seg { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); transition: border-color .15s ease; }
.seg:hover { border-color: var(--brand); color: var(--ink); }
.seg p { color: var(--muted); margin-bottom: 14px; }
.seg__go { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; font-weight: 500; color: var(--brand-dark); }
@media (max-width: 800px) { .segs { grid-template-columns: 1fr; } }
.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.feat .ic { color: var(--brand); margin-bottom: 8px; }
.feat p { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .feats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feats { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.facts { list-style: none; display: grid; gap: 10px; margin-bottom: 1.2em; }
.facts li { padding-left: 18px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.note-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--soft); }
.note-card p { margin: 0; color: var(--muted); }
.container--narrow h2 { margin-top: 1.4em; }
.contact-list { display: grid; gap: 18px; margin: 18px 0; }
.contact-list dt { font-size: .85rem; color: var(--muted); }
.contact-list dd { margin: 2px 0 0; font-size: 1.1rem; }
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; position: relative; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 2px; background: var(--brand-dark); transition: transform 200ms var(--ease-out); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq__a p { padding: 0 40px 18px 0; margin: 0; color: var(--muted); max-width: 70ch; }
.segblock { margin-bottom: 40px; }
.segblock__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.segblock__head p { color: var(--muted); margin: 0; }

/* каталог */
.catalog { padding: 16px 0 48px; }
.catalog__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 6px 0 12px; }
.catalog__head h1 { margin: 0; }
.catalog__head p { margin: 0; }
.catalog__layout { display: grid; grid-template-columns: 268px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: 140px; max-height: calc(100vh - 150px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 4px 16px 16px; background: #fff; }
.filters__head { display: none; }
.filters__foot { display: none; }
.fgroup { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup h3 { font-size: .9rem; text-transform: none; margin: 0 0 8px; }
.ftree { list-style: none; display: grid; gap: 2px; }
.ftree a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .94rem; }
.ftree a:hover { background: var(--soft); }
.ftree a[aria-current="true"] { background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; }
.ftree .sub { padding-left: 12px; }
.ftree .n { color: var(--muted); font-weight: 400; font-size: .84rem; }
.fcheck { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; font-size: .94rem; }
.fcheck input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.fcheck .n { margin-left: auto; color: var(--muted); font-size: .84rem; }
.prange { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prange input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.filters-btn { display: none; }
.sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.sort__label { font-size: .88rem; color: var(--muted); }
.sort select { height: 42px; padding: 0 30px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.view { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.view__btn { width: 44px; height: 42px; display: grid; place-items: center; border: 0; background: #fff; cursor: pointer; color: var(--muted); }
.view__btn[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand-dark); }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 600; }
.count-badge[hidden] { display: none; }
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.active-chips:empty { display: none; }
.achip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark); font-size: .88rem; border: 0; cursor: pointer; }
.achip svg { width: 16px; height: 16px; }
@media (max-width: 899px) {
  .catalog__layout { grid-template-columns: 1fr; }
  .view { display: none; }
  .filters-btn { display: inline-flex; }
  .sort { margin-left: 0; flex: 1; }
  .sort select { width: 100%; }
  .sort__label { display: none; }
  .filters { position: fixed; z-index: 120; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; border-radius: 16px 16px 0 0; border: 0; padding: 0; display: flex; flex-direction: column; transform: translateY(105%); visibility: hidden; transition: transform 260ms var(--ease-out), visibility 0s linear 260ms; box-shadow: 0 -12px 36px -10px rgba(14, 28, 38, .35); }
  .filters.is-open { transform: none; visibility: visible; transition: transform 260ms var(--ease-out), visibility 0s; }
  .filters__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px 16px; border-bottom: 1px solid var(--line); }
  .filters__head h2 { margin: 0; font-size: 1.1rem; }
  .filters__body { overflow: auto; padding: 0 16px; flex: 1; }
  .filters__foot { display: grid; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
  .filters-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(14, 28, 38, .5); }
  .filters-backdrop[hidden] { display: none; }
  body.no-scroll { overflow: hidden; }
}
@media (min-width: 900px) { .filters-backdrop { display: none; } }

/* товарные карточки */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 14px; }
.grid--home { grid-template-columns: repeat(4, 1fr); }
.grid--analogs { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid--home, .grid--analogs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid, .grid--home, .grid--analogs { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.pcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 12px 12px; min-width: 0; transition: border-color .15s ease; }
.pcard:hover { border-color: var(--line-strong); }
.pcard.is-out .pimg img { opacity: .55; }
.pimg { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); }
.pimg a { display: block; width: 100%; height: 100%; }
.pimg img { width: 100%; height: 100%; object-fit: contain; }
.pimg__ph { display: grid; place-items: center; gap: 6px; color: var(--muted); font-size: .85rem; text-align: center; padding: 12px; }
.pimg__ph .ic { color: var(--line-strong); }
.pflag { position: absolute; left: 0; top: 0; padding: 3px 8px; border-radius: 6px; background: var(--danger-tint); color: var(--danger); font-size: .78rem; font-weight: 500; }
.pfav { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.pfav:hover { background: var(--soft); color: var(--ink); }
.pfav[aria-pressed="true"] { color: #d6336c; }
.pbrand { font-size: .78rem; line-height: 18px; height: 18px; overflow: hidden; color: var(--muted); margin: 6px 0 2px; }
.ptitle { font-size: .95rem; font-weight: 500; line-height: 1.3; margin: 0 0 8px; min-height: 3.9em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ptitle a { color: var(--ink); text-decoration: none; }
.ptitle a:hover { color: var(--brand-dark); }
.pprice { margin-top: auto; }
.price { display: block; }
.price__main { display: block; font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; line-height: 1.25; }
.price__unit { display: block; font-size: .84rem; color: var(--muted); min-height: 2.5em; }
.buybox .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.buybox .price__main, .buybox .price__unit { display: inline; min-height: 0; }
.price__ref { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.minbatch { margin: 6px 0 10px; font-size: .86rem; line-height: 1.35; color: var(--ink); background: var(--soft); border-radius: 6px; padding: 6px 8px; min-height: 3.5em; }
.pbuy { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: stretch; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #fff; }
.qty button { width: 34px; border: 0; background: #fff; cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: var(--soft); }
.qty button[disabled] { color: var(--line-strong); cursor: not-allowed; background: #fff; }
.qty input { width: 48px; min-width: 0; border: 0; border-inline: 1px solid var(--line); text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.qty input:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.pbuy { min-height: 54px; }
.pbuy--out { grid-template-columns: 1fr; }
.pbuy .btn { min-height: 40px; padding: 8px 10px; font-size: .92rem; }
@media (max-width: 760px) { .pbuy { grid-template-columns: 1fr; } .pbuy .qty { height: 42px; } .pbuy .qty input { flex: 1; width: auto; } .pbuy .qty button { width: 44px; } }
.qty-hint { color: var(--danger); font-size: .82rem; min-height: 0; margin: 6px 0 0; }
.qty-hint:empty { display: none; }
.pincart { margin: 6px 0 0; font-size: .8rem; color: var(--ok); }
.pincart:empty { display: none; }
.pcard--out .btn { width: 100%; }

/* список (компактный) */
.grid.is-list { grid-template-columns: 1fr; gap: 8px; }
.grid.is-list .pcard { display: grid; grid-template-columns: 96px minmax(0, 1fr) 210px 250px; gap: 4px 16px; align-items: center; padding: 8px 12px; }
.grid.is-list .pimg { width: 96px; grid-row: 1 / span 3; }
.grid.is-list .pbrand { display: none; }
.grid.is-list .ptitle { min-height: 0; margin: 0; -webkit-line-clamp: 2; grid-column: 2; }
.grid.is-list .pprice { grid-column: 3; grid-row: 1 / span 3; margin: 0; }
.grid.is-list .minbatch { grid-column: 2; margin: 4px 0 0; min-height: 0; background: transparent; padding: 0; color: var(--muted); }
.grid.is-list .pbuy, .grid.is-list .pcard-out { grid-column: 4; grid-row: 1 / span 3; }
.grid.is-list .pfav { top: 8px; right: auto; left: auto; position: static; grid-column: 5; }

/* страница товара */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); padding: 20px 0 40px; align-items: start; }
.pimg--lg { border: 1px solid var(--line); border-radius: var(--radius-lg); }
.pdp h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.pdp__brand { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.pdp__avail { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; margin: 0 0 14px; padding: 3px 10px; border-radius: 999px; }
.pdp__avail.is-ok { color: var(--ok); background: var(--ok-tint); }
.pdp__avail.is-out { color: var(--danger); background: var(--danger-tint); }
.pdp__avail .ic { width: 16px; height: 16px; }
.buybox { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: grid; gap: 10px; background: #fff; }
.buybox .price__main { font-size: 2rem; }
.buybox .minbatch { margin: 0; font-size: .92rem; }
.buy { display: flex; flex-wrap: wrap; gap: 10px; }
.buy .qty button { width: 42px; } .buy .qty input { width: 64px; }
.buy .qty { height: 50px; }
.buy__btn { flex: 1 1 180px; }
.buy__total { margin: 0; font-weight: 500; }
.specs { display: grid; margin: 22px 0 14px; border-top: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); font-size: .92rem; }
.specs dd { margin: 0; }
.doc { margin: 0 0 10px; }
.fav-btn.is-on { border-color: #d6336c; color: #d6336c; }
@media (max-width: 800px) { .pdp { grid-template-columns: 1fr; } }

/* корзина */
.cartpage { padding: 18px 0 56px; }
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.cart__lines { display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto auto 44px; gap: 10px 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.line__img { width: 84px; aspect-ratio: 1 / 1; display: grid; place-items: center; background: #fff; }
.line__img img { width: 100%; height: 100%; object-fit: contain; }
.line__name { font-weight: 500; margin: 0 0 2px; font-size: .96rem; }
.line__name a { color: var(--ink); text-decoration: none; }
.line__meta { margin: 0; font-size: .84rem; color: var(--muted); }
.line__price { text-align: right; font-size: .84rem; color: var(--muted); white-space: nowrap; }
.line__sum { text-align: right; font-weight: 600; font-size: 1.1rem; min-width: 96px; white-space: nowrap; }
.line .qty { height: 42px; }
.line__hint { grid-column: 2 / -1; color: var(--danger); font-size: .82rem; margin: -4px 0 0; }
.line__hint:empty { display: none; }
.line__rm { width: 40px; height: 40px; }
@media (max-width: 1020px) { .cart { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .line { grid-template-columns: 72px minmax(0, 1fr) 44px; grid-template-areas: "img main rm" "img qty sum" "hint hint hint"; gap: 8px 12px; align-items: start; }
  .line__img { grid-area: img; width: 72px; }
  .line__main { grid-area: main; }
  .line__price { display: none; }
  .line__qty { grid-area: qty; align-self: center; }
  .line__sum { grid-area: sum; align-self: center; min-width: 0; }
  .line__rm { grid-area: rm; }
  .line__hint { grid-area: hint; grid-column: auto; margin: 0; }
}
.summary { position: sticky; top: 150px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: #fff; display: grid; gap: 12px; }
.summary--static { position: static; }
.summary h2 { margin: 0; font-size: 1.15rem; }
.mode { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.mode__opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.mode__opt:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.mode__opt input { accent-color: var(--brand); margin-top: 4px; }
.mode__opt span { display: grid; line-height: 1.3; }
.mode__opt small { color: var(--muted); }
.sum { display: grid; gap: 8px; margin: 0; }
.sum > div { display: flex; justify-content: space-between; gap: 12px; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sum__total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.2rem; }
.sum__total dt { color: var(--ink); font-weight: 600; }
.sum__total dd { font-weight: 600; }
.free-left { margin: 0; padding: 8px 10px; border-radius: var(--radius); background: var(--warn-tint); font-size: .9rem; }
.free-left.is-done { background: var(--ok-tint); color: var(--ok); }
.free-left[hidden] { display: none; }
.savelist__form { display: grid; gap: 10px; margin-top: 10px; }
.savelist__form[hidden] { display: none; }
.savelist__row { display: flex; gap: 8px; }
.lists { margin-top: 28px; }
.lists h2 { margin-bottom: .2em; }
.lists__items { display: grid; gap: 10px; margin-top: 10px; }
.lst { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
.lst h3 { margin: 0; }
.lst p { margin: 0; color: var(--muted); font-size: .88rem; }
.lst__act { display: flex; gap: 8px; flex-wrap: wrap; }
.lst__act .btn { min-height: 40px; padding: 8px 14px; }
.empty { display: grid; place-items: center; gap: 4px; text-align: center; padding: 48px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty[hidden] { display: none; }
.empty h2 { margin: 6px 0 0; }
.empty p { color: var(--muted); max-width: 46ch; }

/* оформление */
.checkout { padding: 18px 0 56px; }
.checkout__layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.checkout__layout[hidden] { display: none; }
.form { display: grid; gap: 18px; }
.field-group { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px 18px; display: grid; gap: 14px; margin: 0; }
.field-group legend { padding: 0 8px; font-weight: 600; }
.field { display: grid; gap: 6px; min-width: 0; }
.field__label { font-size: .92rem; font-weight: 500; }
.field__label em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; }
.field__hint { font-size: .84rem; color: var(--muted); }
.field__error { color: var(--danger); font-size: .86rem; }
.field__error:empty { display: none; }
.field input[type="text"], .field input[type="tel"], .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field[hidden] { display: none; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; cursor: pointer; }
.choice input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: .94rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); }
.check .field__error { grid-column: 2; }
.demo-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-tint); border: 1px solid #f1dfa8; }
.demo-note p { margin: 0; }
.demo-note .ic { margin-top: 2px; color: #8a6d00; }
.csum { display: grid; gap: 8px; }
.csum__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: .9rem; }
.csum__row span:first-child { color: var(--muted); }
.order-done { text-align: center; padding: 32px 0 20px; display: grid; justify-items: center; gap: 4px; }
.order-done[hidden] { display: none; }
.order-done .ic--xl { color: var(--ok); }
.order-done__box { width: min(560px, 100%); text-align: left; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; margin: 12px 0; }
@media (max-width: 1020px) { .checkout__layout { grid-template-columns: 1fr; } }

/* уведомления */
.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 150; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: .94rem; box-shadow: 0 10px 28px -10px rgba(14, 28, 38, .5); }
.toast button { border: 0; background: transparent; color: #8fd8ee; font-weight: 600; cursor: pointer; padding: 6px 8px; }
.toast--err { background: var(--danger); }

/* подвал */
.ftr { background: #0c1a24; color: #d4dee6; padding: 36px 0 44px; margin-top: 24px; font-size: .94rem; }
.ftr__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 28px; }
.ftr a, .ftr span { display: block; color: #d4dee6; text-decoration: none; padding: 3px 0; }
.ftr a:hover { color: #fff; text-decoration: underline; }
.ftr__brand { font-size: 1.3rem; margin: 0 0 .4em; font-weight: 500; }
.ftr__brand b { color: #7fd1e8; font-weight: 600; }
.ftr__title { color: #8aa0b0; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .5em; }
.ftr__text { color: #a8bac7; margin: 0; max-width: 40ch; }
@media (max-width: 900px) { .ftr__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ftr__grid { grid-template-columns: 1fr; } }
