/* =========================================================================
   POWERSPORTS — OEM parts catalogue
   Same palette and type as the main site: deep charcoal, signal orange.
   ========================================================================= */

:root {
  --bg: #0c0d10;
  --bg-2: #111317;
  --surface: #16191e;
  --surface-2: #1c2026;
  --fg: #f3efe6;
  --fg-2: #e6e1d7;
  --muted: #9a958a;
  --muted-2: #6a6660;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --accent: #ff5326;
  --accent-soft: #ff7553;
  --accent-on: #0c0d10;
  --radius: 4px;
  --radius-lg: 8px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Onest", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --container: 1440px;
  --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(255, 83, 38, 0.07) 0%, rgba(0, 0, 0, 0) 60%),
    radial-gradient(80% 60% at 92% 100%, rgba(255, 209, 102, 0.04) 0%, rgba(0, 0, 0, 0) 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-on); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 3.4vw, 44px); }

/* ── top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  padding: 13px clamp(20px, 3.4vw, 44px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: rgba(12, 13, 16, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em; text-transform: uppercase;
}
.topbar__nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 26px); }
.topbar__nav a {
  font-size: 13px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--fg-2); opacity: 0.72; transition: opacity .18s, color .18s;
}
.topbar__nav a:hover { opacity: 1; color: var(--fg); }
.topbar__nav a.is-current { opacity: 1; color: var(--accent); }
.topbar__cta {
  padding: 9px 16px; border-radius: var(--radius);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-on);
}
.topbar__cta:hover { background: var(--accent-soft); }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(30px, 5vw, 58px); padding-bottom: 26px; }
.hero__eyebrow {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
}
.hero__eyebrow::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(255, 83, 38, 0.5), rgba(255, 83, 38, 0));
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 4.4vw, 52px); line-height: 1.04;
  letter-spacing: -0.03em; text-transform: uppercase; margin: 0 0 14px;
  max-width: 22ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lead { color: var(--muted); max-width: 68ch; margin: 0 0 24px; font-size: clamp(15px, 1.4vw, 17px); }
.hero__lead b { color: var(--fg-2); font-weight: 600; }

.stats { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 40px); margin: 0 0 26px; }
.stat__n {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(19px, 2.4vw, 27px); display: block; line-height: 1.1;
}
.stat__l {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2);
}

/* ── search ──────────────────────────────────────────────────────────── */
.search { position: relative; max-width: 780px; }
.search__field {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 4px 4px 4px 16px;
  transition: border-color .18s, box-shadow .18s;
}
.search__field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 83, 38, 0.12); }
.search__field svg { flex: none; color: var(--muted-2); }
.search__field input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--fg); font-family: var(--font-body); font-size: 16px; padding: 13px 0;
}
.search__field input::placeholder { color: var(--muted-2); }
.search__hint { font-size: 12.5px; color: var(--muted-2); margin: 9px 2px 0; }
.search__hint code { font-family: var(--mono); color: var(--muted); font-size: 12px; }

.search__panel {
  position: absolute; z-index: 50; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
  max-height: min(64vh, 560px); overflow-y: auto; overscroll-behavior: contain;
}
.search__status {
  padding: 10px 16px; font-size: 12.5px; color: var(--muted);
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--surface-2); display: flex; justify-content: space-between; gap: 12px;
}
.search__status b { color: var(--accent); font-weight: 600; }
.hit {
  display: grid; grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 14px; align-items: baseline;
  width: 100%; text-align: left; padding: 11px 16px;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.hit:last-child { border-bottom: none; }
.hit:hover, .hit:focus-visible { background: rgba(255, 83, 38, 0.09); outline: none; }
.hit__pn {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  letter-spacing: 0.01em; overflow-wrap: anywhere;
}
.hit__desc { font-size: 14px; color: var(--fg-2); overflow-wrap: anywhere; }
.hit__desc mark { background: rgba(255, 83, 38, 0.22); color: var(--fg); border-radius: 2px; padding: 0 2px; }
.hit__where { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.hit__where b { color: var(--muted); font-weight: 600; }
.hit__qty {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--border-2); border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.search__empty { padding: 22px 16px; color: var(--muted); font-size: 14px; }

/* ── workspace ───────────────────────────────────────────────────────── */
.workspace {
  display: block;
  padding-bottom: 60px;
}
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2);
}
.panel__head span { color: var(--muted-2); font-weight: 500; letter-spacing: 0.06em; }

