/* ============================================
   四海汽车：综合汽车信息服务门户（汽车之家 / 懂车帝结构）
   ============================================ */
:root {
  --c-primary: #ff6600;
  --c-primary-dark: #e85d00;
  --c-text: #333333;
  --c-muted: #888888;
  --c-bg: #f5f5f5;
  --c-line: #ececec;
  --page-width: 1200px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: #f7f7f7;
  border-bottom: 1px solid var(--c-line);
  font-size: 12px;
  color: #666;
  height: 34px;
}
.topbar-inner {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-links { display: flex; gap: 16px; align-items: center; }
.topbar-links a:hover { color: var(--c-primary); }

.header { background: #fff; }
.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--c-primary); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 20px;
}
.logo b { display: block; font-size: 22px; line-height: 1.1; color: var(--c-primary); }
.logo small { color: var(--c-muted); font-size: 12px; }
.search { flex: 1; display: flex; max-width: 520px; }
.search input {
  flex: 1; height: 40px; border: 2px solid var(--c-primary);
  border-right: 0; padding: 0 12px; outline: none;
}
.search button {
  height: 40px; padding: 0 22px; border: 0; cursor: pointer;
  background: var(--c-primary); color: #fff; font-weight: 700;
}
.phone { margin-left: auto; text-align: right; line-height: 1.15; }
.phone span { display: block; font-size: 12px; color: var(--c-muted); }
.phone b { color: var(--c-primary); font-size: 18px; }

.channel { background: var(--c-primary); }
.channel-inner { display: flex; gap: 4px; }
.channel a {
  color: #fff; padding: 12px 18px; font-size: 16px; font-weight: 600;
}
.channel a:hover, .channel a.is-active { background: var(--c-primary-dark); }

