/* Оформление магазина МИХАС.
 *
 * Фон белый почти везде — так просил заказчик и так правильнее для
 * магазина: товар снят на белом, и любая цветная подложка спорит
 * с фотографией. Цвет берём из логотипа и тратим только на действия.
 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --red:        #b9121a;
  --red-dark:   #910d14;
  --red-pale:   #fdf2f2;
  --ink:        #16181d;
  --text:       #3f4550;
  --muted:      #7c8595;
  --line:       #e8ebf0;
  --line-soft:  #f2f4f7;
  --bg:         #ffffff;
  --bg-soft:    #f7f8fa;
  --green:      #12855a;
  --wrap:       1280px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; left: -9999px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}

.btn-main { background: var(--red); color: #fff; }
.btn-main:hover { background: var(--red-dark); color: #fff; }

.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.btn-sm { height: 38px; padding: 0 16px; font-size: 15px; }
.btn-wide { width: 100%; }

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

.top { background: #fff; border-bottom: 1px solid var(--line-soft); }

.top-bar { background: var(--bg-soft); border-bottom: 1px solid var(--line-soft); }

.top-line {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 9px 20px;
  font-size: 14px;
  color: var(--muted);
}
.top-line > span { display: inline-flex; align-items: center; gap: 7px; }
.top-line svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--red); }
.top-line a { color: var(--muted); }
.top-line a:hover { color: var(--red); }
.top-line-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }

/* Кнопка, которая выглядит ссылкой: выход из кабинета обязан быть
   формой, иначе по нему выйдет любая ссылка, открытая роботом. */
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}
.link-btn:hover { color: var(--red); }

.head {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 20px;
}

.logo { flex: 0 0 auto; }
.logo img { width: 210px; }

.head-search { flex: 1 1 auto; max-width: 560px; position: relative; }
.head-search input {
  width: 100%;
  height: 46px;
  padding: 0 46px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.head-search input:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: transparent; }
.head-search button {
  position: absolute;
  right: 4px; top: 4px;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.head-search button:hover { color: var(--red); }

/* ── подсказки поиска ─────────────────────────────────── */

.suggest {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 24, 29, .12);
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
}
.suggest-item:hover, .suggest-item.on { background: var(--bg-soft); color: var(--ink); }

.suggest-pic {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}
.suggest-pic img { width: 100%; height: 100%; object-fit: contain; }

.suggest-txt { flex: 1 1 auto; min-width: 0; }
.suggest-name { display: block; font-size: 15px; line-height: 1.3; }
.suggest-stock { font-size: 12px; color: var(--muted); }
.suggest-stock.in { color: var(--green); }
.suggest-price { flex: 0 0 auto; font-weight: 700; white-space: nowrap; }

.suggest-more {
  display: block;
  padding: 10px;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.suggest-empty { padding: 14px 10px; color: var(--muted); font-size: 15px; text-align: center; }

.head-phone { text-align: right; }
.head-phone a { display: block; font-size: 18px; font-weight: 700; color: var(--ink); }
.head-phone a:hover { color: var(--red); }
.head-phone span { display: block; font-size: 13px; color: var(--muted); }

.head-icons { display: flex; gap: 6px; }

.icon-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 62px;
  padding: 6px 4px;
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--red); }
.icon-btn svg { width: 24px; height: 24px; }

