/* ============================================================
   Хочу-Мотор · Компоненты (UI Kit v1.1)
   Кнопки, поля, бейджи, чипы, карточки, шапка, футер,
   мобильная навигация, модалки, уведомления
   ============================================================ */

/* ================= Кнопки ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r-btn);
  padding: 13px 26px;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  cursor: pointer;
  text-align: center;
}

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--red-shadow);
}
.btn--primary:hover { background: var(--red-hover); }

.btn--secondary {
  border: 1px solid var(--brd18);
  color: var(--t1);
  padding: 12px 26px;
}
.btn--secondary:hover { border-color: var(--brd20); background: var(--card); }

.btn--outline-accent {
  border: 1px solid rgba(217, 43, 47, .6);
  color: var(--red-soft);
  padding: 12px 26px;
}
.btn--outline-accent:hover { background: var(--red-bg); }

.btn--text { color: var(--t2); font-weight: 600; padding: 12px 16px; }
.btn--text:hover { color: var(--t1); }

.btn--disabled,
.btn:disabled {
  background: var(--card2);
  color: var(--t5);
  border: 1px solid var(--brd07);
  box-shadow: none;
  cursor: not-allowed;
}

.btn--sm { font-size: 12px; border-radius: 9px; padding: 8px 16px; }
.btn--lg { font-size: 16px; border-radius: 12px; padding: 16px 34px; }
.btn--pill { border-radius: var(--r-pill); }
.btn--block { display: flex; width: 100%; }

.btn--icon {
  width: 46px;
  height: 46px;
  padding: 0;
  flex: none;
}

/* ================= Поля ввода ================= */
.field { display: flex; flex-direction: column; gap: 7px; }

.field__label { font-size: 12px; font-weight: 600; color: var(--t3); }

.input,
.select,
.textarea {
  background: var(--card2);
  border: 1px solid var(--brd10);
  border-radius: var(--r-input);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--t1);
  width: 100%;
  outline: none;
  transition: border-color .15s;
}

.input::placeholder,
.textarea::placeholder { color: var(--t3); }

.input:focus,
.select:focus,
.textarea:focus { border-color: var(--red); }

.input--error { border-color: var(--red-light); }
.field__error { font-size: 11px; color: var(--red-light); }
.field__hint { font-size: 11px; color: var(--t4); }

.textarea { min-height: 70px; resize: vertical; }

.input--mono { font-family: var(--font-mono); letter-spacing: .05em; }

/* Поиск */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--brd09);
  border-radius: var(--r-btn);
  padding: 0 16px;
  height: 48px;
  flex: 1;
  min-width: 0;
}

.search:focus-within { border-color: var(--red-brd); }
.search svg { flex: none; }

.search__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 14px;
  color: var(--t1);
}
.search__input::placeholder { color: var(--t3); }

/* Сброс запроса — кружок «×» справа в поле (макеты 04, 08, M5) */
.search__reset {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--card2);
  color: var(--t2);
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search__reset:hover { color: var(--t1); }

/* Счётчик количества */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--brd10);
  border-radius: var(--r-input);
  overflow: hidden;
}
.qty__btn {
  width: 40px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t2); font-size: 18px;
}
.qty__btn:hover { color: var(--t1); background: var(--card2); }
.qty__btn:disabled { color: var(--t5); cursor: not-allowed; opacity: .45; }
.qty__val { width: 44px; text-align: center; font-size: 15px; font-weight: 600; }
.qty--sm .qty__btn { width: 30px; height: 30px; font-size: 15px; }
.qty--sm .qty__val { width: 34px; font-size: 13px; }

/* Чекбоксы / радио / тумблер */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--t2);
  cursor: pointer;
  line-height: 1.5;
}
.check input { position: absolute; opacity: 0; }
.check__box {
  width: 18px; height: 18px; flex: none;
  border-radius: 5px;
  border: 1px solid var(--brd20);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px;
  transition: background .15s, border-color .15s;
  margin-top: 1px;
}
.check input:checked + .check__box {
  background: var(--red);
  border-color: var(--red);
}
.check input:checked + .check__box::after { content: "✓"; }

