:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #eef3f2;
  --text: #17201d;
  --muted: #62706c;
  --line: #d8e0de;
  --accent: #0b6b57;
  --accent-strong: #094c42;
  --amber: #c67a19;
  --blue: #356eb6;
  --shadow: 0 18px 50px rgba(18, 31, 28, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(16px, 4vw, 48px);
  background: rgba(245, 247, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-wrap {
  width: min(380px, 45vw);
}

.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 107, 87, 0.16);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 48px) 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  min-height: 220px;
  padding: clamp(24px, 5vw, 52px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 24, 21, 0.86), rgba(8, 24, 21, 0.44)),
    url("https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-copy p {
  max-width: 600px;
  margin: 0;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.22;
  font-weight: 750;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 10px;
}

.hero-stats div {
  min-height: 86px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 28px;
  line-height: 1;
}

.hero-stats span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  margin: 22px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tab {
  min-width: 96px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab.is-active {
  background: var(--accent);
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel,
.detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-panel {
  position: sticky;
  top: 94px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.panel-heading span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.brand-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
  max-height: calc(100vh - 168px);
  overflow: auto;
}

.brand-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.brand-card.is-active,
.brand-card:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #16231f;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.brand-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.brand-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.crumbs button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.model-grid,
.version-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.model-card,
.version-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  overflow: hidden;
}

.model-card:hover,
.model-card.is-active,
.version-card:hover,
.version-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(11, 107, 87, 0.14);
}

.vehicle-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #dfe7e4;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.card-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.version-card {
  display: block;
  width: 100%;
  padding: 0;
}

.version-price {
  display: block;
  margin-top: 10px;
  color: var(--amber);
  font-size: 16px;
  font-weight: 800;
}

.detail {
  overflow: hidden;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 0;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.detail-info {
  padding: clamp(22px, 4vw, 38px);
}

.detail-info h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.06;
}

.detail-info .subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.price {
  margin: 20px 0;
  color: var(--amber);
  font-size: 28px;
  font-weight: 850;
}

.quick-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-specs div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.quick-specs span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.quick-specs strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.spec-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.spec-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 52px;
  background: var(--surface);
}

.spec-row span,
.spec-row strong {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}

.spec-row span {
  color: var(--muted);
  background: #f8faf9;
  font-weight: 650;
}

.spec-row strong {
  font-weight: 700;
}

.empty {
  padding: 28px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    position: static;
  }

  .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .model-grid,
  .version-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .topbar {
    position: static;
    display: grid;
  }

  .search-wrap {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 300px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-grid,
  .model-grid,
  .version-grid,
  .quick-specs,
  .spec-table {
    grid-template-columns: 1fr;
  }

  .spec-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .tab {
    min-width: 0;
  }
}
