/* ============================================================
   ВЕРСТАК — каталог профессионального электроинструмента
   Визуальный язык: инженерный лист. Бетон, графит, штрих.
   ============================================================ */

:root {
  /* Поверхности */
  --bg:        #E8E9E5;
  --bg-lift:   #F1F2EE;
  --bg-panel:  #16181B;
  --bg-panel-2:#1E2226;

  /* Текст */
  --ink:       #16181B;
  --ink-soft:  #464C51;
  --ink-mute:  #5F6468;
  --ink-invert:#EDEEEA;

  /* Линии */
  --line:      #C4C8C3;
  --line-soft: #D7DAD5;
  --line-dark: #31373C;

  /* Брендовые акценты (работают как маркировка, не как декор) */
  --bosch:     #0A5CA8;
  --makita:    #00838F;
  --dewalt:    #C2860A;
  --milwaukee: #C32D32;

  --focus:     #0A5CA8;

  /* Шрифты */
  --display: 'Unbounded', 'Helvetica Neue', Arial, sans-serif;
  --text:    'Golos Text', 'Helvetica Neue', Arial, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --shell: 1340px;
  --gut: 32px;
}

* { box-sizing: border-box; }

/* Атрибут hidden должен побеждать любые display в компонентах
   (корзина, затемнение, тост, пустое состояние). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--ink-invert);
  padding: 10px 16px; font-family: var(--mono); font-size: 13px;
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 16px; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gut);
}

/* ============================ ШАПКА ============================ */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(232, 233, 229, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 22px; height: 22px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 100% 0 / 6px 100% no-repeat;
}
.logo-text {
  font-family: var(--display); font-weight: 700; font-size: 19px;
  letter-spacing: .01em;
}

.head-nav { display: flex; gap: 26px; margin-left: 12px; }
.head-nav a {
  text-decoration: none; font-size: 15px; color: var(--ink-soft);
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.head-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.head-search input {
  width: 250px; height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 12px;
  font-family: var(--text); font-size: 14px; color: var(--ink);
  transition: border-color .15s ease, width .2s ease;
}
.head-search input::placeholder { color: var(--ink-mute); }
.head-search input:focus { border-color: var(--ink); outline: none; width: 300px; }

.cart-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 14px;
  background: var(--ink); color: var(--ink-invert);
  border: 0; border-radius: 0; cursor: pointer;
  font-family: var(--text); font-size: 14px; font-weight: 500;
  transition: background .15s ease;
}
.cart-btn:hover { background: #000; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  background: var(--ink-invert); color: var(--ink);
  font-family: var(--mono); font-size: 12px; font-weight: 500;
}

/* ============================ HERO ============================ */

.hero {
  background: var(--bg-panel);
  color: var(--ink-invert);
  border-bottom: 1px solid var(--line-dark);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(237,238,234,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237,238,234,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 64px;
  align-items: center;
  padding-block: 84px 88px;
}

.hero-title {
  font-size: clamp(38px, 5.2vw, 66px);
  letter-spacing: -0.035em;
  animation: rise .7s cubic-bezier(.16,.84,.44,1) both;
}
.hero-lead {
  margin-top: 26px; max-width: 52ch;
  font-size: 17px; color: #B9BEB8;
  animation: rise .7s .08s cubic-bezier(.16,.84,.44,1) both;
}
.hero-actions { display: flex; gap: 12px; margin-top: 34px; animation: rise .7s .16s cubic-bezier(.16,.84,.44,1) both; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px;
  border-radius: 0; cursor: pointer;
  font-family: var(--text); font-size: 15px; font-weight: 500;
  text-decoration: none; border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ink-invert); color: var(--ink); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: #4A5157; color: var(--ink-invert); }
.btn-ghost:hover { border-color: var(--ink-invert); background: rgba(237,238,234,.08); }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); background: var(--ink); color: var(--ink-invert); }
.btn-wide { width: 100%; }

