/* soft.digital.moscow — дизайн-система. Токены и роли: DESIGN.md */

:root {
  --paper: #f7f8f9;
  --paper-2: #eef1f3;
  --white: #fff;
  --ink: #111418;
  --ink-2: #41474f;
  --muted: #727a85;
  --line: #dfe3e7;
  --accent: #ef2b32;
  --accent-ink: #c71920;
  --ok: #1b8a5a;
  --warn: #b7791f;
  --bad: #b42318;

  /* Нативные системные шрифты: ноль внешних запросов и мгновенный первый рендер. */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px;
  --s12: 48px; --s16: 64px; --s24: 96px;
  --r: 8px; --r-card: 12px;
  --container: 1360px;
  --gutter: 16px;
  --t: 120ms ease;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 var(--s3); letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }
@media (min-width: 768px) { h1 { font-size: 40px; } h2 { font-size: 28px; } }
p { margin: 0 0 var(--s4); }
.display { font-family: var(--font-display); font-weight: 500; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.045em; text-wrap: balance; }
.small { font-size: 14px; line-height: 1.5; }
.micro { font-size: 12px; line-height: 1.4; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.price--lg { font-size: 28px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; transform: translateY(-160%); background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: var(--r); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; margin-bottom: var(--s3); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.rule { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }

/* ── шапка ─────────────────────────────────────────────────────────────── */
.site-header { background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.site-header { transition: background 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease; }
.site-header.is-compact { background: color-mix(in srgb, var(--paper) 86%, transparent); box-shadow: 0 8px 28px rgb(45 57 69 / 8%); backdrop-filter: blur(22px) saturate(145%); }
.site-header__inner { min-height: 64px; display: grid; grid-template-columns: auto auto minmax(180px, 1fr) auto; gap: var(--s4); align-items: center; }
.brand { min-width: 0; font-family: var(--font-display); white-space: nowrap; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand { display: inline-flex; align-items: center; }
.brand > img { display: block; width: 142px; height: auto; }
.brand__product { min-width: 0; padding-left: 12px; border-left: 1px solid var(--line); display: grid; gap: 1px; }
.brand__product b { color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.brand__product small { color: var(--muted); font-size: 9px; letter-spacing: .02em; }
.site-footer__logo img { display: block; height: 40px; width: auto; }
@media (max-width: 479px) {
  .brand { gap: 8px; }
  .brand > img { width: 126px; }
  .brand__product { padding-left: 8px; }
  .brand__product small { display: none; }
}
.primary-nav { display: flex; align-items: center; gap: var(--s4); font-size: 13px; white-space: nowrap; }
.primary-nav a { color: var(--ink-2); }
.primary-nav a:hover, .primary-nav a.is-active { color: var(--ink); text-decoration: none; }
.primary-nav a.is-active { box-shadow: 0 2px 0 var(--accent); }
.search { display: flex; align-items: center; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); padding-left: 13px; transition: border-color 180ms ease, box-shadow 180ms ease; }
.search:focus-within { border-color: #aeb5bd; box-shadow: 0 0 0 3px rgb(17 20 24 / 6%); }
.search > svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; color: var(--muted); flex: 0 0 auto; }
.search input { flex: 1; min-width: 0; height: 38px; border: 0; padding: 0 10px; background: transparent; font-size: 13px; }
.search input:focus { outline: 0; }
.search button, .hero-search button { width: 34px; height: 34px; margin-right: 3px; padding: 0; border: 0; background: var(--accent); color: var(--white); border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: background 180ms ease, transform 180ms ease; }
.search button:hover, .hero-search button:hover { background: var(--accent-ink); }
.search button:active, .hero-search button:active { transform: scale(.96); }
.search button svg, .hero-search button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; }
.nav { display: flex; gap: var(--s2); align-items: center; white-space: nowrap; }
.nav__icon, .cart-link { width: 36px; height: 36px; display: grid; place-items: center; position: relative; border-radius: 50%; }
.nav__icon:hover, .cart-link:hover { background: var(--paper-2); text-decoration: none; }
.nav svg, .cart-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cart-link__count { position: absolute; top: -2px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--white); font: 600 10px/1 var(--font-body); }
.mobile-dock, .mobile-dock__cart { display: none; }
@media (max-width: 1023px) { .site-header__inner { grid-template-columns: auto 1fr auto; } .primary-nav { display: none; } }
@media (max-width: 767px) { .site-header__inner { grid-template-columns: 1fr auto; padding: 10px 0; } .search { grid-column: 1 / -1; grid-row: 2; } }

/* ── герой ─────────────────────────────────────────────────────────────── */
.hero { padding: var(--s6) 0 var(--s8); border-bottom: 1px solid var(--line); }
.hero__panel { min-height: 440px; display: grid; overflow: hidden; position: relative; background: #f0f2f4; border: 1px solid var(--line); border-radius: 16px; }
.hero__copy { padding: clamp(28px, 5vw, 68px); position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; }
.hero__lead { font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 52ch; text-wrap: pretty; }
.hero-search { display: flex; align-items: center; max-width: 620px; height: 52px; margin-top: var(--s4); border: 1px solid #d8dde1; border-radius: 999px; background: var(--white); padding-left: 17px; box-shadow: 0 12px 36px rgb(55 66 77 / 8%); }
.hero-search > svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; color: var(--muted); }
.hero-search input { min-width: 0; flex: 1; height: 50px; border: 0; background: transparent; padding: 0 12px; font-size: 14px; }
.hero-search input:focus { outline: 0; }
.hero-search button { width: 42px; height: 42px; }
.software-stage { display: none; position: relative; min-height: 440px; background: radial-gradient(circle at 60% 45%, #fff 0, #edf0f2 58%, #e1e5e8 100%); }
.software-stage::after { content: ""; position: absolute; left: 8%; right: 6%; bottom: 42px; height: 42px; background: rgb(75 89 102 / 15%); filter: blur(24px); border-radius: 50%; }
.software-stage__back { position: absolute; width: 70%; height: 68%; left: 14%; top: 12%; border: 1px solid rgb(255 255 255 / 90%); background: rgb(255 255 255 / 48%); transform: skewY(-5deg); box-shadow: inset 0 0 0 1px rgb(170 180 190 / 14%); }
.software-pack { position: absolute; z-index: 2; width: 126px; aspect-ratio: .78; padding: 18px; background: rgb(255 255 255 / 92%); border: 1px solid #dfe3e7; box-shadow: 0 24px 48px rgb(65 76 88 / 14%); display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; }
.software-pack b { font: 500 14px/1.2 var(--font-display); }
.software-pack small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.software-pack--main { width: 160px; left: 33%; top: 20%; transform: rotate(-2deg); }
.software-pack--red { width: 104px; left: 13%; top: 34%; background: #2a2d31; transform: rotate(-6deg); }
.software-pack--green { width: 95px; right: 10%; top: 38%; transform: rotate(5deg); }
.app-mark { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; color: white; font: 600 17px/1 var(--font-display); margin-bottom: auto; }
.app-mark--blue { background: #2877e8; } .app-mark--red { background: #ed3a3f; } .app-mark--green { background: #26a56d; }
.software-window { position: absolute; z-index: 3; width: 178px; height: 112px; right: 19%; top: 18%; background: rgb(255 255 255 / 92%); border: 1px solid #dde2e6; box-shadow: 0 20px 44px rgb(65 76 88 / 12%); padding: 15px; transform: rotate(3deg); }
.software-window span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #dce1e5; margin-right: 3px; }
.software-window span:first-child { background: var(--accent); }
.software-window b { display: block; margin-top: 24px; font: 500 12px/1.35 var(--font-display); max-width: 11ch; }
@media (min-width: 960px) { .hero__panel { grid-template-columns: 1.05fr .95fr; } .software-stage { display: block; } }

.task-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s3); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); }
.task-nav a { min-width: 0; min-height: 88px; padding: 16px; display: flex; align-items: center; gap: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 180ms ease; }
.task-nav a:hover { background: var(--paper); text-decoration: none; }
.task-nav__icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; }
.task-nav svg, .trust-strip svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.task-nav b, .task-nav small { display: block; overflow: hidden; text-overflow: ellipsis; }
.task-nav b { font-size: 14px; font-weight: 500; white-space: nowrap; }
.task-nav small { margin-top: 2px; color: var(--muted); font-size: 11px; white-space: nowrap; }
@media (min-width: 700px) { .task-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .task-nav { grid-template-columns: repeat(7, minmax(0, 1fr)); } .task-nav a { border-bottom: 0; } }

.trust-strip { display: grid; gap: 0; margin-top: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.trust-strip > span { min-height: 68px; padding: 12px 16px; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-content: center; border-bottom: 1px solid var(--line); }
.trust-strip svg { grid-row: 1 / 3; align-self: center; width: 21px; height: 21px; }
.trust-strip b { font-size: 13px; font-weight: 500; }
.trust-strip small { color: var(--muted); font-size: 11px; }
@media (min-width: 700px) { .trust-strip { grid-template-columns: repeat(4, 1fr); } .trust-strip > span { border-bottom: 0; border-right: 1px solid var(--line); } .trust-strip > span:last-child { border-right: 0; } }

/* ── кнопки ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 44px; padding: 0 var(--s6); border-radius: var(--r); border: 1px solid transparent; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--ink-2); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { height: 36px; padding: 0 var(--s4); font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── карточки товаров ──────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--s3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .grid--5 { grid-template-columns: repeat(5, 1fr); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); display: flex; flex-direction: column; overflow: hidden; transition: border-color 180ms ease, transform 180ms ease; }
.card:hover { border-color: #bcc3ca; transform: translateY(-2px); }
.card__img { aspect-ratio: 4 / 3; background: var(--paper-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card__img img { transition: transform 360ms cubic-bezier(.2,.75,.25,1); }
.card__img--empty { font-family: var(--font-display); font-weight: 500; color: var(--muted); font-size: 14px; text-align: center; padding: var(--s4); }
.card__body { padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.card__vendor { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.card__title { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a:hover { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding-top: var(--s2); }
.card__foot form, .card__foot button { position: relative; z-index: 1; }
.card .price { font-size: 18px; }
.card__meta { color: var(--muted); font-size: 11px; line-height: 1.35; }
.card__cart { width: 36px; height: 36px; border: 0; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--white); cursor: pointer; transition: background 180ms ease, transform 180ms ease; }
.card__cart:hover { background: var(--accent-ink); }
.card__cart:active { transform: scale(.96); }
.card__cart svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__img img { transform: scale(1.035); }
  .task-nav a:hover .task-nav__icon, .trust-strip > span:hover svg { transform: translateY(-2px); }
}

/* ── каталог: фильтры ──────────────────────────────────────────────────── */
.catalog { display: grid; gap: var(--s6); }
@media (min-width: 1024px) { .catalog { grid-template-columns: 240px 1fr; } }
.catalog--wide { grid-template-columns: 1fr; }
.filters details { border-top: 1px solid var(--line); padding: var(--s2) 0; }
.filters summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; padding: var(--s2) 0; }
.filters summary::after { content: "+"; color: var(--muted); }
.filters details[open] summary::after { content: "–"; }
.filters label { display: flex; gap: var(--s2); align-items: center; font-size: 14px; padding: 3px 0; cursor: pointer; }
.filters input[type="checkbox"] { accent-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: var(--s1); border: 1px solid var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.chip:hover { text-decoration: none; background: var(--accent); color: var(--white); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.select { height: 36px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); padding: 0 var(--s2); }
.pagination { display: flex; gap: var(--s1); justify-content: center; margin: var(--s8) 0; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r); font-family: var(--font-mono); font-size: 14px; }
.pagination .is-current { background: var(--ink); color: var(--white); border-color: var(--ink); }
.breadcrumbs { font-size: 13px; color: var(--muted); margin: var(--s4) 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.breadcrumbs a { color: var(--ink-2); }

/* ── карточка товара ───────────────────────────────────────────────────── */
.product { display: grid; gap: var(--s6); }
@media (min-width: 1024px) { .product { grid-template-columns: 5fr 7fr; gap: var(--s12); } }
.gallery__main { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery__main img { max-height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: var(--s2); margin-top: var(--s2); overflow-x: auto; }
.gallery__thumbs img { width: 64px; height: 48px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.buybox { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s4); display: grid; gap: var(--s3); }
.buybox__qty { display: flex; align-items: center; gap: var(--s2); }
.buybox__qty input { width: 64px; height: 44px; text-align: center; border: 1px solid var(--line); border-radius: var(--r); font-family: var(--font-mono); }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: var(--s2) 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 400; width: 40%; }
.prose { max-width: 70ch; }
.prose img { border-radius: var(--r); }
.prose h2, .prose h3 { margin-top: var(--s6); }
.tabs { display: flex; gap: var(--s4); border-bottom: 1px solid var(--line); margin: var(--s8) 0 var(--s4); overflow-x: auto; }
.tabs a { padding: var(--s2) 0; border-bottom: 2px solid transparent; white-space: nowrap; color: var(--ink-2); }
.tabs a { transition: color 180ms ease, border-color 180ms ease; }
.tabs a.is-active { border-color: var(--ink); color: var(--ink); font-weight: 600; }

/* ── квитанция ─────────────────────────────────────────────────────────── */
.receipt { background: var(--paper-2); border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); padding: var(--s4); font-size: 14px; }
.receipt__row { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px dotted var(--line); }
.receipt__row:last-child { border-bottom: 0; }
.receipt__row b { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.receipt__title { font-family: var(--font-display); font-weight: 700; margin-bottom: var(--s2); }
.timeline { display: grid; gap: var(--s2); counter-reset: step; font-size: 14px; }
.timeline div { display: flex; gap: var(--s3); align-items: baseline; }
.timeline div::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-mono); color: var(--muted); }
.key { font-family: var(--font-mono); font-size: 18px; font-weight: 600; letter-spacing: .04em; background: var(--white); border: 1px solid var(--line); padding: var(--s2) var(--s3); border-radius: var(--r); user-select: all; word-break: break-all; }

/* ── статусы ───────────────────────────────────────────────────────────── */
.pill { display: inline-block; font-size: 12px; line-height: 1; padding: 5px 8px; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; }
.pill--ok { color: var(--ok); } .pill--warn { color: var(--warn); } .pill--bad { color: var(--bad); } .pill--muted { color: var(--muted); }

/* ── формы ─────────────────────────────────────────────────────────────── */
.form { display: grid; gap: var(--s4); }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: var(--s1); }
.field input, .field select, .field textarea { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 var(--s3); background: var(--white); }
.field textarea { height: auto; padding: var(--s2) var(--s3); min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field .error, .errorlist { color: var(--bad); font-size: 13px; margin: var(--s1) 0 0; padding: 0; list-style: none; }
.field--check { display: flex; gap: var(--s2); align-items: flex-start; font-size: 14px; }
.field--check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
.form-cols { display: grid; gap: var(--s4); }
@media (min-width: 768px) { .form-cols { grid-template-columns: 1fr 1fr; } }
.alert { border: 1px solid var(--line); border-left: 4px solid var(--ink); padding: var(--s3) var(--s4); background: var(--white); border-radius: var(--r); }
.alert--bad { border-left-color: var(--bad); }
.alert--ok { border-left-color: var(--ok); }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.segmented a, .segmented button { padding: 0 var(--s4); height: 40px; display: inline-flex; align-items: center; background: var(--white); border: 0; cursor: pointer; }
.segmented .is-active { background: var(--ink); color: var(--white); }

/* ── корзина / таблицы ─────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.table td { padding: var(--s3) 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.qty button { width: 32px; height: 32px; background: var(--white); border: 0; cursor: pointer; }
.qty span { width: 40px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); }
.summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s4); display: grid; gap: var(--s2); position: sticky; top: 80px; }
.summary__total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 600; border-top: 1px solid var(--line); padding-top: var(--s3); }
.checkout { display: grid; gap: var(--s6); }
@media (min-width: 1024px) { .checkout { grid-template-columns: 7fr 5fr; gap: var(--s12); } }

/* ── секции ────────────────────────────────────────────────────────────── */
.section { padding: var(--s12) 0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s4); }
.section__head a { font-size: 14px; color: var(--ink-2); }
.tiles { display: grid; gap: var(--s3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { min-height: 150px; border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s4); background: var(--white); display: flex; flex-direction: column; gap: var(--s1); transition: border-color 180ms ease, transform 180ms ease; }
.tile:hover { border-color: #bcc3ca; transform: translateY(-2px); text-decoration: none; }
.tile__mark { margin-bottom: auto; color: var(--accent); font: 500 12px/1 var(--font-mono); }
.tile b { font-family: var(--font-display); font-weight: 500; }
.tile span { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }
.b2b { background: var(--ink); color: var(--paper); padding: var(--s12) 0; }
.b2b a { color: var(--paper); }
.b2b__grid { display: grid; gap: var(--s6); }
@media (min-width: 1024px) { .b2b__grid { grid-template-columns: 7fr 5fr; } }
.b2b .btn--ghost { border-color: var(--paper); color: var(--paper); }
.vendors { display: flex; flex-wrap: wrap; gap: var(--s2); }
.vendors a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; background: var(--white); }
.vendors a:hover { border-color: var(--ink); text-decoration: none; }

/* ── футер ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--s16); padding: clamp(44px, 6vw, 80px) 0 24px; font-size: 13px; color: var(--ink-2); background: #f3f4f4; }
.site-footer a { transition: color 180ms ease; }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.site-footer__lead { display: grid; gap: var(--s8); padding-bottom: var(--s8); }
.site-footer__company { max-width: 54ch; }
.site-footer__logo { display: inline-flex; margin-bottom: var(--s3); }
.site-footer__company p { color: var(--ink); font: 500 clamp(18px, 2.1vw, 27px)/1.25 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
.site-footer__company address { margin-top: var(--s4); color: var(--muted); font-style: normal; line-height: 1.65; }
.site-footer__company address b { color: var(--ink-2); font-weight: 500; }
.site-footer__contact { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.site-footer__contact > span { margin-bottom: var(--s1); color: var(--muted); }
.site-footer__contact > a { color: var(--ink); font: 500 17px/1.35 var(--font-display); }
.site-footer__social { display: flex; gap: var(--s2); margin-top: var(--s3); }
.site-footer__social a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #d4d8da; border-radius: 50%; color: var(--ink); font: 600 10px/1 var(--font-mono); }
.site-footer__social a:hover { border-color: var(--accent); color: var(--accent); }
.site-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s4); padding: var(--s8) 0; border-top: 1px solid #d8dcde; }
.site-footer__nav h2 { margin: 0 0 var(--s3); color: var(--ink); font: 500 13px/1.2 var(--font-display); }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-footer__nav a { color: var(--ink-2); line-height: 1.4; }
.site-footer__nav li > span { color: var(--muted); line-height: 1.4; }
.site-footer__bottom { display: grid; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid #d8dcde; color: var(--muted); font-size: 11px; line-height: 1.55; }
.site-footer__bottom p:first-child { color: var(--ink-2); font-weight: 500; white-space: nowrap; }
@media (min-width: 768px) {
  .site-footer__lead { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); align-items: end; }
  .site-footer__nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .site-footer__bottom { grid-template-columns: auto minmax(0, 1fr); gap: var(--s8); align-items: start; }
}

/* ── мобильный liquid glass ───────────────────────────────────────────── */
@media (max-width: 767px) {
  :root { --gutter: 14px; --r-card: 18px; }
  html { scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 8% 4%, rgb(255 255 255 / 92%) 0 8rem, transparent 19rem),
      radial-gradient(circle at 100% 22%, rgb(225 232 239 / 65%) 0 7rem, transparent 21rem),
      #edf1f4;
  }
  body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(145deg, rgb(255 255 255 / 38%), transparent 42%, rgb(220 227 234 / 25%));
  }
  h1 { font-size: clamp(28px, 9vw, 38px); letter-spacing: -.04em; }
  h2 { font-size: 23px; letter-spacing: -.035em; }
  .display { font-size: clamp(38px, 12vw, 52px); }
  .section { padding: 34px 0; }

  .site-header { border-bottom: 0; background: rgb(239 243 246 / 72%); backdrop-filter: blur(24px) saturate(155%); -webkit-backdrop-filter: blur(24px) saturate(155%); box-shadow: 0 1px 0 rgb(255 255 255 / 78%), 0 10px 30px rgb(48 60 72 / 7%); }
  .site-header__inner { min-height: 58px; gap: 8px; padding-block: max(8px, env(safe-area-inset-top)) 8px; padding-inline: var(--gutter); }
  .brand > img { width: 120px; }
  .brand__product { padding-left: 7px; }
  .brand__product b { font-size: 9px; }
  .brand__product small { display: none; }
  .nav { display: none; }
  .search { height: 44px; margin: 0 0 2px; padding-left: 14px; border-color: rgb(255 255 255 / 82%); background: rgb(255 255 255 / 66%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%), 0 8px 22px rgb(55 68 82 / 8%); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .search input { height: 42px; font-size: 16px; }
  .search button { width: 36px; height: 36px; }
  .page-home .site-header .search { display: none; }
  .page-home .site-header__inner { padding-bottom: max(8px, env(safe-area-inset-top)); }

  .mobile-dock {
    position: fixed; z-index: 60; left: 10px; right: 10px; bottom: max(9px, env(safe-area-inset-bottom));
    min-height: 68px; padding: 7px 7px 6px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 1px solid rgb(255 255 255 / 76%); border-radius: 24px;
    background: linear-gradient(160deg, rgb(255 255 255 / 82%), rgb(238 243 247 / 68%));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 95%), inset 0 -1px 0 rgb(125 139 153 / 10%), 0 14px 38px rgb(42 55 70 / 18%);
    backdrop-filter: blur(28px) saturate(175%); -webkit-backdrop-filter: blur(28px) saturate(175%);
  }
  .mobile-dock > a, .mobile-dock__cart { min-width: 0; min-height: 52px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 17px; color: #59636e; font: 500 9px/1 var(--font-body); text-decoration: none; transition: color 180ms ease, background 180ms ease, transform 180ms ease; }
  .mobile-dock > a:active, .mobile-dock__cart:active { transform: scale(.94); }
  .mobile-dock > a.is-active, .mobile-dock__cart.is-active { color: var(--accent-ink); background: linear-gradient(155deg, rgb(255 255 255 / 82%), rgb(255 235 236 / 75%)); box-shadow: inset 0 1px 0 #fff, 0 5px 13px rgb(181 39 47 / 10%); }
  .mobile-dock svg, .mobile-dock__cart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-dock b, .mobile-dock__cart b { position: absolute; top: 2px; left: calc(50% + 7px); min-width: 15px; height: 15px; padding: 0 3px; display: grid; place-items: center; border: 2px solid rgb(250 251 252 / 88%); border-radius: 999px; background: var(--accent); color: #fff; font: 600 8px/1 var(--font-body); }
  .mobile-dock b:empty, .mobile-dock__cart b:empty { display: none; }

  .hero { padding: 16px 0 30px; }
  .hero__panel { min-height: 0; border-color: rgb(255 255 255 / 78%); border-radius: 26px; background: linear-gradient(155deg, rgb(255 255 255 / 75%), rgb(231 237 242 / 62%)); box-shadow: inset 0 1px 0 #fff, 0 18px 44px rgb(55 68 82 / 10%); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .hero__copy { padding: 32px 22px 28px; }
  .hero__lead { font-size: 15px; }
  .hero-search { height: 50px; margin-top: 16px; padding-left: 15px; border-color: rgb(255 255 255 / 88%); box-shadow: inset 0 1px 0 #fff, 0 12px 26px rgb(47 59 72 / 10%); }
  .hero-search input { height: 48px; font-size: 16px; }
  .task-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); border-color: rgb(255 255 255 / 78%); border-radius: 20px; background: rgb(255 255 255 / 58%); box-shadow: inset 0 1px 0 #fff, 0 13px 34px rgb(55 68 82 / 8%); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .task-nav a { min-height: 76px; padding: 12px; }
  .trust-strip { border-color: rgb(255 255 255 / 78%); border-radius: 20px; background: rgb(255 255 255 / 58%); box-shadow: inset 0 1px 0 #fff, 0 13px 34px rgb(55 68 82 / 8%); }

  .grid { gap: 10px; }
  .card, .tile, .buybox, .summary, .gallery__main, .filters {
    border-color: rgb(255 255 255 / 80%); background: linear-gradient(155deg, rgb(255 255 255 / 78%), rgb(245 248 250 / 64%));
    box-shadow: inset 0 1px 0 #fff, 0 12px 30px rgb(55 68 82 / 8%); backdrop-filter: blur(18px) saturate(135%); -webkit-backdrop-filter: blur(18px) saturate(135%);
  }
  .card { border-radius: 18px; }
  .card:hover { transform: none; }
  .card__img { aspect-ratio: 1 / .82; background: rgb(236 240 243 / 64%); }
  .card__body { padding: 11px; gap: 6px; }
  .card__vendor { font-size: 9px; }
  .card__title { font-size: 13px; }
  .card .price { font-size: 15px; }
  .card__cart { width: 34px; height: 34px; border-radius: 11px; }
  .card__meta { font-size: 9px; }

  .catalog { gap: 16px; }
  .filters { padding: 8px 14px; border: 1px solid rgb(255 255 255 / 80%); border-radius: 20px; }
  .toolbar { align-items: end; margin-bottom: 14px; }
  .toolbar label { flex: 1; }
  .toolbar .select { width: 100%; }
  .select { background: rgb(255 255 255 / 72%); }
  .pagination { margin: 30px 0; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }

  .product { gap: 20px; }
  .breadcrumbs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; white-space: nowrap; scrollbar-width: none; }
  .gallery__main { border-radius: 24px; }
  .buybox { padding: 16px; border-radius: 22px; }
  .buybox form.row { display: grid; grid-template-columns: 1fr 1fr; }
  .buybox__qty { grid-column: 1 / -1; }
  .buybox form.row .btn { width: 100%; padding: 0 10px; }
  .tabs { position: sticky; top: 111px; z-index: 10; margin: 30px -14px 18px; padding: 0 14px; background: rgb(239 243 246 / 80%); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .form-cols { grid-template-columns: 1fr !important; gap: 24px !important; }

  .checkout { gap: 18px; }
  .summary { position: static; border-radius: 22px; }
  .segmented { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border-color: rgb(255 255 255 / 85%); border-radius: 16px; background: rgb(255 255 255 / 52%); padding: 3px; }
  .segmented a, .segmented button { height: auto; min-height: 44px; padding: 7px 9px; justify-content: center; text-align: center; border-radius: 13px; font-size: 12px; }
  .field input, .field select, .field textarea { min-height: 48px; border-color: rgb(255 255 255 / 86%); background: rgb(255 255 255 / 68%); box-shadow: inset 0 1px 0 #fff; font-size: 16px; }
  .table { display: block; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .table tbody, .table thead { min-width: 650px; }
  .site-footer { margin-top: 48px; padding-bottom: 28px; background: rgb(234 239 243 / 72%); }
  .site-footer__nav { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); width: calc(100% - 28px); text-align: center; }
  .search-hint { margin-top: -4px; }
}

/* ── responsive continuity: phone → tablet → desktop ─────────────────── */
@media (max-width: 389px) {
  :root { --gutter: 12px; }
  .grid { grid-template-columns: 1fr; }
  .card { display: grid; grid-template-columns: minmax(112px, 38%) 1fr; }
  .card__img { aspect-ratio: 1 / 1.08; }
  .card__body { min-width: 0; }
  .card__title { -webkit-line-clamp: 3; }
  .display { font-size: clamp(34px, 11.5vw, 44px); }
  .hero__copy { padding: 27px 18px 24px; }
  .hero-search input { padding-inline: 9px 4px; }
  .task-nav a { gap: 8px; }
  .task-nav__icon { width: 32px; height: 32px; }
  .site-footer__nav { grid-template-columns: 1fr; }
  .mobile-dock { left: 6px; right: 6px; padding-inline: 4px; border-radius: 21px; }
  .mobile-dock > a, .mobile-dock__cart { font-size: 8px; border-radius: 15px; }
}

@media (max-width: 339px) {
  .brand__product { display: none; }
  .task-nav { grid-template-columns: 1fr; }
  .mobile-dock > a, .mobile-dock__cart { gap: 2px; }
  .mobile-dock svg, .mobile-dock__cart svg { width: 20px; height: 20px; }
}

@media (min-width: 600px) and (max-width: 767px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root { --gutter: clamp(22px, 4vw, 36px); }
  .hero__copy { padding: clamp(38px, 7vw, 64px); }
  .section { padding-block: 42px; }
  .product { grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr); align-items: start; }
  .gallery__main { position: sticky; top: 88px; }
  .checkout { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 28px; }
  .summary { top: 88px; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --gutter: 28px; }
  .site-header__inner { gap: 12px; }
  .primary-nav { gap: 12px; }
  .brand__product small { display: none; }
}

@media (max-width: 767px) and (max-height: 500px) and (orientation: landscape) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .mobile-dock { min-height: 54px; bottom: max(5px, env(safe-area-inset-bottom)); padding-block: 4px; }
  .mobile-dock > a, .mobile-dock__cart { min-height: 44px; gap: 0; }
  .mobile-dock > a span, .mobile-dock__cart span { display: none; }
  .toast { bottom: calc(66px + env(safe-area-inset-bottom)); }
}

/* ── restrained motion: reveal once, then remain stable ──────────────── */
.task-nav__icon, .trust-strip svg { transition: transform 220ms cubic-bezier(.2,.75,.25,1); }
.motion-ready .reveal-item { opacity: 0; transform: translateY(14px); }
.motion-ready .reveal-item.is-revealed {
  opacity: 1; transform: translateY(0);
  transition: opacity 440ms ease var(--reveal-delay, 0ms), transform 520ms cubic-bezier(.2,.75,.25,1) var(--reveal-delay, 0ms);
}
.mobile-dock { animation: dock-in 420ms cubic-bezier(.2,.8,.25,1) both; }
@keyframes dock-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── HTMX ──────────────────────────────────────────────────────────────── */
.htmx-swapping { opacity: .5; transition: opacity var(--t); }
.htmx-request .btn { opacity: .6; }
.toast { position: fixed; left: 50%; bottom: var(--s6); transform: translateX(-50%); background: var(--ink); color: var(--white); padding: var(--s3) var(--s4); border-radius: var(--r); font-size: 14px; z-index: 30; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .motion-ready .reveal-item { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-header, .subnav, .site-footer, .btn, .nav, .mobile-dock { display: none !important; }
  body { background: #fff; }
}
