/* Шрифт Inter — 6 основных начертаний (пути относительно css/) */
@font-face { font-family: "Inter"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/Inter_18pt-Light.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Inter_18pt-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Inter_18pt-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/Inter_18pt-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/Inter_18pt-Bold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/Inter_18pt-ExtraBold.ttf") format("truetype"); }

:root {
  --orange: #f76210;
  --dark: #0c141f;
  --ink: #2b323c;
  --muted: #6e7681;
  --line: #dfe3e8;
  --soft: #f5f7fa;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  background: #fff;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

a,
button,
summary,
.product-card,
.brand-tile,
.model-tile,
.category-tile,
.header-action {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: var(--dark);
  color: #d5dbe3;
  font-size: 13px;
}

.topbar__inner,
.middle-header,
.bottom-nav__inner,
.section-head,
.price-row,
.cart-line,
.cart-total {
  display: flex;
  align-items: center;
}

.topbar__inner { justify-content: space-between; min-height: 36px; gap: 16px; }
.city-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--orange);
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.city-button:hover { color: #fff; }
.top-links { display: flex; gap: 18px; flex-wrap: wrap; }
.top-links a:hover, .bottom-nav a:hover { color: var(--orange); }

.middle-header {
  min-height: 82px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  flex: 0 0 auto;
}

.logo span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
}

.catalog-menu { position: relative; }
.catalog-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  list-style: none;
  cursor: pointer;
  background: var(--orange);
  color: #fff;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 700;
}

.catalog-menu[open] summary {
  background: var(--dark);
  box-shadow: 0 10px 24px rgba(12, 20, 31, .18);
}

.catalog-menu:not([open]) .mega-menu {
  display: none !important;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 270px minmax(420px, 1fr);
  gap: 0;
  width: min(940px, 92vw);
  min-height: 430px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(12, 20, 31, .16);
  border-radius: 8px;
  overflow: hidden;
  animation: menuIn .18s ease;
}

.mega-menu__left {
  padding: 10px;
  background: var(--soft);
  border-right: 1px solid var(--line);
}

.mega-menu__root {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 700;
}

.mega-menu__root:hover,
.mega-menu__root.is-active {
  background: #fff;
  color: var(--orange);
  box-shadow: 0 8px 18px rgba(12, 20, 31, .08);
}

.mega-menu__right {
  position: relative;
  padding: 18px;
}

.mega-panel {
  display: none;
  animation: panelIn .18s ease;
}

.mega-panel.is-active { display: block; }

.mega-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mega-panel__head strong {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.mega-panel__head span,
.mega-panel .muted {
  color: var(--muted);
  font-size: 14px;
}

.mega-panel__section { margin-top: 18px; }
.mega-panel__section h3 { margin: 0 0 10px; font-size: 16px; }
.mega-panel__links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mega-panel__links--columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mega-panel__links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
}
.mega-panel__links a:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-1px);
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.search {
  display: flex;
  min-width: 280px;
  flex: 1;
}

.search input,
.filters input:not([type="checkbox"]),
.filters select,
.finder-form input:not([type="checkbox"]),
.finder-form select,
.checkout-form input:not([type="checkbox"]),
.checkout-form select,
.checkout-form textarea,
.help-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

.search input { border-radius: 6px 0 0 6px; }
.search button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0 6px 6px 0;
  background: var(--ink);
  color: #fff;
  padding: 0 18px;
  font-weight: 700;
}

.search button:hover,
.btn:hover,
.table-cart-button:hover {
  background: var(--dark);
  transform: translateY(-1px);
}

