/* Общие блоки сайта — verstka/blocks.css слияния 02.12.2026 (DESIGN.md «Общие компоненты»): крошки, заголовок страницы,
   «Подбор по машине», «Не нашли то что искали?», имя файла, окно, ожидание. DefaultAsset — сразу после btn.css. Отступ блока
   сверху и всё, что зависит от места на странице, задаёт страница (firmware-page.css: .custom-order margin-top, кнопка).
   Не здесь (ждут ответа Севы, В1–В10): длинный последний пункт крошек, пагинация, пустое состояние, сообщения формы,
   метка .chip, поле формы, окно кабинета. */

/* ---------- Крошки ---------- */
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--mut);
  list-style: none;
}

.crumbs__item {
  line-height: 18px;
}

.crumbs__item + .crumbs__item::before {
  margin-right: 0.5rem;
  content: "›";
}

.crumbs__item--current {
  color: var(--ink2);
}

.crumbs__link {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--mut);
  text-decoration: none;
}

/* ---------- Заголовок страницы: H1 34/26 px 600, −0,02em ---------- */
.page-title {
  margin: 14px 0 0;
  font-size: 2.125rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---------- «Подбор по машине» (pick.css дизайна): ряд — начало каталога, колонка — справа в выдаче поиска ---------- */
.car-pick {
  display: grid;
  gap: 0.75rem;
  align-items: end;
  padding: 1.25rem;
  background: var(--surf);
  border-radius: var(--r);
}

.car-pick--row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.car-pick--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
}

.car-pick--col {
  grid-template-columns: minmax(0, 1fr);
}

.car-pick__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.car-pick__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
  margin: 0;
}

.car-pick__label {
  display: block;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--mut);
}

.car-pick__select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink);
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233A3F47' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line2);
  border-radius: var(--rc);
}

.car-pick__select:disabled {
  color: var(--mut);
  cursor: default;
  background-color: var(--field-off);
  border-color: var(--line);
}

.car-pick--col .car-pick__btn {
  width: 100%;
  margin-top: 0.25rem;
}

/* Строка поиска в длинном списке подбора (car-pick-search.js; дизайн poisk-marok, вариант №1). Настоящий select
   остаётся в форме и несёт значение, на экране — кнопка .cb__btn того же вида и панель как у подсказок поиска. */
.cb__native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  clip-path: inset(50%);
}

.cb {
  position: relative;
  min-width: 0;
}

.cb__btn {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 2rem 0 0.75rem;
  overflow: hidden;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233A3F47' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line2);
  border-radius: var(--rc);
}

.cb__btn[aria-expanded="true"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 6.5l5-5 5 5' fill='none' stroke='%233A3F47' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: var(--ink);
}

.cb__btn:disabled {
  color: var(--mut);
  cursor: default;
  background-color: var(--field-off);
  border-color: var(--line);
}

.cb__pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  width: max(100%, 280px);
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  box-shadow: var(--shadow-suggest);
}

.car-pick--col .cb__pop {
  right: 0;
  left: auto;
}

.cb__search {
  position: relative;
}

.cb__search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--mut);
  pointer-events: none;
  transform: translateY(-50%);
}

.cb__input {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem 0 2.25rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: var(--rc);
}

.cb__input::placeholder {
  color: var(--mut);
}

.cb__input:focus-visible {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.cb__note {
  margin: 0.5rem 0.625rem 0;
  font-size: 0.8125rem;
  color: var(--mut);
}

.cb__list {
  max-height: 288px;
  padding: 0;
  margin: 0.375rem 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.cb__opt {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0.375rem 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.3;
  cursor: pointer;
  border-radius: 8px;
}

.cb__opt[aria-selected="true"] {
  font-weight: 600;
}

.cb__opt[aria-selected="true"]::after {
  flex: none;
  width: 14px;
  height: 10px;
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 5l4 4 8-8' fill='none' stroke='%231B1E23' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.cb__opt--active {
  background: var(--surf);
}

.cb__opt--empty {
  color: var(--mut);
}

.cb__opt mark {
  color: inherit;
  background: var(--hl);
  border-radius: 2px;
}

.cb__alias {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--mut);
}

.cb__empty {
  padding: 0.75rem 0.625rem 0.625rem;
}

.cb__empty:empty {
  padding: 0;
}

.cb__empty-title {
  margin: 0;
  font-weight: 600;
}

.cb__empty-text {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ink2);
}