/* ================= Бейджи статусов товара (ТЗ §9.4) ================= */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  border-radius: 5px;
  padding: 4px 8px;
  text-transform: uppercase;
  white-space: nowrap;
  flex: none;
}
.badge--stock  { color: var(--ok); background: var(--ok-bg); }
.badge--order  { color: var(--warn); background: var(--warn-bg); }
.badge--way    { color: var(--info); background: var(--info-bg); }
.badge--sold   { color: var(--t4); background: var(--card2); border: 1px solid var(--brd10); }
.badge--arch   { color: var(--t5); background: var(--card2); border: 1px solid var(--brd07); }

/* Статусы заказа (ТЗ §15.1) — pill */
.status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  background: var(--card2);
  border: 1px solid var(--brd10);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  white-space: nowrap;
}
.status--warn { color: var(--warn); background: rgba(232,161,63,.1); border-color: var(--warn-brd); }
.status--ok   { color: var(--ok); background: rgba(79,196,127,.1); border-color: var(--ok-brd); }
.status--info { color: var(--info); background: rgba(139,157,196,.1); border-color: var(--info-brd); }
.status--err  { color: var(--red-soft); background: var(--bnr); border-color: rgba(217,43,47,.35); }
.status--muted { color: var(--t4); }

/* ================= Чипы фильтров ================= */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--brd10);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  cursor: pointer;
}
.chip:hover { border-color: var(--brd18); }
.chip--active {
  background: var(--red-bg);
  border-color: var(--red-brd);
  color: var(--red-soft);
  font-weight: 700;
}
.chip__x { color: inherit; }
.chip__caret { color: var(--t4); font-size: 9px; }

.chip-reset { font-size: 12.5px; font-weight: 600; color: var(--accent-text); padding: 8px 6px; }

/* ================= Вкладки ================= */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--brd09); }
.tabs__item {
  font-size: 14px;
  font-weight: 600;
  color: var(--t3);
  padding-bottom: 12px;
  cursor: pointer;
}
.tabs__item--active {
  font-weight: 700;
  color: var(--t1);
  border-bottom: 2px solid var(--red);
  margin-bottom: -1px;
}

/* ================= Хлебные крошки ================= */
.breadcrumbs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12.5px;
  color: var(--t3);
}
.breadcrumbs a:hover { color: var(--t1); }
.breadcrumbs__sep { color: var(--t5); }
.breadcrumbs__current { color: var(--t1); }

/* ================= Пагинация ================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 28px;
}
.pagination__item {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--brd10);
  border-radius: 11px;
  background: var(--card);
  color: var(--t2);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pagination__item:hover {
  border-color: var(--red-brd);
  background: var(--red-bg);
  color: var(--red-light);
  transform: translateY(-1px);
}
.pagination__item--active,
.pagination__item--active:hover {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  font-weight: 750;
  box-shadow: var(--red-shadow);
  transform: none;
  cursor: default;
}
.pagination__item--nav { color: var(--t3); font-size: 22px; }
.pagination__item.is-disabled {
  opacity: .38;
  pointer-events: none;
}
.pagination__dots {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 44px;
  flex: 0 0 28px;
  color: var(--t4);
  border: 0;
}
@media (max-width: 430px) {
  .pagination {
    justify-content: flex-start;
    gap: 6px;
    margin-top: 22px;
    padding: 2px 1px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .pagination::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pagination__item { transition: none; }
  .pagination__item:hover { transform: none; }
}

/* ================= Уведомления ================= */
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--r-btn);
  padding: 13px 16px;
  font-size: 13px;
  color: var(--t1);
  line-height: 1.5;
}
.notice svg { flex: none; }
.notice--ok   { background: rgba(79,196,127,.1); border: 1px solid rgba(79,196,127,.3); }
.notice--warn { background: rgba(232,161,63,.1); border: 1px solid rgba(232,161,63,.3); }
.notice--err  { background: var(--bnr); border: 1px solid rgba(217,43,47,.3); }
.notice--info { background: var(--card2); border: 1px solid var(--brd10); color: var(--t2); }

