/* ============================================================
   成都先进电子 - 官网样式表
   设计风格：现代科技蓝 / 响应式 / B2B 元器件贸易
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --primary: #0a5ed8;        /* 主蓝 */
  --primary-dark: #0747a6;   /* 深蓝 */
  --primary-light: #e8f1ff;  /* 浅蓝底 */
  --accent: #00b4d8;         /* 青色点缀 */
  /* 状态色令牌：成功/警告/危险反馈统一取用，避免散落硬编码色值 */
  --success: #1a9d5a;
  /* 成功态文字/按钮专用深色：--success 作图标/底纹够用，但白字压在上面仅 3.49:1；
     复制成功等小号白字按钮改用本令牌（对白 ≥4.5:1），不改动 --success 的装饰用途。 */
  --success-ink: #137a46;
  --success-soft: #e8f7ef;
  --warning: #b8860b;
  --warning-soft: #fdf4e0;
  --danger: #c0392b;
  --danger-ink: #c0392b;       /* 失败态前景：浅色沿用 --danger 原值，暗色块覆盖为亮红提升对比 */
  --danger-soft: #fff0f0;
  --ink: #16233a;            /* 主文字 */
  --ink-2: #4a5a72;          /* 次文字 */
  --ink-3: #5f6d82;          /* 弱文字（加深提升可读性） */
  --line: #e6ebf2;           /* 描边 */
  --bg: #ffffff;
  --bg-soft: #f5f8fc;        /* 柔灰底 */
  --white: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  /* 小控件统一圆角：搜索框/按钮/弹窗关闭键/复制键等共用一套，
     换肤时只改这一个令牌，避免各处硬编码 6/7/8px 导致皮肤切换后仍不统一。 */
  --radius-control: 8px;
  /* 品牌色固定令牌：微信绿 / QQ 蓝不随主题变化，避免各弹窗各写一份硬编码 */
  --wechat: #07c160; --wechat-soft: #e7f8ee;
  --qq: #12b7f5; --qq-soft: #e8f2ff;
  /* 品牌深色调：浅底上的小字/图标需要 ≥4.5:1（文字）/3:1（图标），
     原品牌色亮版压浅底仅 2.0~2.4:1，改用深色令牌；--wechat/--qq 仍保留作纯装饰点缀。 */
  --wechat-deep: #0a7d42; --wechat-ink: #067a3c;
  --qq-deep: #0a72a8;
  --danger-line: #ffc9c9;
  --shadow-sm: 0 2px 10px rgba(16, 42, 84, .06);
  --shadow: 0 10px 34px rgba(16, 42, 84, .10);
  --shadow-lg: 0 24px 60px rgba(16, 42, 84, .16);
  --container: 1200px;
  --header-h: 66px;
  /* 锚点标题对齐：目标位置 = 顶栏高 + 呼吸间距；各区块用自身 padding-top 反向抵消 */
  --anchor-gap: 14px;
  /* Header logo D1 双线版：两行字整体≈双线徽标墨框的 1.06 倍。
     原先按包口径 K=0.3688 放到整图 67.1px（徽标 59px），与 14.5px 导航文字相比过大；
     现收一档到整图 48px（徽标约 42px，约为导航字高的 3 倍），顶栏同步 74→66px。
     缩放只改 --logo-h，不改 SVG；.logo 的垂直居中规则保证与导航同一中线。 */
  --xj-nav: 15.5px;
  --logo-h: 48px;
  /* 主题相关（默认科技蓝） */
  --hero-1: #06265c;
  --hero-2: #0a5ed8;
  --hero-3: #0d78e0;
  --hero-hl: #7fd4ff;
  --price: #c2410c;              /* 价格强调色（加深至对白 ≥4.5:1），随主题/皮肤切换 */
  --primary-shadow: rgba(10,94,216,.28);
  --primary-shadow-lg: rgba(10,94,216,.38);
  --focus-ring: rgba(10,94,216,.12);
  --footer-bg: #0c1b33;
  --footer-text: #b9c6d8;
  --footer-muted: #9fb0c6;
  /* 缩略图底纹：细网格 + 中心柔光，让示意图卡片更精致；随主题/皮肤切换 */
  --thumb-grid: rgba(90,110,140,.10);
  --thumb-glow: rgba(90,110,140,.07);
  --thumb-bg:
    radial-gradient(circle at 50% 40%, var(--thumb-glow), transparent 62%),
    linear-gradient(var(--thumb-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--thumb-grid) 1px, transparent 1px),
    linear-gradient(145deg, #f7faff, #eef4fc);
  --thumb-size: auto, 24px 24px, 24px 24px, auto;
}

/* ============================================================
   多主题配色（html[data-theme] 切换，CSS 变量覆盖）
   ============================================================ */