/* ---------- «Не нашли то что искали?» ---------- */
.custom-order {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem;
  background: var(--surf);
  border-radius: var(--r);
}

.custom-order__text {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- Имя файла: моно 12,5 px на плашке со значком, перенос по любому знаку ---------- */
.file-name {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  padding: 0.625rem 0.75rem;
  margin: 0;
  font-family: var(--fm);
  font-size: calc(12.5rem / 16);
  line-height: 1.5;
  color: var(--ink2);
  overflow-wrap: anywhere;
  background: var(--surf);
  border-radius: var(--rc);
}

.file-name__icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--mut);
}

/* ---------- Окно (site-modal): ПК — по центру 480 px, телефон — шторка снизу. Поведение — sluzhebnye.js ----------
   z-index 40 — над шапкой (30) и мобильным меню (25). */
.site-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  background: var(--scrim);
}

.site-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 32px;
  margin: auto;
  background: var(--bg);
  border-radius: var(--r);
}

.site-modal__dialog--wide {
  max-width: 760px;
}

.site-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink2);
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: var(--rc);
}

.site-modal__title {
  margin: 0 52px 12px 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.site-modal__title--error {
  color: var(--err);
}

.site-modal__text {
  margin: 0 0 10px;
  color: var(--ink2);
}

/* ---------- Ожидание (site-loader): вуаль и кольцо 44 px, 0,8 с на оборот; над шапкой ---------- */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--veil);
}

.site-loader__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--line2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-loader__spinner {
    animation: none;
  }
}

@media (hover: hover) {
  .crumbs__link:hover {
    color: var(--ink);
    text-decoration: underline;
  }

  .car-pick__select:hover {
    border-color: var(--ink2);
  }

  .car-pick__select:disabled:hover {
    border-color: var(--line);
  }

  .cb__btn:not(:disabled):hover {
    border-color: var(--ink2);
  }

  .cb__opt:hover {
    background: var(--surf);
  }

  .site-modal__close:hover {
    color: var(--ink);
    background: var(--surf);
  }
}

/* stylelint-disable-next-line media-feature-range-notation -- правило темы: (width <= N) не понимает Safari до 16.4 */
@media (max-width: 1143px) {
  .car-pick--row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .car-pick--row .car-pick__btn {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 200px;
  }
}

/* stylelint-disable-next-line media-feature-range-notation -- правило темы: (width <= N) не понимает Safari до 16.4 */
@media (max-width: 900px) {
  .page-title {
    margin-top: 10px;
    font-size: 1.625rem;
  }

  .site-modal {
    align-items: flex-end;
    padding: 24px 0 0;
  }

  .site-modal__dialog {
    max-width: none;
    padding: 24px 16px 20px;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .site-modal__close {
    top: 10px;
    right: 8px;
  }

  .site-modal__title {
    font-size: 20px;
  }
}

/* stylelint-disable-next-line media-feature-range-notation -- правило темы: (width <= N) не понимает Safari до 16.4 */
@media (max-width: 767px) {
  .car-pick--row,
  .car-pick--5 {
    grid-template-columns: minmax(0, 1fr);
    padding: 1rem;
  }

  .car-pick--row .car-pick__btn {
    width: 100%;
  }

  /* Телефон: панель во всю ширину поля, строки по 44 px; поле при открытии — к верху экрана (над клавиатурой) */
  .car-pick__field {
    scroll-margin-top: 8px;
  }

  .cb__pop {
    width: 100%;
  }

  .cb__list {
    max-height: 264px;
  }

  .cb__opt {
    min-height: 44px;
  }
}

/* stylelint-disable-next-line media-feature-range-notation -- правило темы: (width > N) не понимает Safari до 16.4 */
@media not screen and (max-width: 900px) {
  .custom-order {
    padding: 1.375rem 1.75rem;
  }
}