/* ================= Карточки / панели ================= */
.card {
  background: var(--card);
  border: 1px solid var(--brd09);
  border-radius: var(--r-card);
}
.panel {
  background: var(--card);
  border: 1px solid var(--brd09);
  border-radius: var(--r-panel);
}

/* Карточка товара (плитка) */
.product-card {
  background: var(--card);
  border: 1px solid var(--brd09);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.product-card:hover { border-color: var(--brd18); }

.product-card__img { height: 130px; }
.product-card__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-card__title { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.product-card__oem { font-size: 11px; color: var(--t3); font-family: var(--font-mono); }
.product-card__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: auto;
}
.ms3-add-form { display: contents; }
.product-card__price { font-family: var(--font-head); font-size: 16px; font-weight: 600; }
.product-card__bottom .badge { font-size: 9px; padding: 3px 6px; }

/* Карточка товара (строка — каталог/поиск) */
.product-row {
  background: var(--card);
  border: 1px solid var(--brd09);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 16px;
  transition: border-color .15s;
}
.product-row:hover { border-color: var(--brd18); }
.product-row--match { border-color: rgba(217, 43, 47, .35); }

.product-row__img { width: 150px; height: 112px; flex: none; border-radius: 10px; overflow: hidden; }
.product-row__main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.product-row__head { display: flex; align-items: flex-start; gap: 10px; }
.product-row__title { flex: 1; font-size: 15.5px; font-weight: 700; }
.product-row__meta { font-size: 12px; color: var(--t3); font-family: var(--font-mono); }
.product-row__props { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--t3); }
.product-row__warranty { color: var(--ok); }
.product-row__aside {
  width: 180px; flex: none;
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; justify-content: center;
  border-left: 1px solid var(--brd07);
  padding-left: 16px;
}
.product-row__price { font-family: var(--font-head); font-size: 21px; font-weight: 600; }

.oem-hit {
  color: var(--red-soft);
  font-weight: 700;
  background: rgba(217, 43, 47, .12);
  border-radius: 4px;
  padding: 1px 4px;
}