html[data-theme="green"] {
  /* #0a8a5f 白字约 4.36:1、作文字色约 4.1:1，均略低于 AA 4.5:1；调深到 #06734f 两个场景同时达标 */
  --primary: #06734f; --primary-dark: #055a3d; --primary-light: #e6f7f0; --accent: #00a878;
  --hero-1: #053b2b; --hero-2: #0a8a5f; --hero-3: #12a876; --hero-hl: #7ff0c0;
  --price: #06734f; --primary-shadow: rgba(6,115,79,.28); --primary-shadow-lg: rgba(6,115,79,.38); --focus-ring: rgba(6,115,79,.14);
  --footer-bg: #0a2b20; --footer-text: #b7d4c6; --footer-muted: #93b9a6;
}
html[data-theme="purple"] {
  --primary: #6b46c1; --primary-dark: #50329b; --primary-light: #f0eaff; --accent: #9d6bff;
  --hero-1: #2b1a5e; --hero-2: #6b46c1; --hero-3: #8a5cf0; --hero-hl: #cbb6ff;
  --price: #6b46c1; --primary-shadow: rgba(107,70,193,.28); --primary-shadow-lg: rgba(107,70,193,.38); --focus-ring: rgba(107,70,193,.14);
  --footer-bg: #1c1440; --footer-text: #c3b9de; --footer-muted: #9f93c4;
}
html[data-theme="red"] {
  --primary: #c92a2a; --primary-dark: #9e1c1c; --primary-light: #ffecec; --accent: #ff6b6b;
  --hero-1: #4a0c0c; --hero-2: #c92a2a; --hero-3: #e54b4b; --hero-hl: #ffb3b3;
  --price: #c92a2a; --primary-shadow: rgba(201,42,42,.28); --primary-shadow-lg: rgba(201,42,42,.38); --focus-ring: rgba(201,42,42,.14);
  --footer-bg: #2f0d0d; --footer-text: #dcc0c0; --footer-muted: #bd9696;
}
html[data-theme="dark"] {
  --primary: #4d8dff; --primary-dark: #2f6fe0; --primary-light: #16233c; --accent: #22d3ee;
  --wechat-soft: rgba(7,193,96,.14); --qq-soft: rgba(18,183,245,.14);
  --ink: #e8eef7; --ink-2: #b6c2d4; --ink-3: #93a2b8;
  --line: #2a3852; --bg: #101725; --bg-soft: #0b1120; --white: #162033;
  --hero-1: #060d1c; --hero-2: #12284d; --hero-3: #1c4a7a; --hero-hl: #7cc4ff;
  --price: #ff922b; --primary-shadow: rgba(77,141,255,.30); --primary-shadow-lg: rgba(77,141,255,.42); --focus-ring: rgba(77,141,255,.18);
  --footer-bg: #070c16; --footer-text: #9fb0c6; --footer-muted: #7d8ea6;
  --danger-soft: rgba(255,107,107,.16); --success-soft: rgba(34,197,94,.16); --danger-ink: #ff9b9b;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .25);
  --shadow: 0 10px 34px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
  --thumb-grid: rgba(255,255,255,.05); --thumb-glow: rgba(124,196,255,.10);
  --thumb-bg:
    radial-gradient(circle at 50% 40%, var(--thumb-glow), transparent 62%),
    linear-gradient(var(--thumb-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--thumb-grid) 1px, transparent 1px),
    linear-gradient(145deg, #162033, #1c2840);
}
/* 深色主题：局部硬编码底色适配 */
html[data-theme="dark"] .stats-bar,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .brand-box,
html[data-theme="dark"] .cat-card,
html[data-theme="dark"] .card { background: var(--white); }
html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .modal-body .pd-img,
html[data-theme="dark"] .modal-product .pd-img { background: var(--thumb-bg); background-size: var(--thumb-size); }
html[data-theme="dark"] .form-control { background: var(--bg); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .modal { background: var(--white); color: var(--ink); }
html[data-theme="dark"] .chip,
html[data-theme="dark"] .product-search,
html[data-theme="dark"] .header-search,
html[data-theme="dark"] .btn-expand,
html[data-theme="dark"] .tel-item,
html[data-theme="dark"] .section-soft,
html[data-theme="dark"] .nav { background: var(--white); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .product-search input,
html[data-theme="dark"] .header-search input { color: var(--ink); }
html[data-theme="dark"] .product-img { background: var(--thumb-bg); background-size: var(--thumb-size); }
/* 暗色主题下主色 #4d8dff 上的白字仅约 3.2:1，低于 WCAG AA 正文 4.5:1；
   但 --primary 还用作深底上的文字色（此时 4d8dff 达标），故不能整体调深。
   只把"白字实底"控件改用 --primary-dark #2f6fe0（白字约 4.7:1），文字色场景保持原值。 */
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .product-tag,
html[data-theme="dark"] .header-search-btn,
html[data-theme="dark"] .product-search .ps-btn,
html[data-theme="dark"] .no-reset,
html[data-theme="dark"] .tel-call,
html[data-theme="dark"] .fab-btn.primary-fab { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
/* 反白 hover 同理：btn-outline / btn-inquiry / ps-clear 等悬停时白字落主色底 */
html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .btn-inquiry:hover,
html[data-theme="dark"] .product-search .ps-clear:hover,
html[data-theme="dark"] .wx-act:hover,
html[data-theme="dark"] .fab-btn:hover { background: var(--primary-dark); color: #fff; }
/* 暗夜黑顶栏：底色必须一起变深。否则白底 + 反白徽标 + 深色导航块/搜索框颜色全乱，
   且中文站名继承亮色 --ink 会变成白字白底看不见。底色用半透明深蓝，保留毛玻璃质感。 */
html[data-theme="dark"] .header { background: rgba(16,23,37,.92); border-bottom-color: var(--line); }
html[data-theme="dark"] .header.scrolled { background: rgba(16,23,37,.97); }
html[data-theme="dark"] .header .nav { background: transparent; }
html[data-theme="dark"] .header-search:focus-within { background: var(--bg); }
html[data-theme="dark"] .nav-toggle { background: var(--white); }
/* 暗夜黑经营品牌墙：卡片底色已随主题变深，文字必须跟着用亮色 --ink；
   同时去掉灰度滤镜和半透明（两者会进一步压低深色底上的对比度），否则品牌名看不清。 */
html[data-theme="dark"] .brand-box { color: var(--ink); filter: none; opacity: 1; }
html[data-theme="dark"] .brand-box:hover { color: var(--hero-hl); }
html[data-theme="dark"] .btn-expand { color: var(--hero-hl); }
/* 暗夜黑浮动按钮：原来写死白底，4 枚亮白圆钮在整页深色里很割裂；跟随 --white 并保留主色图标 */
html[data-theme="dark"] .fab-btn:not(.primary-fab) { background: var(--white); color: var(--primary); }
html[data-theme="dark"] .fab-btn .tip { background: var(--white); color: var(--ink); }
html[data-theme="dark"] .product-price { color: var(--price); }
/* 详情/弹窗强调色：用 class 而非内联，暗色主题才能覆盖（内联写死色会绕过主题） */
.price-strong { color: var(--price); }
.accent-strong { color: var(--primary); }
html[data-theme="dark"] .price-strong { color: var(--price); }
html[data-theme="dark"] .accent-strong { color: var(--hero-hl); }
/* 吸顶导航遮挡：锚点定位要对齐「标题」而不是区块边框盒。
   浏览器把 border-box 顶端停在 scroll-margin-top 处，区块自带 padding-top 会额外下推标题，
   因此按各类区块的 padding-top 逐组抵消，使 section-head 落在顶栏下方约 14px。 */
section[id] { scroll-margin-top: calc(var(--header-h) + var(--anchor-gap) - 88px); }       /* .section padding-top:88 → -8px */
#products.section { scroll-margin-top: calc(var(--header-h) + var(--anchor-gap) - 56px); } /* 产品区 padding-top:56 → 24px */
footer[id] { scroll-margin-top: calc(var(--header-h) + var(--anchor-gap) - 66px); }       /* 页脚 padding-top:66 → 14px */
#top { scroll-margin-top: 0; }                                                            /* 首页锚点回最顶 */

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
/* 统一键盘焦点圈：仅键盘导航时显示，鼠标点击不出现，兼顾可访问性与清爽观感 */
a:focus-visible, button:focus-visible, input:focus-visible, .cat-card:focus-visible, .product-card:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--radius-sm);
}
/* 跳转到主要内容：平时移出屏幕，键盘聚焦时出现在左上角，绕过整块导航（WCAG 2.4.1） */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; background: var(--white); color: var(--primary); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-weight: 700; }
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- 通用容器 ---------- */
.container { width: min(calc(100% - 40px), var(--container)); margin: 0 auto; }
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative;
  padding-left: 34px;
}
.section-head .eyebrow::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 26px; height: 2px;
  background: var(--primary);
  transform: translateY(-50%);
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 14px;
  color: var(--ink);
}
.section-head p { color: var(--ink-2); max-width: 620px; margin: 0 auto; font-size: 16px; line-height: 1.75; }
.section-head p.subtitle-wide { max-width: 900px; }
/* 语义类替代页面内联样式：前者让 CTA 与上一节贴合，后者让关于区标题保持与全局标题同一套字号字重 */
.section-flush-top { padding-top: 0; }
.about-text .eyebrow { display: inline-block; color: var(--primary); font-weight: 700; letter-spacing: 2px; font-size: 13px; }
.about-title { text-align: left; margin: 12px 0 20px; font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.5px; color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 22px var(--primary-shadow); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 28px var(--primary-shadow-lg); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
/* CTA 区白底主色按钮：原用内联 background 覆盖了 .btn-primary:hover，导致悬停无反馈。
   改用语义类，跟随主题变量，hover 有正常反馈（minimal 皮肤的 !important 仍兼容）。 */
.btn-inverse { background: var(--white, #fff); color: var(--primary); }
.btn-inverse:hover { background: var(--primary-light, #eaf2ff); color: var(--primary-dark, #0747a6); transform: translateY(-2px); }
.btn-lg { padding: 15px 32px; font-size: 16px; }

/* ---------- 顶部滚动进度条 ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 210; background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left center;
  pointer-events: none; opacity: .9;
}

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s, background .3s;
}
/* 吸顶栏底部品牌渐变线：未滚动低调、滚动后鲜明，强化"吸顶"的层次与品牌识别。
   伪元素盖在 border-bottom 之上（bottom:-1px），用主题变量故暗色/各皮肤自动适配。 */
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 18%, var(--accent) 50%, var(--primary) 82%, transparent 100%);
  opacity: .4; transition: opacity .3s; pointer-events: none;
}
.header.scrolled::after { opacity: 1; }
.header.scrolled { box-shadow: var(--shadow-sm); }
.header .container { height: 100%; display: flex; align-items: center; justify-content: flex-start; }
.nav { margin-left: 38px; }
/* ---------- W2 官方横版 Logo（徽标 + 中文 + 英文一体，206.49×56） ----------
   设计稿按真实 56px 显示高制作，直接用整图即可完整还原；浅底/深底两套分别适配浅色顶栏
   与暗色主题/深色页脚，按主题切换显示，杜绝反白滤镜导致的发虚。 */
/* 垂直对齐：logo 图片盒子与导航文字盒子必须共用一条水平中线。
   .logo 用 flex + align-items:center + line-height:0，消除 <img> 换行空白形成的匿名行盒基线偏移；
   D1 画布内容上下留白相等、字标组中心=画布中心，故图片几何中线=字标视觉中线。改动时勿移除。 */
.logo { display: flex; align-items: center; align-self: center; flex-shrink: 0; line-height: 0; transition: opacity .2s; }
.logo:hover { opacity: .82; }
/* D1 双线版整图：桌面固定高 48px（徽标约 42px），与导航文字保持约 3:1；移动端另设 40px；min-height 防止极端缩放过小 */
.logo-full { display: block; height: var(--logo-h); min-height: 30px; width: auto; object-fit: contain; }
.logo-full-dark { display: none; }
/* 暗夜黑顶栏：切换到反白版整图 */
html[data-theme="dark"] .header .logo-full-light { display: none; }
html[data-theme="dark"] .header .logo-full-dark { display: block; }
/* 旧版拆件样式保留但已不在模板使用（兼容历史缓存/自定义页面） */
.logo-mark-img { display: block; width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; justify-content: space-between; height: 44px; flex-shrink: 0; }
.logo-text strong { display: block; font-size: 23px; font-weight: 800; letter-spacing: .3px; line-height: 1.08; white-space: nowrap; text-align: justify; text-align-last: justify; }
.logo-text span { display: block; font-size: 11px; color: var(--ink-2); letter-spacing: .4px; line-height: 1.25; white-space: nowrap; text-align: justify; text-align-last: justify; }
.logo-img { display: block; height: 68px; width: auto; max-width: 280px; object-fit: contain; }
/* 页脚深蓝底：用官方反白版整图（无需滤镜） */
.footer-logo-img { opacity: .98; }
html[data-theme="dark"] .header .logo-mark-img { filter: brightness(0) invert(1); }
html[data-theme="dark"] .header .logo-text span { color: var(--ink-2); }
/* 站点名称仍可在后台修改：隐藏文本节点兜底（页脚用） */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* 数字等宽：避免统计数字随数值变化横向跳动（p.php 同类已修，首页补齐） */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 12px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink-2);
  border-radius: 6px;
  transition: .2s;
  position: relative;
  white-space: nowrap;
}
.nav a:hover { color: var(--primary); background: var(--bg-soft); }
.nav a.active { color: var(--primary); font-weight: 600; }
.nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2.5px; border-radius: 3px;
  background: var(--primary); /* 纯主色单色：比蓝青渐变更沉稳，配合克制的整站气质 */
}
.header-cta { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; justify-content: flex-end; margin-left: auto; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 4px 4px 4px 12px;
  background: var(--bg-soft, #f7f9fc); transition: .2s; width: 260px; flex-shrink: 1; min-width: 180px;
}
.header-search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--focus-ring); }
.header-search svg { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }
.header-search input { border: 0; outline: 0; background: transparent; flex: 1 1 auto; width: 100%; min-width: 0; font-size: 14px; color: var(--ink); }
.header-search input::placeholder { color: var(--ink-3); }
.header-search-btn {
  border: 0; border-radius: var(--radius-control); padding: 8px 16px; background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0; white-space: nowrap; min-height: 38px; transition: filter .2s;
}
.header-search-btn:hover { filter: brightness(1.08); }