/* ── шаги: бренд → год → модель → узел ──────────────────────────────── */
.steps {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 14px 4px 16px;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.step {
  color: var(--muted); padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border-2); transition: color .16s, border-color .16s, background .16s;
}
.step:hover { color: var(--fg); border-color: var(--muted-2); }
.step--now { color: var(--accent); border-color: rgba(255, 83, 38, 0.45); cursor: default; }
.step--soft { color: var(--fg-2); border-color: var(--border); text-transform: none; letter-spacing: 0.04em; }
.step__sep { color: var(--muted-2); font-size: 11px; }

/* ── экраны выбора ───────────────────────────────────────────────────── */
.stage { padding: clamp(20px, 3vw, 34px) clamp(18px, 2.4vw, 30px) clamp(24px, 3vw, 38px); }
.stage__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(19px, 2.4vw, 28px); letter-spacing: -0.02em; margin: 0 0 8px;
}
.stage__lead { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; max-width: 72ch; }
.stage__lead a { color: var(--accent); border-bottom: 1px solid rgba(255, 83, 38, 0.4); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cards--models { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  display: grid; gap: 6px; align-content: start; text-align: left;
  padding: 16px 17px 17px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-2); background: var(--bg-2);
  transition: border-color .16s, background .16s, transform .16s;
}
.card:hover { border-color: var(--accent); background: rgba(255, 83, 38, 0.06); transform: translateY(-1px); }
.card__name {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  letter-spacing: -0.01em; color: var(--fg); line-height: 1.25;
}
.card__site { font-size: 12px; color: var(--muted-2); }
.card__nums { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.card__years { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.card__years i {
  font-style: normal; font-family: var(--mono); font-size: 11px;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--muted);
}
.card__go { font-size: 12px; color: var(--accent); margin-top: 2px; }
.card--photo { grid-template-columns: 92px 1fr; align-items: center; column-gap: 13px; }
.card--photo .card__photo {
  grid-row: 1 / span 4;
  width: 92px; height: 68px; border-radius: 10px; overflow: hidden;
  background: #fff; border: 1px solid var(--border-2);
}
.card--photo .card__photo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }

/* фильтр по типу техники — как в заводских каталогах */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.filter {
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--muted);
  transition: color .16s, border-color .16s, background .16s;
}
.filter:hover { color: var(--fg); border-color: var(--muted-2); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-on); font-weight: 600; }
.filter small { opacity: 0.65; margin-left: 4px; font-size: 11px; }
.year {
  display: grid; gap: 3px; text-align: left;
  padding: 14px 16px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-2); background: var(--bg-2);
  transition: border-color .16s, background .16s, transform .16s;
}
.year:hover { border-color: var(--accent); background: rgba(255, 83, 38, 0.06); transform: translateY(-1px); }
.year__n {
  font-family: var(--font-display); font-weight: 800; font-size: 21px;
  letter-spacing: -0.02em; color: var(--fg);
}
.year__m { font-size: 12px; color: var(--muted-2); font-family: var(--mono); }

