/* 前台通用样式：首页之外的本地页面共用（车型 / 详情 / 经销商 / 资讯 / 召回 / 客服） */
:root {
  --red: #e60012;
  --red-dark: #c0000f;
  --ink: #14171f;
  --text: #2b3040;
  --muted: #6b7280;
  --line: #e6e8ee;
  --soft: #f6f7f9;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 24, 40, .08);
  --max: 1240px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .6em; line-height: 1.25; font-weight: 700; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .18em; font-size: 18px; color: var(--ink); }
/* 车标用官方 TOYOTA 字标图（透明底 webp），跟首页头部同一个资源。
   原来这里是 CSS 画的两个椭圆（border-radius:50%/60%），放大看根本不是丰田标。 */
.logo img { display: block; height: 24px; width: auto; }

.site-nav { display: flex; gap: 6px; margin-left: auto; }

.site-nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--text);
  transition: background .18s, color .18s; white-space: nowrap;
}
.site-nav a:hover { background: var(--soft); color: var(--ink); }
.site-nav a.active { background: var(--red); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* 会员中心的客服入口：描边款，跟旁边的「预约试驾」实心款区分开 */
.header-cs-btn { border-color: var(--red); color: var(--red); background: #fff; }
.header-cs-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
/* 桌面端只留耳机图标：导航条里已经有「在线客服」文字入口，
   同一行再摆一遍同名文字就成了重复，改成图标按钮仍占住右上角这个位置。 */
.header-actions .btn.header-cs-btn { width: 36px; padding: 0; }
.header-cs-btn img { display: block; flex: none; }
.header-cs-btn__label { display: none; }

.nav-toggle { display: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.ghost { background: transparent; }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }

/* ---------- 首屏 ---------- */
.hero {
  padding: 64px 0 40px;
  background: linear-gradient(180deg, #fff 0%, var(--soft) 100%);
}
.hero h1 { font-size: 40px; letter-spacing: -.5px; }
.hero p { color: var(--muted); font-size: 17px; max-width: 680px; }

.hero-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }

.section { padding: 56px 0; }
.section.soft { background: var(--soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head h2 { font-size: 28px; margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- 车型卡片 ---------- */
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

.model-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff;
  transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column;
}
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #f3c1c6; }
.model-card .thumb { aspect-ratio: 16 / 10; background: #f7f8fa; overflow: hidden; padding: 6px; }
.model-card .thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.model-card:hover .thumb img { transform: scale(1.04); }
.model-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.model-card h3 { font-size: 19px; margin: 0; }
.model-card .price { color: var(--red); font-weight: 700; }
.model-card .meta { color: var(--muted); font-size: 13px; }
.model-card .more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }

.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; }

/* ---------- 筛选 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: 14px; color: var(--text);
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 表单 ---------- */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.field > span { font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  /* 16px 起：iOS 聚焦不再强制放大整页 */
  font-size: 16px; font-family: inherit; color: var(--ink); background: #fff;
  transition: border-color .16s, box-shadow .16s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(230, 0, 18, .1);
}
.field textarea { min-height: 96px; resize: vertical; }
.field.full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; }

.alert { border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-top: 16px; }
.alert.info { background: #eff6ff; color: #1d4ed8; }
.alert.error { background: #fef2f2; color: #b91c1c; }
.alert.success { background: #ecfdf5; color: #047857; }

/* ---------- 详情 ---------- */
.detail-hero { background: linear-gradient(120deg, #101319 0%, #23293a 60%, #3a1f22 100%); color: #fff; padding: 48px 0; }
.detail-hero h1 { color: #fff; font-size: 38px; margin-bottom: 6px; }
.detail-hero .en { color: rgba(255, 255, 255, .55); letter-spacing: .3em; font-size: 13px; }
.detail-hero .price { font-size: 24px; font-weight: 700; color: #ffb3b9; margin: 14px 0; }
.detail-hero img { border-radius: var(--radius); }

.detail-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { text-align: left; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 38%; color: var(--muted); font-weight: 500; }

.color-list { display: flex; flex-wrap: wrap; gap: 10px; }
.color-pill { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: #fff; }

/* ---------- 列表 / 资讯 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.news-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-card .cover { aspect-ratio: 16 / 9; background: var(--soft); }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.news-card time { color: var(--muted); font-size: 13px; }
.news-card h3 { font-size: 18px; margin: 0; }
.news-card p { color: var(--muted); font-size: 14px; margin: 0; }

.article { max-width: 820px; margin: 0 auto; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.article .content p { font-size: 16px; line-height: 1.9; color: var(--text); }
.article .content h2 { font-size: 22px; margin-top: 32px; }
.article .cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }

/* ---------- 经销商 ---------- */
.dealer-list { display: grid; gap: 16px; }
.dealer-item { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: #fff; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.dealer-item h3 { font-size: 17px; margin: 0 0 6px; }
.dealer-item .addr { color: var(--muted); font-size: 14px; }
.dealer-item .tel { font-weight: 700; color: var(--red); }

/* ---------- 召回结果 ---------- */
.result-card { border-radius: var(--radius); border: 1px solid var(--line); padding: 26px; margin-top: 24px; }
.result-card.affected { border-color: #fecaca; background: #fff7f7; }
.result-card.safe { border-color: #bbf7d0; background: #f4fdf8; }
.result-card.pending { border-color: #e2e8f0; background: #f8fafc; }
/* 召回页：已登录直接展示时的信息条，以及结果卡片底部的操作区 */
.recall-self {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #f7f8fa; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 18px; font-size: 14px; color: var(--muted);
}
.recall-self__text strong { color: var(--ink); font-weight: 600; }
.recall-self[hidden], .form-card[hidden] { display: none; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.result-card h2 { font-size: 22px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-top: 16px; }
.kv div { font-size: 14px; color: var(--muted); }
.kv strong { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0f1218; color: rgba(255, 255, 255, .72); padding: 52px 0 26px; margin-top: 60px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { display: block; padding: 5px 0; font-size: 14px; color: rgba(255, 255, 255, .7); }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 34px; padding-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .45); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer .brand-line { font-weight: 800; letter-spacing: .2em; color: #fff; font-size: 17px; margin-bottom: 10px; }

/* ---------- 客服浮窗 / 提示 ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast { background: #101319; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .22); animation: toast-in .22s ease; max-width: 320px; }
.toast.error { background: #b91c1c; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.loading-dots { display: inline-flex; gap: 6px; }
.loading-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-split, .detail-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .site-header .bar { height: 60px; gap: 12px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 60px; margin: 0; padding: 10px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; gap: 2px;
    display: none; box-shadow: 0 16px 30px rgba(16, 24, 40, .08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 12px; border-radius: 10px; }
  .header-actions .btn { display: none; }
  /* 客服入口在手机上保留：会员最常用的动作就是找客服，藏进汉堡菜单反而多一步。
     窄屏导航收进汉堡菜单了，这里补回文字，跟对照站 member-home.html 右上角一致。 */
  .header-actions .btn.header-cs-btn { display: inline-flex; width: auto; height: 36px; padding: 0 14px; font-size: 13px; }
  .header-cs-btn__label { display: inline; }
  .hero { padding: 40px 0 26px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .section { padding: 36px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-head h2 { font-size: 22px; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .model-card .body { padding: 14px; }
  .model-card h3 { font-size: 16px; }
  .news-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px; }
  .kv { grid-template-columns: 1fr; }
  .detail-hero { padding: 32px 0; }
  .detail-hero h1 { font-size: 28px; }
  .site-footer { padding: 36px 0 20px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 420px) {
  .model-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .btn { height: 42px; padding: 0 18px; font-size: 14px; }
}

/* ---------- 页脚「服务信息」链接区（对照站 home-footer__links） ---------- */
.footer-links {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-links__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  padding: 4px 0;
}
/* 覆盖 .site-footer a 的 block，链接行内排 */
.site-footer .footer-links a,
.site-footer .footer-commit summary {
  display: inline-block;
  padding: 2px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
  cursor: pointer;
}
.site-footer .footer-links a:hover,
.site-footer .footer-commit summary:hover { color: #fff; }
.footer-commit { position: relative; }
.footer-commit summary {
  list-style: none;
  border-bottom: 1px dashed rgba(255, 255, 255, .28);
}
.footer-commit summary::-webkit-details-marker { display: none; }
.footer-commit__panel {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
}
.site-footer .footer-commit__panel a { font-size: 12.5px; color: rgba(255, 255, 255, .68); }
@media (max-width: 720px) {
  .footer-links__row { gap: 4px 16px; }
  .site-footer .footer-links a,
  .site-footer .footer-commit summary { font-size: 12px; }
}
