﻿/* 4S淘车网 - 懂车帝风格公共样式
   品牌主色：懂车帝黄 #FFCC00 / #FFD100；价格强调：橙红 #FF5000 */
:root {
  --brand: #ffcc00;
  --brand-deep: #f5b800;
  --brand-ink: #1a1a1a;
  --price: #ff5000;
  --price-dark: #e04300;
  --ink: #1f2329;
  --ink-2: #4e535b;
  --ink-3: #8b9099;
  --line: #e8eaed;
  --line-2: #d8dce1;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --nav: #1d2126;
  --nav-hover: #2b3138;
  --green: #00a870;
  --blue: #3370ff;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(20, 30, 50, 0.05);
  --shadow: 0 4px 16px rgba(20, 30, 50, 0.08);
  --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部栏 ---------- */
.topbar { background: var(--nav); color: #fff; height: 40px; font-size: 12px; }
.topbar .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.topbar-links { display: flex; gap: 20px; color: #b9bfc7; }
.topbar-links a:hover { color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 16px; color: #b9bfc7; }
.topbar-right a:hover { color: var(--brand); }

/* ---------- 主导航 ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header-inner { height: 68px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 8px; flex: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 9px; background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-ink); font-weight: 800; font-size: 19px; letter-spacing: -1px;
}
.logo-text { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -0.5px; white-space: nowrap; }
.logo-text .hi { color: var(--price); }
.logo-sub { font-size: 11px; color: var(--ink-3); margin-left: 2px; font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: 4px; height: 100%; }
.main-nav a {
  position: relative; height: 100%; display: flex; align-items: center;
  padding: 0 15px; font-size: 15px; color: var(--ink-2); font-weight: 500;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); font-weight: 700; }
.main-nav a.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand);
}
.nav-spacer { flex: 1; }
.header-search { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 0 14px; height: 36px; width: 230px; }
.header-search input { border: none; outline: none; background: none; flex: 1; min-width: 0; font-size: 13px; color: var(--ink); }
.header-search svg { color: var(--ink-3); flex: none; }
.header-search:focus-within { border-color: var(--brand-deep); background: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 6px; padding: 9px 18px; font-size: 14px; font-weight: 600; transition: all .15s; }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn-brand:hover { background: var(--brand-deep); }
.btn-outline { background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--brand-deep); color: var(--ink); }
.btn-danger { background: #fff1f0; color: #d4380d; border: 1px solid #ffccc7; }
.btn-danger:hover { background: #ffe0dc; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.nav-toggle { display: none; background: none; border: none; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- 频道栏 ---------- */
.channel-bar { background: #fff; border-bottom: 1px solid var(--line); }
.channel-inner { display: flex; align-items: center; gap: 6px; overflow-x: auto; height: 46px; scrollbar-width: none; }
.channel-inner::-webkit-scrollbar { display: none; }
.channel-item { padding: 0 14px; height: 100%; display: flex; align-items: center; white-space: nowrap; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid transparent; }
.channel-item:hover { color: var(--price); }
.channel-item.active { color: var(--price); border-bottom-color: var(--price); font-weight: 600; }

/* ---------- 通用区块 ---------- */
.section { margin: 28px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; width: 4px; height: 20px; border-radius: 2px; background: var(--brand); }
.section-sub { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.section-more { font-size: 13px; color: var(--ink-3); }
.section-more:hover { color: var(--price); }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); overflow: hidden; }
.card-hover { transition: transform .18s, box-shadow .18s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- 页脚 ---------- */
/* ---------- v5.7 底部黑色区域：文字 LOGO + 便民入口 + 栏目 + 联系卡 ---------- */
/* ===== v5.7.1 页脚横幅（桌面 / 手机通用）：独立于黑色页脚之上，页脚本身保持原样 ===== */
.footer-banner-wrap { margin-top: 48px; padding-bottom: 28px; }
.footer-banner { display: block; width: 100%; border-radius: 12px; overflow: hidden; background: #e9edf2; box-shadow: var(--shadow-sm); }
.footer-banner img { display: block; width: 100%; height: auto; border: 0; }
a.footer-banner:hover { box-shadow: var(--shadow); }
/* 有横幅时取消黑色页脚原有的顶部外边距，避免出现双倍空白；无横幅时页脚样式完全不受影响 */
.footer-banner-wrap + .site-footer { margin-top: 0; }

.site-footer { background: var(--nav); color: #9aa1aa; padding: 44px 0 0; margin-top: 48px; font-size: 13px; }
.footer-top { display: grid; grid-template-columns: 1.45fr 1.9fr 1fr; gap: 36px; padding-bottom: 30px; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 20px; letter-spacing: -1px; display: flex; align-items: center; justify-content: center; flex: none; }
.footer-logo-text { font-size: 23px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.footer-slogan { margin-top: 14px; color: var(--brand); font-weight: 700; font-size: 14px; }
.footer-desc { margin-top: 8px; line-height: 1.8; }
.footer-quick { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.footer-quick a { padding: 5px 6px; border: 1px solid #3b424a; border-radius: 6px; color: #c7ccd2; font-size: 12px; text-align: center; white-space: nowrap; }
.footer-quick a:hover { border-color: var(--brand); color: var(--brand); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 9px; }
.footer-col a:hover { color: var(--brand); }
.footer-contact-box { background: #262b31; border: 1px solid #363d45; border-radius: 10px; padding: 16px; }
.footer-contact-box h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.fc-qq { color: var(--brand); font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.footer-contact-box p { margin-top: 8px; line-height: 1.8; font-size: 12px; }
.fc-btn { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 6px; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 12px; }
.fc-btn:hover { background: var(--brand-deep); }
.footer-bottom { border-top: 1px solid #333940; padding: 16px 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.footer-copy { color: #9aa1aa; }
.footer-meta { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-record, .footer-contact { line-height: 1.7; }
.footer-top-btn { color: var(--brand); white-space: nowrap; }
.footer-top-btn:hover { color: #fff; }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: rgba(20,25,32,.92); color: #fff; padding: 11px 22px; border-radius: 8px; font-size: 13px; z-index: 500; box-shadow: var(--shadow); }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty h3 { color: var(--ink); margin: 12px 0 6px; }

/* ---------- 弹层 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,20,28,.5); z-index: 200; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: var(--radius-lg); z-index: 210; width: min(440px, 92vw); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 17px; }
.modal-close { background: none; border: none; font-size: 24px; color: var(--ink-3); line-height: 1; }
.modal-body { padding: 22px; }
.modal-foot { padding: 0 22px 22px; display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px;
  outline: none; background: #fff; color: var(--ink); font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-deep); box-shadow: 0 0 0 3px rgba(255,204,0,.18); }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.form-error { background: #fff1f0; color: #cf1322; border: 1px solid #ffccc7; padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.form-ok { background: #f6ffed; color: #237804; border: 1px solid #b7eb8f; padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; height: auto; box-shadow: var(--shadow); border-bottom: 1px solid var(--line); }
  .main-nav.open { display: flex; }
  .main-nav a { height: 48px; padding: 0 20px; }
  .main-nav a.active::after { display: none; }
  .nav-toggle { display: block; }
  .header-search { width: 160px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
  .footer-contact-box { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .topbar { display: none; }
  .header-inner { height: 60px; gap: 10px; }
  .logo-text { font-size: 17px; }
  .logo-sub { display: none; }
  .logo-mark { width: 32px; height: 32px; font-size: 16px; }
  .header-search { display: none; }
  .main-nav { top: 60px; }
  .section-title { font-size: 18px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- v5 图片化首页 / 资讯卡片 / 定位标签 ---------- */
.hero-banner { position: relative; overflow: hidden; }
.hero-banner.has-image { background: #1d2126; }
.hero-img { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-banner.has-image .hero-content, .hero-banner.has-image .hero-art { position: relative; z-index: 1; }
.hero-banner.has-image .hero-content { text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.banner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.banner-card { position: relative; display: block; height: 160px; overflow: hidden; border-radius: 12px; background: #1d2126; }
.banner-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .3s; }
.banner-card:hover img { transform: scale(1.04); }
.banner-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.banner-caption b { display: block; font-size: 16px; }
.banner-caption i { display: block; font-style: normal; font-size: 12px; color: #ffd84d; margin-top: 3px; }
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.news-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.news-card .news-thumb { width: 100%; height: 130px; border-radius: 0; }
.news-card .news-photo, .news-thumb .news-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-body { padding: 13px 14px 15px; }
.news-card-body h4 { margin: 6px 0 5px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.news-card-body p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.55; height: 38px; overflow: hidden; }
.news-tag { color: var(--price); font-size: 11px; font-weight: 700; }
.news-card-meta { margin-top: 9px; font-size: 11px; color: var(--ink-3); }
.vc-photo, .dh-photo, .pc-photo, .sc-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-distance, .b-distance { display: inline-block; margin-left: 6px; padding: 2px 7px; background: #fff7d6; color: #9a6b00; border-radius: 10px; font-size: 11px; }
.article-cover { margin: 0 0 16px; }
.article-cover img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.article-lead { color: #5f6b7a; border-left: 3px solid #ffcc00; padding-left: 12px; background: #fffdf3; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 1000px) {
  .banner-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .banner-grid, .news-grid { grid-template-columns: 1fr; }
  .banner-card { height: 140px; }
}

/* ---------- v5.1 全量品牌库 / 品牌筛选 ---------- */
.qn-cyan { background: #e0f7f5; color: #08979c; }
.brand-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.bs-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; text-align: center; }
.bs-item b { display: block; font-size: 22px; color: var(--price); }
.bs-item span { font-size: 12px; color: var(--ink-3); }
.brand-filter-box { flex: 1; min-width: 0; }
.brand-filter-line { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.brand-filter-line input { flex: 1; min-width: 180px; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 10px; font-size: 13px; color: var(--ink); }
.brand-lib-link { font-size: 12px; color: var(--price); white-space: nowrap; }
.brand-letter { display: inline-block; padding: 6px 4px 6px 10px; font-weight: 700; color: var(--price); font-size: 12px; }
.brand-letters { max-height: 96px; overflow-y: auto; }
.brand-search-wrap { display: flex; gap: 8px; flex: 1; min-width: 200px; }
.brand-search-wrap input { flex: 1; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 12px; font-size: 13px; color: var(--ink); }
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.brand-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.brand-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.bc-logo { width: 52px; height: 52px; flex: none; border-radius: 10px; background: #1d2126; color: #ffcc00; font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bc-photo { width: 100%; height: 100%; object-fit: cover; }
.bc-main { flex: 1; min-width: 0; }
.bc-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.bc-title a { color: var(--ink); }
.bc-cat { display: inline-block; margin-left: 6px; font-size: 10px; padding: 2px 6px; border-radius: 8px; background: #eef3ff; color: #3370ff; vertical-align: middle; }
.bc-cat.c2 { background: #fff2d6; color: #b8860b; }
.bc-cat.c3 { background: #f3eaff; color: #722ed1; }
.bc-en { font-size: 11px; color: var(--ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-meta { font-size: 11px; color: #888; margin-top: 4px; }
.bc-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.bc-actions a { font-size: 11px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--ink-2); white-space: nowrap; }
.bc-actions a:hover { border-color: var(--brand); color: var(--price); }
@media (max-width: 1000px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .brand-summary { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: 1fr; }
  .brand-card { padding: 11px; }
}