.icon-count {
  position: absolute;
  top: 2px; right: 8px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* ── меню разделов ────────────────────────────────────── */

/* Меню приклеивается к верху: в каталоге на двести пятьдесят товаров
   переход в другой раздел иначе стоит прокрутки страницы наверх. */
/* Полоса красная — единственное крупное цветное пятно на странице.
   Весь остальной фон остаётся белым, и товар на белом с ним не спорит. */
.nav {
  position: sticky;
  top: 0;
  z-index: 55;
  background: var(--red);
  color: #fff;
  transition: box-shadow .2s;
}
.nav.stuck { box-shadow: 0 6px 20px rgba(22, 24, 29, .2); }

.nav-in { display: flex; align-items: center; gap: 2px; padding: 0 20px; }

.nav-menu { display: flex; align-items: center; gap: 2px; }

.nav a {
  display: block;
  padding: 14px 14px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

/* В приклеенном виде полоса выше: рядом с меню появляются телефон и
   значки, и в прежнюю высоту они влезали только переносом строк. */
.nav.stuck .nav-in { min-height: 66px; }
/* Первый пункт выравниваем по краю содержимого страницы, иначе меню
   выглядит сдвинутым относительно всего остального. */
.nav-menu > a:first-child { padding-left: 0; }

/* На цветном фоне подсветку даёт не цвет текста — он и так белый, —
   а подчёркивание. Подложка при наведении выглядела заплаткой, тем
   более что у первого пункта её быть не может: он прижат к краю. */
.nav a:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, .65); }
.nav a.here { color: #fff; border-bottom-color: #fff; }

.nav-rest { display: flex; gap: 2px; }
.nav-rest a { font-weight: 500; color: rgba(255, 255, 255, .8); }
.nav-rest a:hover { color: #fff; }

/* ── что появляется в приклеенном меню ────────────────── */

.nav-extra {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding-left: 22px;
}
.nav.stuck .nav-extra { display: flex; }

.nav-extra .nav-phone {
  padding: 0 16px 0 0;
  margin-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, .28);
  border-bottom: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
}
.nav-extra .nav-phone:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.nav-extra .nav-phone span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
}

/* Только значки, без подписей: рядом стоит меню из шести разделов,
   и с подписями полоса переносится на вторую строку. Что означает
   значок, подсказывает всплывающая подсказка. */
.icon-only {
  min-width: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
}
.nav-extra .icon-btn { color: #fff; }
.nav-extra .icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.nav-extra .icon-btn svg { width: 22px; height: 22px; }

/* Счётчик на красном фоне выворачиваем: красным по красному его не видно. */
.nav-extra .icon-btn .icon-count {
  top: -2px;
  right: -2px;
  background: #fff;
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 100%;
  padding: 12px 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

/* ── хлебные крошки ───────────────────────────────────── */

.crumbs { padding: 14px 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--red); }
.crumbs span { margin: 0 7px; opacity: .5; }

/* ── общие блоки страницы ─────────────────────────────── */

section { padding: 34px 0; }

.page-h {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  margin-bottom: 6px;
}
.page-sub { margin: 0 0 22px; color: var(--muted); }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.sec-head h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; }
.sec-head a { color: var(--red); font-weight: 600; font-size: 15px; }

/* ── плитка товаров ───────────────────────────────────── */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: #d9dee6; box-shadow: 0 6px 22px rgba(22, 24, 29, .07); }

.card-pic {
  display: block;
  aspect-ratio: 1;
  margin-bottom: 12px;
}
.card-pic img { width: 100%; height: 100%; object-fit: contain; }

.card-name {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
  min-height: 3em;
}
.card-name:hover { color: var(--red); }