@media (max-width: 767px) {
  .product-row { padding: 11px; gap: 11px; flex-wrap: wrap; }
  .product-row__img { width: 92px; height: 92px; }
  .product-row__title { font-size: 13.5px; }
  .product-row__meta, .product-row__props { font-size: 10.5px; }
  .product-row__aside {
    width: 100%;
    border-left: 0;
    padding-left: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .product-row__price { font-size: 17px; }
  .product-row__aside .btn { padding: 8px 13px; font-size: 11.5px; border-radius: 8px; }
}

/* ================= Шапка ================= */
.mobile-app-header { display: none; }

@media (max-width: 767px) {
  .mobile-app-header { display: block; padding-bottom: 4px; }
  .site-header { display: none; }
}

.topbar {
  border-bottom: 1px solid var(--brd06);
  font-size: 12px;
  color: var(--t3);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar__group { display: flex; gap: 22px; align-items: center; }
.topbar strong { color: var(--t1); font-weight: 600; }
.topbar__phone { font-weight: 700; color: var(--t1); }

.header__in {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.header__search { flex: 1; display: flex; gap: 10px; min-width: 0; }

.header__icons { display: flex; gap: 20px; flex: none; color: var(--t2); }
.header__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: inherit;
  position: relative;
}
.header__icon:hover, .header__icon--active { color: var(--accent-text); }
.header__icon .count {
  position: absolute;
  top: -5px; right: -7px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.header__icon .count[hidden] { display: none; }

.nav {
  border-bottom: 1px solid var(--brd06);
}
.nav__in {
  display: flex;
  gap: 28px;
  padding-bottom: 14px;
  font-size: 13.5px;
  font-weight: 600;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__in::-webkit-scrollbar { display: none; }
.nav__link { white-space: nowrap; color: var(--t1); }
.nav__link:hover { color: var(--accent-text); }
.nav__link--active { color: var(--accent-text); }
.nav__link--muted { color: var(--t2); }
.nav__spacer { flex: 1; }

.burger { display: none; }

@media (max-width: 1023px) {
  .header__in { gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 12px; }
  .header__search { order: 3; flex-basis: 100%; }
}

@media (max-width: 767px) {
  .topbar__group span:not(.topbar__phone) { display: none; }
  .topbar strong { display: none; }
  .header__in { gap: 12px; }
  .header__icons { gap: 14px; }
  .burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 1px solid var(--brd10);
    color: var(--t1);
    flex: none;
  }
  .nav { display: none; }
  .btn--vin-header { display: none; }
}

/* ================= Мобильная нижняя навигация ================= */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bar);
  border-top: 1px solid var(--brd08);
  padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
  z-index: 60;
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--t4);
  font-size: 9.5px;
  font-weight: 600;
  min-height: 44px;
  justify-content: center;
}
.bottom-nav__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bottom-nav__cart-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--bar);
  border-radius: 50%;
  background: var(--red);
  box-sizing: content-box;
}
.bottom-nav__cart-dot[hidden] { display: none; }
.bottom-nav__item--active { color: var(--accent-text); font-weight: 700; }

@media (max-width: 767px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: 76px; }
}

/* ================= Мобильное меню (выезжающее) ================= */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
}
.drawer.is-open { visibility: visible; }
.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .2s;
}
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__panel {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: min(320px, 85vw);
  background: var(--card);
  border-right: 1px solid var(--brd09);
  transform: translateX(-100%);
  transition: transform .25s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--brd07);
}
.drawer__close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--card2);
  border: 1px solid var(--brd10);
  display: flex; align-items: center; justify-content: center;
  color: var(--t3);
  font-size: 16px;
}
.drawer__nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer__link {
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  border-bottom: 1px solid var(--brd06);
}
.drawer__link--muted { color: var(--t2); font-weight: 500; }

/* ================= Футер ================= */
.footer {
  border-top: 1px solid var(--brd06);
  background: var(--foot);
  margin-top: 40px;
}
.footer__in {
  padding-top: 30px;
  padding-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 32px;
}
.footer__about { font-size: 12px; color: var(--t3); line-height: 1.6; max-width: 280px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--t2); }
.footer__col a:hover { color: var(--t1); }
.footer__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--t1);
  text-transform: uppercase;
  font-family: var(--font-head);
}
.footer__phone { color: var(--t1); font-weight: 700; font-size: 15px; }
.footer__social { display: flex; gap: 8px; margin-top: 2px; }
.social-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.social-btn--tg { background: #2aabee; }
.social-btn--max { background: #7c3aed; color: #fff; font-family: var(--font-head); font-size: 14px; font-weight: 600; }
.theme-icon--moon { display: none; }
[data-theme="light"] .theme-icon--sun { display: none; }
[data-theme="light"] .theme-icon--moon { display: block; }

.footer__bottom {
  border-top: 1px solid var(--brd06);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--t5);
}
.footer__bottom a:hover { color: var(--t2); }

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 767px) {
  .footer__grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ================= Модалка ================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .55);
}
.modal.is-open { display: flex; }