.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius-control); background: #fff; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--hero-1) 0%, var(--hero-2) 62%, var(--hero-3) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
}
.hero::after {
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  right: -120px; top: -160px;
  background: radial-gradient(circle, rgba(0,180,216,.45), transparent 65%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 76px 0 80px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  padding: 6px 14px; border-radius: 30px;
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
  backdrop-filter: blur(4px);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.2); animation: badgePulse 2.4s ease-in-out infinite; }
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74,222,128,.2); }
  50% { box-shadow: 0 0 0 7px rgba(74,222,128,.05); }
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero h1 .hl { color: var(--hero-hl); }
.hero p.lead {
  font-size: 16px; color: rgba(255,255,255,.95); max-width: 620px; margin-bottom: 26px; line-height: 1.7;
  /* 至少占 5 行高度；文案完整显示、不再按行数裁剪（旧版裁剪成 4 行会把长简介截成省略号） */
  min-height: 149px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
/* 首页两个主按钮适当缩小高度（只作用于 Hero，不影响其它区块的 btn-lg） */
.hero-actions .btn { padding: 11px 26px; font-size: 15px; min-height: 0; }
/* 按钮内 SVG 必须显式给高度，否则内联 svg 默认 150px 会把按钮撑成竖长块 */
.hero-actions .btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.hero-search {
  margin-bottom: 18px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius-control);
  padding: 8px;
  display: flex; gap: 8px;
  backdrop-filter: blur(8px);
  width: 100%;
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
}
.hero-search input {
  flex: 1; border: 0; outline: 0; background: transparent; color: #fff;
  padding: 10px 14px; font-size: 14px;
}
/* 占位文字压在浅色渐变端：.78 透明度在翡翠绿等皮肤上仅 2.2:1，提到 .96 保证各皮肤达 AA */
.hero-search input::placeholder { color: rgba(255,255,255,.96); }
.hero-search button {
  border: 0; background: #fff; color: var(--primary);
  padding: 0 22px; border-radius: var(--radius-control); font-weight: 700; min-height: 38px;
  display: flex; align-items: center; gap: 7px;
}
/* 暗夜黑下 --primary=#4d8dff 作白底文字仅 3.2:1；改用已验证白底 4.7:1 的 --primary-dark。
   方向与前轮"白字实底按钮"相反（此处是深字压白底），单独处理，不影响其它主题。 */
html[data-theme="dark"] .hero-search button { color: var(--primary-dark); }
.hero-search button:hover { background: var(--primary-light); }
.hero-search button svg { width: 17px; height: 17px; }

/* Hero 右侧视觉卡 */
.hero-visual { position: relative; }
.hero-card {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  padding: 26px;
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px rgba(0,0,0,.2);
}
.hero-card h2 { font-size: 14px; letter-spacing: 1px; opacity: .85; margin-bottom: 18px; font-weight: 600; }
/* minmax(0,1fr) 防止长品牌名（Infineon 等 nowrap）把轨道撑破，配合下方窄屏降列与省略号 */
.brands-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.brand-chip {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-control); padding: 12px 4px;
  text-align: center; font-weight: 800;
  white-space: nowrap; transition: .2s;
}
.brand-chip b { display: block; font-size: 12.5px; letter-spacing: .2px; }
.brand-chip span { display: block; font-size: 12px; font-weight: 600; opacity: .95; margin-top: 2px; letter-spacing: 0; }
.brand-chip:hover { background: rgba(255,255,255,.26); transform: translateY(-3px); }
.hero-card .stat-row { display: flex; gap: 14px; margin-top: 16px; }
.hero-stat { flex: 1; background: rgba(0,0,0,.12); border-radius: 10px; padding: 14px; text-align: center; }
.hero-stat b { display: block; font-size: 20px; font-weight: 800; color: var(--hero-hl); font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 13px; opacity: .95; }

/* ---------- 数据条 ---------- */
.stats-bar { background: #fff; border-bottom: 1px solid var(--line); }
.stats-bar .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item { text-align: center; padding: 34px 10px; position: relative; }
.stat-item + .stat-item::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 1px; background: var(--line); }
.stat-item b { display: block; font-size: clamp(28px, 3vw, 38px); font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-item b span { font-size: 20px; }
.stat-item p { color: var(--ink-2); font-size: 14px; margin-top: 4px; }

/* ---------- 分类卡 ---------- */
.cats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; transition: .3s;
  position: relative; overflow: hidden; cursor: pointer;
}
.cat-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: .3s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.cat-card:hover::before { transform: scaleX(1); }
.cat-icon {
  width: 62px; height: 62px; margin: 0 auto 16px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 16px; display: grid; place-items: center;
}
.cat-icon svg { width: 30px; height: 30px; transition: transform .3s cubic-bezier(.2,.7,.3,1); }
.cat-card:hover .cat-icon svg { transform: scale(1.14) rotate(-4deg); }
.cat-card h3 { font-size: 17px; margin-bottom: 8px; }
.cat-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.cat-small {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--primary); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 产品区 ---------- */
/* 压缩首屏留白：标题与筛选条更紧凑，让型号信息尽量在首屏可见 */
#products.section { padding: 56px 0 72px; }
#products .section-head { margin-bottom: 30px; }
.product-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between; margin-bottom: 22px;
}
/* 筛选标签用固定列数 Grid：所有标签等宽、整行填满、多行对齐。
   旧方案 flex:1 1 96px 会把每行剩余空间平分给该行标签，末行只剩 4~5 个时被拉成 ~290px 巨型胶囊，
   与上一行 ~100px 严重不一致。改为固定 9 列（17 个标签 → 9+8，末行仅差 1 个、宽度差 ~12%），
   既填满又协调；响应式在各断点递减列数。 */