.card-attrs { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.card-bottom { margin-top: auto; padding-top: 12px; }

.price { display: flex; align-items: baseline; gap: 9px; }
.price-now { font-size: 20px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.price-old { font-size: 14px; color: var(--muted); text-decoration: line-through; }

.badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.stock { margin: 6px 0 10px; font-size: 13px; }
.stock-in { color: var(--green); }
.stock-low { color: #b8730a; }
.stock-out { color: var(--muted); }

/* Кнопка в плитке: подпись «Сообщить о поступлении» в узкую клетку
   одной строкой не помещается, поэтому здесь разрешаем перенос —
   высоту клетки это не ломает, соседние в ряду тянутся следом. */
.card .btn {
  margin-top: 8px;
  height: auto;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.fav {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.fav:hover, .fav.on { color: var(--red); }
.fav svg { width: 20px; height: 20px; }

/* ── каталог с фильтрами ──────────────────────────────── */

.catalog { display: grid; gap: 26px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .catalog { grid-template-columns: 260px 1fr; gap: 32px; } }

/* Фильтр едет вместе со страницей: список товаров длинный, а менять
   условия отбора приходится, дойдя до его середины.
   Верхний отступ — под приклеенное меню, иначе фильтр уезжает под него. */
.filters {
  position: sticky;
  top: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 18px 18px;
}
.filter { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.filter:last-child { border-bottom: 0; }

.filter-h {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

/* Свёрнутые группы: стрелка вместо стандартного треугольника,
   чтобы список выглядел как часть оформления, а не как отладка. */
summary.filter-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
summary.filter-h::-webkit-details-marker { display: none; }

summary.filter-h::after {
  content: '';
  width: 8px; height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s;
}
details[open] > summary.filter-h::after { transform: rotate(-135deg) translate(-3px, -3px); }
summary.filter-h:hover { color: var(--red); }
summary.filter-h:hover::after { border-color: var(--red); }

.filter-mark {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.filter-body { padding-top: 8px; }

.check { display: flex; align-items: center; gap: 9px; margin: 7px 0; cursor: pointer; font-size: 15px; }
.check input { width: 17px; height: 17px; accent-color: var(--red); }
.check-count { margin-left: auto; color: var(--muted); font-size: 13px; }

/* ── ползунок цены ────────────────────────────────────── */

/* Две дорожки лежат друг на друге: браузер не умеет диапазон из двух
   значений, поэтому берём два обычных ползунка и гасим фон у обоих. */
.slider { position: relative; height: 32px; margin-top: 14px; }

.slider-track {
  position: absolute;
  top: 14px; left: 0; right: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.slider-fill { position: absolute; top: 0; height: 4px; border-radius: 2px; background: var(--red); }

.slider input[type="range"] {
  position: absolute;
  top: 7px; left: 0;
  width: 100%;
  height: 18px;
  margin: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

.slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(22, 24, 29, .2);
}

.slider input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
}
.slider input[type="range"]::-moz-range-track { background: none; }

.range { display: flex; gap: 8px; }
.range input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.tools-count { color: var(--muted); font-size: 15px; }
.tools-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.tools-sort select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: #fff;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-block;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.here { background: var(--red); border-color: var(--red); color: #fff; }

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

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

.product { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; gap: 40px; } }

.gallery-main {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  aspect-ratio: 1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }

.gallery-strip { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.gallery-strip button {
  flex: 0 0 74px;
  height: 74px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.gallery-strip button.on { border-color: var(--red); }
.gallery-strip img { width: 100%; height: 100%; object-fit: contain; }

.p-brand { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.p-brand a { color: var(--red); font-weight: 600; }
.p-h { font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; margin-bottom: 10px; }
.p-sku { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.p-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
}
.p-price .price-now { font-size: 30px; }
.p-buy .btn { flex: 1 1 190px; }

.p-note { display: flex; gap: 10px; padding: 12px 0; font-size: 14px; color: var(--text); }
.p-note svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--red); }

.specs { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.specs td { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 52%; }
.specs td:last-child { color: var(--ink); font-weight: 500; }

.tabs { display: flex; gap: 22px; margin: 34px 0 18px; border-bottom: 1px solid var(--line); }
.tabs button {
  padding: 0 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--red); }

.text-block { max-width: 80ch; }
.text-block p { margin: 0 0 14px; }
.text-block h2, .text-block h3 { margin: 24px 0 10px; font-size: 19px; }
.text-block ul { margin: 0 0 14px; padding-left: 20px; }

/* ── страницы каталога ────────────────────────────────── */

.pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}

.page-btn, .page-num, .page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.page-btn:hover, .page-num:hover { border-color: var(--red); color: var(--red); }

.page-nums { display: flex; flex-wrap: wrap; gap: 8px; }
.page-num.is-here { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.page-gap { border-color: transparent; color: var(--muted); }

.page-btn.is-off { color: var(--muted); border-color: var(--line-soft); }
.page-btn.is-off:hover { border-color: var(--line-soft); color: var(--muted); }

.pages-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

@media (max-width: 560px) {
  .page-nums { display: none; }
  .pages { justify-content: space-between; }
}

/* ── корзина ──────────────────────────────────────────── */

.cart-list { border-top: 1px solid var(--line-soft); }

.cart-row {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 760px) {
  .cart-row { grid-template-columns: 78px 1fr 128px 130px 40px; }
}

.cart-pic {
  width: 78px; height: 78px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cart-pic img { width: 100%; height: 100%; object-fit: contain; }

.cart-name a { display: block; color: var(--ink); font-size: 15px; line-height: 1.35; }
.cart-name a:hover { color: var(--red); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.qty button {
  width: 38px; height: 40px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.qty button:hover { color: var(--red); }
.qty input {
  width: 46px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
}
.qty input:focus { outline: 2px solid var(--red); outline-offset: -2px; }

.cart-sum { font-size: 17px; font-weight: 700; color: var(--ink); white-space: nowrap; }

.cart-del {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.cart-del:hover { background: var(--red-pale); color: var(--red); }

/* ── формы ────────────────────────────────────────────── */

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 500; color: var(--ink); }
.field label b { color: var(--red); font-weight: 500; }

.field input:not([type="checkbox"]):not([type="radio"]),
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: -1px;
  border-color: transparent;
}
.field .check { margin: 8px 0; }
.field .check input { width: 18px; min-height: 0; }

.field-note { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

.block-h { font-size: 18px; font-weight: 700; margin: 26px 0 14px; }
.block-h:first-child { margin-top: 0; }

.form-error {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--red-pale);
  color: var(--red-dark);
}

.hp { position: absolute; left: -9999px; }

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

.checkout { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .checkout { grid-template-columns: 1fr 340px; gap: 40px; } }

.checkout-side {
  position: sticky;
  top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.checkout-item { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.checkout-item:last-of-type { border-bottom: 0; }

.checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

/* ── кабинет ──────────────────────────────────────────── */

.account { display: grid; gap: 26px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .account { grid-template-columns: 230px 1fr; gap: 36px; } }

.account-menu { list-style: none; margin: 0; padding: 0; }
.account-menu li { margin-bottom: 4px; }
.account-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
}
.account-menu a:hover { background: var(--bg-soft); }
.account-menu a.here { background: var(--red-pale); color: var(--red); font-weight: 600; }

.order {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
}
.order-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 12px;
}
.order-num { font-weight: 700; color: var(--ink); }
.order-date { color: var(--muted); font-size: 14px; }
.order-sum { margin-left: auto; font-weight: 700; }

.status {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text);
}
.status-new { background: #fff4e5; color: #a35a00; }
.status-confirmed { background: #e8f1ff; color: #14509b; }
.status-delivering { background: #eaf3ff; color: #14509b; }
.status-done { background: #e7f6ee; color: var(--green); }
.status-canceled { background: var(--bg-soft); color: var(--muted); }

.auth-box { max-width: 420px; margin: 0 auto; }

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

.foot { border-top: 1px solid var(--line); background: #fff; padding: 40px 0 24px; }
.foot-in { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .foot-in { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .foot-in { grid-template-columns: 1.4fr repeat(3, 1fr); } }

.foot h3 { font-size: 15px; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 7px 0; font-size: 15px; }
.foot li a { color: var(--text); }
.foot li a:hover { color: var(--red); }
.foot-logo img { width: 190px; margin-bottom: 14px; }
.foot-desc { font-size: 15px; color: var(--muted); max-width: 34ch; }
.foot-phone { display: block; font-size: 19px; font-weight: 700; color: var(--ink); margin-top: 12px; }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted);
}

/* Значки в одну строку у правого края: «Импульс», за ним «Дассет».
   Каждый из них рисует внутри себя блок во всю ширину, поэтому ширину
   задаём по содержимому здесь. */
.foot-marks { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.foot-marks > span { flex: 0 0 auto; }

/* ── телефон ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .head { flex-wrap: wrap; gap: 14px; }
  .logo img { width: 160px; }
  .head-search { order: 3; flex: 1 1 100%; max-width: none; }
  .head-phone { margin-left: auto; }
  .top-line { display: none; }

  .nav-in { display: block; }
  .nav-toggle { display: block; }
  .nav-menu { display: none; flex-direction: column; }
  .nav-menu.open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 0; }
  .nav-rest { margin-left: 0; flex-direction: column; gap: 0; }

  section { padding: 24px 0; }
}
