/* Новая разметка по схеме auto.ru: шапка, главная, каталог строками. Подключается после site.css */

/* шапка */
.topbar { background: #fff; backdrop-filter: none; }
.hd { display: flex; align-items: center; gap: 14px; height: 64px; }
.region { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--muted); }
.region select { border: 0; background: none; font-weight: 600; color: var(--ink); cursor: pointer; max-width: 170px; }
.hd__search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 12px; padding: 0 12px; height: 42px; min-width: 120px; }
.hd__search input { flex: 1; border: 0; background: none; outline: none; min-width: 0; }
.hd__right { display: flex; align-items: center; gap: 10px; }
.lang { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 8px; font-weight: 600; cursor: pointer; }
.btn--place { background: #12a150; border-color: #12a150; color: #fff; white-space: nowrap; }
.btn--place:hover { background: #0e8a44; border-color: #0e8a44; }
.sections { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.sections::-webkit-scrollbar { display: none; }
.sections a { padding: 7px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.sections a:hover { color: var(--ink); background: var(--bg); }
.sections a.on { color: var(--ink); background: var(--bg); box-shadow: inset 0 -2px 0 var(--accent); }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--dark:hover { background: #1e293b; }
.page-h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }
.notice { background: #fff7e0; border: 1px solid #f5d98b; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; }

/* главная */
.home-top { text-align: center; padding: 40px 0 8px; }
.home-top h1 { font-size: clamp(28px, 4.4vw, 46px); }
.offers { margin: 8px 0 20px; }
.smart { margin: 0 auto; max-width: 820px; background: var(--bg); border: 1px solid var(--line); align-items: center; padding: 6px 6px 6px 14px; }
.smart__ico { font-size: 18px; }
.smart input { background: none; }
.understood { justify-content: center; color: var(--muted); }
.understood span { background: var(--accent-soft); color: var(--accent); }
.hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.hint { border: 1px dashed #c5cfdd; background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--muted); font-size: 14px; }
.hint:hover { color: var(--accent); border-color: var(--accent); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px auto 0; max-width: 900px; }
.pill { appearance: none; border: 0; background: #e9edf3; border-radius: 999px; padding: 9px 30px 9px 14px; font-weight: 600; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.pill.on { background-color: var(--accent-soft); color: var(--accent); }
.pill:disabled { opacity: .5; cursor: default; }
.services { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.service { display: grid; justify-items: center; gap: 6px; width: 104px; font-size: 13px; font-weight: 600; }
.service span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); font-size: 26px; transition: .15s; }
.service:hover span { transform: translateY(-2px); }
.brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; font-weight: 600; }
.brand:hover { background: #fff; }
.brand .muted { margin-left: auto; font-weight: 500; }
.brand__logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font-size: 11px; font-weight: 800; color: var(--muted); }
.tip { padding: 22px; background: linear-gradient(160deg, #fff, #eef3ff); justify-content: center; gap: 8px; }
.tip__ico { font-size: 34px; }
.tip p { margin: 0; }

/* каталог */
.fpanel { padding: 18px; display: grid; gap: 14px; margin-bottom: 18px; }
.tabs { display: inline-flex; background: var(--bg); border-radius: 12px; padding: 3px; justify-self: start; }
.tabs button { border: 0; background: none; padding: 8px 18px; border-radius: 10px; font-weight: 650; cursor: pointer; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fgrid .input { background: var(--bg); border-color: transparent; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pair .input:first-child { border-radius: 11px 0 0 11px; } .pair .input:last-child { border-radius: 0 11px 11px 0; }
.fmore { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.fmore[hidden] { display: none; }
.flabel { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.fmore .check { margin-bottom: 6px; }
.fbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.fbar .btn--dark { min-width: 260px; }
.brandchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.results__tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 2px; }
.seg button { border: 0; background: none; width: 36px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 16px; color: var(--muted); }
.seg button.on { background: var(--accent-soft); color: var(--accent); }
.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 260px 1fr 230px; gap: 18px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; transition: .15s; }
.row:hover { box-shadow: 0 2px 4px rgba(15,23,42,.06), 0 14px 34px rgba(15,23,42,.1); }
.row__img { aspect-ratio: 4 / 3; border-radius: 12px; background: linear-gradient(180deg, #eef2f8, #dfe6f1); display: grid; place-items: center; position: relative; overflow: hidden; }
.row__img svg { width: 96%; }
.row__main h3 { font-size: 19px; color: var(--accent); }
.row__specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; font-size: 14px; }
.row__seller { font-size: 13.5px; }
.row__side { display: grid; gap: 6px; align-content: start; justify-items: start; }
.row__year { display: flex; gap: 10px; align-items: baseline; }
.row__price { font-size: 22px; font-weight: 800; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.row__tools { display: flex; gap: 6px; }
.row__tools .icon-btn { background: var(--bg); box-shadow: none; }
.row__days { font-size: 13px; }

/* страница машины */
.gallery__thumbs button { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.gallery__thumbs svg { height: auto; }
.bar span { position: absolute; top: -5px; width: 4px; height: 20px; background: #0f172a; border-radius: 2px; }
.bar__labels { display: flex; justify-content: space-between; font-size: 13px; }
.mobile-bar { bottom: 0 !important; }

@media (max-width: 1000px) {
  .hd__search { display: none; }
  .brands { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 200px 1fr; }
  .row__side { grid-column: 1 / -1; grid-template-columns: repeat(3, auto); align-items: center; }
}
@media (max-width: 760px) {
  .hd { gap: 8px; height: 56px; }
  .region select { max-width: 96px; }
  .btn--place span, .lang { font-size: 13px; }
  .btn--place span { display: none; }
  .fgrid { grid-template-columns: 1fr 1fr; }
  .fbar .btn--dark { min-width: 0; width: 100%; }
  .row { grid-template-columns: 120px 1fr; gap: 12px; padding: 10px; }
  .row__img { aspect-ratio: 1; }
  .row__specs { display: none; }
  .row__main h3 { font-size: 16px; }
  .row__side { grid-template-columns: 1fr 1fr; }
  .brands { grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .home-top { padding-top: 24px; }
  main { padding-bottom: 90px; }
  .footer { padding-bottom: 10px; }
}
@media (max-width: 420px) {
  .lang { max-width: 70px; }
  .cur button { padding: 5px 8px; }
}

/* идеи сайтов США: бюджет, обмен, слежка за ценой */
.budget { display: grid; gap: 16px; background: linear-gradient(120deg, #fff 45%, #eaf6ef); }
.budget__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.budget__out { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 6px; border-top: 1px solid var(--line); }
.budget__out .price-big { font-size: 26px; color: var(--great); }
.btn--on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.watch { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 12px; }
.watch .thumb { aspect-ratio: 16/10; border-radius: 10px; background: #eef2f8; display: grid; place-items: center; }
.watch .thumb svg { width: 100%; }
@media (max-width: 760px) {
  .budget__grid { grid-template-columns: 1fr 1fr; }
  .watch { grid-template-columns: 80px 1fr; }
  .watch > span { grid-column: 1 / -1; }
}