.hero {
  background: linear-gradient(90deg, #fff4ea, #fff);
  border-bottom: 1px solid var(--c-line);
  padding: 22px 0;
}
.hero-inner { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.hero h1 { font-size: 28px; }
.hero p { color: #666; margin-top: 6px; max-width: 560px; }
.hero-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-width: 360px; }
.hero-tools a {
  background: #fff; border: 1px solid var(--c-line); padding: 10px 12px;
  text-align: center; font-size: 13px;
}
.hero-tools a:hover { border-color: var(--c-primary); color: var(--c-primary); }

.panel {
  background: #fff;
  margin: 16px 0;
  padding: 18px 18px 20px;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px; border-left: 4px solid var(--c-primary); padding-left: 10px;
}
.panel-head h2 { font-size: 20px; }
.panel-head span { font-size: 12px; color: var(--c-muted); }

.series-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.brand-item {
  height: 36px; padding: 0 16px; background: #fff;
  border: 1px solid var(--c-line); cursor: pointer;
  display: inline-flex; align-items: center;
}
.brand-item:hover, .brand-item.is-active {
  border-color: var(--c-primary); color: var(--c-primary);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  height: 30px; padding: 0 12px; border-radius: 15px; cursor: pointer;
  border: 1px solid var(--c-line); background: #fff;
}
.filters button.is-active {
  background: var(--c-primary); color: #fff; border-color: var(--c-primary);
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.car-card {
  border: 1px solid var(--c-line); background: #fff;
}
.car-card:hover { border-color: var(--c-primary); }
.car-cover {
  height: 130px; position: relative;
  background: #f3f3f3; display: grid; place-items: center;
}
.car-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.car-cover-fallback { text-align: center; color: #667; font-weight: 700; }
.car-body { padding: 10px 12px 12px; }
.car-name { font-size: 15px; }
.car-meta { font-size: 12px; color: var(--c-muted); margin: 4px 0; }
.guide { color: var(--c-muted); font-size: 12px; }
.quote { color: var(--c-primary); font-size: 18px; font-weight: 700; margin: 2px 0 6px; }
.off { color: #0a7a3e; font-size: 12px; }
.car-actions { display: flex; gap: 6px; margin-top: 8px; }
.car-actions button, .car-actions a {
  flex: 1; height: 30px; cursor: pointer; border: 1px solid var(--c-line); background: #fff;
  display: grid; place-items: center;
}
.btn-quote { background: var(--c-primary) !important; color: #fff !important; border-color: var(--c-primary) !important; }
.btn-compare.is-on { color: var(--c-primary); border-color: var(--c-primary); }
.empty { text-align: center; color: var(--c-muted); padding: 30px 0; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.deal-item, .rank-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--c-line); font-size: 14px;
}
.deal-item b, .rank-list b { font-weight: 600; }
.deal-off { color: #0a7a3e; }
.rank-list { list-style: none; }
.rank-list li span { color: var(--c-primary); font-weight: 700; }
.rank-list a { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.news-grid a { display: block; }

.pic-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.pic-grid figure { background: #f7f7f7; }
.pic-grid img { width: 100%; height: 120px; object-fit: cover; }
.pic-grid figcaption { padding: 8px; font-size: 13px; text-align: center; }

.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td {
  border: 1px solid var(--c-line); padding: 10px 12px; text-align: center;
}
.compare-table th { background: #fafafa; width: 110px; }
.compare-hint { padding: 36px; text-align: center; color: var(--c-muted); }

.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.news-grid article { background: #fafafa; padding: 14px; }
.news-grid b { color: var(--c-primary); font-size: 12px; }
.news-grid h3 { font-size: 15px; margin: 6px 0; }
.news-grid p { font-size: 13px; color: #666; }

.dealer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dealer-grid article { border: 1px solid var(--c-line); padding: 14px 16px; }
.dealer-grid h3 { margin-bottom: 6px; }
.dealer-grid p { font-size: 13px; color: #666; }

.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.about-card { background: #fafafa; padding: 16px 18px; }
.about-card h3 { margin-bottom: 8px; }

.footer {
  background: #2b2b2b; color: #aaa; font-size: 12px;
  padding: 28px 0 40px; line-height: 1.8; text-align: center;
}
.footer-map {
  display: grid; grid-template-columns: repeat(3, 1fr);
  text-align: left; gap: 20px; margin-bottom: 18px;
  padding-bottom: 16px; border-bottom: 1px solid #3a3a3a;
}
.footer-map h4 { color: #ddd; margin-bottom: 6px; }
.footer-map a { display: block; color: #aaa; }
.footer-map a:hover, .footer a:hover { color: #fff; }
.footer a { color: #ccc; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: grid; place-items: center; z-index: 40;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(420px, calc(100% - 32px)); background: #fff;
  padding: 24px; text-align: center;
}
.modal-card p { color: #666; margin: 10px 0; }
.modal-phone { color: var(--c-primary) !important; font-size: 24px; font-weight: 700; }
.modal-card button {
  margin-top: 8px; height: 36px; padding: 0 24px; border: 0; cursor: pointer;
  background: var(--c-primary); color: #fff;
}

.compare-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--c-line);
}
.compare-bar[hidden] { display: none; }
.compare-bar-inner {
  height: 52px; display: flex; align-items: center; justify-content: space-between;
}
.compare-bar a {
  background: var(--c-primary); color: #fff; height: 32px; padding: 0 16px;
  display: grid; place-items: center;
}

.page-main { padding: 16px 0 40px; }
.crumb { font-size: 13px; color: #888; margin: 8px 0 14px; }
.crumb a:hover { color: var(--c-primary); }
.page-title { font-size: 26px; margin-bottom: 8px; }
.page-lead { color: #666; margin-bottom: 18px; }

.detail-top {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px;
  background: #fff; padding: 20px; margin-bottom: 16px;
}
.detail-cover { background: #f3f3f3; min-height: 280px; }
.detail-cover img { width: 100%; height: 320px; object-fit: cover; }
.detail-price .guide { font-size: 14px; }
.detail-price .quote { font-size: 28px; margin: 8px 0; }
.spec-table { width: 100%; border-collapse: collapse; background: #fff; }
.spec-table th, .spec-table td { border: 1px solid var(--c-line); padding: 10px 14px; text-align: left; }
.spec-table th { width: 160px; background: #fafafa; color: #666; font-weight: 500; }

.article-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }
.article-body { background: #fff; padding: 28px 32px 40px; }
.article-body h1 { font-size: 28px; line-height: 1.4; margin: 8px 0 12px; }
.article-meta { color: #999; font-size: 13px; margin-bottom: 20px; }
.article-body p { font-size: 16px; line-height: 1.9; color: #333; margin-bottom: 16px; }
.side-box { background: #fff; padding: 16px; margin-bottom: 16px; }
.side-box h3 { font-size: 16px; margin-bottom: 10px; border-left: 3px solid var(--c-primary); padding-left: 8px; }
.side-box a { display: block; padding: 8px 0; border-bottom: 1px solid var(--c-line); font-size: 14px; }
.side-box a:hover { color: var(--c-primary); }

.news-list { background: #fff; }
.news-item { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--c-line); }
.news-item:hover { background: #fafafa; }
.news-item .tag { color: var(--c-primary); font-size: 13px; font-weight: 700; }
.news-item h3 { font-size: 18px; margin: 4px 0 6px; }
.news-item p { color: #666; font-size: 14px; }
.news-item .date { color: #999; font-size: 12px; margin-top: 6px; }

.btn-line { display: flex; gap: 10px; margin-top: 16px; }
.btn-line a, .btn-line button {
  height: 36px; padding: 0 16px; border: 1px solid var(--c-line); background: #fff; cursor: pointer;
  display: grid; place-items: center; font-size: 14px;
}
.btn-line .primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.compare-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.compare-pick label { background: #fff; border: 1px solid var(--c-line); padding: 8px 12px; cursor: pointer; }
.compare-pick input { margin-right: 6px; }

@media (max-width: 1100px) {
  .car-grid, .pic-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid, .dealer-grid, .two-col, .about, .detail-top, .article-wrap { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .phone, .channel a:nth-child(n+6) { display: none; }
  .car-grid, .pic-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-tools { min-width: 0; width: 100%; }
}
