/* Поиск автомобилей (/poisk/) — в стиле сайта, тёмная и светлая тема через токены ui.css */
.at-sr { padding: 8px 0 40px; font-family: var(--at-ui-font); color: var(--at-c-fg); }
.at-sr h1 { text-align: left; margin: 0 0 6px; font: 700 clamp(26px, 3.4vw, 38px)/1.15 var(--at-ui-font); color: var(--at-c-fg); letter-spacing: -.01em; text-transform: none; }
.at-sr__count { color: var(--at-c-muted); font-size: 15px; margin-bottom: 20px; min-height: 22px; }
.at-sr__toggle { display: none; }
/* страна: карточки с флагом и количеством машин */
.at-sr .cr-cty { margin: 4px 0 20px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.cr-cty__i {
  position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 44px 14px 16px; border-radius: 12px;
  background: var(--at-c-surface); border: 1px solid var(--at-c-line); color: var(--at-c-fg) !important; text-decoration: none !important;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cr-cty__i:hover { border-color: var(--at-c-muted); transform: translateY(-1px); }
.cr-cty__i .at-flag { width: 40px; height: 27px; border-radius: 5px; }
.cr-cty__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-cty__t b { font-size: 17px; font-weight: 800; line-height: 1.2; }
.cr-cty__t small { font-size: 12.5px; font-weight: 500; color: var(--at-c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-cty__ok { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid var(--at-c-line); }
.cr-cty__i.is-on { border-color: var(--at-accent); box-shadow: 0 0 0 1px var(--at-accent), 0 8px 24px rgba(var(--at-accent-rgb),  .14); background: linear-gradient(rgba(var(--at-accent-rgb),  .07), rgba(var(--at-accent-rgb),  .07)), var(--at-c-surface); }
.cr-cty__i.is-on .cr-cty__ok { border-color: var(--at-accent); background: var(--at-accent); }
.cr-cty__i.is-on .cr-cty__ok::before { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }

.at-flag { flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); background: #fff; }
@media (max-width: 1199.98px) { .cr-cty__sub { display: none; } }
@media (max-width: 991.98px) {
  .cr-cty__i { flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 13px; text-align: center; }
  .cr-cty__t { align-items: center; max-width: 100%; }
  .cr-cty__ok { display: none; }
}
@media (max-width: 575.98px) { .cr-cty { gap: 8px; } .cr-cty__i .at-flag { width: 34px; height: 23px; } .cr-cty__t b { font-size: 15px; } .cr-cty__t small { font-size: 11.5px; } }

.at-sr__bar {
  display: grid; grid-template-columns: 1.25fr 1.25fr 1.6fr .85fr .85fr 1fr 1.1fr auto; gap: 10px; align-items: end;
  padding: 16px; border-radius: 18px; background: var(--at-c-surface); border: 1px solid var(--at-c-line); margin-bottom: 22px;
}
.at-sr__f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.at-sr__f > span { font-size: 12.5px; font-weight: 600; color: var(--at-c-muted); }
.at-sr__sel { position: relative; }
.at-sr__sel::after { content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; border-right: 1.8px solid var(--at-c-muted); border-bottom: 1.8px solid var(--at-c-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.at-sr select {
  width: 100%; height: 46px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--at-c-line); background: var(--at-c-soft);
  color: var(--at-c-fg); font: 600 14px var(--at-ui-font); -webkit-appearance: none; appearance: none; outline: none; text-overflow: ellipsis;
}
.at-sr select:focus { border-color: var(--at-c-muted); }
.at-sr select:disabled { opacity: .55; }
.at-sr select option { color: #111317; background: #fff; }
.at-sr__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; height: 46px; border-radius: 12px; background: var(--at-c-soft); border: 1px solid var(--at-c-line); }
.at-sr__seg button { border: 0; border-radius: 9px; background: transparent; color: var(--at-c-muted); font: 600 13px var(--at-ui-font); cursor: pointer; padding: 0 4px; white-space: nowrap; }
.at-sr__seg button:hover { color: var(--at-c-fg); }
.at-sr__seg button[aria-checked="true"] { background: var(--at-c-surface); color: var(--at-c-fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .16); }
.at-sr__reset { height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--at-c-line); background: transparent; color: var(--at-c-fg); font: 600 14px var(--at-ui-font); cursor: pointer; white-space: nowrap; }
.at-sr__reset:hover { border-color: var(--at-c-muted); }

.at-sr__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.is-loading .at-sr__grid { min-height: 300px; }
.at-sr-card {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--at-c-surface); border: 1px solid var(--at-c-line);
  color: var(--at-c-fg) !important; text-decoration: none !important; transition: border-color .15s, transform .15s;
}
.at-sr-card:hover { border-color: var(--at-c-muted); transform: translateY(-2px); }
.at-sr-card__img { display: block; aspect-ratio: 4 / 3; background: var(--at-c-soft); overflow: hidden; }
.at-sr-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-sr-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.at-sr-card__title { font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.at-sr-card__meta { font-size: 13.5px; color: var(--at-c-muted); }
.at-sr-card__price { margin-top: auto; padding-top: 6px; font-size: 19px; font-weight: 700; }

.at-sr__empty { text-align: center; padding: 40px 16px; border-radius: 18px; background: var(--at-c-surface); border: 1px solid var(--at-c-line); }
.at-sr__empty b { display: block; font-size: 20px; margin-bottom: 6px; }
.at-sr__empty p { color: var(--at-c-muted); margin: 0 auto 18px; max-width: 460px; }
.at-sr__empty .at-sr__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.at-sr__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px; font: 700 15px var(--at-ui-font); cursor: pointer; text-decoration: none !important; border: 1px solid transparent; }
.at-sr__btn_main { background: var(--at-accent); color: #fff !important; }
.at-sr__btn_main:hover { background: var(--at-accent-2); }
.at-sr__btn_line { background: transparent; color: var(--at-c-fg) !important; border-color: var(--at-c-line); }

@media (max-width: 1199px) {
  .at-sr__bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .at-sr__f_engine { grid-column: span 2; }
}
@media (max-width: 991px) { .at-sr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 575px) {
  /* на телефоне фильтры под кнопкой, чтобы результаты были сразу на экране */
  .at-sr__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .at-sr__top .at-sr__count { margin: 0; font-size: 14px; line-height: 1.35; }
  .at-sr__toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; flex: 0 0 auto;
    border: 1px solid var(--at-c-line); background: var(--at-c-surface); color: var(--at-c-fg); font: 600 14px var(--at-ui-font); cursor: pointer;
  }
  .at-sr__toggle b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--at-accent); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
  .at-sr__toggle b:empty { display: none; }
  .at-sr__bar:not(.is-open) { display: none; }
  .at-sr__bar { grid-template-columns: 1fr 1fr; padding: 12px; gap: 10px; border-radius: 16px; margin-bottom: 16px; }
  .at-sr__f_brand, .at-sr__f_model, .at-sr__f_engine { grid-column: span 2; }
  .at-sr__reset { grid-column: span 2; }
  .at-sr__grid { grid-template-columns: 1fr; }
  .at-sr-card__title { font-size: 16px; }
}