/* right: model detail */
.detail__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px 20px; padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.detail__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.2vw, 27px); letter-spacing: -0.02em; margin: 0 0 6px; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--muted);
}
.tag--accent { border-color: rgba(255, 83, 38, 0.45); color: var(--accent); }
.detail__links { display: flex; flex-wrap: wrap; gap: 10px; }
.detail__source { margin-top: 7px; font-size: 12px; color: var(--muted-2); }
.detail__source a { color: var(--muted); border-bottom: 1px solid var(--border-2); }
.detail__source a:hover { color: var(--accent); }
.linkbtn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--fg-2); padding: 7px 13px;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  transition: border-color .16s, color .16s, background .16s;
}
.linkbtn:hover { border-color: var(--accent); color: var(--fg); background: rgba(255, 83, 38, 0.08); }
.linkbtn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-on); font-weight: 600; }
.linkbtn--primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-on); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 20px; font-size: 13px; color: var(--muted);
  background: rgba(255, 209, 102, 0.045); border-bottom: 1px solid var(--border);
}
.notice b { color: var(--fg-2); font-weight: 600; }
.notice svg { flex: none; margin-top: 2px; color: var(--warn, #ffd166); }

/* assemblies strip */
.assemblies {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.asm {
  flex: 0 1 auto; max-width: 100%; text-align: left;
  padding: 9px 14px; border: 1px solid var(--border-2); border-radius: var(--radius);
  background: var(--bg-2); transition: border-color .16s, background .16s;
}
.asm:hover { border-color: var(--muted-2); }
.asm.is-active { border-color: var(--accent); background: rgba(255, 83, 38, 0.10); }
.asm__name {
  display: block; font-size: 13px; color: var(--fg-2); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch;
}
.asm.is-active .asm__name { color: var(--fg); font-weight: 500; }
.asm__count { display: block; font-size: 11px; color: var(--muted-2); margin-top: 3px; font-family: var(--mono); }
.asm.is-active .asm__count { color: var(--accent); }

/* parts + diagram: схема сверху, список деталей под ней */
.cat { display: block; }
.cat__figure { padding: 18px clamp(14px, 2vw, 24px) 20px; border-bottom: 1px solid var(--border); }
.cat__figure .diagram { max-width: 880px; margin: 0 auto; }
.cat__figure .diagram__legend { max-width: 880px; margin-left: auto; margin-right: auto; }
.cat__parts { min-width: 0; }

.table { width: 100%; border-collapse: collapse; }
.table thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface-2);
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2);
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}
.table th.col-n, .table td.col-n { width: 52px; text-align: center; }
.table th.col-photo, .table td.col-photo { width: 66px; }
.table--nophoto th.col-photo, .table--nophoto td.col-photo { display: none; }
.table td.col-photo img {
  width: 46px; height: 46px; object-fit: contain;
  background: #fff; border-radius: var(--radius); padding: 3px; cursor: zoom-in;
}
.table th.col-pn, .table td.col-pn { width: 132px; }
.table th.col-qty, .table td.col-qty { width: 62px; text-align: center; }
.table tbody tr { border-bottom: 1px solid var(--border); cursor: pointer; transition: background .14s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.table tbody tr.is-active { background: rgba(255, 83, 38, 0.13); }
.table tbody tr.is-active td { border-color: rgba(255, 83, 38, 0.3); }
.table td { padding: 9px 12px; font-size: 13.5px; color: var(--fg-2); vertical-align: top; }
.table td.col-n {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-2);
  padding-top: 10px;
}
.table tr.has-hot td.col-n { color: var(--accent); }
.table td.col-pn { font-family: var(--mono); font-size: 12.5px; color: var(--fg); letter-spacing: 0.01em; }
.table td.col-desc { line-height: 1.4; }
.table td.col-qty { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.table .note { display: block; font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.table .note--ru { color: var(--muted-2); opacity: .8; font-style: italic; }
.table__foot { padding: 12px 16px; font-size: 12.5px; color: var(--muted-2); border-top: 1px solid var(--border); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* diagram */
.diagram__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.diagram__title { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); }
.diagram__hint { font-size: 11.5px; color: var(--muted-2); }
.diagram {
  position: relative; background: #fff; border-radius: var(--radius);
  overflow: hidden; cursor: zoom-in; line-height: 0;
}
.diagram img { width: 100%; height: auto; display: block; }
.hot {
  position: absolute; border: 1px solid rgba(255, 83, 38, 0); border-radius: 2px;
  background: rgba(255, 83, 38, 0); cursor: pointer;
  transition: background .14s, border-color .14s;
}
.hot:hover, .hot:focus-visible {
  background: rgba(255, 83, 38, 0.16); border-color: var(--accent); outline: none;
}
.hot.is-active { background: rgba(255, 83, 38, 0.24); border-color: var(--accent); }
.hot__num {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 10px; font-weight: 700; line-height: 1;
  color: var(--accent-on); background: var(--accent);
  padding: 3px 5px; border-radius: 3px; white-space: nowrap;
  opacity: 0; transition: opacity .14s; pointer-events: none;
}
.hot:hover .hot__num, .hot.is-active .hot__num { opacity: 1; }
.hot--point { width: 0; height: 0; border: none; background: none; }
.hot--point .hot__num { transform: translate(-50%, -50%); }
.diagram__legend { margin-top: 10px; font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.diagram__legend b { color: var(--muted); font-weight: 600; }
.diagram--none {
  background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; cursor: default;
}
.diagram--none a { color: var(--accent); border-bottom: 1px solid rgba(255, 83, 38, 0.4); }
.diagram--none a:hover { border-bottom-color: var(--accent); }
.diagram--none b { display: block; color: var(--fg-2); font-weight: 600; margin-bottom: 6px; font-size: 13.5px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(6, 7, 9, 0.94);
  display: flex; flex-direction: column; padding: 16px;
}
.lightbox__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 4px 4px 12px; color: var(--muted); font-size: 13px;
}
.lightbox__bar b { color: var(--fg); font-weight: 600; }
.lightbox__close {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-2);
  color: var(--fg-2); font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--fg); }
