:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #0e1116;
  --ink-soft: #5b6470;
  --line: #e4e8ee;
  --accent: #1f6feb;
  --accent-2: #00b4d8;
  --accent-ink: #ffffff;
  --hero-bg: #0b1120;
  --shadow: 0 8px 30px rgba(16, 24, 40, .08);
  --shadow-hover: 0 16px 48px rgba(16, 24, 40, .16);
  --radius: 16px;
  --maxw: 1240px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
          "Segoe UI", Roboto, "Noto Sans Arabic", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
#catalog, #contact, #top { scroll-margin-top: 120px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; }
.brand-mark { color: var(--accent); font-size: 18px; }
.top-nav { display: flex; gap: 22px; margin-inline-start: auto; font-weight: 600; color: var(--ink-soft); }
.top-nav a:hover { color: var(--accent); }

/* ---------- Language switch ---------- */
.lang-switch { position: relative; margin-inline-start: 8px; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface);
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--ink);
}
.lang-btn:hover { border-color: var(--accent); }
.lang-btn .caret { font-size: 10px; color: var(--ink-soft); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 160px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); display: none; z-index: 60;
}
.lang-menu.open { display: block; }
.lang-menu li {
  padding: 9px 12px; border-radius: 8px; cursor: pointer; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.lang-menu li:hover { background: #eef3fb; }
.lang-menu li.active { color: var(--accent); }
.lang-menu li .tick { opacity: 0; }
.lang-menu li.active .tick { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--hero-bg); }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 500px at 78% -10%, rgba(31,111,235,.45), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(0,180,216,.35), transparent 55%),
    linear-gradient(180deg, #0b1120, #0e1830);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 50% 0%, #000, transparent 75%);
}
.hero-inner { position: relative; padding: 84px 20px 64px; max-width: 880px; }
.hero-eyebrow {
  display: inline-block; letter-spacing: .14em; text-transform: uppercase;
  font-size: 12px; font-weight: 700; color: #8fd3ff; margin: 0 0 14px;
  border: 1px solid rgba(143,211,255,.4); padding: 5px 12px; border-radius: 999px;
}
.hero-title { font-size: clamp(30px, 5.2vw, 54px); line-height: 1.1; margin: 0 0 16px; font-weight: 800; }
.hero-sub { font-size: clamp(15px, 2vw, 18px); color: #c9d4e6; margin: 0 0 28px; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 26px rgba(31,111,235,.45); }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 40px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 28px; font-weight: 800; }
.hero-stats span { font-size: 13px; color: #9fb0c9; }

/* ---------- Section ---------- */
.section-head { padding: 54px 0 8px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 8px; }
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- Filter ---------- */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; padding: 22px 0 8px;
  position: sticky; top: 64px; z-index: 30; background: var(--bg);
  border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600;
  white-space: nowrap; transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Brand block ---------- */
.brand-block { padding: 28px 0 8px; }
.brand-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.brand-head h3 { font-size: 22px; margin: 0; }
.brand-head .badge { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}

/* ---------- Card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: #eef1f5; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-ph {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  text-align: center; padding: 16px; color: #fff; font-weight: 800; font-size: 18px;
  background: linear-gradient(135deg, #1f6feb, #00b4d8);
}
.body-badge {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
  background: rgba(14,17,22,.72); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-brand { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .03em; }
.card-name { font-size: 19px; font-weight: 800; margin: 0; }
.card-foot { margin-top: auto; padding-top: 12px; }
.card-btn {
  width: 100%; text-align: center; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; padding: 10px; border-radius: 10px; font: inherit; font-weight: 700;
  cursor: pointer; transition: all .15s ease;
}
.card-btn:hover { background: var(--accent); color: #fff; }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, #0b1120, #0e1830); color: #fff; margin-top: 56px; }
.contact-inner { padding: 60px 20px; }
.contact h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 12px; }
.contact p { color: #c9d4e6; max-width: 680px; margin: 0 0 28px; }
.contact-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ccard {
  display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 16px 18px;
}
.ccard-ico { font-size: 22px; }
.ccard strong { display: block; font-size: 14px; }
.ccard p { margin: 2px 0 0; font-size: 15px; color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #070b14; color: #8294ad; font-size: 13px; }
.site-footer .wrap { padding: 22px 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .top-nav { display: none; }
  .header-inner { gap: 10px; }
  .hero-inner { padding: 60px 20px 48px; }
  .hero-stats { gap: 24px; }
  .filter-bar { top: 64px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-name { font-size: 17px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 车型详情 ---------- */
.detail { padding-bottom: 100px; }
.detail-hero {
  position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: linear-gradient(180deg, #0b1120, #0e1830); color: #fff; align-items: stretch;
  padding-top: 64px;
}
.detail-hero-media { position: relative; min-height: 320px; }
.detail-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-ph {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 22px; background: linear-gradient(135deg, #1f6feb, #00b4d8);
}
.back-btn {
  position: absolute; top: 76px; inset-inline-start: 16px; z-index: 3;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600;
  backdrop-filter: blur(6px);
}
.back-btn:hover { background: rgba(255,255,255,.24); }
.detail-hero-info { padding: 24px 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.detail-brand { color: #8fd3ff; font-weight: 700; letter-spacing: .08em; margin: 0 0 6px; }
.detail-title { font-size: clamp(26px, 4vw, 40px); margin: 0 0 10px; font-weight: 800; }
.detail-body { color: #c9d4e6; margin: 0 0 6px; }
.detail-sample { color: #ffd166; font-size: 13px; margin: 4px 0 0; font-weight: 600; }

.detail-body-wrap { max-width: var(--maxw); margin-inline: auto; padding: 28px 20px 0; }
.opt-group { margin-bottom: 26px; }
.opt-group h3 { font-size: 16px; margin: 0 0 12px; color: var(--ink); }
.opt-row { display: flex; flex-wrap: wrap; gap: 12px; }
.opt-row.swatch-row { gap: 10px; }
.opt {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 12px 16px; cursor: pointer; font: inherit; min-width: 140px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.opt:hover { border-color: var(--accent); }
.opt.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,235,.15); background: #f3f8ff; }
.opt-name { font-weight: 700; font-size: 15px; }
.opt-price { font-size: 13px; color: var(--ink-soft); }
.opt-pkg { min-width: 200px; }
.opt-desc { font-size: 12px; color: var(--ink-soft); }
.swatch {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 14px 6px 6px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  transition: border-color .15s ease;
}
.swatch:hover { border-color: var(--accent); }
.swatch.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,235,.15); }
.swatch-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); border: 1px solid rgba(0,0,0,.15); flex: none; }
.swatch-label { white-space: nowrap; }

.detail-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 12px 24px;
  box-shadow: 0 -8px 30px rgba(16,24,40,.12);
}
.detail-bar-prices { display: flex; gap: 26px; align-items: baseline; }
.detail-bar-prices > div { display: flex; flex-direction: column; }
.detail-bar-prices span { font-size: 12px; color: var(--ink-soft); }
.detail-bar-prices strong { font-size: 15px; font-weight: 700; }
.detail-bar-prices .total strong { font-size: 22px; color: var(--accent); }

.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(8,11,20,.55); padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; background: var(--surface); border-radius: 18px; padding: 28px;
  max-width: 460px; width: 100%; box-shadow: var(--shadow-hover);
}
.modal-card h3 { margin: 0 0 14px; font-size: 20px; }
.modal-card pre {
  background: #f4f6fa; border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  font-family: inherit; font-size: 13px; line-height: 1.7; white-space: pre-wrap; margin: 0 0 14px;
}
.modal-note { color: var(--ink-soft); font-size: 13px; margin: 0 0 12px; }
.modal-contacts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-weight: 600; }
.modal-close {
  position: absolute; top: 12px; inset-inline-end: 14px; border: none; background: transparent;
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-soft);
}

@media (max-width: 760px) {
  .detail-hero { grid-template-columns: 1fr; }
  .detail-hero-media { min-height: 200px; }
  .detail-hero-info { padding: 24px 20px 28px; }
  .detail-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px; }
  .detail-bar-prices { justify-content: space-between; gap: 12px; }
  .detail-bar .btn { width: 100%; }
  .opt { min-width: 0; flex: 1 1 calc(50% - 6px); }
  .opt-pkg { flex: 1 1 100%; }
}