.modal__win {
  width: 560px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: var(--card);
  border: 1px solid var(--brd12);
  border-radius: 18px;
  box-shadow: var(--modal-shadow);
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--brd07);
}
.modal__title-wrap { display: flex; gap: 14px; align-items: center; }
.modal__icon {
  width: 46px; height: 46px; flex: none;
  border-radius: 12px;
  background: var(--bnr);
  display: flex; align-items: center; justify-content: center;
}
.modal__title {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.modal__subtitle { font-size: 12px; color: var(--t3); line-height: 1.4; }
.modal__close {
  width: 30px; height: 30px; flex: none;
  border-radius: 8px;
  background: var(--card2);
  border: 1px solid var(--brd10);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--t3);
}
.modal__body { padding: 18px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal__body[hidden],
.vin-success[hidden] { display: none; }

.vin-success {
  min-height: 350px;
  padding: 38px 32px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  animation: vin-success-in .24s ease-out;
}
.vin-success__icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ok);
  background: rgba(79, 196, 127, .13);
  box-shadow: inset 0 0 0 1px rgba(79, 196, 127, .18);
}
.vin-success__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.vin-success__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.vin-success__title:focus { outline: none; }
.vin-success__text {
  max-width: 390px;
  margin: 0;
  color: var(--t2);
  font-size: 13.5px;
  line-height: 1.65;
}
.vin-success__action { width: min(220px, 100%); }

@keyframes vin-success-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal__win {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    transform: translateY(0);
    animation: sheet-rise .22s ease-out;
  }
  .modal__head { padding-top: 8px; }
  .vin-success {
    min-height: 370px;
    padding: 34px 22px 30px;
    gap: 18px;
  }
  .vin-success__icon { width: 80px; height: 80px; }
  .vin-success__title { font-size: 23px; }
  .vin-success__text { font-size: 13px; }
  .vin-success__action { width: 100%; min-height: 48px; }
}

