/* 二手车出口独立站 - 样式 v1.0 */
/* 移动端优先；主题色由 js/config.js 在启动时注入，改品牌无需动本文件 */

:root {
  --navy: #0C447C;
  --blue: #185FA5;
  --blue-light: #E6F1FB;
  --blue-mid: #85B7EB;
  --gold: #BA7517;
  --gold-light: #FAEEDA;
  --ink: #2C2C2A;
  --muted: #5F5E5A;
  --line: #E3E6EA;
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --green: #0F6E56;
  --green-light: #E1F5EE;
  --orange: #BA7517;
  --orange-light: #FAEEDA;
  --red: #A32D2D;
  --red-light: #FCEBEB;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(12, 68, 124, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans Arabic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] { direction: rtl; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; }

/* 顶部导航 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--navy); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.nav { display: none; gap: 4px; }
.nav a {
  font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 6px;
}
.nav a.active, .nav a:hover { color: var(--navy); background: var(--blue-light); }
.lang-select {
  font-size: 12px; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--white); color: var(--navy);
}
.menu-btn { display: block; font-size: 20px; color: var(--navy); padding: 4px; }
.nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--white); flex-direction: column; padding: 10px 16px;
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }

/* 页面容器 */
.page { max-width: 1100px; margin: 0 auto; padding: 20px 16px 80px; }

/* Hero */
.hero {
  background: var(--navy); color: var(--white);
  border-radius: var(--radius); padding: 28px 20px; margin-bottom: 20px;
}
.hero-tag {
  display: inline-block; font-size: 11px; letter-spacing: .5px;
  background: rgba(255,255,255,.14); padding: 5px 10px; border-radius: 20px; margin-bottom: 14px;
}
.hero h1 { font-size: 27px; line-height: 1.3; font-weight: 600; margin-bottom: 10px; }
.hero p { font-size: 14px; opacity: .88; margin-bottom: 20px; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; font-size: 13px; font-weight: 500;
  transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--white); color: var(--navy); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.5); }
