/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #0b2447;
  --primary-light: #19376d;
  --accent: #ff5722;
  --accent-hover: #e64a19;
  --bg: #f5f6f8;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e5e7eb;
  --success: #2e7d32;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== 顶部导航 ========== */
.header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 28px; }
.nav a {
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.nav a:hover { color: var(--accent); }
.header-contacts { display: flex; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-telegram { background: #229ed9; color: white; }
.btn-telegram:hover { background: #1a8bc4; }
.btn-whatsapp { background: #25d366; color: white; }
.btn-whatsapp:hover { background: #1fb857; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}
.btn-outline:hover { background: white; color: var(--primary); }

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 32px;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.hero-badge {
  background: rgba(255,255,255,0.1);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
}

/* ========== 区块标题 ========== */
.section { padding: 60px 0; }
.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ========== 车辆网格 ========== */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.car-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.car-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
  overflow: hidden;
}
.car-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.car-body { padding: 16px; }
.car-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.car-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}
.car-meta {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.car-status {
  display: inline-block;
  background: #e8f5e9;
  color: var(--success);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

/* ========== 优势 ========== */
.features {
  background: white;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.feature {
  text-align: center;
  padding: 20px;
}
.feature-icon {
  width: 64px;
  height: 64px;
  background: #fff3e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}
.feature h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--primary);
}
.feature p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========== 流程 ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  background: white;
  padding: 24px;
  border-radius: 10px;
  text-align: center;
  border-top: 4px solid var(--accent);
}
.step-num {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 12px;
}
.step h4 { font-size: 15px; margin-bottom: 6px; color: var(--primary); }
.step p { font-size: 13px; color: var(--text-muted); }

/* ========== CTA 联系 ========== */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}
.cta h2 { font-size: 32px; margin-bottom: 12px; }
.cta p { opacity: 0.9; margin-bottom: 28px; }
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== 页脚 ========== */
.footer {
  background: #0a1a30;
  color: #999;
  padding: 32px 0;
  font-size: 13px;
  text-align: center;
}
.footer a { color: #ccc; }

/* ========== 车辆详情页 ========== */
.car-detail {
  background: white;
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
}
.car-detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.car-main-img {
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  border-radius: 8px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}
.car-thumbs {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}
.car-thumb {
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 13px;
}
.car-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.car-detail-title h1 {
  font-size: 28px;
  color: var(--primary);
}
.car-detail-title .year { color: var(--text-muted); font-weight: 400; }
.car-detail-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.spec-table td:first-child {
  color: var(--text-muted);
  width: 40%;
}
.spec-table td:last-child {
  font-weight: 600;
}
.car-description {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
  line-height: 1.8;
}
.contact-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.contact-buttons .btn { padding: 14px 28px; font-size: 15px; }
.back-link {
  display: inline-block;
  margin: 24px 0 0;
  color: var(--primary);
  font-weight: 600;
}

/* ========== 搜索框 ========== */
.search-box {
  max-width: 560px;
  margin: 0 auto 28px;
}
.search-box input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  background: white;
}
.search-box input:focus { border-color: var(--accent); }
.search-box input::placeholder { color: #aaa; }

/* ========== 品牌筛选按钮 ========== */
.brand-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.brand-btn {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.brand-btn:hover { border-color: var(--primary); color: var(--primary); }
.brand-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.no-result {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 0;
  color: #999;
  font-size: 15px;
}

/* ========== 配件页 ========== */
.parts-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: white;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 18px 24px;
  margin-top: 36px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.parts-entry .pe-text { font-size: 14px; color: var(--text-muted); }
.parts-entry .pe-text strong { display: block; color: var(--primary); font-size: 16px; margin-bottom: 2px; }
.parts-entry a {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.parts-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 56px 0;
  text-align: center;
}
.parts-hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 12px; }
.parts-hero p { font-size: 16px; opacity: 0.9; max-width: 640px; margin: 0 auto; }

.part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.part-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.part-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
  overflow: hidden;
}
.part-img img { width: 100%; height: 100%; object-fit: cover; }
.part-body { padding: 20px; }
.part-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: #fff3e0;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.part-name { font-size: 19px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.part-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.part-price { font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 12px; }
.part-short { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 14px; }
.part-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text);
}
.part-highlights li { padding-left: 20px; position: relative; }
.part-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}
.part-specs { margin: 0 0 14px; }
.part-specs td { padding: 8px 0; font-size: 13.5px; }
.part-specs td:first-child { width: 50%; }
.part-lead { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.part-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.part-actions .btn { flex: 1; justify-content: center; font-size: 14px; padding: 11px 14px; }

/* ========== 手机适配 ========== */
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .nav { display: none; }
  .header-inner { height: 56px; }
  .logo { font-size: 17px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .hero { padding: 40px 0; }
  .hero-badges { gap: 10px; margin-top: 24px; }
  .hero-badge { padding: 8px 14px; font-size: 12px; }
  .section { padding: 36px 0; }
  .section-title { font-size: 22px; }
  .car-grid { gap: 14px; }
  .car-img { height: 200px; }
  .car-body { padding: 12px; }
  .car-title { font-size: 14px; }
  .car-price { font-size: 19px; }
  .car-detail-gallery { grid-template-columns: 1fr; }
  .car-main-img { height: 220px; }
  .car-thumbs { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); height: 72px; }
  .car-detail { padding: 14px; margin-top: 14px; }
  .car-detail-title h1 { font-size: 20px; }
  .car-detail-price { font-size: 28px; }
  .header-contacts .btn { padding: 7px 10px; font-size: 12px; gap: 4px; }
  .contact-buttons .btn { padding: 12px 16px; font-size: 14px; flex: 1; justify-content: center; }
  .spec-table td { padding: 10px 8px; font-size: 14px; }
  .cta h2 { font-size: 24px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 12px; }
  .step { padding: 16px 12px; }
  .search-box input { padding: 12px 16px; font-size: 14px; }
  .brand-filters { gap: 6px; margin-bottom: 16px; }
  .brand-btn { padding: 6px 14px; font-size: 13px; }
  .parts-hero { padding: 36px 0; }
  .parts-hero h1 { font-size: 24px; }
  .parts-hero p { font-size: 14px; }
  .part-grid { grid-template-columns: 1fr; gap: 16px; }
  .part-img { height: 190px; }
  .part-body { padding: 16px; }
  .part-name { font-size: 17px; }
  .part-price { font-size: 20px; }
  .parts-entry { padding: 14px 16px; margin-top: 24px; }
  .parts-entry a { flex: 1; text-align: center; }
}

@media (max-width: 380px) {
  .header-contacts .btn { padding: 6px 8px; font-size: 11px; }
  .car-img { height: 180px; }
}
