/* 客户端 H5 —— 微信风格 · 简洁商务 */
:root {
  --primary: #1463d7;
  --primary-dark: #0b4ca8;
  --ink: #102a43;
  --bg: #f3f6fa;
  --card: #ffffff;
  --text: #1c2430;
  --text-sub: #7a8699;
  --line: #e8ecf2;
  --danger: #e64340;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); /* 底部导航高度 + iPhone 安全区 */
}
#app { max-width: 640px; margin: 0 auto; min-height: 100%; position: relative; }

/* 顶部联系条 */
.topbar {
  position: sticky; top: 0; z-index: 60;
  max-width: 640px; margin: 0 auto;
  background: linear-gradient(110deg, #102a43, #1463d7);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 12px; font-size: 12.5px;
}
.topbar .tb-brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; letter-spacing: .5px; display:flex; align-items:center; gap:7px; }
.brand-mark { width:24px; height:24px; border-radius:8px; background:linear-gradient(135deg,#ffbf54,#f17c36); display:inline-flex; justify-content:center; align-items:center; font-weight:900; font-size:14px; color:#fff; box-shadow:0 2px 7px rgba(0,0,0,.2); }
.topbar .tb-brand b { font-weight: 800; font-size: 15px; }
.topbar .tb-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.topbar .tb-wx {
  background: rgba(255,255,255,.18); font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 14px; border: 1px solid rgba(255,255,255,.35);
  white-space: nowrap; cursor: pointer;
}
.topbar .tb-wx i { font-style: normal; font-size: 10px; opacity: .85; margin-left: 1px; }
.topbar .tb-wx:active { background: rgba(255,255,255,.32); }
.topbar .tb-phone {
  background: #ff9f1a; color: #fff; text-decoration: none;
  font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 14px;
  white-space: nowrap;
}
.topbar .tb-phone:active { background: #f08c00; }
@media (min-width: 641px) {
  .topbar { border-radius: 0; }
}

/* 报价页水印 */
#watermark {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background-repeat: repeat; opacity: 1;
}

/* 顶部 */
.header {
  background: radial-gradient(circle at 85% 0%, rgba(100,183,255,.55), transparent 32%), linear-gradient(135deg, #102a43, #1463d7);
  color: #fff; padding: 16px 16px 15px;
  box-shadow: inset 0 -1px rgba(255,255,255,.11);
}
.header h1 { font-size: 15.5px; font-weight: 700; letter-spacing: 1px; display: inline-block; }
.header .sub { margin-top: 4px; font-size: 11.5px; opacity: .92; }
.header .sub .dot { margin: 0 6px; opacity: .5; }
.header .brand-line { margin-bottom: 6px; font-size: 11.5px; padding: 3px 10px; }
/* 详情页头部：返回按钮 + 标题 */
.header.detail-header { display: flex; align-items: center; gap: 12px; }
.header.detail-header .back-btn {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s;
}
.header.detail-header .back-btn:active { background: rgba(255,255,255,.32); }
.header.detail-header .dh-title { flex: 1; min-width: 0; }
.header.detail-header .dh-title h1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 首页交易保障条 */
.trust-bar {
  display: flex; margin: -5px 10px 0; background: var(--card); border-radius: 14px;
  padding: 12px 4px 10px; box-shadow: 0 8px 22px rgba(16,42,67,.10); position:relative; z-index:2;
}
.trust-bar .tb-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
}
.trust-bar .tb-item + .tb-item::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 26px; background: var(--line);
}
.trust-bar .tb-ico {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.trust-bar .tb-txt { font-size: 11.5px; color: var(--text-sub); white-space: nowrap; }
.trust-bar .tb-txt b { color: var(--text); font-weight: 700; }

/* 单行保障条（列表/详情/下单页） */
.trust-line {
  margin: 8px 10px 0; background: #eaf6ef; color: #1d7a45; border-radius: 7px;
  padding: 6px 10px; font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.trust-line .tl-dot { margin: 0 5px; opacity: .45; }

/* 搜索 */
.search-box {
  margin: 12px 10px 0; background: var(--card); border-radius: 12px;
  display: flex; align-items: center; padding: 7px 13px; gap: 8px;
  box-shadow: 0 5px 16px rgba(16,42,67,.07); border:1px solid rgba(20,99,215,.08);
}
.search-box input { border: 0; outline: 0; flex: 1; font-size: 13.5px; background: transparent; }
.search-box svg { flex-shrink: 0; }

/* 分类 chips */
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px 2px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; padding: 4px 13px; border-radius: 15px; background: var(--card);
  color: var(--text-sub); font-size: 12.5px; border: 1px solid var(--line); cursor: pointer; transition:all .18s ease;
}
.cat-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 区块标题 */
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
.section-title h2 { font-size: 14.5px; font-weight: 700; }
.section-title span { font-size: 11px; color: var(--text-sub); }

/* 卡片 */
.card { background: var(--card); border-radius: 14px; margin: 0 10px 9px; padding: 12px 13px; box-shadow: 0 3px 14px rgba(28,36,48,.055); }
.model-card { cursor: pointer; transition:transform .16s ease, box-shadow .16s ease; border:1px solid rgba(16,42,67,.035); }
.model-card:active { transform:scale(.98); box-shadow:0 1px 5px rgba(28,36,48,.08); }
.model-card .mc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.model-card .mc-name { font-size: 14.5px; font-weight: 700; }
.model-card .mc-btn {
  font-size: 11.5px; color: var(--primary); border: 1px solid var(--primary);
  padding: 3px 9px; border-radius: 13px; background: #f0f6ff;
}
.storage-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.storage-tag {
  background: #f5f8fd; border: 1px solid #e5edf8; border-radius: 8px;
  padding: 4px 8px; font-size: 12px; color: var(--text-sub);
}
.storage-tag b { color: var(--danger); font-size: 13px; font-weight: 700; margin-left: 3px; }

/* 首页热门机型：双列网格，一屏看更多 */
#hot-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 10px; }
#hot-list .model-card { margin: 0; }
#hot-list .mc-head { align-items:flex-start; }
#hot-list .mc-btn { flex-shrink:0; }

/* 列表报价行 */
.quote-list-card { padding:4px 14px; overflow:hidden; }
.list-summary { color:var(--text-sub); font-size:12px; margin:10px 13px 7px; }
.list-summary b { color:var(--primary); }
.quote-row { display: flex; align-items: center; padding: 12px 1px; border-bottom: 1px solid #eef2f7; }
.quote-row:last-child { border-bottom: 0; }
.qr-main { flex: 1; min-width: 0; }
.qr-model { font-weight: 750; font-size: 14px; color:var(--ink); }
.qr-tags { margin-top: 2px; display: flex; gap: 4px; flex-wrap: wrap; }
.mini-tag { font-size: 10.5px; background: #f0f3f8; color: var(--text-sub); border-radius: 3px; padding: 1px 5px; }
.qr-price { text-align: right; margin: 0 8px; }
.qr-price .p { color: #e55336; font-weight: 800; font-size: 15.5px; }
.qr-price .p small { font-size: 10px; font-weight: 400; color: var(--text-sub); }
.qr-price .moq { font-size: 10px; color: var(--text-sub); margin-top: 1px; }
.btn-add {
  background: var(--primary); color: #fff; border: 0; border-radius: 7px;
  padding: 5px 9px; font-size: 11.5px; cursor: pointer; flex-shrink: 0;
}
.btn-add:active { background: var(--primary-dark); }

/* 详情 */
.detail-groups .dg-title { font-size: 13px; font-weight: 700; margin: 9px 0 3px; color: var(--text); }
.dg-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f0f3f7; }
.dg-row .cond { font-size: 13px; }
.dg-row .price { color: var(--danger); font-weight: 800; font-size: 15px; }
.notice-bar {
  margin: 8px 10px 0; background: #fff8e6; color: #b8860b; font-size: 11.5px;
  border-radius: 7px; padding: 7px 10px; line-height: 1.5;
}

/* 采购车 & 结算 */
.cart-item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci-info { flex: 1; }
.ci-name { font-weight: 700; font-size: 15px; }
.ci-sub { font-size: 12.5px; color: var(--text-sub); margin-top: 3px; }
.ci-sub .price { color: var(--danger); font-weight: 700; }
.qty-ctrl { display: flex; align-items: center; gap: 10px; }
.qty-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 16px; color: var(--text); cursor: pointer; }
.qty-num { min-width: 30px; text-align: center; font-weight: 700; }
.ci-subtotal { width: 76px; text-align: right; color: var(--danger); font-weight: 800; font-size: 15px; }
.ci-del { color: var(--text-sub); font-size: 12px; padding: 6px; cursor: pointer; }

/* 表单 */
.form-card .field { margin-bottom: 14px; }
.form-card label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.form-card input, .form-card textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-size: 14.5px; outline: none; background: #fafbfd; font-family: inherit;
}
.form-card input:focus, .form-card textarea:focus { border-color: var(--primary); background: #fff; }
.form-card textarea { height: 80px; resize: none; }

/* 主按钮 */
.btn-primary {
  display: block; width: calc(100% - 24px); margin: 16px 12px;
  background: linear-gradient(135deg, var(--primary), #287eea); color: #fff; border: 0; border-radius: 12px;
  padding: 13px; font-size: 16px; font-weight: 700; cursor: pointer; text-align: center;
}
.btn-primary:active { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .5; }

/* 成功页 */
.success-wrap { text-align: center; padding: 50px 24px 20px; }
.success-icon { width: 68px; height: 68px; border-radius: 50%; background: #e8f7ee; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success-wrap h2 { font-size: 20px; margin-bottom: 8px; }
.success-wrap p { color: var(--text-sub); font-size: 13.5px; line-height: 1.6; }
.order-no-box { margin: 18px auto; background: var(--card); border-radius: 10px; padding: 14px; }
.order-no-box .no { font-size: 19px; font-weight: 800; letter-spacing: 1px; color: var(--primary); }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 50; padding-bottom: env(safe-area-inset-bottom); box-shadow:0 -4px 16px rgba(16,42,67,.07);
}
.tab-item {
  flex: 1; text-align: center; padding: 8px 0 6px; color: var(--text-sub);
  font-size: 10.5px; cursor: pointer; position: relative; text-decoration: none; display: block;
}
.tab-item svg { display: block; margin: 0 auto 2px; }
.tab-item.active { color: var(--primary); }
.tab-badge {
  position: absolute; top: 2px; right: calc(50% - 22px); background: var(--danger);
  color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* 空状态 */
.empty { text-align: center; color: var(--text-sub); padding: 60px 0 40px; font-size: 14px; }
.empty .big { font-size: 40px; margin-bottom: 10px; opacity: .4; }

/* toast */
#toast {
  position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75); color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 14px; z-index: 999; display: none; max-width: 80%; text-align: center;
}

/* 售后保障卡 */
.after-sales { border: 1px solid #d9f0e3; }
.after-sales .as-title { font-size: 15px; font-weight: 800; margin-bottom: 8px; color: #1d8a4e; }
.after-sales .as-body { font-size: 12.8px; color: var(--text-sub); line-height: 1.8; }
.after-sales .as-sec { font-weight: 800; color: var(--text); margin: 10px 0 2px; font-size: 13.5px; }
.after-sales .as-line { margin: 2px 0; }

/* 联系页 */
.contact-card { text-align: center; padding: 30px 16px; }
.contact-card .avatar { width: 60px; height: 60px; border-radius: 14px; background: var(--primary); color: #fff; font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.contact-line { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; display: flex; justify-content: space-between; font-size: 14px; }
.contact-line span:first-child { color: var(--text-sub); }

/* 顶部品牌行 */
.brand-line {
  font-size: 12.5px; opacity: .95; margin-bottom: 8px;
  background: rgba(255,255,255,.16); display: inline-block;
  padding: 4px 12px; border-radius: 14px; letter-spacing: .5px;
}

/* 品牌广告卡 */
.footer-ad { border: 1px solid #dbe7fb; }
.footer-ad .fa-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-ad .fa-logo {
  width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, #1a6df0, #3f8bfd);
  color: #fff; font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.footer-ad .fa-brand { font-size: 16px; font-weight: 800; }
.footer-ad .fa-slogan { font-size: 11.5px; color: var(--text-sub); margin-top: 2px; }
.footer-ad .fa-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.footer-ad .fa-label { font-size: 12px; color: var(--text-sub); flex-shrink: 0; }
.wx-chip {
  background: #f0f6ff; color: var(--primary); font-size: 12.5px; font-weight: 600;
  border: 1px solid #d5e5fc; border-radius: 14px; padding: 4px 10px; cursor: pointer;
}
.wx-chip i { font-style: normal; font-size: 10.5px; color: var(--text-sub); margin-left: 2px; }
.wx-chip:active { background: #dcebff; }
.phone-link { color: var(--primary); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.footer-ad.compact .fa-slogan { display: none; }

/* 联系页微信列表 */
.wx-val { display: flex; align-items: center; gap: 8px; }
.copy-btn {
  background: var(--primary); color: #fff; font-size: 11.5px; border-radius: 12px;
  padding: 3px 10px; cursor: pointer; flex-shrink: 0;
}
.copy-btn:active { background: var(--primary-dark); }

/* 下单路径：金额与下一步操作始终清晰可见 */
.cart-total { margin-bottom:88px; background:linear-gradient(135deg,#fff,#f6faff); }
.checkout-dock { position:fixed; z-index:55; left:50%; bottom:calc(58px + env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(620px, calc(100% - 20px)); border-radius:14px; padding:10px 10px 10px 15px; background:rgba(255,255,255,.96); box-shadow:0 8px 28px rgba(16,42,67,.18); border:1px solid #e6edf7; display:flex; align-items:center; justify-content:space-between; backdrop-filter:blur(12px); }
.checkout-dock span { display:block; color:var(--text-sub); font-size:11px; margin-bottom:2px; }
.checkout-dock b { color:#e55336; font-size:20px; }
.checkout-dock button { border:0; background:linear-gradient(135deg,var(--primary),#287eea); color:white; font-family:inherit; font-weight:700; padding:11px 23px; border-radius:10px; font-size:14px; }
.checkout-note { margin:13px 12px 0; padding:12px 13px; border-radius:12px; background:#eaf3ff; color:var(--primary-dark); font-size:12px; }
.checkout-note b { display:block; font-size:13.5px; margin-bottom:4px; }
.checkout-note span { color:#55718e; }

@media (min-width: 641px) {
  body { background: #e9edf3; }
  #app { box-shadow: 0 0 30px rgba(0,0,0,.08); min-height: 100vh; background: var(--bg); }
}