/* ================= VIN-баннер ================= */
.vin-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(115deg, var(--bnr), var(--card) 65%);
  border: 1px solid rgba(217, 43, 47, .35);
  border-radius: var(--r-panel);
  padding: 22px 28px;
}
.vin-banner__text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.vin-banner__title {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.vin-banner__desc { font-size: 13px; color: var(--t2); }
.vin-banner__actions { display: flex; gap: 10px; }

@media (max-width: 1023px) {
  .vin-banner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .vin-banner__title { font-size: 15px; }
  .vin-banner__desc { font-size: 11.5px; }
}

/* ================= Плавающие мессенджеры (моб.) ================= */
.contact-launcher {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 70;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.contact-launcher__menu {
  width: 238px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--brd12);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .36);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(.97);
  transform-origin: right bottom;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .75, .25, 1), visibility .18s;
}
.contact-launcher.is-open .contact-launcher__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.contact-launcher__eyebrow {
  padding: 5px 8px 3px;
  color: var(--t3);
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact-launcher__item {
  min-height: 52px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--t1);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.contact-launcher__item:hover {
  background: var(--card2);
  border-color: var(--brd12);
  transform: translateX(-2px);
}
.contact-launcher__channel-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
}
.contact-launcher__item--telegram .contact-launcher__channel-icon { background: #229ed9; }
.contact-launcher__item--max .contact-launcher__channel-icon { background: #7c3aed; }
.contact-launcher__copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.contact-launcher__copy strong { font-size: 13px; line-height: 1.25; }
.contact-launcher__copy small { overflow: hidden; color: var(--t3); font-size: 9.5px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.contact-launcher__arrow { color: var(--t4); font-size: 15px; transition: color .16s ease, transform .16s ease; }
.contact-launcher__item:hover .contact-launcher__arrow { color: var(--red); transform: translate(1px, -1px); }
.contact-launcher__toggle {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  box-shadow: 0 10px 28px rgba(217, 43, 47, .34), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.contact-launcher__toggle::before {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(217, 43, 47, .25);
  border-radius: inherit;
  opacity: 0;
  transform: scale(.88);
  transition: opacity .18s ease, transform .22s ease;
}
.contact-launcher__toggle:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(217, 43, 47, .42), inset 0 1px 0 rgba(255, 255, 255, .2); }
.contact-launcher__toggle:hover::before,
.contact-launcher.is-open .contact-launcher__toggle::before { opacity: 1; transform: scale(1); }
.contact-launcher.is-open .contact-launcher__toggle { background: var(--card2); box-shadow: 0 10px 28px rgba(0, 0, 0, .34); }
.contact-launcher__icon { position: absolute; transition: opacity .16s ease, transform .22s ease; }
.contact-launcher__icon--chat { opacity: 1; transform: rotate(0) scale(1); }
.contact-launcher__icon--close { opacity: 0; transform: rotate(-70deg) scale(.7); }
.contact-launcher.is-open .contact-launcher__icon--chat { opacity: 0; transform: rotate(70deg) scale(.7); }
.contact-launcher.is-open .contact-launcher__icon--close { opacity: 1; transform: rotate(0) scale(1); }

@media (min-width: 768px) {
  .contact-launcher { display: flex; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .contact-launcher { right: 20px; bottom: 20px; }
}

.chat-fabs {
  display: none;
  position: fixed;
  right: 14px;
  bottom: 104px;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}
.chat-fabs .social-btn {
  width: 44px; height: 44px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
}
@media (max-width: 767px) {
  .chat-fabs { display: flex; }
}

/* ================= Мобильный футер (компактный, по макету) ================= */
.m-footer-wrap { display: none; }

@media (max-width: 767px) {
  .footer { display: none; }
  .m-footer-wrap { display: block; padding-top: 14px; padding-bottom: 6px; }
}

.m-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--foot);
  border: 1px solid var(--brd07);
  border-radius: 14px;
  padding: 16px 15px;
}
.m-footer__top { display: flex; align-items: center; justify-content: space-between; }
.m-footer__top .logo__name { font-size: 16px; }
.m-footer__social { display: flex; gap: 8px; }
.m-footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.m-footer__col { display: flex; flex-direction: column; gap: 7px; }
.m-footer__col a { font-size: 12px; color: var(--t2); }
.m-footer__title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--t3);
  text-transform: uppercase;
  font-family: var(--font-head);
}
.m-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--brd07);
  padding-top: 12px;
}
.m-footer__phone { font-family: var(--font-head); font-size: 16px; font-weight: 600; color: var(--t1); }
.m-footer__mail { font-size: 11.5px; color: var(--t3); }
.m-footer__warranty {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bnr);
  border: 1px solid rgba(217, 43, 47, .3);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--t2);
  line-height: 1.4;
}
.m-footer__warranty strong { color: var(--t1); font-weight: 600; }
.m-footer__warranty svg { flex: none; }
.m-footer__warranty .arrow { color: var(--red-soft); font-weight: 700; font-size: 11px; margin-left: auto; }
.m-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
  font-size: 10px;
  color: var(--t5);
  line-height: 1.5;
}
.m-footer__legal a { color: var(--t5); }

/* ================= Bottom-sheet (панель фильтров, M1) ================= */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  align-items: flex-end;
  background: rgba(0, 0, 0, .6);
}
.sheet.is-open { display: flex; }
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__panel {
  width: 100%;
  background: var(--card);
  border-top: 1px solid var(--brd12);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .5);
  max-height: 90%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet__grip {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.sheet__grip::after {
  content: "";
  position: absolute;
  inset: -8px 0 -28px;
}
.sheet__grip::before { content: ""; width: 38px; height: 4px; border-radius: 2px; background: var(--brd20); }
[data-drag-region] {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.modal__close,
.sheet__reset,
.sheet__close {
  position: relative;
  z-index: 3;
}
.modal__win.is-dragging,
.sheet__panel.is-dragging {
  cursor: grabbing;
  user-select: none;
  will-change: transform;
}
.modal__grip { display: none; }
@media (max-width: 767px) {
  .modal__grip { display: flex; }
}

@keyframes sheet-rise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .modal__win,
  .vin-success { animation: none; }
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 12px;
  border-bottom: 1px solid var(--brd07);
}
.sheet__actions { display: flex; align-items: center; gap: 12px; }
.sheet__title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sheet__reset { font-size: 12.5px; color: var(--accent-text); font-weight: 600; }
.sheet__close {
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--brd10);
  border-radius: 8px;
  background: var(--card2);
  color: var(--t2);
  font-size: 18px;
  line-height: 1;
}
.sheet__form {
  flex: 1;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.sheet__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sheet__foot {
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--brd07);
}

