/* =========================================================
   style.css —— 静态生成版（移动优先，桌面自适应）
   ========================================================= */

:root {
  --brand: #0b6cff;
  --brand-dark: #0850c4;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #9aa3af;
  --line: #e8ebf0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(17, 24, 39, .06);
  --maxw: 1180px;
  --wa: #25d366;
  --topbar-h: 56px;
  --tabbar-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.content-narrow { max-width: 780px; }
.muted { color: var(--ink-3); font-size: 13px; }
.link-strong { color: var(--brand); font-weight: 700; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 60;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
}
.topbar .logo { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .3px; font-size: 15px; }
.topbar .logo .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--brand), #38bdf8);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 900;
}
.topbar .spacer { flex: 1; }
.topbar .desktop-nav { display: none; gap: 2px; }
.topbar .desktop-nav a {
  padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-2);
}
.topbar .desktop-nav a:hover { background: #f3f6fb; color: var(--brand); }
.topbar .desktop-nav a.on { color: var(--brand); background: #eff6ff; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.lang-switch a { padding: 5px 9px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.lang-switch a.on { background: var(--brand); color: #fff; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); flex: none; }
.icon-btn:hover { background: #f3f6fb; }

/* ---------- 底部 tabbar ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; height: var(--tabbar-h); z-index: 60;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; color: var(--ink-3); font-weight: 600;
}
.tabbar a svg { width: 21px; height: 21px; }
.tabbar a.on { color: var(--brand); }

/* ---------- 主体 ---------- */
main { padding-top: calc(var(--topbar-h) + 14px); padding-bottom: calc(var(--tabbar-h) + 26px); }
.page-h1 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; }
.lead { font-size: 13.5px; color: var(--ink-2); margin: 6px 0 0; }
.backlink {
  display: inline-block; margin-bottom: 10px; padding: 7px 13px; font-size: 13px;
  font-weight: 700; color: var(--brand); background: #fff; border-radius: 9px; border: 1px solid var(--line);
}

/* ---------- Hero ---------- */
.hero { margin: 0 12px 14px; border-radius: 18px; overflow: hidden; position: relative; color: #fff; }
.hero .slide { display: none; padding: 26px 22px 30px; min-height: 168px; }
.hero .slide.on { display: block; animation: fade .45s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hero .slide.a { background: linear-gradient(135deg, #0b6cff, #1e3a8a); }
.hero .slide.b { background: linear-gradient(135deg, #0e7490, #0b6cff); }
.hero .slide.c { background: linear-gradient(135deg, #7c3aed, #0b6cff); }
.hero h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.hero p { margin: 0; opacity: .9; font-size: 13.5px; }
.hero .dots { position: absolute; bottom: 12px; left: 22px; display: flex; gap: 5px; }
.hero .dots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.45); }
.hero .dots i.on { width: 16px; background: #fff; }

/* ---------- 区块标题 ---------- */
.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 12px; }
.sec-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.sec-head .more { margin-left: auto; font-size: 12.5px; color: var(--brand); font-weight: 700; white-space: nowrap; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 12px 4px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 21px; color: var(--brand); line-height: 1.2; }
.stat span { font-size: 12px; color: var(--ink-2); }

/* ---------- 品牌宫格 ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.brand-grid a {
  background: var(--card); border-radius: 12px; padding: 12px 6px; text-align: center;
  font-size: 11.5px; font-weight: 700; box-shadow: var(--shadow); line-height: 1.25;
  border: 1px solid transparent; transition: .15s;
}
.brand-grid a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 产品卡 ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.prod-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  border: 1px solid transparent; transition: .15s;
}
.prod-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.prod-thumb {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative;
  background: linear-gradient(135deg, #eef2f8, #dbe6f5); color: var(--ink-3);
}
.thumb-inner { text-align: center; }
.prod-thumb .size { font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.prod-thumb .model { font-size: 20px; font-weight: 900; color: var(--brand-dark); }
.prod-thumb .bname { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.prod-thumb .tag {
  position: absolute; top: 8px; left: 8px; background: rgba(11,108,255,.92);
  color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px;
}
.prod-thumb .stock {
  position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.94);
  color: #0f9d58; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px;
}
.prod-body { padding: 10px 11px 12px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.prod-body .fit { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.prod-body .name { font-size: 13px; font-weight: 700; line-height: 1.35; }
.price { display: flex; align-items: baseline; gap: 4px; }
.price b { font-size: 16px; color: #e8590c; font-weight: 900; }
.price span { font-size: 11px; color: var(--ink-3); }
.prod-foot { display: flex; margin-top: auto; padding-top: 4px; }
.btn-inq {
  flex: 1; background: var(--brand); color: #fff; border-radius: 9px; padding: 7px 0;
  font-size: 12px; font-weight: 800; text-align: center;
}
.btn-inq:hover { background: var(--brand-dark); }
.btn-wa {
  display: block; margin-top: 8px; background: var(--wa); color: #fff; border-radius: 11px;
  padding: 11px 0; font-weight: 800; font-size: 14px; text-align: center;
}
.btn-wa.block { margin-top: 10px; }

/* ---------- 列表页布局（侧栏 + 主区） ---------- */
.layout { display: block; }
.sidebar { margin-bottom: 14px; }
.side-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px; }
.side-title { font-size: 11px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.side-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.side-link span { flex: 1; }
.side-link b { font-size: 11px; color: var(--ink-3); font-weight: 700; }
.side-link:hover { background: #f3f6fb; color: var(--brand); }
.side-link.on { background: #eff6ff; color: var(--brand); font-weight: 800; }
.side-link.on b { color: var(--brand); }

/* 移动端：侧栏变成横向 chips */
@media (max-width: 899px) {
  .sidebar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .side-box { display: flex; align-items: center; gap: 6px; padding: 6px; margin: 0; flex: none; }
  .side-title { display: none; }
  .side-link { padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; }
  .side-link b { display: none; }
  .side-link.on { border-color: var(--brand); }
}

/* ---------- 卡片 / 规格 ---------- */
.card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin: 0 12px 12px; }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.card.empty { text-align: center; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 7px 10px; font-size: 13px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }
.chips-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-inline span { font-size: 11.5px; background: #f1f5f9; color: var(--ink-2); padding: 3px 9px; border-radius: 99px; font-weight: 600; }
.kv-block { display: grid; gap: 9px; font-size: 13.5px; }
.kv-block div { display: flex; gap: 8px; }
.kv-block b { color: var(--ink-3); font-weight: 600; min-width: 92px; flex: none; }

/* ---------- 详情页 ---------- */
.detail-wrap { display: block; }
.gallery { margin: 0 12px 12px; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.shot { margin: 0; background: linear-gradient(135deg, #eef2f8, #dbe6f5); }
.shot img { width: 100%; }
.p-title { margin: 0 0 10px; font-size: 18px; font-weight: 800; line-height: 1.35; }
.p-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tagpill {
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px;
  background: #eff6ff; color: var(--brand-dark);
}
.price-card .price { margin-bottom: 4px; }
.price-card .price b { font-size: 26px; }

/* ---------- 表单 ---------- */
.form { display: grid; gap: 10px; }
.form label { font-size: 12px; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 4px; }
.form input, .form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 14px; background: #fbfcfe; color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid rgba(11,108,255,.25); border-color: var(--brand); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.submit { background: var(--brand); color: #fff; border-radius: 11px; padding: 12px; font-weight: 800; font-size: 14px; width: 100%; }
.submit:hover { background: var(--brand-dark); }

/* ---------- 教程 ---------- */
.tut { background: #fff; border-radius: var(--radius); padding: 13px 14px; box-shadow: var(--shadow); margin-bottom: 9px; display: flex; gap: 11px; align-items: center; }
.tut .play { width: 38px; height: 38px; border-radius: 99px; background: #eff6ff; color: var(--brand); display: grid; place-items: center; flex: none; }
.tut .t { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.tut .m { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ---------- 悬浮 WhatsApp ---------- */
.wa-float {
  position: fixed; right: 14px; bottom: calc(var(--tabbar-h) + 14px); z-index: 70;
  width: 52px; height: 52px; border-radius: 99px; background: var(--wa);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(37, 211, 102, .4);
}
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------- 页脚 ---------- */
.foot { background: #0f172a; color: #94a3b8; padding: 26px 16px 30px; font-size: 12.5px; margin-top: 26px; }
.foot h4 { color: #fff; margin: 0 0 8px; font-size: 13px; }
.foot a { color: #cbd5e1; }
.foot .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.foot .socials { display: flex; gap: 8px; margin-top: 12px; }
.foot .socials a { width: 34px; height: 34px; border-radius: 9px; background: #1e293b; display: grid; place-items: center; }
.foot .socials svg { width: 17px; height: 17px; fill: #cbd5e1; }
.foot .copy { margin-top: 18px; padding-top: 14px; border-top: 1px solid #1e293b; font-size: 11.5px; }

/* ---------- 桌面端 ---------- */
@media (min-width: 900px) {
  :root { --tabbar-h: 0px; }
  .tabbar { display: none; }
  .topbar .desktop-nav { display: flex; }
  .wa-float { bottom: 22px; right: 22px; }
  main { padding-bottom: 30px; }
  .hero { margin: 0 auto 22px; max-width: var(--maxw); }
  .hero .slide { min-height: 250px; padding: 44px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 16px; max-width: 540px; }
  .stats { grid-template-columns: repeat(4, 1fr); margin: 18px auto 4px; max-width: var(--maxw); }
  .brand-grid { grid-template-columns: repeat(8, 1fr); }
  .prod-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .card, .gallery, .tut { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
  .prod-grid, .stats, .brand-grid, .layout { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
  .layout { display: grid; grid-template-columns: 210px 1fr; gap: 20px; align-items: start; }
  .sidebar { position: sticky; top: calc(var(--topbar-h) + 16px); }
  .detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; max-width: var(--maxw); margin: 0 auto; }
  .detail-main .card, .detail-side .card { margin: 0 0 12px; }
  .detail-side { position: sticky; top: calc(var(--topbar-h) + 16px); }
  .p-title { font-size: 22px; }
  .foot .cols { grid-template-columns: 2fr 1fr 1fr; }
}