.header-phones { display: grid; gap: 6px; font-weight: 700; }
.header-phone { display: grid; gap: 1px; color: inherit; text-decoration: none; }
.header-phone:hover span { color: var(--orange); }
.header-phones small { color: var(--muted); font-weight: 400; }
/* Действия в шапке: только иконка + подпись снизу, без рамок, счётчик в углу */
.header-actions { display: flex; align-items: flex-start; gap: 14px; }
.header-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  padding: 2px;
  cursor: pointer;
  color: var(--ink);
  max-width: 84px;
}
.header-action__icon { position: relative; display: inline-flex; }
.header-action__icon .icon { width: 26px; height: 26px; }
.header-action__label {
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-action:hover { color: var(--orange); }
.header-action:hover .header-action__label { color: var(--orange); }
.header-action__badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.bottom-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bottom-nav__inner { min-height: 46px; gap: 24px; overflow-x: auto; }
.bottom-nav a { flex: 0 0 auto; font-size: 15px; }

.messages { margin-top: 16px; }
.message { padding: 12px 14px; border-radius: 6px; background: #eaf5ff; border: 1px solid #cbe4ff; }
.message.success { background: #ecf9ef; border-color: #ccefd3; }

.hero {
  min-height: 430px;
  background-size: cover;
  background-position: center right;
  color: #fff;
}

.hero__inner {
  min-height: 430px;
  display: flex;
  align-items: center;
}

.hero__copy { max-width: 620px; }
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .95;
  letter-spacing: 0;
}

.hero p { margin: 0 0 26px; color: #d6dde7; font-size: 20px; line-height: 1.45; }
.hero__actions, .pill-links, .model-tags, .subtabs { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

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

.finder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  margin-top: -48px;
  position: relative;
}

.finder-layout--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.finder, .finder-card, .home-sidebar, .filters, .order-summary, .store-card, .generation-card, .account-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finder { padding: 18px; box-shadow: 0 18px 45px rgba(12,20,31,.12); }
.finder-card {
  padding: 18px;
  box-shadow: 0 18px 45px rgba(12,20,31,.12);
}
.finder-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.finder-card__head h2 {
  margin: 0 0 3px;
  font-size: 24px;
}
.finder-card__head p {
  margin: 0;
  color: var(--muted);
}
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab, .subtab { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 10px 16px; cursor: pointer; font-weight: 700; }
.tab.is-active, .subtab.is-active { background: var(--dark); color: #fff; border-color: var(--dark); }
.subtabs { margin-bottom: 12px; }
.tab-panel, .subtab-panel { display: none; }
.tab-panel.is-active, .subtab-panel.is-active { display: grid; }
.finder-form { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: center; }
.finder-form--card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finder-form--card .btn { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; cursor: pointer; }
.check input {
  appearance: none;
  width: 18px !important;
  min-width: 18px;
  height: 18px !important;
  min-height: 18px !important;
  flex: 0 0 18px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #fff;
  display: grid;
  place-items: center;
}
.check input:checked {
  background: var(--orange);
  border-color: var(--orange);
}
.check input:checked::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.home-sidebar { padding: 18px; }
.home-sidebar h2, .side-column h2 { margin: 0 0 12px; font-size: 20px; }
.home-sidebar a, .news-mini { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.home-sidebar span, .news-mini span { color: var(--muted); font-size: 13px; }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  margin-top: 38px;
}

.section-head { justify-content: space-between; gap: 16px; margin: 34px 0 16px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head a, .pill-links a { color: var(--orange); font-weight: 700; }
.side-column { border-left: 1px solid var(--line); padding-left: 20px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  position: relative;
}

.product-card:hover {
  border-color: var(--orange);
  box-shadow: 0 12px 28px rgba(12, 20, 31, .1);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  height: 170px; /* фиксированная средняя высота — карточки одинаковые */
  background: #fff;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}

.brand-strip a img {
    width: 100px;
        height: 100%;
	    object-fit: contain;
	        margin-bottom: 10px;
}

.alphabet-list a img {
  width: 100px;
      object-fit: contain;
          height: 100%;
	      margin-bottom: 10px;
}

.model-head img {
  
}

/* Изображение не на весь блок, а среднего размера по центру */
.product-card__image img { max-width: 90%; max-height: 155px; width: auto; height: auto; object-fit: contain; }
.product-card__logo { max-width: 70%; max-height: 60%; opacity: .5; }
/* Лого-заглушка в галерее детализации */
.gallery__logo { max-width: 60%; max-height: 60%; margin: auto; opacity: .5; }
.product-card__placeholder, .detail-placeholder {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
}

.orange-partials {
    color: var(--orange);
}

.badges { position: absolute; top: 8px; left: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.badges span { background: var(--orange); color: #fff; border-radius: 4px; padding: 4px 6px; font-size: 12px; }
.product-card__body { padding: 12px; display: grid; gap: 9px; flex: 1; }
.product-card__title { font-weight: 700; line-height: 1.25; min-height: 40px; }
.product-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 13px; }
.product-meta a { color: var(--orange); }
.product-icons { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.product-icons--large { margin: 14px 0; }
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
}
.ui-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--orange);
  vertical-align: -4px;
}
.ui-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon--sun { color: #e8a000; }
.ui-icon--snow { color: #2685d9; }
.ui-icon--vehicle { color: var(--dark); }
.ui-icon--sound { color: #5d6bd8; }
.ui-icon--wheel { color: var(--orange); }
.season-icon,
.vehicle-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
}
.season-icon--summer { color: #d48600; background: #fff4d6; }
.season-icon--winter { color: #2774b8; background: #e9f5ff; }
.season-icon--all { color: #286a6d; background: #e9fbf7; }
/* Значок шипованной шины (inline-SVG) */
.studs-icon {
  display: inline-block;
  width: 20px;
  height: 18px;
  vertical-align: middle;
  flex: 0 0 auto;
}
.vehicle-icon { color: var(--ink); }
.stock { font-size: 13px; }
.stock--ok { color: #16833b; }
.stock--empty { color: #a23f29; }
.price-row { gap: 8px; margin-top: auto; }
.price-row strong, .price-detail strong { font-size: 22px; color: var(--dark); }
.price-row del, .price-detail del { color: var(--muted); }
.favorite-form {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
}
.favorite-button,
.table-favorite-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.favorite-button:hover,
.favorite-button.is-active,
.table-favorite-button:hover,
.table-favorite-button.is-active {
  color: #e63455;
  border-color: #e63455;
  background: #fff1f4;
}

.catalog-page {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.catalog-page > *,
.filters,
.catalog-results {
  min-width: 0;
  width: 100%;
}

.filters { padding: 16px; height: max-content; position: sticky; top: 12px; }
.filters h1, .filters h2 { font-size: 24px; margin: 0 0 14px; }
.filters form, .checkout-form { display: grid; gap: 10px; }
.catalog-toolbar { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 14px; color: var(--muted); }
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px 0 8px;
  flex-wrap: wrap;
}
.pagination__page,
.pagination__nav,
.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: all .15s ease;
}
.pagination__ellipsis { border-color: transparent; background: transparent; }
.pagination__page:hover,
.pagination__nav:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.pagination__page.is-current {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.pagination__nav.is-disabled {
  opacity: .4;
  pointer-events: none;
}
.catalog-assist-section { margin: 28px 0; }
.section-head--compact { margin: 0 0 14px; }
.size-group { margin: 12px 0 18px; }
.size-group h3 { margin: 0 0 8px; }
.size-links { display: flex; flex-wrap: wrap; gap: 8px; }
.size-links a {
  display: inline-grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  font-weight: 700;
}
.size-links a:hover {
  color: var(--orange);
  border-color: var(--orange);
  transform: translateY(-1px);
}
.size-links small { color: var(--muted); font-weight: 400; }

.product-detail {
  display: grid;
  grid-template-columns: minmax(360px, 560px) minmax(0, 1fr);
  gap: 34px;
  margin-top: 32px;
}

.gallery {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Главное фото: ФИКСИРОВАННАЯ высота, чтобы контейнер не «скакал» */
.gallery__main { height: 420px; display: grid; place-items: center; }
.gallery__main img { max-width: 100%; max-height: 420px; object-fit: contain; }
.gallery__main img[data-zoom] { cursor: zoom-in; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb {
  width: 66px; height: 66px; padding: 5px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; transition: border-color .15s;
}
.thumb img { max-width: 100%; max-height: 50px; object-fit: contain; }
.thumb:hover { border-color: #c7ccd3; }
.thumb.is-active { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }

/* Лайтбокс — просмотр фото на весь экран */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: 24px; background: rgba(12, 20, 31, .9); opacity: 0; transition: opacity .2s;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox__close {
  position: absolute; top: 16px; right: 20px; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: rgba(255, 255, 255, .15); color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .3); }
/* Хлебные крошки: пункты через точку-разделитель, текущая страница без ссылки */
.breadcrumbs { margin: 14px auto 0; font-size: 13px; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumbs li + li::before {content: "·"; color: #535353; font-weight: 700;}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs .is-current { color: var(--ink); font-weight: 600; }
.product-info h1 { margin: 14px 0 8px; font-size: 34px; line-height: 1.15; }
.sku { color: var(--muted); }
.price-detail { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; }
.price-detail strong { font-size: 34px; }
.buy-form { display: flex; gap: 10px; margin-top: 20px; }
.buy-form input { width: 86px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; }
.stock-request { display: grid; gap: 10px; max-width: 420px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }

.detail-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 34px;
  margin-bottom: 25px;
}

.specs { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 8px 16px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; }
.specs--iconic dt,
.specs--iconic dd {
  display: flex;
  align-items: center;
  gap: 6px;
}
.progress-spec {
  position: relative;
  width: min(100%, 320px);
  height: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f5;
}
.progress-spec span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}
.progress-spec b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--dark);
  font-size: 12px;
}
.photo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-row img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; cursor: zoom-in; }

.reviews { display: grid; gap: 12px; }
.reviews article { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.stars {
  color: #f4b400;
  letter-spacing: 1px;
  white-space: nowrap;
}
.stars span { color: #d8dde5; }
.review-card { background: #fff; }
.review-card__head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.review-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--orange);
  font-weight: 800;
}
.review-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.review-card time,
.review-card small,
.review-actions {
  color: var(--muted);
  font-size: 13px;
}
.review-actions { display: flex; gap: 12px; }

.model-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 24px;
  background: var(--soft);
  border-radius: 8px;
}
.model-head--catalog { margin-top: 0; }
.model-head img { max-width: 90%; object-fit: contain; }
.model-photo {
  min-width: 220px;
  min-height: 180px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}
.model-photo span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}
.model-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.model-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.model-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  margin-top: 18px;
}
.model-info-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.model-info-grid h2,
.model-reviews h2 { margin-top: 0; }
.rating-large {
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 800;
  color: var(--orange);
}
.model-reviews { margin-top: 18px; }
.model-tags span, .alphabet-list a, .city-tabs a, .pill-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}
.model-tags--iconic span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-page, .listing-page, .help-page, .contacts-page, .account-page, .text-page, .narrow-page { margin-top: 32px; margin-bottom: 48px; }
.cart-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cart-line { display: grid; grid-template-columns: 1fr 110px 150px 110px 90px; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.cart-line input { width: 70px; }
.cart-line button { border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 6px 8px; }
.cart-total { justify-content: flex-end; gap: 18px; margin-top: 18px; font-size: 20px; }

.checkout-page { margin-top: 24px; } /* раскладка в две колонки — у .checkout (form) */
.checkout-form { border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.checkout-form label { display: grid; gap: 6px; font-weight: 700; }
.checkout-form textarea { min-height: 100px; padding-top: 10px; }

.brand-strip, .about-band {
  margin-top: 34px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.brand-strip div { display: flex; gap: 10px; flex-wrap: wrap; }
.brand-strip a, .brand-strip span { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; font-weight: 700; }
.about-band p { max-width: 900px; line-height: 1.65; color: var(--muted); }

.article-grid, .store-grid, .account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.category-grid,
.brand-grid,
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 14px 0 28px;
}

.category-tile,
.brand-tile,
.model-tile {
  min-height: 138px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.category-tile:hover,
.brand-tile:hover,
.model-tile:hover {
  border-color: var(--orange);
  box-shadow: 0 10px 24px rgba(12, 20, 31, .08);
  transform: translateY(-2px);
}

.brand-tile img,
.model-tile img,
.category-tile img {
  max-height: 56px;
  object-fit: contain;
}

.brand-tile > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--orange);
  font-size: 26px;
  font-weight: 800;
}

.model-tile__image {
  min-height: 64px;
  display: grid;
  align-items: center;
}

.model-tile__image span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--orange);
  font-size: 26px;
  font-weight: 800;
}

.brand-tile small,
.model-tile small,
.category-tile span,
.model-tile span,
.muted {
  color: var(--muted);
}

.diameter-section { margin-top: 28px; }
.diameter-group { margin: 18px 0 26px; }
.diameter-group h3 { margin: 0 0 10px; font-size: 24px; }
.diameter-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}
.diameter-row {
  display: grid;
  grid-template-columns: 74px minmax(150px, 1.5fr) 118px 88px 96px 98px 42px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.diameter-row:last-child { border-bottom: 0; }
.diameter-row--head {
  min-height: 42px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.diameter-row a { color: var(--dark); font-weight: 700; }
.table-cart-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.table-favorite-button {
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 1;
}
.article-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.brand-page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.brand-page-head h1 { margin: 0 0 8px; }
.brand-page-head__side {
  display: grid;
  justify-items: end;
  gap: 12px;
  min-width: 180px;
}
.brand-page-head__side img {
  max-width: 150px;
  max-height: 70px;
  object-fit: contain;
}
.brand-page-head__side > span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--orange);
  font-size: 32px;
  font-weight: 800;
}
.sort-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}
.sort-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.brand-description {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  line-height: 1.65;
}
.alphabet-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  align-items: start; /* карточки по высоте содержимого, без растягивания */
}
.alphabet-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.alphabet-group h2 {
  margin: 0 0 10px;
  color: var(--orange);
}
.alphabet-group div {
  display: grid;
  gap: 8px;
}
.alphabet-group a {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.alphabet-group a:hover { color: var(--orange); }

/* Подбор по авто: колонки формируются на сервере (как на mosautoshina),
   поэтому при малом числе марок они идут одной колонкой, а не растягиваются в ряд. */
.auto-columns {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin: 18px 0 0;
  flex-wrap: wrap;
}
.auto-column {
  flex: 1 1 200px;
  min-width: 200px;
  max-width: 280px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.auto-column li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
}
.auto-column li.littera {
  font-weight: 800;
  font-size: 18px;
  color: var(--orange);
  text-transform: uppercase;
  padding: 12px 0 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.auto-column li a { color: var(--ink); text-decoration: none; }
.auto-column li a:hover { color: var(--orange); }
.auto-column li.popular a { font-weight: 700; }
.auto-column .count { color: var(--muted); font-size: 12px; }

/* Страница модели: поколения и модификации в 3 колонки */
.generation-list { display: flex; flex-direction: column; gap: 16px; }
.generation-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0;
  overflow: hidden;
}
.generation-card__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.generation-card__head h2 { margin: 0; font-size: 17px; }
.generation-card__years { color: var(--muted); font-weight: 600; font-size: 14px; }
.mod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 18px;
  padding: 16px 18px;
}
.mod-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background-color .12s ease, color .12s ease;
}
.mod-link:hover { background: var(--orange); color: #fff; }
@media (max-width: 860px) { .mod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mod-grid { grid-template-columns: 1fr; } }
.fitment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 24px 0;
}
.fitment-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.fitment-params p {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  margin: 0;
}
.article-card img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.article-card span, .eyebrow { color: var(--muted); font-size: 14px; }
.article-card h2 { font-size: 20px; margin: 8px 0; }
.text-page { max-width: 900px; }
.text-page h1 { font-size: 38px; }
.text-cover { width: 100%; border-radius: 8px; margin: 18px 0; }
.content { line-height: 1.7; }

.help-search { display: flex; gap: 10px; margin-bottom: 18px; }
.faq-list details { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.faq-list summary { cursor: pointer; font-weight: 700; }
/* Блок «наши контакты» под заголовком */
.contacts-info { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 20px 22px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.contacts-info__block h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.contacts-info__phone { display: block; font-size: 20px; font-weight: 800; color: var(--ink); text-decoration: none; margin-bottom: 4px; }
.contacts-info__phone:hover { color: var(--orange); }
.contacts-info__phone small { font-size: 13px; font-weight: 500; color: var(--muted); }
.contacts-info__block a[href^="mailto"] { display: block; font-weight: 700; color: var(--orange); text-decoration: none; margin-bottom: 4px; }
.contacts-info__time { margin: 0; color: var(--muted); }
.contacts-info__socials { display: flex; flex-wrap: wrap; gap: 10px; }
.contacts-info__socials .footer-social { background: #fff; border: 1px solid var(--line); }
.contacts-info__socials .footer-social svg { fill: var(--ink); }
.contacts-info__socials .footer-social:hover { background: var(--orange); border-color: var(--orange); }
.contacts-info__socials .footer-social:hover svg { fill: #fff; }
.contacts-info__block--org { flex-basis: 100%; max-width: 520px; }
.contacts-info__block--org p { margin: 2px 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.contacts-info__org-name { font-weight: 700; color: var(--ink) !important; font-size: 14px !important; }

.city-tabs, .alphabet-list { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.alphabet-list a.is-active { border-color: var(--orange); color: var(--orange); }
/* Контент из визуального редактора (описания, страницы, «Кто мы») */
.rich-text { line-height: 1.6; }
.rich-text h2, .rich-text h3 { margin: 18px 0 8px; }
.rich-text p { margin: 0 0 12px; }
.rich-text ul, .rich-text ol { margin: 0 0 12px; padding-left: 22px; }
.rich-text li { margin: 4px 0; }
.rich-text img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-text a { color: var(--orange); }
.rich-text table { border-collapse: collapse; max-width: 100%; }
.rich-text td, .rich-text th { border: 1px solid var(--line); padding: 6px 10px; }

.store-card { padding: 16px; border-left: 3px solid var(--line); }
.store-card span { color: var(--orange); font-weight: 700; }
.store-card h2 { font-size: 17px; margin: 6px 0; }
.store-card__time { color: var(--muted); font-size: 13px; }
/* Цветовая метка перевозчика у партнёрских пунктов выдачи */
.store-card--cdek { border-left-color: #1ab248; }
.store-card--cdek .store-card__type { color: #1ab248; }
.store-card--kit { border-left-color: #0a6cff; }
.store-card--kit .store-card__type { color: #0a6cff; }
.store-card--pecom { border-left-color: #e3001b; }
.store-card--pecom .store-card__type { color: #e3001b; }
.store-card--dellin { border-left-color: var(--orange); }
.store-card--dellin .store-card__type { color: var(--orange); }
.map-embed iframe,
.yandex-map iframe { width: 100%; min-height: 220px; border: 0; }
.yandex-map {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 18px 0;
}
.yandex-map iframe { min-height: 360px; }
.city-tabs a.is-active { border-color: var(--orange); color: var(--orange); background: #fff6ef; }
.contacts-map { height: 420px; width: 100%; border: 1px solid var(--line); border-radius: 10px; margin: 18px 0; z-index: 0; }
.contacts-map .leaflet-popup-content { font-size: 13px; }
.reviews-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}
.review-step { margin-bottom: 24px; }
.review-model-head {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}
.reviews-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}
.reviews-sidebar article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.reviews-sidebar a:not(.btn) {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.model-info-grid--wide { grid-template-columns: 1fr; }

.city-modal[hidden] { display: none; }
.city-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.city-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 31, .45);
}
.city-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(12,20,31,.28);
}
.city-modal__close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
}
.city-modal__csrf { display: none; }
.city-modal__search {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  margin-bottom: 14px;
  font: inherit;
}
.city-modal__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.city-modal__list button {
  display: grid;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
}
.city-modal__list button:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.city-modal__list small { color: var(--muted); }
.test-list { display: grid; gap: 10px; }
.test-list > a, .generation-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.test-list span { display: block; margin-top: 5px; color: var(--muted); }
.data-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 10px; text-align: left; }
.data-table th { background: var(--soft); }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 16px; }

.account-section { margin-top: 28px; }
.order-history { display: grid; gap: 12px; }
.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
/* (старая раскладка состава заказа удалена — актуальные правила ниже,
   .order-card / .order-item с flex-раскладкой) */

.site-footer {
  margin-top: 48px;
  background: var(--dark);
  color: #d7dde6;
  padding: 34px 0;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
.site-footer h3 { margin: 0 0 10px; color: #fff; }
.site-footer a { display: block; margin: 8px 0; color: #d7dde6; }
.site-footer a:hover { color: #fff; }
.footer-logo { color: #fff; }
.footer-schedule { margin: 8px 0; color: #aab3bf; }
.footer-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.footer-social { display: inline-flex !important; align-items: center; justify-content: center; width: 38px; height: 38px; margin: 0 !important; border-radius: 50%; background: rgba(255,255,255,.1); transition: background .15s, transform .15s; }
.footer-social:hover { background: var(--orange); transform: translateY(-2px); }
.footer-social svg { width: 20px; height: 20px; fill: #fff; }

@media (max-width: 980px) {
  .middle-header { flex-wrap: wrap; padding: 12px 0; }
  .search { order: 5; flex-basis: 100%; }
  .finder-layout, .finder-layout--split, .section-grid, .catalog-page, .product-detail, .detail-tabs, .checkout-page, .model-info-grid, .fitment-grid, .reviews-layout, .review-model-head { grid-template-columns: 1fr; }
  .finder-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { position: static; }
  .side-column { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mega-menu {
    grid-template-columns: 220px minmax(360px, 1fr);
    width: min(92vw, 760px);
  }
  .mega-panel__links--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diameter-table { overflow-x: auto; }
  .diameter-row {
    grid-template-columns: 80px minmax(180px, 1fr) 130px 100px 100px 100px 48px;
    min-width: 760px;
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 20px, 1240px); }
  .topbar__inner { align-items: flex-start; flex-direction: column; padding: 8px 0; }
  .hero, .hero__inner { min-height: 390px; }
  .hero p { font-size: 17px; }
  .finder-layout { margin-top: 16px; }
  .finder-form { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { min-height: 330px; }
  .product-card__title { font-size: 14px; }
  .cart-line { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mega-menu {
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
    max-height: 78vh;
    overflow: auto;
  }
  .mega-menu__left {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .mega-panel__head { flex-direction: column; }
  .mega-panel__links--columns { grid-template-columns: 1fr; }
  .model-head { flex-direction: column; }
  .model-photo { min-width: 0; }
  .search button span { display: none; }
  .brand-page-head { flex-direction: column; }
  .brand-page-head__side { justify-items: start; }
}

.logo img {
    width: 120px;
}

/* ===== Раздел «Помощь»: карточки разделов ===== */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; margin-top: 18px; }
.card-help { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card-help__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-help__icon svg { width: 30px; height: 30px; fill: var(--orange); }
.card-help__head h3 { margin: 0; font-size: 17px; }
.card-help__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.card-help__list li a { display: block; padding: 7px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--soft); }
.card-help__list li a:hover { color: var(--orange); }
.card-help__more { margin-top: 12px; border: 0; background: transparent; color: var(--orange); font-weight: 700; cursor: pointer; padding: 4px 0; }
.faq-search-results { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.faq-search-item { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.faq-search-item:hover { border-color: var(--orange); }
.faq-search-item small { color: var(--muted); }

/* ===== Страница вопроса: сайдбар + ответ ===== */
.faq-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; margin: 24px auto; }
.faq-sidebar { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.faq-nav__group { border-bottom: 1px solid var(--soft); padding: 4px 0; }
.faq-nav__title { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.faq-nav__icon svg { width: 20px; height: 20px; fill: var(--muted); }
.faq-nav__group ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 40px; display: none; }
.faq-nav__group.is-open ul { display: block; }
.faq-nav__group ul li a { display: block; padding: 5px 0; font-size: 14px; color: var(--muted); text-decoration: none; }
.faq-nav__group ul li a:hover { color: var(--orange); }
.faq-nav__group ul li.active a { color: var(--orange); font-weight: 700; }
.faq-content { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px 28px; }
.faq-content h1 { margin-top: 10px; }
.faq-answer { line-height: 1.7; }
.faq-answer p { margin: 0 0 12px; }

/* ===== Обзор личного кабинета ===== */
.account-dashboard { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.card-title { margin: 0 0 14px; font-size: 18px; }
.card-user-info { grid-row: span 2; }
.user-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.user-avatar { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.user-avatar .no-avatar { font-size: 32px; font-weight: 800; color: var(--muted); }
/* Бейдж-карандаш накладывается на правый-нижний край аватарки (не обрезается) */
.avatar-edit-badge { position: absolute; right: 2px; bottom: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); box-sizing: border-box; }
.user-name { flex: 1 1 auto; min-width: 0; font-size: 22px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; word-break: break-word; }
.user-info-blocks dl { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 9px 0; border-bottom: 1px solid var(--soft); }
.user-info-blocks dt { color: var(--muted); }
.user-info-blocks dd { margin: 0; font-weight: 600; text-align: right; }
.user-account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-link { background: transparent; color: var(--orange); border: 1px solid var(--line); }
.btn-link:hover { border-color: var(--orange); }
.account-profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.account-profile-stats a { background: var(--soft); border-radius: 10px; padding: 14px 8px; text-align: center; text-decoration: none; color: var(--ink); }
.account-profile-stats strong { display: block; font-size: 24px; color: var(--orange); }
.account-profile-stats span { font-size: 12px; color: var(--muted); }
.card-account-stats .stats { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card-account-stats .stats li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--soft); }
.account-hint { background: var(--soft); border-radius: 10px; padding: 14px; font-size: 14px; line-height: 1.6; }
.account-hint a, .account-support a { color: var(--orange); }
.account-support { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.card-account-sale-preview { grid-column: 2; }
.card-account-sale-preview-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-account-sale-preview-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.btn-primary { background: var(--orange); color: #fff; }
.account-sale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.account-sale-card { position: relative; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-decoration: none; color: var(--ink); }
.account-sale-card:hover { border-color: var(--orange); }
.account-sale-card-badge { position: absolute; top: 10px; right: 10px; background: #d23b3b; color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.account-sale-card strong { font-size: 13px; line-height: 1.3; }
.account-sale-card-meta { color: var(--muted); font-size: 12px; }
.account-sale-card-price { font-weight: 800; }
.account-sale-card-price span { color: var(--muted); font-weight: 400; text-decoration: line-through; margin-right: 4px; }

@media (max-width: 900px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-sidebar { position: static; max-height: none; }
  .account-dashboard { grid-template-columns: 1fr; }
  .card-user-info { grid-row: auto; }
  .card-account-sale-preview { grid-column: auto; }
}

/* ===== Доработки: кнопки, сортировка, модалки, кабинет, корзина ===== */
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn--lg { min-height: 50px; padding: 0 26px; font-size: 16px; width: 100%; }
/* Атрибут hidden должен скрывать элемент даже если у класса задан display
   (иначе .btn{display:inline-flex} перебивает hidden и кнопка «В корзине»
   показывается одновременно с «В корзину»). */
[hidden] { display: none !important; }

/* Кнопка «В корзине» — визуально как «В корзину», только зелёная */
.btn--in-cart { background: #1f9d4d; color: #fff; text-decoration: none; }
.btn--in-cart:hover { background: #178040; color: #fff; }
.card-cart, .buy-block { display: flex; flex-direction: column; gap: 8px; }
/* И кнопка добавления, и «В корзине» одинаковой ширины внутри карточки/детализации */
.card-cart .btn,
.card-cart form,
.buy-block .btn { width: 100%; }

/* ===== Страница успеха заказа ===== */
.success-page { margin: 24px auto; }
.success-hero { text-align: center; padding: 28px 16px; }
.success-check { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: #e6f6ec; display: grid; place-items: center; }
.success-check svg { width: 38px; height: 38px; fill: none; stroke: #229a3e; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success-hero h1 { margin: 0 0 8px; }
.success-hero p { color: var(--muted); max-width: 620px; margin: 0 auto; }
.success-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; margin-top: 20px; }
.success-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.success-card h2 { margin: 0 0 14px; font-size: 18px; }
.success-items { display: flex; flex-direction: column; gap: 12px; }
.success-item { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--soft); }
.success-item__photo { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.success-item__photo img { width: 100%; height: 100%; object-fit: contain; }
.success-item__photo .is-logo { opacity: .5; padding: 4px; }
.success-item__name { display: flex; flex-direction: column; font-weight: 600; color: var(--ink); text-decoration: none; }
.success-item__name small { color: var(--muted); font-weight: 400; }
.success-item__qty { color: var(--muted); font-size: 13px; }
.success-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.success-total strong { font-size: 22px; color: var(--orange); }
.success-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.success-info dt { color: var(--muted); }
.success-info dd { margin: 0; text-align: right; font-weight: 600; }
.success-pay-note { margin-top: 14px; padding: 12px; background: #fff6ef; border-radius: 10px; font-size: 13px; color: var(--ink); }
.success-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
@media (max-width: 900px) { .success-grid { grid-template-columns: 1fr; } }

/* ===== Оформление заказа ===== */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; margin-top: 24px; }
.checkout-main { display: flex; flex-direction: column; gap: 18px; }
.checkout-block { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0; }
.checkout-block legend { font-weight: 800; font-size: 16px; padding: 0 8px; }
.checkout-block label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.checkout-block input:not([type="radio"]), .checkout-block select, .checkout-block textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; width: 100%;
}
.checkout-block .full { margin-top: 12px; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
/* Кастомные радио: нативный input скрыт, но рабочий */
.radio-chip input[type="radio"], .radio-line input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-chip { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; cursor: pointer; font-weight: 600; user-select: none; }
.radio-chip::before, .radio-line::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.radio-chip:has(input:checked) { border-color: var(--orange); color: var(--orange); background: #fff6ef; }
.radio-chip:has(input:checked)::before, .radio-line:has(input:checked)::before {
  border-color: var(--orange); box-shadow: inset 0 0 0 4px var(--orange);
}
.legal-fields { margin: 6px 0 14px; }
.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.checkout-subtitle { font-weight: 700; color: var(--muted); font-size: 13px; }
.radio-line { display: flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; user-select: none; }
/* Перебиваем общий .checkout-block label { display:grid } для радио-меток */
.checkout-block label.radio-chip { display: inline-flex; align-items: center; gap: 9px; }
.checkout-block label.radio-line { display: flex; align-items: center; gap: 9px; }

/* Расчёт доставки */
.checkout-hint { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.delivery-loader { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.delivery-error { margin: 12px 0 0; font-size: 13px; color: #d23b3b; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--orange); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.delivery-options { display: grid; gap: 10px; margin-top: 16px; }
.checkout-block label.delivery-option {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer;
  font-weight: 600; transition: border-color .15s, box-shadow .15s, background .15s;
}
.checkout-block label.delivery-option:hover { border-color: #c7ccd3; }
.delivery-option input[type="radio"] { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 50%; position: relative; cursor: pointer; }
.delivery-option input[type="radio"]:checked { border-color: var(--orange); }
.delivery-option input[type="radio"]:checked::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--orange); }
.checkout-block label.delivery-option.is-selected { border-color: var(--orange); background: #fff6ef; box-shadow: 0 0 0 1px var(--orange) inset; }
.delivery-option__body { display: flex; flex-direction: column; gap: 2px; }
.delivery-option__name { font-size: 15px; font-weight: 700; }
.delivery-option__meta { font-size: 12px; color: var(--muted); font-weight: 500; }
.delivery-option__price { font-size: 17px; font-weight: 800; color: var(--dark); white-space: nowrap; }
.checkout-block label.delivery-option.is-na { opacity: .75; }
.delivery-option.is-na .delivery-option__price { font-size: 14px; color: var(--muted); font-weight: 600; }

.order-summary { border: 1px solid var(--line); border-radius: 12px; padding: 18px; position: sticky; top: 16px; }
.order-summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.order-summary__head h2 { margin: 0; }
.order-summary__edit { color: var(--orange); font-size: 13px; font-weight: 700; text-decoration: none; }
.order-summary__items { display: flex; flex-direction: column; gap: 12px; max-height: 360px; overflow: auto; }
.order-summary__item { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; }
.order-summary__photo { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.order-summary__photo img { width: 100%; height: 100%; object-fit: contain; }
.order-summary__photo .is-logo { opacity: .5; padding: 4px; }
.order-summary__name { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; }
.order-summary__name small { color: var(--muted); font-weight: 400; }
.order-summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.order-summary__total strong { font-size: 22px; color: var(--orange); }
.order-consent { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.order-consent a { color: var(--orange); }

@media (max-width: 900px) {
  .checkout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}

/* Мои отзывы (личный кабинет) */
.my-reviews { display: flex; flex-direction: column; gap: 14px; }
.my-review { display: grid; grid-template-columns: 90px 1fr; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.my-review__photo { width: 90px; height: 90px; border-radius: 8px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.my-review__photo img { width: 100%; height: 100%; object-fit: contain; }
.my-review__title { font-weight: 700; color: var(--ink); text-decoration: none; }
.my-review__title:hover { color: var(--orange); }
.my-review__meta { display: flex; align-items: center; gap: 12px; margin: 6px 0; color: var(--muted); font-size: 13px; }
.my-review__meta .stars { color: #f5a623; }
.review-status { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.review-status--ok { background: #e6f6ec; color: #229a3e; }
.review-status--wait { background: #fff3e8; color: var(--orange); }

/* Рейтинг в карточке товара */
.product-rating { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.product-rating .stars { color: #f5a623; }
.product-rating__count { color: var(--muted); font-size: 12px; }

/* Лайки/дизлайки отзыва */
.review-actions { display: flex; gap: 10px; margin-top: 8px; }
.review-vote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}
.review-vote:hover { border-color: var(--orange); }
.review-actions.is-voted .review-vote { cursor: default; opacity: .75; }
.review-vote b { font-weight: 700; }

/* Кликабельные характеристики (производитель, модель, размер) */
.spec-link { color: var(--orange); font-weight: 600; text-decoration: none; border-bottom: 1px dashed currentColor; }
.spec-link:hover { color: var(--dark); }

/* Сортировка */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.catalog-toolbar__info { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.sort-form label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  font-weight: 600;
}

/* Универсальная модалка */
.auth-modal,
.review-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-modal[hidden],
.review-modal[hidden] { display: none; }
.auth-modal__backdrop,
.review-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 31, .55);
}
.auth-modal__panel,
.review-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(12, 20, 31, .3);
  max-height: 92vh;
  overflow: auto;
}
.review-modal__panel { max-width: 520px; }
.auth-modal__panel[hidden] { display: none; }
.auth-modal__close,
.review-modal__close,
.city-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.auth-modal__panel h2,
.review-modal__panel h2 { margin: 0 0 18px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label:not(.check) { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.auth-form input[type="email"],
.auth-form input[type="password"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 15px;
}
.auth-form .check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); font-weight: 500; }
.auth-form .check a { color: var(--orange); }
.auth-form__error { color: #d23b3b; font-size: 13px; margin: 0; }
.auth-form__ok { color: #229a3e; font-size: 14px; font-weight: 600; margin: 0; }
.top-links__accent { color: var(--orange) !important; font-weight: 700; }
.auth-form__switch { margin: 4px 0 0; font-size: 14px; text-align: center; color: var(--muted); }
.auth-form__switch a { color: var(--orange); font-weight: 700; }

/* Рейтинг звёздами */
.review-form { display: flex; flex-direction: column; gap: 14px; }
.review-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.review-form input, .review-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
.review-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rating-input { display: flex; align-items: center; gap: 10px; }
.rating-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rating-star {
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: var(--line);
  cursor: pointer;
  transition: color .1s ease;
}
.rating-star.is-on { color: #f5a623; }

/* ===== Личный кабинет ===== */
.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  margin: 24px auto;
}
.account-sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  position: sticky;
  top: 16px;
}
.account-sidebar__user { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.account-sidebar__user strong { display: block; font-size: 14px; }
.account-sidebar__user small { color: var(--muted); font-size: 12px; word-break: break-all; }
.account-nav { display: flex; flex-direction: column; gap: 4px; }
.account-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.account-nav a:hover { background: var(--soft); }
.account-nav a.is-active { background: var(--orange); color: #fff; }
.account-logout { margin-top: 16px; }
.account-logout .btn { width: 100%; }
.account-content { min-width: 0; }

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
  position: relative;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar--sm { width: 44px; height: 44px; font-size: 16px; }
.account-avatar--lg { width: 120px; height: 120px; font-size: 40px; cursor: pointer; }
.account-avatar--lg .account-avatar__hint {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(12, 20, 31, .65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 4px;
  opacity: 0;
  transition: opacity .15s ease;
}
.account-avatar--lg:hover .account-avatar__hint { opacity: 1; }

.account-overview { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.account-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; flex: 1; }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card strong { font-size: 30px; color: var(--orange); }
.stat-card span { color: var(--muted); font-size: 13px; }

/* Заказы */
.order-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.order-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.order-card__head time { color: var(--muted); font-size: 13px; margin-left: 10px; }
.order-status { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); }
.order-status--new { background: #fff3e8; color: var(--orange); }
.order-status--paid, .order-status--done { background: #e6f6ec; color: #229a3e; }
.order-status--cancelled { background: #fde8e8; color: #d23b3b; }
.order-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--soft); }
.order-item__photo { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.order-item__photo img { width: 100%; height: 100%; object-fit: contain; }
.order-item__photo .is-logo { opacity: .5; padding: 8px; }
/* Название прижато к фото, цена/кол-во уходят вправо */
.order-item__name { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; font-weight: 600; margin-right: auto; }
.order-item__name small { color: var(--muted); font-weight: 400; }
.order-item__qty { color: var(--muted); }
.order-card__delivery { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.order-card__delivery svg { color: var(--orange); flex-shrink: 0; }
.order-card__delivery b { color: var(--ink); font-weight: 700; }
.order-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.order-card__foot .btn { min-width: 160px; }
.paid-badge { color: #229a3e; font-weight: 700; }
.pay-note { color: var(--muted); font-size: 14px; }
.order-item__qty { white-space: nowrap; }
.order-item__sum { white-space: nowrap; }

/* Гараж */
.garage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 28px; }
.garage-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.garage-card__photo { height: 150px; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.garage-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.garage-card__body { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.garage-card__body small { color: var(--muted); font-size: 12px; }
.garage-card__actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.garage-add { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.garage-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.garage-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.garage-form select, .garage-form input { border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }

/* Учётные данные */
.profile-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.profile-form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.profile-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-avatar-upload { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.form-grid input { border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }
.profile-form--password p { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.profile-form--password input { border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; width: 100%; }

/* Спецпредложения */
.offers-hero { background: linear-gradient(120deg, var(--orange), #ff9248); color: #fff; border-radius: 16px; padding: 28px; margin-bottom: 20px; }
.offers-hero h1 { margin: 0 0 8px; color: #fff; }
.offers-hero p { margin: 0; opacity: .95; }
.offers-toggle { display: inline-flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 999px; margin-bottom: 20px; }
.offers-toggle a { padding: 8px 22px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; }
.offers-toggle a.is-active { background: var(--orange); color: #fff; }
.offers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.offer-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s ease; }
.offer-card:hover { box-shadow: 0 10px 30px rgba(12, 20, 31, .12); }
.offer-card__badge { position: absolute; top: 12px; left: 12px; background: #d23b3b; color: #fff; font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.offer-card__image { height: 150px; display: flex; align-items: center; justify-content: center; }
.offer-card__image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.offer-card__image .is-logo { max-width: 70%; max-height: 70%; opacity: .55; }
.offer-card__title { font-size: 14px; line-height: 1.3; }
.offer-card__meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.offer-card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.offer-card__price strong { font-size: 20px; color: var(--orange); }
.offer-card__price del { color: var(--muted); font-size: 13px; }
.offer-card__save { width: 100%; color: #229a3e; font-size: 12px; font-weight: 700; }

/* ===== Корзина ===== */
.cart-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.cart-wrap.is-empty { grid-template-columns: 1fr; }
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-line {
  display: grid;
  grid-template-columns: 90px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.cart-line__photo { width: 90px; height: 90px; border-radius: 10px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.cart-line__photo img { width: 100%; height: 100%; object-fit: contain; }
.cart-line__logo { opacity: .5; padding: 8px; }
.cart-line__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-line__title { font-weight: 700; color: var(--ink); text-decoration: none; }
.cart-line__meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.cart-line__unit { color: var(--muted); font-size: 13px; }
.cart-line__total { font-size: 18px; white-space: nowrap; }
.qty-control { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty-btn { width: 38px; height: 38px; border: 0; background: #fff; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty-btn:hover { background: var(--soft); color: var(--orange); }
.qty-value { min-width: 40px; text-align: center; font-weight: 700; }
.cart-line__actions { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.icon-btn .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.icon-btn:hover { border-color: var(--orange); color: var(--orange); }
.icon-btn.is-active { color: var(--orange); border-color: var(--orange); }
.icon-btn.is-active .icon { fill: var(--orange); }
.icon-btn--danger:hover { border-color: #d23b3b; color: #d23b3b; }
.cart-summary { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; position: sticky; top: 16px; }
.cart-summary h2 { margin: 0 0 14px; }
.cart-summary__row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); }
.cart-summary__row--total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; color: var(--ink); }
.cart-summary__row--total strong { font-size: 24px; color: var(--orange); }
.cart-summary .btn { margin-top: 14px; }
.cart-history { margin-top: 36px; }

.auth-form input[name="contact"], .auth-form input[name="order_number"] {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 15px;
}

.footer-logo img {
    width: 230px;
}

.side-column h2 {
    margin-top: 12px;
}

@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .account-nav { flex-direction: row; flex-wrap: wrap; }
  .profile-grid { grid-template-columns: 1fr; }
  .cart-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cart-line { grid-template-columns: 70px 1fr; grid-auto-rows: auto; }
  .cart-line__photo { width: 70px; height: 70px; }
  .cart-line__total, .cart-line__qty, .cart-line__actions { grid-column: 2; justify-self: start; }
  .order-item { grid-template-columns: 56px 1fr; }
  .review-form__row { grid-template-columns: 1fr; }
}
/* ===== Подвал: реквизиты организации ===== */
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 22px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}
.footer-legal__org p { margin: 0 0 4px; font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; max-width: 720px; }
.footer-legal__org strong { color: #fff; }
.footer-legal__copy { margin: 0; font-size: 12px; color: rgba(255,255,255,.55); white-space: nowrap; }

/* ===== Статьи в сайдбаре главной ===== */
.side-articles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-article { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; text-decoration: none; color: var(--ink); }
.side-article img { width: 100%; height: 84px; object-fit: cover; display: block; }
.side-article__ph { display: grid; place-items: center; height: 84px; background: var(--soft); color: var(--muted); font-weight: 800; }
.side-article__title { display: block; padding: 8px 10px; font-size: 12px; line-height: 1.3; font-weight: 600; }
.side-article:hover { border-color: var(--orange); }
.side-article:hover .side-article__title { color: var(--orange); }

/* ===== Тесты шин: результаты с плюсами/минусами ===== */
.test-results { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.test-row {
  display: grid;
  grid-template-columns: 56px 120px 1fr auto;
  gap: 18px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.test-place { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-weight: 800; font-size: 18px; color: var(--ink); }
.test-place--1 { background: #ffd97a; }
.test-place--2 { background: #e3e7ec; }
.test-place--3 { background: #f3c9a3; }
.test-row__photo { width: 120px; height: 100%; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.test-row__photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.test-row__ph { color: var(--muted); font-weight: 800; font-size: 28px; }
.test-row__name { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.test-row__name a { color: var(--orange); }
.test-row__name a:hover { color: var(--dark); }
.test-row__body dl { display: flex; gap: 10px; margin: 0 0 8px; }
.test-row__body dt { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; line-height: 1; color: #fff; }
.test-row__body dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.test-plus dt { background: #229a3e; }
.test-minus dt { background: #d23b3b; }
.test-summary dt { background: var(--muted); }
.test-summary dd { color: var(--muted); }
.test-row__price { text-align: right; white-space: nowrap; }
.test-row__price a, .test-row__price span { font-weight: 800; color: var(--orange); }
.test-row__price a:hover { color: var(--dark); }
@media (max-width: 720px) {
  .test-row { grid-template-columns: 44px 1fr; }
  .test-row__photo { display: none; }
  .test-row__price { grid-column: 2; text-align: left; }
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   Все мобильные элементы по умолчанию скрыты — десктоп не меняется.
   Включаются только в @media (max-width: 860px).
   ============================================================ */
.burger,
.mobile-drawer,
.mobile-tabbar { display: none; }
body.no-scroll { overflow: hidden; }

@media (max-width: 860px) {
  /* — Прячем десктопные части шапки (их функции — в drawer и tabbar) — */
  .topbar,
  .catalog-menu,
  .header-phones,
  .header-actions,
  .bottom-nav { display: none !important; }

  /* — Компактная шапка: [бургер] [лого] … [поиск во всю ширину] — */
  .burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex: 0 0 auto;
    border: 1px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink); cursor: pointer;
  }
  .burger .icon { width: 24px; height: 24px; }
  .middle-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; }
  .middle-header .logo { margin-right: auto; }
  .logo img { width: 104px; }
  .search { order: 5; flex-basis: 100%; margin: 0; }

  /* Чтобы фиксированная нижняя панель не перекрывала контент и футер */
  body { padding-bottom: 66px; }
  .site-footer { margin-bottom: 0; }

  /* — Нижняя панель навигации (как в приложении) — */
  .mobile-tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .07);
    padding: 6px 4px; padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-tab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: 0; cursor: pointer; text-decoration: none;
    color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 2px;
  }
  .mobile-tab .icon { width: 24px; height: 24px; }
  .mobile-tab.is-active { color: var(--orange); }
  .mobile-tab__icon { position: relative; display: inline-flex; }
  .mobile-tab__badge {
    position: absolute; top: -6px; right: -9px; min-width: 16px; height: 16px;
    padding: 0 4px; border-radius: 999px; background: var(--orange); color: #fff;
    font-size: 10px; line-height: 16px; text-align: center; font-weight: 700;
  }

  /* — Drawer (выезжающее меню) — */
  .mobile-drawer { display: block; position: fixed; inset: 0; z-index: 70; }
  .mobile-drawer[hidden] { display: none; }
  .mobile-drawer__backdrop {
    position: absolute; inset: 0; background: rgba(12, 20, 31, .5);
    opacity: 0; transition: opacity .25s;
  }
  .mobile-drawer.is-open .mobile-drawer__backdrop { opacity: 1; }
  .mobile-drawer__panel {
    position: absolute; top: 0; left: 0; bottom: 0; width: min(86vw, 360px);
    background: #fff; display: flex; flex-direction: column; gap: 12px;
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .2);
  }
  .mobile-drawer.is-open .mobile-drawer__panel { transform: translateX(0); }
  .mobile-drawer__top { display: flex; align-items: center; justify-content: space-between; }
  .mobile-drawer__top .logo img { width: 112px; }
  .mobile-drawer__close {
    width: 40px; height: 40px; border: 0; background: var(--soft); border-radius: 10px;
    font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink);
  }
  .mobile-drawer__row { display: flex; gap: 8px; }
  .mobile-chip {
    display: inline-flex; align-items: center; gap: 7px; flex: 1; min-width: 0;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--ink); font-weight: 600; font-size: 13px;
    cursor: pointer; text-decoration: none;
  }
  .mobile-chip .icon { width: 18px; height: 18px; flex: 0 0 auto; }
  .mobile-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-drawer__search { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .mobile-drawer__search input { flex: 1; min-width: 0; border: 0; padding: 11px 12px; font-size: 15px; }
  .mobile-drawer__search button { border: 0; background: var(--orange); color: #fff; width: 46px; display: grid; place-items: center; cursor: pointer; }
  .mobile-drawer__search .icon { width: 20px; height: 20px; }

  .mobile-nav { display: flex; flex-direction: column; }
  .mobile-nav__label { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; margin: 12px 0 2px; }
  .mobile-nav > a { padding: 12px 4px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--soft); }
  .mobile-cat { border-bottom: 1px solid var(--soft); }
  .mobile-cat summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 4px; cursor: pointer; list-style: none; font-weight: 700; }
  .mobile-cat summary::-webkit-details-marker { display: none; }
  .mobile-cat summary a { color: var(--ink); text-decoration: none; flex: 1; }
  .mobile-cat__toggle { display: inline-flex; }
  .mobile-cat__toggle .icon { width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
  .mobile-cat[open] .mobile-cat__toggle .icon { transform: rotate(180deg); }
  .mobile-cat__body { display: flex; flex-direction: column; padding: 0 0 8px 12px; }
  .mobile-cat__body a { padding: 8px 4px; color: var(--ink); text-decoration: none; font-size: 14px; }
  .mobile-cat__brand { color: var(--muted); font-size: 13px; }
  .mobile-drawer__phones { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
  .mobile-drawer__phones a { font-weight: 800; color: var(--ink); text-decoration: none; }
  .mobile-drawer__phones small { color: var(--muted); font-weight: 500; }
}

/* Очень узкие экраны: товары в одну колонку для читаемости */
@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ===== Cookie-баннер ===== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 980px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--dark); color: #fff; padding: 14px 18px; border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
}
.cookie-banner__text { font-size: 14px; line-height: 1.5; flex: 1 1 320px; }
.cookie-banner__text a { color: var(--orange); }
.cookie-banner__accept { white-space: nowrap; min-width: 130px; }
@media (max-width: 860px) { .cookie-banner { bottom: 76px; } } /* над нижним таб-баром */

/* ===== Сноска подтверждения города ===== */
.city-box { position: relative; }
.city-confirm {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 70;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  padding: 10px 12px; width: max-content; max-width: 240px;
  opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.city-confirm.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.city-confirm__q { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.city-confirm__actions { display: flex; gap: 8px; }
.city-confirm__actions button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 5px 16px; font-weight: 700; cursor: pointer; font-size: 13px; color: var(--ink);
}
.city-confirm__actions .city-confirm__yes { background: var(--orange); color: #fff; border-color: var(--orange); }
.city-confirm__actions .city-confirm__no:hover { border-color: var(--orange); color: var(--orange); }