.hero-facts {
  display: flex; flex-wrap: wrap; gap: 0; margin: 44px 0 0;
  border-top: 1px solid var(--line-dark);
  animation: rise .7s .24s cubic-bezier(.16,.84,.44,1) both;
}
.hero-facts > div {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 30px 0 0; margin-right: 30px; border-right: 1px solid var(--line-dark);
}
.hero-facts > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8F979B; }
.hero-facts dd {
  margin: 0; font-family: var(--mono); font-size: 13px; color: var(--ink-invert); letter-spacing: .02em;
}

/* --- Техническая пластина --- */
.plate {
  border: 1px solid var(--line-dark);
  background: var(--bg-panel-2);
  animation: rise .7s .2s cubic-bezier(.16,.84,.44,1) both;
}
.plate-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 20px; border-bottom: 1px solid var(--line-dark);
}
.plate-title { font-family: var(--display); font-size: 14px; font-weight: 500; letter-spacing: .04em; }
.plate-code { font-family: var(--mono); font-size: 12px; color: #8F979B; letter-spacing: .08em; }
.plate-grid { padding: 8px 20px 18px; }
.plate-row {
  display: grid;
  grid-template-columns: 116px repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(49,55,60,.7);
}
.plate-row:last-child { border-bottom: 0; }
.plate-row.head { padding-top: 14px; }
.plate-row.head span {
  font-family: var(--mono); font-size: 11px; color: #6E757A; letter-spacing: .06em; text-align: center;
}
.plate-brand { font-family: var(--display); font-size: 13px; font-weight: 500; }
.plate-cell { display: grid; place-items: center; height: 22px; }
.plate-dot {
  width: 11px; height: 11px; background: #3A4147;
}
.plate-dot.on { background: currentColor; }
.plate-foot {
  padding: 14px 20px; border-top: 1px solid var(--line-dark);
  font-size: 12.5px; color: #868D88; line-height: 1.55;
}

/* ============================ ПОЛОСА БРЕНДОВ ============================ */

.brandstrip { border-bottom: 1px solid var(--line); background: var(--bg-lift); }
.brandstrip-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.brand-tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 30px 26px 26px; text-align: left;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
  transition: background .18s ease;
}
.brandstrip-inner .brand-tab:first-child { border-left: 1px solid var(--line); }
.brand-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .22s cubic-bezier(.16,.84,.44,1);
}
.brand-tab:hover { background: #fff; }
.brand-tab:hover::after, .brand-tab[aria-pressed="true"]::after { transform: scaleX(1); }
.brand-tab[aria-pressed="true"] { background: #fff; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; color: currentColor; }
.brand-meta { font-size: 13.5px; color: var(--ink-soft); }
.brand-count { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); letter-spacing: .04em; }

/* ============================ КАТАЛОГ ============================ */

.catalog { padding-block: 56px 96px; }
.catalog-inner { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 48px; align-items: start; }
.catalog-main { min-width: 0; }

.filters { position: sticky; top: 92px; }
.filters-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.filters-head h2 { font-size: 17px; letter-spacing: .01em; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--text); font-size: 13px; color: var(--ink-mute);
  border-bottom: 1px solid var(--line); transition: color .15s ease, border-color .15s ease;
}
.link-btn:hover { color: var(--ink); border-bottom-color: var(--ink); }

.filter-group { padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.filter-legend {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: 12px;
}

.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 14.5px; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-mark {
  width: 16px; height: 16px; flex: none;
  border: 1.5px solid var(--line); background: transparent;
  display: grid; place-items: center;
  transition: border-color .12s ease, background .12s ease;
}
.check-mark::after { content: ""; width: 7px; height: 7px; background: var(--ink); transform: scale(0); transition: transform .12s ease; }
.check input:checked + .check-mark { border-color: var(--ink); }
.check input:checked + .check-mark::after { transform: scale(1); }
.check input:focus-visible + .check-mark { outline: 2px solid var(--focus); outline-offset: 2px; }
.check:hover .check-mark { border-color: var(--ink); }
.check-text { color: var(--ink-soft); }
.check input:checked ~ .check-text { color: var(--ink); }
.check-count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); }
.check-swatch { width: 10px; height: 10px; flex: none; background: currentColor; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; cursor: pointer;
  background: transparent; border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 0;
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  transition: all .13s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ink-invert); }

