/* =========================================================================
   佳孚品牌单商户外贸网站 - 前台样式
   响应式：PC + 手机；商务外贸风格（参考 Made-in-China 商户主页）
   ========================================================================= */
:root {
  --primary: #ff6a00;
  --primary-dark: #e05c00;
  --dark: #0f172a;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f3f6fb;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== 页头：样式统一由 home.css 提供（与首页顶部完全一致），主题色见 :root（已为首页橙色） ==== */
.container.narrow { max-width: 640px; }
.card { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px; }

/* ===== 轮播 / 主视觉 ===== */
.hero { background: linear-gradient(135deg, #1e3a8a, #0f172a); color: #fff; padding: 60px 0; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.hero-tag { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); padding: 5px 14px; border-radius: 999px; font-size: 13px; letter-spacing: 1px; }
.hero h1 { font-size: 34px; font-weight: 700; max-width: 700px; }
.hero p.hero-desc { max-width: 760px; color: rgba(255,255,255,.85); font-size: 15px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-block; padding: 11px 24px; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline-light { border: 1px solid rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }

/* ===== 区块 ===== */
.section { padding: 40px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 24px; }
.section-head h2 { font-size: 24px; color: var(--dark); }
.section-head p { color: var(--muted); margin-top: 6px; }

/* ===== 公司数据条（对标参考站） ===== */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 10px; }
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 16px 8px; text-align: center; }
.stat b { display: block; font-size: 24px; color: #fff; }
.stat span { font-size: 12.5px; color: rgba(255,255,255,.75); }

/* ===== 产品卡片网格（对标参考站双列卡片） ===== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.product-card:hover { transform: translateY(-3px); }
.product-thumb { aspect-ratio: 4/3; background: #eef2f8; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #9aa5b1; font-size: 13px; }
.product-body { padding: 12px 14px 14px; }
.product-title { font-size: 14.5px; font-weight: 600; min-height: 42px; color: var(--dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #dc2626; font-weight: 700; font-size: 15px; margin-top: 6px; }
.product-subtitle { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.5; }
.product-meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.product-link { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; }

/* ===== 分类筛选 ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; justify-content: center; }
.filter-chip { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 14px; background: #fff; }
.filter-chip.active, .filter-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 详情页 ===== */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.detail-gallery .main-img { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.detail-info h1 { font-size: 24px; color: var(--dark); }
.detail-price { font-size: 22px; color: #dc2626; font-weight: 700; margin: 10px 0; }
.detail-subtitle { font-size: 15.5px; color: var(--muted); margin-top: 8px; }
.detail-rows { margin-top: 12px; }
.detail-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.detail-row b { min-width: 120px; color: var(--muted); font-weight: 500; }
.spec-block { margin-top: 24px; }
.spec-block h3 { font-size: 18px; margin-bottom: 8px; color: var(--dark); }
.spec-text { white-space: pre-line; }

/* ===== 询盘表单 ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 14px; color: var(--dark); }
.form-field label .req { color: #dc2626; }
.form-field input, .form-field select, .form-field textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14.5px; font-family: inherit; width: 100%;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.inquiry-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ===== 页脚 ===== */
.site-footer { background: var(--dark); color: rgba(255,255,255,.85); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 34px 16px; }
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: rgba(255,255,255,.75); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 14px 0; font-size: 13px; text-align: center; color: rgba(255,255,255,.6); }

/* ===== 消息提示（flash）===== */
.flash { max-width: 1200px; margin: 16px auto 0; padding: 0 16px; }

/* ===== 空状态 ===== */
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .hero h1 { font-size: 26px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 车型详情：多图缩略图 + 富文本描述 ===== */
.detail-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.detail-thumbs .thumb-btn { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; overflow: hidden; }
.detail-thumbs .thumb-btn img { width: 86px; height: 64px; object-fit: cover; display: block; border-radius: 6px; }
.detail-thumbs .thumb-btn.active { border-color: var(--primary); }
.rich-text { white-space: normal; line-height: 1.8; }
.rich-text h2 { font-size: 20px; margin: 12px 0 8px; }
.rich-text h3 { font-size: 17px; margin: 10px 0 6px; }
.rich-text ul, .rich-text ol { padding-left: 22px; margin: 8px 0; }
.rich-text a { color: var(--primary); text-decoration: underline; }
.rich-text h1 { font-size: 24px; margin: 14px 0 10px; }
.rich-text h4 { font-size: 15px; margin: 10px 0 6px; }
.rich-text blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--primary); background: #f8fafc; color: #4b5563; }
.rich-text pre { margin: 10px 0; padding: 12px 14px; background: #f6f8fa; border-radius: 8px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.rich-text code { padding: 1px 5px; background: #f1f5f9; border-radius: 4px; font-size: 13px; }
.rich-text img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.rich-text hr { border: 0; border-top: 1px solid #e5e7eb; margin: 16px 0; }
.rich-text table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.rich-text td, .rich-text th { border: 1px solid #dcdfe4; padding: 8px 10px; font-size: 14px; }
.rich-text th { background: #f7f9fc; font-weight: 600; }