.filter-chips {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px; width: 100%; min-width: 0;
}
.filter-chips .chip { text-align: center; padding: 7px 8px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.chip {
  padding: 7px 15px; border-radius: 30px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 600; transition: .2s; white-space: nowrap; flex-shrink: 0;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 6px 16px var(--primary-shadow); }
/* 按下 / 选中瞬间的轻微回弹，克制且不影响布局（仅 transform） */
.chip:active, .skin-opt:active, .theme-opt:active, .btn:active, .btn-expand:active, .btn-inquiry:active {
  transform: scale(.96);
}
.chip.active, .skin-opt.active { animation: softPop .22s cubic-bezier(.2,1.3,.4,1); }
@keyframes softPop { 0% { transform: scale(.94); } 100% { transform: scale(1); } }
.product-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 4px 4px 4px 12px; background: #fff;
  width: 340px; flex-shrink: 0;
}
.product-search .ps-icon { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }
.product-search input { border: 0; outline: 0; padding: 8px 4px; width: 100%; background: transparent; font-size: 14px; min-width: 0; }
.product-search .ps-btn {
  border: 0; border-radius: var(--radius-control); background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; padding: 9px 18px; min-height: 38px; cursor: pointer; flex-shrink: 0; transition: .2s;
}
.product-search .ps-btn:hover { background: var(--primary-dark); }
/* 清空搜索按钮：有输入时出现，一键复位关键词 */
.product-search .ps-clear {
  border: 0; background: var(--bg-soft); color: var(--ink-2); cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  flex-shrink: 0; transition: .15s; padding: 0;
}
.product-search .ps-clear svg { width: 14px; height: 14px; }
.product-search .ps-clear:hover { background: var(--primary); color: #fff; }
.product-search .ps-clear[hidden] { display: none; }
/* 结果计数：让筛选/搜索的效果即时可见（无障碍 aria-live） */
.result-line { min-height: 20px; font-size: 12.5px; color: var(--ink-3); margin: -6px 0 14px; }
.result-line b { color: var(--primary); font-weight: 700; }

/* 【P1 加载骨架】reset 请求期间盖住旧列表的占位卡；与 products-grid 同列数，
   用 shimmer 微光表达"加载中"，尊重 prefers-reduced-motion（末尾统一关闭动画）。 */
.products-skeleton { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.products-skeleton[hidden] { display: none; }
.products-grid.is-loading { display: none; }
.sk-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; padding-bottom: 16px;
}
.sk-img, .sk-line, .sk-foot {
  background: linear-gradient(90deg, var(--bg-soft, #f2f5fa) 25%, var(--line, #e7edf6) 50%, var(--bg-soft, #f2f5fa) 75%);
  background-size: 200% 100%; animation: skShimmer 1.3s ease-in-out infinite;
}
.sk-img { height: 136px; border-radius: 0; }
.sk-line { height: 12px; border-radius: 6px; margin: 14px 18px 0; }
.sk-foot { height: 44px; border-radius: 6px; margin: 14px 18px 0; }
.sk-line.w40 { width: 40%; } .sk-line.w45 { width: 45%; } .sk-line.w50 { width: 50%; }
.sk-line.w55 { width: 55%; } .sk-line.w60 { width: 60%; } .sk-line.w65 { width: 65%; }
.sk-line.w70 { width: 70%; } .sk-line.w80 { width: 80%; } .sk-line.w85 { width: 85%; } .sk-line.w90 { width: 90%; }
@keyframes skShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (max-width: 1080px) { .products-skeleton { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .products-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .products-skeleton { grid-template-columns: minmax(0, 1fr); } }
html[data-theme="dark"] .sk-card { background: var(--bg-soft); }

/* minmax(0,1fr)：长型号/英文规格不撑破轨道，避免移动端 Chrome shrink-to-fit 自动整页缩放 */
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; transition: opacity .2s ease, filter .2s ease; }
/* 【精修】搜索更新态：保留列表布局只做轻微淡出，避免 display:none 硬切换造成闪动。
   与 .is-loading 互斥，由 JS 保证：已有真实卡时用 updating，首次/空列表才用骨架。 */
.products-grid.updating { opacity: .45; pointer-events: none; }
.product-card {
  min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .3s; display: flex; flex-direction: column; cursor: pointer;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.product-img {
  height: 136px;
  background: linear-gradient(145deg, #f7faff, #eef4fc); /* 老浏览器兜底 */
  background: var(--thumb-bg); background-size: var(--thumb-size);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.product-img svg { width: 100%; height: 100%; transition: transform .35s cubic-bezier(.2,.7,.3,1); }
.product-card:hover .product-img svg { transform: scale(1.06); }
.product-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.product-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 12.5px; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.product-body h3 { font-size: 16px; margin-bottom: 8px; line-height: 1.4; }
.product-meta { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; flex: 1; line-height: 1.65; }
.product-meta span { display: inline-block; margin-right: 12px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
.product-price { color: var(--price); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.product-price small { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.btn-inquiry {
  border: 1px solid var(--primary); color: var(--primary); background: transparent;
  padding: 7px 14px; border-radius: var(--radius-control); font-size: 13px; font-weight: 700; transition: .2s;
}
.btn-inquiry:hover { background: var(--primary); color: #fff; }
.no-result {
  grid-column: 1/-1; text-align: center; color: var(--ink-3);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 56px 24px;
}
.no-result b { display: block; font-size: 18px; color: var(--ink-2); margin-bottom: 6px; }
.no-result svg { width: 32px; height: 32px; color: var(--ink-3); margin-bottom: 12px; }
/* 【空状态出口】一键清除筛选回到全部现货 */
.no-reset {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 18px; padding: 9px 20px; min-height: 44px;
  border: 1px solid var(--primary); border-radius: var(--radius-control);
  background: var(--primary); color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  cursor: pointer; transition: .18s;
}
.no-reset:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.no-reset:active { transform: scale(.97); }
.no-reset:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- 品牌墙 ---------- */
/* 品牌分类胶囊：固定 9 列 Grid，宽度完全一致；响应式按断点 5/3 列，
   避免旧 flex 方案下各胶囊随字数长短不一、参差不齐。 */
.brand-filter { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 9px; width: 100%; margin-bottom: 30px; }
.brand-filter .chip { padding: 7px 8px; font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.brands-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
/* 【P2 去灰】品牌名是信任背书，默认不做灰度和降透明度（会削弱品牌价值）；
   保留细边框与 hover 抬升表达可交互，选中态用主色描边+浅底明确反馈。 */
.brand-box {
  min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-control);
  min-height: 62px; padding: 10px 8px; display: flex; align-items: center; justify-content: center;
  text-align: center; font-weight: 700; font-size: 13.5px; color: var(--ink); line-height: 1.4;
  transition: .25s; cursor: pointer;
}
.brand-box:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.brand-box.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light, #eef4fc); box-shadow: 0 0 0 1px var(--primary) inset; }
.brand-box:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 暗色主题覆盖：active 态用半透明主色底，保证反白文字可读 */
html[data-theme="dark"] .brand-box.active { background: rgba(255,255,255,.08); color: var(--hero-hl); }

/* ---------- 展开更多 ---------- */
.expand-wrap { display: flex; justify-content: center; margin-top: 26px; }
.btn-expand {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 30px;
  padding: 11px 26px; font-size: 14px; font-weight: 600; color: var(--primary);
  cursor: pointer; transition: .2s; box-shadow: var(--shadow-sm);
}
.btn-expand:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
/* 弱网重试态：文字之外给危险色，避免"加载失败"看起来和普通按钮一样安静 */
.btn-expand.is-error { border-color: var(--danger); background: var(--danger-soft); color: var(--danger-ink); }
.btn-expand svg { width: 16px; height: 16px; transition: transform .25s; }
.btn-expand[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- 优势 ---------- */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; } /* 8 项服务优势：桌面 4 列两行 */
@media (max-width: 1100px) { .adv-grid { grid-template-columns: repeat(2, 1fr); } }
.adv-item { display: flex; gap: 18px; }
.adv-icon {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 14px;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 20px var(--primary-shadow);
}
.adv-icon svg { width: 26px; height: 26px; }
.adv-item h3 { font-size: 17px; margin-bottom: 6px; }
.adv-item p { font-size: 14px; color: var(--ink-2); }

/* ---------- 关于 ---------- */
.about-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: stretch; }
.about-visual {
  background: linear-gradient(140deg, var(--primary-dark), var(--primary));
  border-radius: 18px; padding: 40px; color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.about-visual::after {
  content: ""; position: absolute; width: 300px; height: 300px; right: -80px; bottom: -100px;
  border: 40px solid rgba(255,255,255,.07); border-radius: 50%;
}
.about-visual .about-slogan { font-size: 22px; font-weight: 700; margin-bottom: 18px; position: relative; z-index: 1; }
.about-visual p { color: rgba(255,255,255,.85); position: relative; z-index: 1; margin-bottom: 12px; }
.about-visual .quote-mark { font-size: 70px; line-height: 1; opacity: .2; position: absolute; top: 18px; right: 26px; font-family: Georgia, serif; }
.about-text .lead { font-size: 17px; color: var(--ink); font-weight: 600; margin-bottom: 16px; line-height: 1.8; }
.about-text p { color: var(--ink-2); margin-bottom: 14px; }
.about-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; margin: 24px 0 6px; } /* 8 项亮点：4 列两行 */
@media (max-width: 900px) { .about-points { grid-template-columns: repeat(2, 1fr); } }
.about-point { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.about-point svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }

/* ---------- 询价 CTA ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff; border-radius: 18px; padding: 48px 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; width: 320px; height: 320px; right: -60px; top: -120px;
  background: radial-gradient(circle, rgba(0,180,216,.4), transparent 70%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: 28px; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 16px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 页脚 ---------- */
.footer { background: var(--footer-bg); color: var(--footer-text); padding: 66px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 44px; padding-bottom: 48px; }
.footer-brand .logo-text strong { color: #fff; }
.footer-brand p { font-size: 14px; margin-top: 18px; line-height: 1.8; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 20px; position: relative; padding-left: 14px; }
.footer-col h4::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; background: var(--accent); border-radius: 2px; }
.footer-col ul li { margin-bottom: 11px; font-size: 14px; }
/* 页脚导航链接改为 inline-flex 撑到 44px 触屏高度，避免 11 个链接只有 ~23px 点击区易误触 */
.footer-col ul li a { display: inline-flex; align-items: center; min-height: 32px; }
.footer-col ul li a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.footer-contact svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 22px 0; text-align: center; font-size: 13.5px; color: var(--footer-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- 模态框（产品/询价） ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(8,20,40,.6);
  z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal-mask.show { display: flex; animation: fadeIn .2s; }
.modal {
  background: #fff; border-radius: 16px; width: min(100%, 540px);
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: popIn .25s;
}
.modal-head { padding: 22px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 20px; }
.modal-close { width: 34px; height: 34px; border: 0; background: var(--bg-soft); border-radius: var(--radius-control); font-size: 20px; color: var(--ink-2); display: grid; place-items: center; }
.modal-close:hover { background: var(--line); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 26px 28px; }
.modal-body .pd-img { height: 180px; background: linear-gradient(145deg, #f7faff, #eef4fc); background: var(--thumb-bg); background-size: var(--thumb-size); border-radius: 10px; display: grid; place-items: center; margin-bottom: 20px; }
.modal-body .pd-img svg { width: 100%; height: 100%; }
.pd-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 18px 0; }
/* 库中有连续不可断长串（如 TXM3.579545M0002491HDDEO00T、Accessories_10.16X5.8MM_TM），
   网格项默认 min-width:auto 会被撑破、窄屏溢出。min-width:0 + anywhere 让长值在两列内换行。 */
.pd-info div { font-size: 14px; min-width: 0; }
.pd-info span { color: var(--ink-3); display: block; font-size: 12.5px; }
.pd-info b { color: var(--ink); overflow-wrap: anywhere; }

/* 产品详情：左右两栏（避免内容过长出现滚动条） */
.modal-product { width: min(100%, 720px); }
.modal-product .modal-body { padding: 22px 26px 24px; }
.pd-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.modal-product .pd-img { height: 200px; margin-bottom: 0; background: linear-gradient(145deg, #f7faff, #eef4fc); background: var(--thumb-bg); background-size: var(--thumb-size); border-radius: 10px; display: grid; place-items: center; }
.modal-product .pd-img svg { width: 100%; height: 100%; }
.pd-cat { color: var(--primary); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.pd-title { font-size: 21px; margin-bottom: 10px; line-height: 1.3; overflow-wrap: anywhere; }
.pd-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pd-title-line .pd-title { margin: 0; }
.pd-desc { color: var(--ink-2); font-size: 13px; line-height: 1.6; margin-bottom: 4px; }
.modal-product .pd-info { grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 14px 0 18px; }
/* 详情弹窗按钮区：原来由 JS 内联写死 grid/padding/min-height，换肤与主题令牌都无法生效；
   改为语义类后，1 枚或 2 枚按钮都能等宽自适应，样式只在这里维护。 */
.pd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.pd-actions .btn { width: 100%; min-height: 46px; padding: 12px 16px; display: inline-flex; align-items: center; justify-content: center; }
.pd-detail-link { border: 1px solid var(--primary); background: var(--white); color: var(--primary); }
@media (max-width: 620px) {
  .pd-layout { grid-template-columns: 1fr; gap: 14px; }
  .modal-product .pd-img { height: 150px; }
  .pd-title { font-size: 18px; }
  .pd-actions { grid-template-columns: 1fr; }
}

/* 电话咨询弹窗 */
.modal-tel { width: min(100%, 440px); }
.modal-tel .modal-head { padding: 18px 24px; }
.modal-tel .modal-body { padding: 22px 24px 26px; }
.tel-lead { color: var(--ink-2); font-size: 14px; margin-bottom: 18px; }
.tel-list { display: flex; flex-direction: column; gap: 12px; }
.tel-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  text-decoration: none; transition: .2s; background: #fff;
}
.tel-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.tel-item-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.tel-item-icon svg { width: 20px; height: 20px; }
.tel-item-info { flex: 1; }
/* 只作用于直接子 span；用后代选择器会把内层 <span data-setting=contact_name> 也设成 block，导致"苏伟生"换行 */
.tel-item-info > span { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 3px; }
.tel-item-info > span span { display: inline; }
.tel-item-info b { font-size: 19px; color: var(--ink); letter-spacing: .5px; }
.tel-call { background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 20px; flex-shrink: 0; }
/* text-wrap:balance 让不可避免的换行也均匀分两行，绝不出现"差一字单独一行"的孤行 */
.tel-tip { font-size: 12.5px; color: var(--ink-2); margin-top: 16px; line-height: 1.65; text-align: center; text-wrap: balance; }

/* 微信/QQ 在线咨询弹窗 */
.modal-wechat { width: min(100%, 680px); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-wechat .modal-head { padding: 18px 24px; }
.modal-wechat .modal-body { padding: 24px 26px 26px; }
.wx-main { display: flex; align-items: center; gap: 28px; }
.wx-qr {
  flex: 0 0 240px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.wx-qr img {
  width: 230px; height: 230px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff;
}
.wx-qr-cap {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; color: var(--wechat-ink); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.wx-qr-cap svg { width: 18px; height: 18px; }
.wx-side { flex: 1; min-width: 0; }
.wx-lead { color: var(--ink); font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
/* 【询盘最后一米】型号旁的一键复制按钮：复用 [data-copy-model] 委托的反馈逻辑 */
.wx-model-copy {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px; padding: 2px 9px; min-height: 24px;
  border: 1px solid var(--primary); border-radius: var(--radius-control);
  background: var(--primary); color: #fff;
  font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1;
  cursor: pointer; vertical-align: middle; transition: .18s;
}
.wx-model-copy:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.wx-model-copy:active { transform: scale(.94); }
.wx-model-copy.copied { background: var(--success-ink); border-color: var(--success-ink); }
.wx-model-copy:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 咨询信息卡：无位移反馈。hover 只改变颜色/阴影/左侧色条，元素几何位置恒定，
   从根本上消除边界抖动；左侧色条用 scaleY 展开，比整卡上浮更精致也更省性能。 */
.wx-rows { display: flex; flex-direction: column; gap: 12px; }
.wx-row {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
  background: var(--white, #fff);
  transition: border-color var(--mx-enter) var(--mx-ease),
              background var(--mx-enter) var(--mx-ease),
              box-shadow var(--mx-enter) var(--mx-ease);
}
.wx-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary); border-radius: 10px 0 0 10px;
  transform: scaleY(0); transform-origin: center;
  transition: transform var(--mx-enter) var(--mx-ease);
}
.wx-row:hover, .wx-row:focus-within {
  border-color: var(--primary);
  background: var(--primary-light, #eef5ff);
  box-shadow: var(--shadow-sm);
}
.wx-row:hover::before, .wx-row:focus-within::before { transform: scaleY(1); }
.wx-row-icon { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; flex-shrink: 0; }
.wx-row-icon svg { width: 22px; height: 22px; }
.wx-row-icon.qq { background: var(--qq-soft); color: var(--qq-deep); }
.wx-row-icon.wx { background: var(--wechat-soft); color: var(--wechat-deep); }
.wx-row-info { flex: 1; min-width: 0; }
.wx-row-info span { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 3px; }
.wx-row-info b { font-size: 17px; color: var(--ink); letter-spacing: .5px; }
.wx-act {
  flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--primary);
  background: var(--primary-light); border: 1px solid transparent;
  border-radius: var(--radius-control); padding: 8px 14px; text-decoration: none; cursor: pointer;
  transition: .2s;
}
.wx-act:hover { background: var(--primary); color: #fff; }
.wx-act.copy.copied { background: var(--success-ink); border-color: var(--success-ink); color: #fff; }
.wx-act.copy.copy-fail { background: var(--danger-soft); color: var(--danger-ink); border-color: var(--danger-line); }
.wx-tip { font-size: 13px; color: var(--ink-2); font-weight: 500; margin-top: 16px; line-height: 1.65; text-align: center; text-wrap: balance; }

/* 表单样式保留供后台/未来扩展使用 */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.form-row label .req { color: var(--danger); }
.form-control {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-control); outline: 0; transition: .2s; background: #fff; color: var(--ink);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.form-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; display: none; }
.form-success {
  text-align: center; padding: 30px 10px;
}
.form-success .ok-icon { width: 66px; height: 66px; background: var(--success-soft); color: var(--success); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; }
.form-success .ok-icon svg { width: 34px; height: 34px; }
.form-success h3 { font-size: 22px; margin-bottom: 8px; }
.form-success p { color: var(--ink-2); }

/* ---------- 浮动按钮 ---------- */
/* z-index 150：高于吸顶栏(100)，使外观面板在矮屏展开时能盖过顶栏；
   低于弹窗遮罩(200)，打开询价/详情时被正确遮住。 */
.fab {
  position: fixed; right: 22px; bottom: 26px; z-index: 150;
  display: flex; flex-direction: column; gap: 12px;
}
.fab-btn {
  width: 50px; height: 50px; border-radius: 50%; border: 0;
  background: #fff; color: var(--primary); box-shadow: var(--shadow);
  display: grid; place-items: center; transition: .25s; position: relative;
}
.fab-btn:hover { transform: translateY(-4px); background: var(--primary); color: #fff; }
.fab-btn svg { width: 22px; height: 22px; }
.fab-btn .tip {
  position: absolute; right: 60px; top: 50%; transform: translateY(-50%);
  background: #16233a; color: #fff; font-size: 12px; padding: 5px 10px;
  border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .2s;
}
.fab-btn:hover .tip { opacity: 1; }
.fab-btn.primary-fab { background: var(--primary); color: #fff; }

/* ---------- 主题切换器 ---------- */
.theme-fab { position: relative; }
.theme-panel {
  position: absolute; right: 62px; bottom: 0; width: 226px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 12px; z-index: 95;
  /* 一次只显示一组选项，常规屏无需滚动；极端矮屏才纵向滚动，横向永不出现滚动条 */
  max-height: calc(100vh - 220px); overflow-x: hidden; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateX(8px); transition: .22s;
}
.theme-panel.open { opacity: 1; visibility: visible; transform: translateX(0); }
.theme-panel h4 { font-size: 12.5px; color: var(--ink-3); margin-bottom: 7px; font-weight: 600; }
/* 【P2 快捷档】三个一键预设，放在标签页上方；选中态用主色描边 */
.quick-presets { display: flex; gap: 5px; margin-bottom: 10px; }
.quick-preset {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--white);
  color: var(--ink-2); font-family: inherit; font-size: 11.5px; font-weight: 600;
  padding: 6px 4px; cursor: pointer; transition: .15s;
}
.quick-preset:hover { color: var(--primary); border-color: var(--primary); }
.quick-preset.active { color: var(--primary); border-color: var(--primary); background: var(--primary-light, #eef4fc); }
.quick-preset:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
html[data-theme="dark"] .quick-preset.active { background: rgba(255,255,255,.08); color: var(--hero-hl); }
/* 布局 / 配色 标签页：避免面板过高产生滚动条 */
.appearance-tabs { display: flex; gap: 3px; background: var(--bg-soft); border-radius: 8px; padding: 3px; margin-bottom: 10px; }
.appearance-tab {
  flex: 1; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink-2);
  font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 6px 4px; cursor: pointer; transition: .15s;
}
.appearance-tab:hover { color: var(--primary); }
.appearance-tab.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }
.skin-opt:focus-visible, .theme-opt:focus-visible, .appearance-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.appearance-pane[hidden] { display: none; }
/* 皮肤/主题选项统一压紧，4+5 项分两页后单页高度足够小 */
.skin-opts, .theme-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.skin-opt {
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 5px 4px 4px;
  background: var(--white); cursor: pointer; text-align: center; transition: .18s;
}
.skin-opt:hover { border-color: var(--primary); transform: translateY(-2px); }
.skin-opt.active { border-color: var(--primary); background: var(--primary-light); box-shadow: inset 0 0 0 1px var(--primary); }
.skin-ico { display: block; width: 100%; height: 17px; fill: var(--ink-3); }
.skin-opt.active .skin-ico { fill: var(--primary); }
.skin-opt span { display: block; font-size: 11px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.theme-opt {
  border: 2px solid transparent; border-radius: var(--radius-control); padding: 5px 3px 4px;
  background: var(--bg-soft); cursor: pointer; text-align: center; transition: .18s;
}
.theme-opt:hover { transform: translateY(-2px); }
.theme-opt.active { border-color: var(--primary); background: var(--primary-light); }
.theme-swatch { width: 100%; height: 19px; border-radius: 5px; margin-bottom: 3px; display: block; }
.theme-opt span { font-size: 11px; color: var(--ink-2); font-weight: 600; }

/* ---------- 动画 ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(.96) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.fade-up { opacity: 0; transform: translateY(24px); transition: .6s cubic-bezier(.2,.7,.3,1); }
.fade-up.visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  /* 761–1080px：padding 仍为 88/56，沿用上方桌面锚点抵消量，勿在此覆盖 */
  .filter-chips { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .brand-filter { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px; box-shadow: var(--shadow); border-bottom: 1px solid var(--line); margin-left: 0; }
  .nav.open { display: flex; }
  /* 菜单展开时锁背景滚动，避免面板打开时页面仍能滑动造成错位；
     用 class 而非 inline style，与弹窗的 overflow:hidden 机制互不覆盖 */
  body.nav-open { overflow: hidden; }
  /* 暗夜黑：移动端下拉导航是绝对定位面板，需深色底 + 亮字，不能被桌面端的 transparent 覆盖 */
  html[data-theme="dark"] .header .nav.open { background: var(--white); color: var(--ink); }
  html[data-theme="dark"] .header .nav.open a { color: var(--ink); }
  .nav a { padding: 13px 8px; }
  /* 移动端选中态：横排下划线改为左侧主色竖条，纵排菜单里更清晰 */
  .nav a.active::after { display: block; left: 0; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; }
  .nav-toggle { display: flex; }
  .header-search { width: auto; flex: 1 1 auto; max-width: 320px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .brands-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .filter-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .brand-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .header-search { width: auto; max-width: none; padding-left: 9px; }
  .header-search svg { display: none; }
  .header-search-btn { padding: 7px 12px; }
  /* ≤760px 与 padding 同断点同步锚点抵消量：64/48，保证标题仍落在顶栏下方 14px */
  .section { padding: 64px 0; }
  #products.section { padding: 48px 0 60px; }
  section[id] { scroll-margin-top: calc(var(--header-h) + var(--anchor-gap) - 64px); }
  #products.section { scroll-margin-top: calc(var(--header-h) + var(--anchor-gap) - 48px); }
  .hero .container { padding: 56px 0 60px; }
  .stats-bar .container { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(3)::before { display: none; }
  .stat-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adv-grid { grid-template-columns: 1fr; }
  .about-points { grid-template-columns: repeat(2, 1fr); }
  .about-wrap { grid-template-columns: 1fr; gap: 36px; }
  .brands-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .product-toolbar { flex-direction: column; align-items: stretch; }
  .product-search { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-2col { grid-template-columns: 1fr; }
  .pd-info { grid-template-columns: 1fr; }
}

/* 第114期：about 锚点可达性——CTA 区底部留白随视口增高，保证高视口下 #about 可落位 -8px、
   标题落在顶栏下方 80px 且高亮不翻到 contact。常规视口 vh<1278 时 max 取原值（88/≤760 64），零影响。
   放在 760 媒体查询块之后，避免块内 .section{padding:64px 0} 后写覆盖本规则。
   皮肤级基准同步见 skins.css 末尾（compact/minimal 的 .section padding 特异性更高会覆盖此处）。 */
.section-flush-top { padding-bottom: max(88px, calc(100vh - 1190px)); }
@media (max-width: 760px) {
  .section-flush-top { padding-bottom: max(64px, calc(100vh - 1190px)); }
}

/* ===== 复制型号交互（一键复制料号，采购/工程高频需求） =====
   按钮文字直接写在 JS 模板里（不靠 CSS 伪元素），确保样式文件未更新时也能看见；
   JS 模板内的内联样式进一步兜底，二者一致。 */
.product-name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.product-name-line > span { min-width: 0; overflow-wrap: anywhere; }
/* 【P1 语义修正】型号是真正的 button（键盘/读屏入口），外观与原来的标题文字一致；
   卡片容器已移除 role=button，不再与复制/询价按钮形成嵌套按钮冲突。 */
.product-name-btn {
  min-width: 0; overflow-wrap: anywhere; text-align: left;
  border: 0; background: transparent; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; line-height: inherit;
  transition: color .18s;
}
.product-name-btn:hover { color: var(--primary); }
.product-name-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.btn-copy-model {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 9px; border-radius: var(--radius-control);
  border: 1px solid var(--primary, #0a5ed8); background: var(--primary, #0a5ed8);
  color: #fff; font-size: 12px; font-weight: 600; font-family: inherit; line-height: 1;
  white-space: nowrap; cursor: pointer; box-shadow: 0 1px 3px var(--primary-shadow, rgba(10,94,216,.18));
  transition: color .18s, border-color .18s, background .18s, transform .12s, box-shadow .18s;
}
.btn-copy-model:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 3px 9px var(--primary-shadow); }
.btn-copy-model:active { transform: scale(.94); }
.btn-copy-model.copied { background: var(--success-ink); border-color: var(--success-ink); }
.btn-copy-model.copy-fail, .wx-model-copy.copy-fail { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-ink); }
.btn-copy-model:focus-visible { outline: 2px solid var(--primary, #0a5ed8); outline-offset: 2px; }
.btn-copy-model svg { display: block; width: 13px; height: 13px; flex: none; }
@media (max-width: 520px) { .btn-copy-model { padding: 0 7px; } }

/* 轻量提示条 */
#xjzToast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 16px);
  background: rgba(32, 44, 62, .94); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 11px 20px; border-radius: 30px; box-shadow: 0 8px 28px rgba(0,0,0,.22);
  opacity: 0; pointer-events: none; z-index: 9999; transition: opacity .22s, transform .22s;
  max-width: min(88vw, 480px); text-align: center; overflow-wrap: anywhere;
}
#xjzToast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .btn-copy-model, #xjzToast { transition: none; }
}

@media (max-width: 480px) {
  .filter-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .filter-chips .chip { font-size: 12px; padding: 7px 4px; }
  /* 移动端无并排导航文字：桌面已收至 48px，移动端用 34px 档防窄屏挤压搜索框 */
  .logo-full { height: 34px; }
  .logo-mark-img { width: 38px; height: 38px; }
  .logo-text { height: 38px; }
  .logo-text strong { font-size: 17px; }
  .logo-text span { font-size: 9.5px; letter-spacing: .3px; }
  .footer-logo .logo-img { height: 54px; max-width: 200px; }
  /* 【窄屏溢出修复】清除搜索框 180px 下限，否则 logo+搜索框+汉堡按钮总宽超出视口，页面出现横向滚动 */
  .header-search { min-width: 0; }
  .header-cta { gap: 8px; }
  .header-search-btn { padding: 6px 10px; font-size: 12px; }
  .header-search input { font-size: 12px; }
  /* 窄屏保留占位提示（"搜索型号 / 品牌…"），不要设为 transparent——否则空框无图标时用户不知用途 */
  .products-grid { grid-template-columns: minmax(0, 1fr); }
  .cats-grid { grid-template-columns: 1fr; }
  .brands-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-points { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; }
  .hero-search button { justify-content: center; padding: 12px; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; }
}
/* 窄屏微信弹窗：两栏改上下，允许滚动兜底 */
@media (max-width: 620px) {
  /* 刘海屏安全区：只给浮层与浮动按钮叠加 inset，不改定位方式 */
  .modal-mask {
    padding: 12px; /* 不支持 env() 时退回原值 */
    padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right))
             calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  }
  .fab {
    padding: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  /* 列出各弹窗变体以覆盖更高特位的组件规则，不用 !important */
  .modal-body, .modal-wechat .modal-body, .modal-product .modal-body, .modal-tel .modal-body { padding: 20px 18px; }
  .wx-qr img { width: 200px; height: 200px; }
  .modal-wechat { max-height: 92vh; overflow-y: auto; }
  .wx-main { flex-direction: column; gap: 20px; }
  .wx-qr { flex: none; }
  .wx-side { width: 100%; }
}

/* ===================================================================
   审查加固补丁（2026-11-22）：品牌墙防溢出 / 统计数字防溢出 /
   触屏点击区域 / 非交互元素误导态。仅追加覆盖，不改动现有规则。
   =================================================================== */
/* 品牌墙：窄屏降到 3 列并允许文字省略，避免 nowrap 品牌名撑破 hero 卡片被裁切 */
@media (max-width: 560px) {
  .brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .brand-chip { padding: 10px 2px; }
  .brand-chip b, .brand-chip span { overflow: hidden; text-overflow: ellipsis; }
}
/* 【Hero 热门品牌联动】已改为可点击筛货，与下方品牌墙行为一致：恢复上浮 hover 与选中/焦点态 */
.brand-chip { cursor: pointer; }
.brand-chip:hover { background: rgba(255,255,255,.26); transform: translateY(-3px); }
.brand-chip.active { box-shadow: 0 0 0 2px var(--primary) inset; background: rgba(255,255,255,.3); }
.brand-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 统计数字：窄屏用 clamp 缩放 + 允许长数字换行，避免 "10000+" 溢出压到相邻统计块 */
@media (max-width: 520px) {
  .hero-stat { padding: 10px 4px; }
  .hero-stat b { font-size: clamp(16px, 4vw, 20px); overflow-wrap: anywhere; }
}
/* ≤480 收紧：置于 ≤520 块之后，避免其中 .hero-stat 的 padding 覆盖本块取值 */
@media (max-width: 480px) {
  .hero .container { padding: 40px 0 44px; }
  .hero-card { padding: 18px; }
  .brands-grid { gap: 6px; }
  .hero-stat { padding: 10px 8px; }
}
/* Hero 简介：改为自然高度，后台换成短文案时不再留约 100px 空白（两列已居中，无需硬撑） */
.hero p.lead { min-height: 0; }

/* ---------- 触屏点击区域：主操作控件不小于 44×44px ---------- */
@media (hover: none) and (pointer: coarse) {
  .filter-chips .chip, .brand-filter .chip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-inquiry { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .ps-clear { width: 44px; height: 44px; }
  .modal-close { min-width: 44px; min-height: 44px; }
  .nav-toggle { width: 44px; height: 44px; }
  .wx-act.copy { min-height: 44px; }
  .appearance-tab { min-height: 44px; }
  /* 复制型号按钮已统一到 .btn-copy-model，这里在触屏上兜底放大到 44px */
  .btn-copy-model { height: 44px !important; padding: 0 12px !important; }
  /* 巡检补齐：搜索/换肤/换主题等次级操作按钮同样纳入 44px 规范 */
  .header-search-btn, .product-search .ps-btn, .hero-search button { min-height: 44px; }
  .skin-opt, .theme-opt { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

/* ===================================================================
   全站微交互增强层（2026-11-24）
   时长令牌 240/300/340ms，一律 transform + GPU 合成，不阻塞主线程。
   只作用于可交互元素与滚动入场容器，不触碰正文排版。
   =================================================================== */
:root {
  --mx-fast: .24s;
  --mx-base: .3s;
  --mx-enter: .34s;
  --mx-ease: cubic-bezier(.2,.7,.3,1);
  --mx-primary: var(--primary, #0a5ed8); /* 聚焦竖条/边框强调色，跟随主题变量 */
}

/* ---------- 1. 按钮：按角色拆分反馈，越重要的动作越沉稳 ----------
   精致感来自"分寸"而非"堆料"：主行动按钮只做底色加深 + 微抬 + 阴影，不缩放；
   图标/胶囊类才用小缩放；纯文字/次按钮只变色。避免所有按钮一律 brightness+scale。 */
.btn, .btn-inquiry, .btn-expand, .header-search-btn, .product-search .ps-btn,
.hero-search button, .product-search .ps-clear, .fab-btn, .wx-act, .tel-call,
.skin-opt, .theme-opt, .appearance-tab, .btn-expand {
  transition: filter var(--mx-base) var(--mx-ease), transform var(--mx-base) var(--mx-ease),
              background-color var(--mx-base) var(--mx-ease), color var(--mx-base) var(--mx-ease),
              border-color var(--mx-base) var(--mx-ease), box-shadow var(--mx-base) var(--mx-ease);
}
/* 主行动按钮：沉稳加深 + 微抬 2px + 阴影，不缩放（大按钮缩放显得弹跳笨重） */
.btn:hover, .btn-inquiry:hover, .btn-expand:hover, .hero-search button:hover {
  filter: brightness(1.06);
  transform: translate3d(0,-2px,0);
  box-shadow: var(--shadow);
}
/* 图标/胶囊类：小缩放才合适，压到 1.04 更克制 */
.header-search-btn:hover, .product-search .ps-btn:hover, .product-search .ps-clear:hover,
.fab-btn:hover, .wx-act:hover, .tel-call:hover, .skin-opt:hover, .theme-opt:hover,
.appearance-tab:hover, .chip:hover, .btn-copy-model:hover {
  filter: brightness(1.1);
  transform: scale(1.04);
}
/* 按下瞬间：下沉 1px + 内阴影，模拟真实按压，而非单纯缩小 */
.btn:active:not(:disabled), .btn-inquiry:active, .btn-expand:active,
.hero-search button:active {
  transform: translate3d(0,1px,0);
  box-shadow: inset 0 2px 5px rgba(16,42,84,.18);
  filter: brightness(1.02);
}
.header-search-btn:active, .product-search .ps-btn:active, .product-search .ps-clear:active,
.fab-btn:active, .wx-act:active, .tel-call:active, .chip:active, .btn-copy-model:active {
  transform: scale(.96);
  filter: brightness(1.02);
}

/* ---------- 2. 卡片：hover 上浮 8px + 阴影加深，340ms 无跳变 ---------- */
/* .wx-row 不参与上浮：它与相邻卡片仅隔 10px，上浮 8px 会让卡片脱离指针、hover 反复触发而抖动。
   咨询信息卡改用下方「无位移反馈」（左侧色条 + 背景微亮），几何位置恒定，永不抖。 */
.cat-card, .product-card, .brand-box, .tel-item {
  transition: transform var(--mx-enter) var(--mx-ease), box-shadow var(--mx-enter) var(--mx-ease),
              border-color var(--mx-enter) var(--mx-ease), filter var(--mx-enter) var(--mx-ease);
}
.cat-card:hover, .product-card:hover, .brand-box:hover, .tel-item:hover {
  transform: translate3d(0,-8px,0);
  box-shadow: var(--shadow-lg); /* 走主题令牌，跟随深色/换肤，避免硬编码蓝灰阴影 */
}

/* ---------- 3. 导航栏滚动 >100px：半透明毛玻璃固定顶栏 ---------- */
.header { transition: background var(--mx-base) var(--mx-ease), box-shadow var(--mx-base) var(--mx-ease); }
.header.glass {
  background: rgba(255,255,255,.72);
  /* 毛玻璃只保留轻微模糊：blur(18)+saturate 在滚动顶栏上每帧重绘，中低端移动设备易掉帧 */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow); /* 跟随主题 */
}
html[data-theme="dark"] .header.glass { background: rgba(16,23,37,.72); }

/* ---------- 4. 图标：hover 轻微跳动 1 次（340ms，仅按钮/卡片内图标） ---------- */
@keyframes mxIconBump {
  0%   { transform: translate3d(0,0,0) scale(1); }
  45%  { transform: translate3d(0,-3px,0) scale(1.14); }
  100% { transform: translate3d(0,0,0) scale(1); }
}
.btn svg, .btn-inquiry svg, .btn-expand svg, .fab-btn svg, .wx-act svg,
.cat-icon svg, .adv-icon svg, .tel-item-icon svg, .wx-row-icon svg,
.ps-icon, .header-search svg { transition: transform var(--mx-fast) var(--mx-ease); }
.btn:hover svg, .btn-inquiry:hover svg, .btn-expand:hover svg, .fab-btn:hover svg,
.wx-act:hover svg, .cat-card:hover .cat-icon svg, .tel-item:hover .tel-item-icon svg,
.wx-row:hover .wx-row-icon svg { animation: mxIconBump var(--mx-enter) var(--mx-ease) 1; }
.cat-card:hover .cat-icon svg { transform: none; }

/* ---------- 5. 输入框聚焦反馈 ---------- */
/* 独立表单控件：左侧 2px 强调条滑入（控件自带 13px padding，竖条落在留白区，不压字） */
.form-control {
  background-image: linear-gradient(var(--mx-primary), var(--mx-primary));
  background-repeat: no-repeat;
  background-position: 0 50%;
  background-size: 2px 0;
  transition: border-color var(--mx-base) var(--mx-ease), background-size var(--mx-base) var(--mx-ease),
              box-shadow var(--mx-base) var(--mx-ease);
}
.form-control:focus { background-size: 2px 100%; border-color: var(--mx-primary); }

/* 搜索框：容器自带「边框高亮 + 外发光」完整反馈，input 不再画竖条。
   此前竖条画在 input 最左侧（position 0）且无左内边距，正好压住输入文字起始处，造成挡字瑕疵。 */
.header-search:focus-within, .product-search:focus-within {
  border-color: var(--mx-primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.hero-search {
  transition: border-color var(--mx-base) var(--mx-ease), box-shadow var(--mx-base) var(--mx-ease);
}
.hero-search:focus-within { border-color: rgba(255,255,255,.62); box-shadow: 0 0 0 3px var(--focus-ring); }

/* ---------- 6. 输入错误：抖动 1 次 + 红色提示文字 ---------- */
@keyframes mxShake {
  0%,100% { transform: translate3d(0,0,0); }
  20% { transform: translate3d(-6px,0,0); }
  40% { transform: translate3d(6px,0,0); }
  60% { transform: translate3d(-4px,0,0); }
  80% { transform: translate3d(4px,0,0); }
}
.is-invalid { border-color: var(--danger) !important; animation: mxShake var(--mx-base) var(--mx-ease) 1; }
.field-error { display: none; color: var(--danger); font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
.field-error.show { display: block; animation: fadeIn var(--mx-fast) var(--mx-ease); }

/* ---------- 7. 提交按钮：未填完置灰、填完解锁、提交中加载并防重复 ---------- */
.btn[data-submit]:disabled, .btn.is-locked {
  opacity: .48; filter: grayscale(.5); cursor: not-allowed; transform: none;
}
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; transform: none; }
.btn.is-loading::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
  animation: mxSpin var(--mx-fast) linear infinite;
}
@keyframes mxSpin { to { transform: rotate(360deg); } }

/* ---------- 8. 滚动入场：板块元素从下方 30px 淡入滑入（≤350ms） ---------- */
.fade-up { opacity: 0; transform: translate3d(0,30px,0); transition: opacity var(--mx-enter) var(--mx-ease), transform var(--mx-enter) var(--mx-ease); }
.fade-up.visible { opacity: 1; transform: translate3d(0,0,0); }

/* ---------- 9. 图片：进入视口由模糊渐变清晰 ---------- */
.img-reveal { filter: blur(9px); opacity: .55; transition: filter var(--mx-enter) var(--mx-ease), opacity var(--mx-enter) var(--mx-ease); }
.img-reveal.is-clear { filter: blur(0); opacity: 1; }

/* ---------- 10. 回到顶部：滚动 >500px 才出现 ---------- */
/* visibility 让隐藏态同时退出 Tab 序列，避免焦点落在透明按钮上 */
#fabTop { opacity: 0; visibility: hidden; transform: translate3d(0,14px,0) scale(.9); pointer-events: none; transition: opacity var(--mx-base) var(--mx-ease), transform var(--mx-base) var(--mx-ease), visibility var(--mx-base); }
#fabTop.show { opacity: 1; visibility: visible; transform: translate3d(0,0,0) scale(1); pointer-events: auto; }

/* ---------- 11. 移动端触摸目标 ≥48×48px ---------- */
@media (hover: none) and (pointer: coarse) {
  .btn, .btn-inquiry, .btn-expand, .chip, .header-search-btn, .product-search .ps-btn,
  .hero-search button, .fab-btn, .wx-act, .tel-call, .nav-toggle, .nav a,
  .skin-opt, .theme-opt, .appearance-tab, .btn-copy-model, .copy,
  .quick-preset, .wx-model-copy, .no-reset {
    min-height: 48px; min-width: 48px;
  }
  .form-control, .product-search input, .header-search input, .hero-search input { min-height: 48px; }
  /* iOS Safari 聚焦 <16px 输入框会自动放大整页且失焦不还原：触屏统一 16px，高度靠 padding 补偿 */
  .header-search input, .hero-search input, .product-search input { font-size: 16px; }
  /* 平掉更高特位的组件规则，保证触屏上 Hero 按钮与筛选胶囊也达到 48px */
  .hero-actions .btn, .filter-chips .chip, .brand-filter .chip { min-height: 48px; }
  .btn-copy-model { height: 48px !important; }
  /* 型号按钮与 Hero 热门品牌也是高频触屏入口，补齐到 48px，避免与相邻复制按钮目标悬殊 */
  .product-name-btn { min-height: 48px; display: inline-flex; align-items: center; }
  .brand-chip { min-height: 48px; display: flex; align-items: center; justify-content: center; }
  /* 页脚 11 个导航链接同样纳入触屏目标 */
  .footer-col ul li a { min-height: 48px; }
}

/* 尊重系统"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  /* 全局平滑滚动在"减少动态效果"下必须关闭：前庭敏感用户会因平滑位移不适（WCAG 2.3.3） */
  html { scroll-behavior: auto; }
  .btn, .btn-inquiry, .btn-expand, .cat-card, .product-card, .brand-box, .fade-up,
  .img-reveal, #fabTop, .form-control, .header { transition-duration: .01ms !important; }
  .btn:hover svg, .btn-inquiry:hover svg, .btn-expand:hover svg, .fab-btn:hover svg,
  .wx-act:hover svg, .cat-card:hover .cat-icon svg, .tel-item:hover .tel-item-icon svg,
  .wx-row:hover .wx-row-icon svg, .is-invalid, .field-error.show { animation: none; }
  .hero-badge .dot { animation: none; } /* 装饰呼吸点纳入降级 */
  .sk-img, .sk-line, .sk-foot { animation: none; } /* 【第十轮】骨架屏 shimmer 纳入降级，避免前庭敏感用户持续位移 */
  /* 【第十一轮】筛选回弹、弹窗淡入/弹出、按钮加载旋转同属动效，统一降级；文字反馈仍然保留 */
  .chip.active, .skin-opt.active, .theme-opt.active, .modal-mask.show, .modal { animation: none; }
  .btn.is-loading::after { animation: none; }
  /* 咨询卡左侧色条：减少动效时直接常亮，不做展开过渡 */
  .wx-row, .wx-row::before { transition-duration: .01ms !important; }
  .wx-row::before { transform: scaleY(1); opacity: 0; }
  .wx-row:hover::before, .wx-row:focus-within::before { opacity: 1; }
}

/* ---------- 12. 打印样式 ----------
   浏览器打印默认省略背景图形：Hero/关于/CTA 是深色渐变 + 白字，不处理会整块白纸白字不可见；
   fixed 悬浮元素会叠在每一页。这里统一改为白底深字并隐藏交互层。 */
@media print {
  .hero, .about-visual, .cta-band { background: #fff !important; color: #111 !important; }
  .hero h1, .hero h1 .hl, .hero p.lead, .about-visual .about-slogan, .about-visual p,
  .cta-band h2, .cta-band p { color: #111 !important; }
  .fab, #fabTop, .scroll-progress, .modal-mask, .theme-panel, .skip-link,
  #xjzToast, .nav-toggle, .header-search, .product-search { display: none !important; }
  /* 【第十一轮】打印块此前只重置透明度/位移，忘了 blur(9px)：从页顶直接打印时首屏外图片仍是模糊的 */
  .fade-up, .img-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .products-grid.updating { filter: none !important; }
  section, footer, .product-card, .cat-card { break-inside: avoid; }
}

/* ===================================================================
   第八轮补优（2026-11-27）
   =================================================================== */
/* 【超窄屏 ≤360px】34px logo 仍可能挤压搜索框：再降一档并允许 logo 适度收缩，
   保证 header-search 的搜索按钮（flex-shrink:0）不被顶出视口产生横向滚动 */
@media (max-width: 360px) {
  .logo { flex-shrink: 1; min-width: 0; }
  .logo-full { height: 28px; min-height: 24px; max-width: 40vw; }
}
/* 【强制颜色 / 高对比度模式】Windows 高对比度会抹掉 background/border/box-shadow，
   选中态仅靠背景色表达时将与未选中项无法区分。用系统色 CanvasText 补一圈轮廓，
   只加 outline，不改任何颜色令牌与布局，正常模式不生效。 */
@media (forced-colors: active) {
  .chip.active, .skin-opt.active, .theme-opt.active, .quick-preset.active,
  .brand-chip.active, .brand-box.active, .appearance-tab.active, .filter-chips .chip.active,
  .nav a.active, .btn-primary, .no-reset {
    outline: 2px solid CanvasText;
    outline-offset: -2px;
  }
  .brand-chip.active { box-shadow: none; }
}