.price-range input[type="range"] {
  display: block; width: 100%; margin: 0; padding: 0;
  accent-color: var(--ink); height: 20px;
}
.price-range-out { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-mute); }
.price-range-out output { color: var(--ink); font-weight: 500; }

.switch { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 14.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 34px; height: 18px; flex: none; background: #C9CDC8; position: relative;
  transition: background .15s ease;
}
.switch-dot { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; transition: transform .18s cubic-bezier(.16,.84,.44,1); }
.switch input:checked + .switch-track { background: var(--ink); }
.switch input:checked + .switch-track .switch-dot { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch-label { color: var(--ink-soft); }

.filters-toggle { display: none; }

/* --- Панель управления --- */
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--ink);
  flex-wrap: wrap;
}
.catalog-count { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); letter-spacing: .02em; }
.toolbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sort { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sort-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); white-space: nowrap; }
.sort select {
  appearance: none; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; padding: 4px 22px 4px 2px; cursor: pointer; max-width: 100%;
  font-family: var(--text); font-size: 14px; color: var(--ink);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 8px center, right 3px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.sort select:focus { outline: none; border-bottom-color: var(--ink); }

/* --- Строки товаров --- */
.rows { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 216px 178px;
  grid-template-areas: "art body side buy";
  gap: 26px;
  align-items: start;
  padding: 26px 0 26px 16px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .16s ease;
}
.row-art  { grid-area: art; }
.row-body { grid-area: body; min-width: 0; }
.row-side { grid-area: side; }
.row-buy  { grid-area: buy; }
.row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: currentColor; transform: scaleY(0); transform-origin: top;
  transition: transform .2s cubic-bezier(.16,.84,.44,1);
}
.row:hover { background: var(--bg-lift); }
.row:hover::before { transform: scaleY(1); }

.row-art {
  border: 1px solid var(--line); background: #fff;
  aspect-ratio: 160 / 100; display: grid; place-items: center;
  color: var(--ink); position: relative; overflow: hidden;
}
.row-art svg { width: 100%; height: 100%; padding: 10px; }

.row-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.row-brand-mark { width: 8px; height: 8px; background: currentColor; flex: none; }
.row-brand-name { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: currentColor; }
.row-name { font-family: var(--display); font-weight: 500; font-size: 16.5px; line-height: 1.32; letter-spacing: -0.01em; }
.row-id { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); margin-top: 6px; letter-spacing: .04em; }