.btn-blue { background: var(--navy); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-wa { background: #25D366; color: #fff; }

/* 信任数据条 */
.trust-bar {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px;
}
.trust-item {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 12px; text-align: center;
}
.trust-num { font-size: 22px; font-weight: 600; color: var(--navy); line-height: 1.2; }
.trust-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 区块标题 */
.section { margin-bottom: 28px; }
.section-head { margin-bottom: 14px; }
.section-head h2 { font-size: 19px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.section-head p { font-size: 13px; color: var(--muted); }

/* 承诺四宫格 */
.promise-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.promise {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 14px;
}
.promise-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--blue-light); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; margin-bottom: 10px;
}
.promise h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.promise p { font-size: 12px; color: var(--muted); }

/* 车源卡片 */
.car-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.car-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.car-image-wrap, .report-image-wrap { position: relative; overflow: hidden; background: #EEF1F4; }
.car-image-wrap { height: 190px; }
.car-image, .report-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.report-image-wrap { height: 260px; }
.car-image-note {
  position: absolute; bottom: 8px; left: 8px;
  font-size: 10px; color: var(--white); background: rgba(12,68,124,.78);
  padding: 4px 8px; border-radius: 4px; letter-spacing: .2px;
}
.car-card-top {
  padding: 16px; display: flex; justify-content: space-between;
  align-items: flex-start; gap: 10px; border-bottom: 1px solid var(--line);
}
.car-badge {
  display: inline-block; font-size: 11px; padding: 4px 9px; border-radius: 20px;
  background: var(--blue-light); color: var(--navy); font-weight: 500; margin-bottom: 8px;
}
.car-card[data-badge="badgeLuxury"] .car-badge { background: var(--gold-light); color: var(--gold); }
.car-card[data-badge="badgeEV"] .car-badge { background: var(--green-light); color: var(--green); }
.car-badge.type { background: #EEF1F5; color: #5B6B7C; margin-left: 5px; }
.car-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.car-card .car-meta { font-size: 12px; color: var(--muted); }
.grade-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: #1D9E75; border: 2px solid #E1F5EE;
}
.car-card-body { padding: 16px; }
.car-specs {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 14px;
}
.spec-label { font-size: 11px; color: var(--muted); }
.spec-value { font-size: 13px; font-weight: 500; }
.car-price {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.price-main { font-size: 20px; font-weight: 600; color: var(--navy); }
.price-sub { font-size: 12px; color: var(--muted); }
.car-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.car-actions .btn { flex: 1; min-width: 130px; }

/* 分类筛选 */
.filter-shell { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.filter-head strong { font-size: 14px; color: var(--navy); }
.filter-clear { font-size: 12px; color: var(--blue); background: none; }
.filter-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 9px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: 12px; color: var(--muted); min-width: 48px; padding-top: 7px; flex-shrink: 0; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.filter-chip { font-size: 12px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--muted); white-space: nowrap; }
.filter-chip.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.filter-more { display: block; margin: 2px 0 0 auto; font-size: 12px; color: var(--blue); }
.filter-extra { display: none; }
.filter-shell.expanded .filter-extra { display: block; padding-top: 9px; border-top: 1px dashed var(--line); margin-top: 9px; }
.filter-count { font-size: 12px; color: var(--muted); margin: 0 2px 10px; }
.filter-empty { background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center; font-size: 13px; color: var(--muted); grid-column: 1 / -1; }
.filter-empty .btn { margin-top: 14px; }

@media (max-width: 600px) {
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 3px; }
  .filter-chip { flex-shrink: 0; }
}

/* 目的国准入 */
.elig-mini { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--muted); }
.elig-badge { display: inline-flex; align-items: center; gap: 4px; }
.elig-badge::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.elig-badge.ok::before { background: #1B7A48; }
.elig-badge.check::before { background: #B76A00; }
.elig-badge.blocked::before { background: var(--red); }

.elig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.elig-cell { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 6px; padding: 8px 7px; background: var(--white); text-align: left; }
.elig-cell.ok { border-left-color: #1B7A48; }
.elig-cell.check { border-left-color: #B76A00; }
.elig-cell.blocked { border-left-color: var(--red); }
.elig-cell-name { display: block; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.elig-cell-status { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.elig-reason { margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 10px 12px; min-height: 54px; }
.elig-reason strong { color: var(--navy); }

@media (max-width: 600px) {
  .elig-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 一车一码报告 */
.report-shell {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.report-head {
  background: var(--navy); color: var(--white); padding: 20px;
}
.report-head .eyebrow { font-size: 11px; opacity: .8; letter-spacing: 1px; margin-bottom: 6px; }
.report-head h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.report-head p { font-size: 12px; opacity: .85; }
.report-body { padding: 18px 20px; }
.report-block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.report-block:last-child { border-bottom: none; }
.report-block h3 { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 12px; }

.vin-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg); border: 1px dashed var(--blue-mid);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
}
.vin-strip .spec-label { min-width: 52px; }
.vin-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; letter-spacing: .5px; }

.grade-banner {
  border-radius: 8px; padding: 14px 16px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.grade-banner.blue { background: var(--blue-light); color: var(--navy); }
.grade-banner.yellow { background: var(--gold-light); color: var(--gold); }
.grade-banner.orange { background: var(--orange-light); color: var(--orange); }
.grade-banner.red { background: var(--red-light); color: var(--red); }
.grade-banner strong { font-size: 15px; }
.grade-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.data-table th, table.data-table td {
  text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line);
}
table.data-table th { color: var(--muted); font-weight: 500; font-size: 11px; }
[dir="rtl"] table.data-table th, [dir="rtl"] table.data-table td { text-align: right; }
.ok-mark { color: var(--green); font-weight: 600; }
.history-list { list-style: none; }
.history-list li {
  font-size: 12px; padding: 8px 0 8px 18px; position: relative; color: var(--muted);
}
.history-list li::before {
  content: ""; position: absolute; left: 4px; top: 15px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue-mid);
}
[dir="rtl"] .history-list li { padding: 8px 18px 8px 0; }
[dir="rtl"] .history-list li::before { left: auto; right: 4px; }

.market-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.market-item { background: var(--bg); border-radius: 8px; padding: 12px; }
.market-item .spec-label { margin-bottom: 3px; }
.market-item .spec-value { font-size: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 11px; padding: 4px 9px; border-radius: 20px;
  background: var(--green-light); color: var(--green);
}

.disclaimer {
  font-size: 11px; color: var(--muted); background: var(--bg);
  border-radius: 8px; padding: 12px; margin-top: 14px; line-height: 1.6;
}

/* 匹配器 */
.match-form {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 18px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field select, .field input, .field textarea {
  width: 100%; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); color: var(--ink); font-family: inherit;
}
.field textarea { resize: vertical; }
.match-results { display: grid; grid-template-columns: 1fr; gap: 12px; }
.match-card {
  background: var(--white); border: 1px solid var(--line);
  border-left: 3px solid var(--green); border-radius: 8px;
  padding: 14px 16px;
}
.match-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.match-card p { font-size: 12px; color: var(--muted); }

/* 规则表 */
.rule-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.rule-tab {
  font-size: 12px; padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--white); color: var(--muted);
}
.rule-tab.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.rule-panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.rule-row {
  display: grid; grid-template-columns: 88px 1fr; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.rule-row:last-of-type { border-bottom: none; }
.rule-key { color: var(--muted); font-size: 12px; }
.rule-note {
  background: var(--gold-light); color: #633806;
  border-radius: 8px; padding: 12px; font-size: 12px; margin-top: 14px; line-height: 1.6;
}

/* 流程步骤 */
.flow { display: grid; grid-template-columns: 1fr; gap: 8px; }
.flow-step {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px;
}
.flow-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-light); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.flow-step span { font-size: 13px; }

/* WhatsApp 悬浮 */
.wa-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  width: 50px; height: 50px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
}
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }

/* 页脚 */
.footer {
  border-top: 1px solid var(--line); padding: 20px 16px 80px;
  text-align: center; font-size: 11px; color: var(--muted);
}
.footer .brand { justify-content: center; margin-bottom: 8px; }

/* 桌面端 */
@media (min-width: 768px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
  .page { padding: 28px 24px 60px; }
  .hero { padding: 40px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 15px; }
  .trust-bar { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .promise-grid { grid-template-columns: repeat(4, 1fr); }
  .car-grid { grid-template-columns: repeat(3, 1fr); }
  .car-image-wrap { height: 210px; }
  .report-image-wrap { height: 380px; }
  .market-grid { grid-template-columns: repeat(4, 1fr); }
  .flow { grid-template-columns: repeat(6, 1fr); }
  .flow-step { flex-direction: column; text-align: center; gap: 8px; }
  .match-results { grid-template-columns: repeat(3, 1fr); }
  .rule-row { grid-template-columns: 140px 1fr; }
}