/* ================= Полноэкранный поиск (M3) ================= */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 96;
  background: var(--bg);
  display: none;
  flex-direction: column;
  gap: 13px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  overflow: auto;
}
.search-overlay.is-open { display: flex; }
.search-overlay__row { display: flex; gap: 10px; align-items: center; }
.search-overlay__row .search { border-color: var(--red); height: 46px; }
.search-overlay__cancel { font-size: 13px; color: var(--accent-text); font-weight: 600; flex: none; }
.search-overlay__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t3);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.search-hints { overflow: hidden; }
.search-hint {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--brd07);
  width: 100%;
  text-align: left;
}
.search-hint:last-child { border-bottom: 0; }
.search-hint__text { flex: 1; font-size: 13.5px; font-family: var(--font-mono); color: var(--t3); }
.search-hint__text strong { color: var(--t1); font-weight: 700; }
.search-hint__cat { font-size: 11px; color: var(--t4); }
.search-recent { display: flex; flex-wrap: wrap; gap: 8px; }

/* ================= Sticky-бар покупки (M6/M7) ================= */
.buybar { display: none; }

@media (max-width: 767px) {
  .buybar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 70;
    align-items: center;
    gap: 11px;
    background: var(--bar);
    border-top: 1px solid var(--brd08);
    padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  }
  .buybar__info { display: flex; flex-direction: column; gap: 1px; flex: none; }
  .buybar__label { font-size: 10.5px; color: var(--t4); }
  .buybar__value { font-family: var(--font-head); font-size: 18px; font-weight: 600; }
  .buybar__value--warn { font-size: 15px; color: var(--warn); }
  .buybar .btn { flex: 1; }
  body.has-buybar .bottom-nav { display: none; }
  body.has-buybar { padding-bottom: 92px; }
}

/* ================= Табы входа (M10, моб.) ================= */
.auth-tabs { display: none; }

@media (max-width: 767px) {
  .auth-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 6px; }
  .auth-logo .logo__name { font-size: 24px; }
  .auth-logo small { font-size: 11.5px; color: var(--t3); }
  .auth-tabs {
    display: flex;
    background: var(--card2);
    border: 1px solid var(--brd07);
    border-radius: 11px;
    padding: 4px;
  }
  .auth-tabs button {
    flex: 1;
    border-radius: 8px;
    padding: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    text-align: center;
  }
  .auth-tabs button.is-active { background: var(--red); color: #fff; font-weight: 700; }
}

/* ================= Спец-блоки ================= */
/* Преимущества */
.benefit {
  background: var(--card2);
  border: 1px solid var(--brd07);
  border-radius: var(--r-card);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.benefit__value { font-family: var(--font-head); font-size: 19px; font-weight: 600; color: var(--red); }
.benefit__label { font-size: 12px; color: var(--t2); line-height: 1.4; }

/* B2B-строка */
.b2b-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card2);
  border: 1px solid var(--brd07);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 12.5px;
  color: var(--t2);
}
.b2b-strip strong { color: var(--t1); font-weight: 600; }
.b2b-strip svg { flex: none; }
.b2b-strip__arrow { color: var(--t5); margin-left: auto; }

/* Черновик-метка */
.draft-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 5px;
  padding: 3px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}