.row-specs { display: grid; gap: 4px; margin-top: 12px; }
.spec { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.spec dt { color: var(--ink-mute); }
.spec dd { margin: 0; color: var(--ink-soft); }

.row-side { display: flex; flex-direction: column; gap: 8px; }
.tag {
  display: inline-block; align-self: flex-start;
  border: 1px solid var(--line); padding: 3px 8px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft); letter-spacing: .04em;
}
.tag-stock { border-color: #9FBBA9; color: #2F6B41; background: #EDF4EE; }
.tag-low { border-color: #C9A66B; color: #8A5B12; background: #F8F0E1; }
.tag-out { border-color: var(--line); color: var(--ink-mute); background: transparent; }

.row-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.price { text-align: right; }
.price-now { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
.price-old { font-family: var(--mono); font-size: 12px; color: var(--ink-mute); text-decoration: line-through; }
.price-sale { font-family: var(--mono); font-size: 11px; color: #8A5B12; letter-spacing: .04em; }
.btn-buy { width: 100%; height: 42px; }
.row-note { font-size: 12px; color: var(--ink-mute); text-align: right; }

.empty { padding: 70px 0; text-align: center; }
.empty-title { font-family: var(--display); font-size: 20px; font-weight: 500; }
.empty-text { color: var(--ink-soft); margin: 10px 0 22px; }

/* ============================ ПЛАТФОРМЫ ============================ */

.platforms { background: var(--bg-panel); color: var(--ink-invert); padding-block: 84px 90px; }
.platforms-head { max-width: 640px; margin-bottom: 44px; }
.platforms-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.platforms-head p { margin-top: 14px; color: #B9BEB8; font-size: 16.5px; }

.platforms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.plat-card { background: var(--bg-panel); padding: 24px 22px 26px; display: flex; flex-direction: column; gap: 10px; }
.plat-brand { font-family: var(--display); font-weight: 700; font-size: 22px; color: currentColor; }
.plat-name { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #8A918C; }
.plat-volts { font-family: var(--display); font-weight: 500; font-size: 30px; letter-spacing: -0.02em; }
.plat-text { font-size: 14px; color: #A7ADA8; line-height: 1.55; }
.plat-list { margin-top: 6px; display: grid; gap: 5px; }
.plat-list li { font-size: 13.5px; color: #A7ADA8; display: grid; grid-template-columns: 14px 1fr; gap: 8px; }
.plat-list li::before { content: ""; width: 6px; height: 6px; background: currentColor; margin-top: 7px; }

.platform-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.platform-notes li { font-size: 14px; color: #9AA19C; line-height: 1.55; padding-left: 16px; border-left: 2px solid var(--line-dark); }

/* ============================ БРЕНДЫ ============================ */

.brands { padding-block: 88px 92px; }
.brands-head { max-width: 660px; margin-bottom: 44px; }
.brands-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.brands-head p { margin-top: 14px; color: var(--ink-soft); font-size: 16.5px; }

.brands-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.brand-card { background: var(--bg); padding: 34px 32px 30px; display: flex; flex-direction: column; gap: 14px; }
.brand-card h3 { font-size: 30px; color: currentColor; letter-spacing: -0.02em; }
.brand-card p { color: var(--ink-soft); font-size: 15px; max-width: 46ch; }
.brand-card .brand-specs { display: flex; flex-wrap: wrap; gap: 14px 24px; padding-top: 14px; margin-top: auto; border-top: 1px solid var(--line-soft); }
.brand-specs div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-specs dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.brand-specs dd { margin: 0; font-family: var(--display); font-weight: 500; font-size: 15px; }
.brand-card .btn { align-self: flex-start; }

/* ============================ СЕРВИС ============================ */

.service { border-top: 1px solid var(--line); background: var(--bg-lift); padding-block: 64px 70px; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.service-col h3 { font-size: 15px; letter-spacing: .01em; margin-bottom: 16px; }
.service-col ul { display: grid; gap: 9px; }
.service-col li { font-size: 14px; color: var(--ink-soft); line-height: 1.5; padding-left: 14px; position: relative; }
.service-col li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 1px; background: var(--ink-mute); }
.link-inline { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.link-inline:hover { border-bottom-color: var(--ink); }

/* ============================ ПОДВАЛ ============================ */

.site-foot { background: var(--bg-panel); color: #9AA19C; padding-block: 52px 40px; }
.foot-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: start; }
.foot-brand .logo-text { color: var(--ink-invert); }
.foot-brand p { margin-top: 12px; font-size: 14px; max-width: 42ch; line-height: 1.55; }
.foot-nav { display: flex; flex-direction: column; gap: 10px; }
.foot-nav a { color: #C3C8C3; text-decoration: none; font-size: 14px; }
.foot-nav a:hover { color: #fff; }


/* ============================ КОРЗИНА ============================ */

.scrim { position: fixed; inset: 0; background: rgba(10, 12, 14, .5); z-index: 60; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.cart {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: var(--bg); z-index: 70;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--ink);
  animation: slide .28s cubic-bezier(.16,.84,.44,1) both;
}
@keyframes slide { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }

.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--ink); }
.cart-head h2 { font-size: 20px; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1; padding: 6px; color: var(--ink-soft); }
.icon-btn:hover { color: var(--ink); }

.cart-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-empty { padding: 60px 0; text-align: center; color: var(--ink-mute); font-size: 14.5px; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.cart-item svg { border: 1px solid var(--line); background: #fff; padding: 6px; }
.cart-item-name { font-size: 14px; line-height: 1.35; font-weight: 500; }
.cart-item-brand { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.cart-item-price { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 26px; height: 26px; background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.qty button:hover { background: var(--bg-lift); color: var(--ink); }
.qty span { min-width: 26px; text-align: center; font-family: var(--mono); font-size: 13px; }
.cart-remove { background: none; border: 0; cursor: pointer; color: var(--ink-mute); font-size: 12px; text-decoration: underline; padding: 0; margin-top: 6px; }
.cart-remove:hover { color: var(--ink); }

.cart-foot { padding: 20px 24px 24px; border-top: 1px solid var(--ink); background: var(--bg-lift); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.cart-total span { font-size: 14px; color: var(--ink-soft); }
.cart-total strong { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.cart-note { margin-top: 10px; font-size: 12px; color: var(--ink-mute); }

/* ============================ TOAST ============================ */

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 90; background: var(--ink); color: var(--ink-invert);
  padding: 13px 20px; font-size: 14px;
  border-left: 3px solid var(--ink-invert);
  animation: rise .22s ease both;
  max-width: calc(100vw - 32px);
}

/* ============================ АДАПТИВ ============================ */

@media (max-width: 1180px) {
  :root { --gut: 24px; }
  /* Четыре колонки уже не помещаются: цена уходит в правую колонку,
     а теги с наличием — под название. */
  .row {
    grid-template-columns: 112px minmax(0, 1fr) 184px;
    grid-template-areas:
      "art body buy"
      "art side buy";
    gap: 16px 22px;
  }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platforms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-block: 60px 64px; }
  .catalog-inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .filters {
    position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(320px, 88%);
    background: var(--bg); border-right: 1px solid var(--ink);
    padding: 22px 22px 40px; overflow-y: auto;
    transform: translateX(-102%); transition: transform .26s cubic-bezier(.16,.84,.44,1);
  }
  .filters.is-open { transform: none; }
  .filters-toggle { display: inline-flex; height: 38px; }
  .head-nav { display: none; }
  .head-search input { width: 180px; }
  .head-search input:focus { width: 220px; }
  .row {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
      "art body"
      ".   side"
      ".   buy";
    gap: 14px 18px;
  }
  .row-buy { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .price { text-align: left; }
  .btn-buy { width: auto; padding-inline: 26px; }
  .row-note { text-align: left; }
  .brandstrip-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brandstrip-inner .brand-tab:nth-child(3) { border-left: 1px solid var(--line); }
  .brandstrip-inner .brand-tab:nth-child(-n+2) { border-top: 0; }
  .brands-grid { grid-template-columns: minmax(0, 1fr); }
  .platform-notes { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --gut: 16px; }
  .head-inner { height: 60px; gap: 12px; }
  .head-search { display: none; }
  .logo-text { font-size: 17px; }
  .hero-facts { flex-wrap: wrap; gap: 0; }
  .hero-facts > div { padding-right: 20px; margin-right: 20px; border-right: 0; }
  .hero-title { font-size: 34px; }
  .plate-row { grid-template-columns: 92px repeat(5, 1fr); }
  .brandstrip-inner { grid-template-columns: minmax(0, 1fr); }
  .brandstrip-inner .brand-tab { border-left: 1px solid var(--line); }
  .row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "art"
      "body"
      "side"
      "buy";
    padding-left: 12px;
  }
  .row-art { max-width: 150px; }
  .catalog-toolbar { flex-wrap: wrap; }
  .platforms-grid { grid-template-columns: minmax(0, 1fr); }
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