.lightbox__stage {
  flex: 1; min-height: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: center;
  background: #fff; border-radius: var(--radius); padding: 10px;
}
.lightbox__stage .diagram { background: #fff; cursor: default; width: 100%; max-width: 1400px; }
.lightbox__stage .hot__num { opacity: 1; font-size: 11px; }
.lightbox__stage .photo { background: #fff; border-radius: var(--radius); padding: 12px; max-width: 900px; }
.lightbox__stage .photo img { width: 100%; height: auto; }

/* footer */
.footer { border-top: 1px solid var(--border); margin-top: auto; padding: 30px 0 36px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.footer__mark { font-family: var(--font-display); font-weight: 800; font-size: 15px; text-transform: uppercase; }
.footer p { color: var(--muted); font-size: 13.5px; max-width: 44ch; margin: 10px 0 0; }
.footer h4 { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: var(--muted); font-size: 13.5px; }
.footer a:hover { color: var(--fg); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted-2);
}

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1120px) {
  .cat__figure .diagram { max-width: 620px; }
}
@media (max-width: 900px) {
  .topbar__nav a:not(.topbar__cta) { display: none; }
}
@media (max-width: 620px) {
  .hit { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .hit__qty { justify-self: start; }
  .table th.col-pn, .table td.col-pn { width: 104px; }
  .table th.col-n, .table td.col-n { width: 38px; }
  .table th.col-photo, .table td.col-photo { width: 52px; }
  .table td.col-photo img { width: 38px; height: 38px; }
  .table th.col-qty, .table td.col-qty { width: 44px; }
  .table td { padding: 8px 9px; font-size: 13px; }
  .detail__head { padding: 15px 15px; }
  .assemblies { padding: 10px 15px; }
  .cat__figure { padding: 14px 12px 16px; }
  .hero h1 { max-width: none; }
  .steps { padding-left: 0; padding-right: 0; }
}
