/* ==========================================================================
   智美富联科技 - 全站样式
   设计语言：白橙主题（主题橙 + 深橙棕侧栏与页脚）
   ========================================================================== */

:root {
  --brand: #f97316;      /* 主题橙 */
  --brand-dark: #c2410c;
  --steel: #a55a1e;      /* 深橙棕（侧栏头部 / 次级按钮 / 圆形控件） */
  --steel-dark: #8a4a17;
  --steel-deep: #7a3f14; /* 页脚底色 */
  --link: #ea580c;
  --text: #333333;
  --text-gray: #666666;
  --text-light: #888888;
  --bg-page: #ffffff;
  --bg-gray: #f0f1f2;
  --bg-side: #eef0f1;
  --border: #e2e2e2;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.7;
}

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

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

ul, ol { list-style: none; }

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--border);
  outline: none;
}

input:focus, textarea:focus { border-color: var(--steel); }

.container {
  /* 宽屏内容区：1100px 在 1920 视口下两侧各留 ~410px 空白，
     放宽至 1600px 并与顶栏/页脚同宽（三处均 1600 + 20px 内边距，边缘对齐） */
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* AI 生图放大 7%（容器不变，图片放大） */
.hero-slide img[src^="https://trae-api"],
.cat-item img[src^="https://trae-api"],
.cert-strip img[src^="https://trae-api"],
.map-frame img[src^="https://trae-api"],
.factory-photo img[src^="https://trae-api"],
.logo-badge img[src^="https://trae-api"] {
  transform: scale(1.07);
}

/* ==========================================================================
   顶部导航（红色横幅）
   ========================================================================== */
/* 透明悬浮顶栏：默认无背景，下滑后由 .scrolled 变白色顶栏（见文件末尾交互增强块） */
.site-header {
  background: transparent;
  color: var(--text);
  position: relative;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.logo-badge {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

/* 视觉放大 logo（transform 不占布局，顶栏高度不变） */
.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.7);
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.header-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(165, 90, 30, 0.18);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(70, 45, 25, 0.08);
  overflow: hidden;
  width: 240px;
}

.header-search input {
  flex: 1;
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
}

.header-search button {
  padding: 6px 10px;
  background: #fff;
  color: var(--text-gray);
  display: flex;
  align-items: center;
}

.header-search button svg { width: 15px; height: 15px; }

/* 中文 / EN 分段切换按钮 */
.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid rgba(51, 51, 51, 0.35);
  border-radius: 3px;
  overflow: hidden;
}

.lang-opt {
  font-size: 12px;
  line-height: 1;
  padding: 5px 12px;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-opt:hover { background: rgba(249, 115, 22, 0.1); }

.lang-opt.active {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.lang-opt.active:hover { background: var(--brand); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* 只选直接子项 > a：移动端语言切换会被 main.js 整体移入 nav 内，
   若用后代选择器会连带改掉语言按钮的文字颜色与字号（.lang-opt 自有样式） */
.main-nav > a {
  /* 深橙红 #c2410c：白底顶栏对比度 5.2:1（AA 达标），
     叠在浅色轮播图上也比主题橙 #f97316（2.9:1）清晰可读 */
  color: var(--brand-dark);
  /* 14px → 16px：客户反馈导航文字看不清 */
  font-size: 16px;
  padding: 2px 0;
  position: relative;
  transition: opacity 0.2s ease;
}

.main-nav > a:hover { opacity: 0.8; }

.main-nav > a.active { font-weight: 700; }

/* 英文站导航项全大写（按 <html lang> 判定，不影响中文站）；
   letter-spacing 补偿大写字母视觉宽度，避免 16px 下显得拥挤 */
html[lang="en"] .main-nav > a {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* 英文站标签类文本全大写统一规则（语言包大写要求的根因修复，一处覆盖全站）：
   所有标题（含 JS 生成的详情页 h1/h3）、分类名、侧栏按钮/引导语、面包屑、
   数据条标签、页脚栏目与链接、选项卡、参数表头、主按钮。
   正文句子（p、cat-desc、profile-text、news-item、side-contact-item、
   detail-note、footer-bottom 版权行）不纳入，保持可读性；
   侧栏分类链接 .side-list a 按用户要求保持正常大小写，不纳入大写规则；
   仅 <html lang="en"> 命中，中文站完全不受影响 */
html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] h5,
html[lang="en"] h6,
html[lang="en"] .cat-name,
html[lang="en"] .side-btn,
html[lang="en"] .btn-primary,
html[lang="en"] .tab-btn,
html[lang="en"] .spec-table th,
html[lang="en"] .detail-eyebrow,
html[lang="en"] .breadcrumb a,
html[lang="en"] .breadcrumb span,
html[lang="en"] .cta-label,
html[lang="en"] .stat span,
html[lang="en"] .cert-note,
html[lang="en"] .footer-col h4,
html[lang="en"] .footer-col a {
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  /* 与导航文字同色，保持移动端汉堡键与菜单项视觉一致 */
  color: var(--brand-dark);
}

.nav-toggle svg { width: 24px; height: 24px; }

/* ==========================================================================
   区块标题（首字母红色，居中）
   ========================================================================== */
.sec-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #444;
  margin: 46px 0 30px;
}

/* 标题颜色全站统一（不再首字标红） */
.sec-title .first { color: inherit; }

/* ==========================================================================
   首页 Hero 轮播
   ========================================================================== */
.hero {
  position: relative;
  background: #efe9e3;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  /* 框架随大图比例自适应：hero 图实为 1980×1080（11:6，比 16:9 更宽），
     框架取 54.545vw（= 1080/1980）与图片比例完全一致，
     contain 完整展示时图片恰好铺满框架、零裁切零留白（不露模糊蒙版）；
     height: 660px 供不支持 vw 的旧内核兜底，
     min(...) 上限防止超宽屏（21:9 等）轮播高过一屏 —— 触顶时由
     下方 contain + 模糊铺底自动补全两侧，图片仍完整展示 */
  height: 660px;
  height: 54.545vw;
  height: min(54.545vw, 100vh);
}

/* 现代内核（Chrome 88+ / Safari 15+ / Firefox 89+）精确 11:6：
   aspect-ratio 按布局宽度推导高度，而 vw 单位含滚动条宽度、
   会产生几像素偏差；max-height 触顶场景同样由模糊铺底兜底。
   移动端断点（后文）显式给出 height 后本比例自动失效，固定高度优先 */
@supports (aspect-ratio: 11 / 6) {
  .hero-slider {
    height: auto;
    max-height: 100vh;
    aspect-ratio: 11 / 6;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
  /* 内联 background-image 与 <img> 同源（见各页幻灯片 style 属性），
     供下方 ::before 模糊背景层继承 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 模糊铺底：background:inherit 取幻灯片上的内联背景图，
   模糊放大后铺满全宽 —— 主图用 contain 完整展示后，
   两侧/上下空隙由同图模糊版填充，避免出现留白色块 */
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  /* 模糊会向边缘外取样，放大确保四边无透明缝隙（.hero overflow:hidden 裁掉溢出） */
  transform: scale(1.1);
}

.hero-slide.active { opacity: 1; visibility: visible; }

.hero-slide img {
  /* 定位提升层级：与 ::before 同为定位元素，DOM 顺序在后即画在其上 */
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  /* 完整展示不裁切：大图（11:6）在任意视口宽度/高度下均不变形、不切边 */
  object-fit: contain;
}

/* 轮播大图上的公司名标题 + 标语 */
.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  text-align: center;
  padding: 0 16px;
}

.hero-title {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #000;
  margin: 0 0 12px;
}

.hero-sub {
  font-size: 15px;
  letter-spacing: 2px;
  color: #000;
  margin: 0;
}

/* 英文页轮播文案：标题贴向页面最左面（宽屏下不按 .container 内容区缩进），
   改用主题橙（黑色显得小气古板）；中文页保持居中黑色不变（仅 <html lang="en"> 命中） */
html[lang="en"] .hero-caption {
  text-align: left;
  padding-left: max(20px, 4vw);
  padding-right: 20px;
}

html[lang="en"] .hero-title,
html[lang="en"] .hero-sub {
  color: var(--brand);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.85), 0 0 14px rgba(255, 255, 255, 0.6);
}

/* 英文标题分多排排布，收紧行距使文案块更紧凑美观（中文单行不受影响） */
html[lang="en"] .hero-title { line-height: 1.35; }

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
  transition: background 0.25s ease;
}

.hero-dot.active { background: var(--brand); }

/* ==========================================================================
   核心产品（白底圆角卡片 + 深蓝标题 + 灰色描述 3 列）
   ========================================================================== */
.cat-section { padding: 0 0 40px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 列间距加大，保证每个产品左右都有留白，不与相邻产品挤在一起 */
  gap: 42px 34px;
}

.cat-item { text-align: left; }

/* 白底圆角卡片装产品图，柔和阴影悬浮感 */
.cat-card {
  display: block;
  aspect-ratio: 16 / 10;
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cat-item:hover .cat-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.cat-card img { width: 100%; height: 100%; object-fit: contain; }

/* 标题左侧浅蓝强调条 + 描述文字，仿样板说明块 */
.cat-body {
  display: block;
  padding-left: 14px;
  border-left: 2px solid #bfdbfe;
}

.cat-item .cat-name {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.cat-item:hover .cat-name { color: var(--brand); }

.cat-desc {
  display: block;
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.8;
  text-align: justify;
}

/* ==========================================================================
   公司简介 + 红色平行四边形认证块
   ========================================================================== */
.profile-section { padding: 0 0 50px; }

/* ---------- 首页 ODM/OEM 定制流程 ---------- */
.process-section { padding: 0 0 50px; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.process-card { background: var(--bg-gray); border-top: 3px solid var(--brand); border-radius: 0 0 4px 4px; padding: 26px 22px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.process-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(249, 115, 22, 0.12); }
.process-num { display: block; font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.process-card h3 { font-size: 15px; color: var(--text); margin-bottom: 8px; }
.process-card p { font-size: 13px; color: var(--text-gray); }
.process-stats { margin-top: 30px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border-radius: 4px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 28px 0; }
.stat { text-align: center; color: #fff; }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, 0.25); }
.stat strong { display: block; font-family: var(--serif); font-size: 28px; letter-spacing: 1px; }
.stat span { display: block; margin-top: 4px; font-size: 13px; opacity: 0.85; }

/* ---------- 首页 制造实力 ---------- */
.capability-section { padding: 0 0 50px; }
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cap-item { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 22px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.cap-item:hover { border-color: var(--brand); box-shadow: 0 8px 20px rgba(249, 115, 22, 0.08); }
.cap-item svg { flex: none; width: 30px; height: 30px; color: var(--brand); }
.cap-item h3 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.cap-item p { font-size: 13px; color: var(--text-gray); }

.profile-text {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 2;
  margin-bottom: 34px;
}

.profile-bottom {
  display: grid;
  /* minmax(0,1fr) + 子项 min-width:0：证书轨道为 max-content 超宽内容，
     否则会被 grid 项的 min-width:auto 撑爆列宽导致整页横向滚动条 */
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.profile-bottom > div { min-width: 0; }

.cert-strip {
  padding: 10px 0 26px;
  overflow: hidden;
  /* Apple 风格：两侧渐隐遮罩，卡片滑入滑出更柔和 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* 无缝无限轮播轨道：卡片用 margin-right 留白（最后一张也有），
   main.js 克隆一份轨道内容后整体平移 -50% 恰好回到起点，循环无跳变 */
.cert-track {
  display: flex;
  width: max-content;
  animation: certMarquee 50s linear infinite;
}

/* 鼠标悬停暂停轮播 */
.cert-strip:hover .cert-track {
  animation-play-state: paused;
}

@keyframes certMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* 证书卡片：大圆角 + 柔和投影，悬停轻微上浮（Apple 风格） */
.cert-strip .cert-slide {
  flex: 0 0 auto;
  width: 250px;
  height: 340px;
  margin-right: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.cert-strip .cert-slide:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06), 0 20px 42px rgba(0, 0, 0, 0.14);
}

.cert-strip .cert-slide img { width: 100%; height: 100%; object-fit: contain; }

.cert-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 4px 16px;
}

.cert-icons .cert-note {
  font-size: 12px;
  color: var(--text-light);
}

/* ==========================================================================
   项目案例（左文案 + 右地图）
   ========================================================================== */
.showcase-section { padding: 0 0 60px; }

.showcase-grid {
  display: grid;
  grid-template-columns: 24% 1fr;
  min-height: 340px;
}

.showcase-intro {
  background: #fbeee1;
  color: #7a4516;
  font-size: 12.5px;
  font-style: italic;
  line-height: 2;
  padding: 26px 22px;
}

.showcase-map {
  position: relative;
  overflow: hidden;
  background: #f5efe9;
}

.showcase-map img { width: 100%; height: 100%; object-fit: cover; }

.map-next-btn {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--steel);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.map-next-btn:hover { background: var(--steel-dark); }
.map-next-btn svg { width: 16px; height: 16px; }

/* 内页证书缩略图网格（技术图书馆等） */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 10px;
}

.cert-grid .cert-thumb {
  height: 260px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: zoom-in;
}

/* contain 保证竖版证书完整显示不裁切 */
.cert-grid .cert-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* 公司新闻列表（首页 #news 区块） */
.news-list { border-top: 1px solid var(--border); }

.news-item {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 15px 8px;
  border-bottom: 1px solid var(--border);
}

.news-date {
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 12.5px;
  color: var(--text-light);
}

.news-item a {
  font-size: 13.5px;
  color: var(--text);
  transition: color 0.2s ease;
}

.news-item a:hover { color: var(--brand); }

.showcase-intro .side-btn { margin-top: 18px; }

/* ==========================================================================
   内页两栏布局（侧栏 + 内容）
   ========================================================================== */
.inner-wrap { padding: 26px 0 60px; }

.inner-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 34px;
  align-items: start;
}

/* ---------- 侧栏 ---------- */
.side-block { margin-bottom: 22px; }

.side-head {
  background: var(--steel);
  color: #fff;
  font-size: 15px;
  padding: 10px 18px;
  letter-spacing: 1px;
}

.side-body {
  background: var(--bg-side);
  padding: 14px 16px;
}

.side-list li + li { margin-top: 2px; }

.side-list a {
  display: block;
  font-size: 12.5px;
  color: #555;
  padding: 4px 2px;
  transition: color 0.2s ease;
}

.side-list a:hover { color: var(--brand); }

.side-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-side);
  border-top: 1px solid #e0e3e5;
}

.side-cta .cta-label {
  font-size: 12px;
  color: #777;
}

.circle-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--steel);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.circle-arrow:hover { background: var(--brand); }
.circle-arrow svg { width: 14px; height: 14px; }

.side-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #555;
  margin-bottom: 8px;
  word-break: break-all;
}

.side-contact-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 3px;
  stroke: #666;
}

.side-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #fff;
  border: 1px solid #c8ccce;
  border-radius: 3px;
  font-size: 12.5px;
  color: #555;
  padding: 7px 0;
  margin: 12px 0;
  transition: all 0.2s ease;
}

.side-btn:hover { border-color: var(--brand); color: var(--brand); }

.social-row {
  display: flex;
  gap: 14px;
  padding: 4px 0 12px;
}

.social-row svg {
  width: 17px;
  height: 17px;
  fill: #8a9299;
  transition: fill 0.2s ease;
}

.social-row a:hover svg { fill: var(--brand); }

/* ---------- 内页主内容 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #999;
  margin-bottom: 34px;
}

.breadcrumb svg { width: 14px; height: 14px; stroke: var(--steel); }
.breadcrumb a { color: var(--link); }
.breadcrumb a:hover { text-decoration: underline; }

.page-title {
  text-align: center;
  font-size: 21px;
  font-weight: 400;
  color: #444;
  margin-bottom: 36px;
  letter-spacing: 1px;
}

/* 页头标题下方的介绍视频：16:9 响应式铺满，圆角柔和阴影与卡片风格统一 */
.page-video {
  margin: -14px 0 30px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.page-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  cursor: pointer; /* 点击进入放大播放 */
}

/* 产品文字目录列表（复刻原站） */
.toc-list li { margin-bottom: 12px; }

.toc-list > li > a {
  font-size: 13.5px;
  color: #444;
  transition: color 0.2s ease;
}

.toc-list > li > a:hover { color: var(--brand); }

.sub-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin: 10px 0 16px 14px;
}

.sub-links a {
  font-size: 12.5px;
  color: var(--link);
}

.sub-links a:hover { text-decoration: underline; }

/* ---------- 产品卡片网格（详情页/热销用） ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  border: 1px solid var(--border);
  background: #fff;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fafaf9;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
}

.product-info { padding: 12px 14px 16px; }

.product-info h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

.product-info .product-desc {
  font-size: 11.5px;
  color: #999;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 详情页 ---------- */
.detail-layout {
  display: grid;
  /* 图库列 400px：与 400×400 的产品主图框架保持一致 */
  grid-template-columns: 400px 1fr;
  gap: 40px;
  margin-bottom: 44px;
}

.gallery-main {
  background: #fff;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 12px;
}

.gallery-main img { width: 100%; height: 100%; object-fit: contain; }

.gallery-thumbs { display: flex; gap: 10px; }

.thumb {
  width: 76px;
  height: 76px;
  overflow: hidden;
  background: #fff;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.active, .thumb:hover { opacity: 1; }

.detail-eyebrow {
  font-size: 12px;
  color: var(--brand);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 22px;
  color: #333;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.75;
  margin: -6px 0 4px;
  text-align: justify;
}

.detail-price {
  font-size: 20px;
  color: var(--brand);
  font-weight: 700;
  margin: 14px 0;
}

.detail-price .price-old {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  margin-left: 10px;
}

.detail-points { margin: 16px 0; }

.detail-points li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: #555;
  margin-bottom: 7px;
}

.detail-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.detail-actions {
  display: flex;
  gap: 14px;
  margin: 24px 0;
}

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 10px 28px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border: 1px solid var(--steel); color: var(--steel); }
.btn-outline:hover { background: var(--steel); color: #fff; }

/* 选项卡 */
.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 26px;
}

.tab-btn {
  font-size: 14px;
  color: #666;
  padding: 10px 24px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.tab-btn:hover { color: var(--brand); }

.tab-btn.active {
  color: var(--brand);
  font-weight: 700;
  border-bottom-color: var(--brand);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--border);
  padding: 9px 14px;
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  background: #f5f7f8;
  color: #555;
  font-weight: 600;
  width: 160px;
  white-space: nowrap;
}

.spec-table td { color: #444; }

.detail-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: #999;
  line-height: 1.9;
}

/* ---------- 关于页 ---------- */
.about-body {
  font-size: 13px;
  color: #555;
  line-height: 2.1;
}

.about-body h3 {
  font-size: 15px;
  color: #444;
  margin: 28px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--brand);
}

.about-body p { margin-bottom: 12px; }

.factory-photo {
  overflow: hidden;
  border-radius: 3px;
  margin: 14px 0 24px;
  /* 统一 16:9 框架：工厂/展会照片按框架比例铺满，各页版面高度一致 */
  aspect-ratio: 16 / 9;
}

.factory-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 联系页 ---------- */
.contact-info-block { margin-bottom: 30px; }

.contact-info-block .ci-company {
  font-size: 15px;
  font-weight: 700;
  color: #444;
  margin-bottom: 14px;
}

.contact-info-block .ci-row {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.contact-info-block .ci-row svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 4px;
  stroke: var(--steel);
}

.contact-map-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
  /* 与厂区实景图 16:9 一致，图片完整铺满框架不留空隙 */
  aspect-ratio: 16 / 9;
}

.contact-map-frame img { width: 100%; height: 100%; object-fit: cover; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}

.contact-form .form-row { margin-bottom: 14px; }

.contact-form label {
  display: block;
  font-size: 12.5px;
  color: #666;
  margin-bottom: 5px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 3px;
  background: #fff;
}

.contact-form textarea { min-height: 120px; resize: vertical; }

.contact-form .form-error {
  font-size: 12px;
  color: var(--brand);
  margin-top: 4px;
  display: none;
}

.contact-form .form-row.error .form-error { display: block; }
.contact-form .form-row.error input,
.contact-form .form-row.error textarea { border-color: var(--brand); }

.form-success {
  display: none;
  background: #eaf6ea;
  border: 1px solid #bfe3bf;
  color: #2c7a2c;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 3px;
  margin-top: 12px;
}

.form-success.show { display: block; }

.feedback-intro {
  background: var(--bg-side);
  padding: 24px 26px;
  font-size: 12.5px;
  color: #555;
  line-height: 2.1;
}

.feedback-intro h4 {
  font-size: 14px;
  color: #444;
  margin-bottom: 10px;
}

/* ---------- 下载 / 技术图书馆 ---------- */
.doc-list li {
  border-bottom: 1px dashed var(--border);
}

.doc-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 6px;
  font-size: 13.5px;
  color: #444;
  transition: color 0.2s ease;
}

.doc-list a:hover { color: var(--brand); }

.doc-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--steel);
}

.doc-list .doc-meta {
  margin-left: auto;
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}

/* ==========================================================================
   页脚（深钢蓝）
   ========================================================================== */
.site-footer {
  background: var(--steel-deep);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 170px repeat(4, 1fr);
  gap: 26px;
  padding: 46px 20px 36px;
  max-width: 1600px;
  margin: 0 auto;
}

/* 页脚 logo 徽标：.logo-badge 基础样式无 display，span 默认 inline 时
   width/height 不生效，内部 img 会按 .footer-logo 整宽渲染并被
   scale(1.7) 放大溢出视口；显式块化让 52px 盒生效 */
.footer-logo .logo-badge {
  display: block;
  width: 52px;
  height: 52px;
}

.footer-col h4 {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col li { margin-bottom: 9px; }

.footer-col a {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
}

.footer-col a:hover { color: #fff; }

.footer-col .footer-mail {
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-all;
}

.footer-col .footer-mail svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: rgba(255, 255, 255, 0.72);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  max-width: 1600px;
  margin: 0 auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-legal a { color: rgba(255, 255, 255, 0.6); }
.footer-legal a:hover { color: #fff; }

.footer-tech a { color: rgba(255, 255, 255, 0.6); }
.footer-tech a:hover { color: #fff; }

/* ==========================================================================
   悬浮组件
   ========================================================================== */
.chat-fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.4);
  transition: transform 0.2s ease;
}

.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 16px; height: 16px; }

/* 图片放大 Lightbox */
.cert-strip .cert-thumb { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.86);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open { opacity: 1; visibility: visible; }

.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 86vh;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  transform: scale(0.9);
  transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.32, 1.15);
}

.lightbox.open img { transform: scale(1); }

/* 标题下介绍视频的放大播放（复用 lightbox 遮罩，视频黑底铺满 16:9） */
.lightbox video {
  width: min(92vw, 960px);
  max-height: 86vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  transform: scale(0.9);
  transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.32, 1.15);
}

.lightbox.open video { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-close svg { width: 20px; height: 20px; }

body.lightbox-active { overflow: hidden; }

/* 回到顶部 */
.scroll-top {
  position: fixed;
  right: 30px;
  bottom: 84px;
  z-index: 900;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--steel);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--brand); }
.scroll-top svg { width: 18px; height: 18px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 960px) {
  /* 移动端隐藏页面滚动条（触摸滑动 / 滚轮仍可正常滚动）：
     Firefox（scrollbar-width）与旧 Edge（-ms-overflow-style）各走一条，
     WebKit/Chromium 系（含移动端 Safari/Chrome、Win 测试环境）走
     ::-webkit-scrollbar display:none；根元素与 body 双写覆盖视口滚动条归属差异 */
  html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
  }

  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-stats { grid-template-columns: repeat(2, 1fr); gap: 22px 0; padding: 24px 0; }
  .stat + .stat { border-left: none; }
  .stat strong { font-size: 24px; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }

  /* ---- 顶栏移动端重排（单行）----
     logo 左、汉堡键右，两者同一行；公司名文本已移除，
     品牌信息由 logo / aria-label / 页面 h1 承载。
     移动端不显示搜索框与 header-top-row；语言切换由 main.js 移入汉堡菜单内。
     菜单常驻绝对定位整宽下拉（脱离文档流、不顶开页面），收起态用
     visibility+opacity 隐藏，展开时自上而下滑入淡出，文字居中。
     此布局下顶栏高度 ≈ 10+52+10 = 72px，
     与文末「移动端 hero 上移量 / 锚点补偿」块联动 */
  .header-inner { position: relative; gap: 10px 16px; padding: 10px 16px; }
  .brand { gap: 14px; }
  /* 占满 logo 右侧剩余宽度并右对齐 → 汉堡键顶到最右，与 logo 同行 */
  .header-right {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 12px;
  }
  /* 首行容器移动端整体隐藏（搜索桌面才显示；语言切换已移入菜单），
     避免空容器占位把汉堡键挤离最右端 */
  .header-top-row { display: none; }
  /* 移动端隐藏搜索框（桌面端保留 240px 样式不变） */
  .header-search { display: none; }
  .nav-toggle { display: flex; flex: none; }
  /* 菜单卡常驻绝对定位（相对 .header-inner，已 position:relative）：
     left/right:0 整宽贴齐视口，top:100% 紧贴首行之下，脱离文档流 →
     不推挤 logo / 汉堡键所在行。收起态不用 display:none —— display
     切换无法触发过渡动画；改用 visibility+opacity+transform 组合：
     visibility:hidden 同时移出 tab 焦点与读屏器，行为等同隐藏 */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    /* 居中对齐：菜单项与文字在卡内水平居中 */
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    background: #fff;
    padding: 14px 18px;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(70, 45, 25, 0.16);
    /* #siteHeader 在本断点为 fixed 且无高度约束，矮视口（横屏/小窗）下
       展开菜单会纵向溢出视口底部且页面滚动无法触达；
       限高 = 视口高 - 顶栏72px - 8px 下间距 - 8px 呼吸 = 88px，超出时菜单内滚动。
       dvh 不支持的内核自动丢弃第二条，保留 vh 兜底 */
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* 收起态：自上而下 16px 滑入 + 淡出；visibility 过渡延迟到动画结束
       再生效（0.25s 与透明度同步），保证淡出全过程仍可见可点 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }
  /* 展开态：visibility 立即生效（本条过渡不含延迟），随后滑下淡入 */
  .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  /* 语言切换（main.js 按断点移入菜单内）撑满菜单卡并居中，
     与上方文字导航项形成视觉区分；桌面端 .lang-switch 仍在 header-top-row，不受影响 */
  .main-nav .lang-switch { align-self: stretch; justify-content: center; }
  /* 移入菜单后按 0,2,0 覆盖 .lang-opt 基础 pill 样式（0,1,0），
     给菜单内的语言按钮更大的字号与点击区（基础样式为 12px / 5px 12px） */
  .main-nav .lang-opt {
    padding: 6px 14px;
    font-size: 13px;
    transition: background 0.2s ease, color 0.2s ease;
  }

  /* iOS Safari 聚焦输入框会按 <16px 字号自动放大整页，统一抬到 16px 防护 */
  .header-search input,
  .contact-form input,
  .contact-form textarea { font-size: 16px; }

  .hero-slider { height: 480px; }
  .hero-title { font-size: 22px; letter-spacing: 2px; }
  .hero-sub { font-size: 12px; letter-spacing: 1px; }

  .cert-grid { grid-template-columns: repeat(2, 1fr); }

  .cert-strip .cert-slide { width: 190px; height: 260px; margin-right: 16px; }

  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-map { min-height: 260px; }

  .inner-layout { grid-template-columns: 1fr; }
  /* 单列后 DOM 顺序（侧栏在前）会把侧栏顶到主内容上方；
     移动端统一将侧栏排到主内容之后：产品列表 / 文章 / 表单在前，侧栏在下。
     order 只影响移动端（桌面端侧栏仍在左栏），行间距由 .inner-layout 的 34px gap 接管 */
  .inner-side { order: 2; }
  /* 侧栏在移动端改为两列并排：全站 12 个内页侧栏均恰好 2 个 .side-block，天然等宽 */
  .inner-side {
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }
  .side-block { margin-bottom: 0; }

  /* 详情页单列：桌面 40px 横向间距在手机变成纵向后过空，
     同步收紧与下方选项卡的 44px 下距 */
  .detail-layout { grid-template-columns: 1fr; gap: 26px; margin-bottom: 34px; }
  /* 缩略图较多时换行平铺，防止横向溢出 */
  .gallery-thumbs { flex-wrap: wrap; }
  /* 英文选项卡标签很长（Packing & Accessories 等，总宽约 536px），
     561~576px 临界屏宽会溢出容器，故在 960 断点即启用横向滚动 */
  .tabs-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-btn { flex: none; white-space: nowrap; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .sub-links { grid-template-columns: 1fr; }
  /* 产品目录 / 页内目录：行内小字链接在手机上点击热区不足 20px，
     块化 + 纵向内边距扩大拇指热区，字号同步上调一档 */
  .toc-list > li > a { display: block; padding: 7px 0; font-size: 14px; }
  .sub-links a { display: block; padding: 6px 0; font-size: 13px; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-logo { grid-column: 1 / -1; }
  /* 移动端页脚 logo 缩小：40px 盒 ×1.7 ≈ 68px 视觉，与页脚小字号协调 */
  .footer-logo .logo-badge { width: 40px; height: 40px; }
}

@media (max-width: 560px) {
  .container { padding: 0 14px; }

  .sec-title { margin: 34px 0 22px; font-size: 16px; }

  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; }
  .cat-item .cat-name { font-size: 15px; }
  .cat-desc { font-size: 12px; }

  /* 单卡文字在 2 列下过挤，窄屏改为单列纵向流 */
  .process-grid { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: 1fr; }

  .hero-slider { height: 360px; }
  .hero-title { font-size: 19px; letter-spacing: 1px; }
  .hero-sub { font-size: 11px; }

  /* 新闻条目日期与标题并排易溢出，允许换行 */
  .news-item { flex-wrap: wrap; gap: 4px 14px; }

  .inner-wrap { padding: 20px 0 46px; }
  .breadcrumb { flex-wrap: wrap; margin-bottom: 24px; }
  .page-title { font-size: 18px; margin-bottom: 24px; }
  /* 小屏标题下距仅 24px，视频再上提 -14px 只剩 10px 过挤，取消上提 */
  .page-video { margin-top: 0; }
  /* 侧栏两列在窄屏过挤，恢复单列（列间距由 grid gap 接管） */
  .inner-side { grid-template-columns: 1fr; gap: 18px; }
  .feedback-intro { padding: 18px 16px; }

  .product-grid { grid-template-columns: 1fr; }
  .detail-title { font-size: 18px; flex-wrap: wrap; }
  .detail-price { font-size: 17px; }
  .detail-actions { flex-wrap: wrap; gap: 10px; }
  .btn-primary,
  .btn-outline { padding: 10px 18px; font-size: 13px; }
  /* 询价 / 联系按钮平分整行并居中，扩大拇指点击面积；
     英文 Request a Quote 约 136px < 半行 ≈186px，不会折行 */
  .detail-actions .btn-primary,
  .detail-actions .btn-outline { flex: 1 1 0; justify-content: center; }

  /* 选项卡横向滚动已上提到 960 断点，此处仅压缩手机端按钮尺寸 */
  .tab-btn { padding: 10px 16px; font-size: 13px; }

  /* 参数表首列 nowrap 160px 在窄屏挤压取值列，收窄并允许折行 */
  .spec-table th,
  .spec-table td { font-size: 12.5px; padding: 8px; }
  .spec-table th { width: 110px; white-space: normal; }
  .spec-table td { word-break: break-word; }

  /* 文档行右侧 meta（margin-left:auto + nowrap）会把标题挤出屏幕，改为独占一行；
     用 padding-left 而非 margin-left：flex-basis:100% + margin 会超出容器 28px */
  .doc-list a { flex-wrap: wrap; gap: 4px 10px; }
  .doc-list .doc-meta { flex-basis: 100%; margin-left: 0; padding-left: 28px; white-space: normal; }

  /* 小屏页脚保持两列：单列会让 4 组链接各占一整行把页脚拉得过长；
     同时收紧内边距与行距，列宽 ≈165px 足够最长文案（word-break 兜底邮箱） */
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; padding: 32px 14px 26px; }
  .footer-col h4 { margin-bottom: 12px; }
  .footer-col li { margin-bottom: 7px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }

  /* 悬浮按钮缩角，避免小屏遮挡内容 */
  .chat-fab { right: 14px; bottom: 16px; padding: 8px 14px; }
  .scroll-top { right: 16px; bottom: 70px; width: 38px; height: 38px; }
}

/* ==========================================================================
   交互增强：吸顶头部 / 导航下划线动画 / 滚动浮现 / 数字滚动 / 悬停细节
   ========================================================================== */
/* sticky 必须加在占位容器上：header 被 components.js 包在 #siteHeader 内，
   sticky 元素只能在父容器范围内吸顶，若加在 .site-header 上会随父容器滑出屏幕。
   -webkit-sticky 前缀行不可省略：旧版 iOS Safari（<13）与微信内置浏览器等
   旧 WebView 内核只认带前缀写法，缺失会导致移动端顶栏滚动时不吸顶固定 */
#siteHeader { position: -webkit-sticky; position: sticky; top: 0; z-index: 100; }
.site-header { transition: background 0.3s ease, box-shadow 0.3s ease; }
.site-header.scrolled { background: #fff; box-shadow: 0 8px 22px rgba(70, 45, 25, 0.12); }
[id] { scroll-margin-top: 84px; }

/* 全站顶栏透明悬浮，下滑后浮现白色顶栏；透明态文字带浅色光晕以保证图片上可读 */
.site-header:not(.scrolled) .main-nav a,
.site-header:not(.scrolled) .lang-opt,
.site-header:not(.scrolled) .nav-toggle { text-shadow: 0 1px 4px rgba(255, 255, 255, 0.55); }
/* Hero 上移量兜底值（桌面端顶栏实测 ≈98px）；
   运行时由 main.js initHeroOffset() 实测 #siteHeader 高度精确覆盖，
   以适配移动端断点与菜单展开导致的顶栏高度变化，防止白色空隙 */
body:has(.hero-slider) .hero { margin-top: -98px; }

.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 2px; background: var(--brand); border-radius: 2px; transform: scaleX(0); transform-origin: right center; transition: transform 0.28s ease; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); transform-origin: left center; }

.cat-card img { transition: transform 0.45s ease; }
.cat-item:hover .cat-card img { transform: scale(1.1); }

.news-item { transition: transform 0.2s ease; }
.news-item:hover { transform: translateX(6px); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.revealed { opacity: 1; transform: none; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.header-search input:focus-visible, .lang-switch .lang-opt:focus-visible { outline-color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cat-card img, .main-nav a::after, .news-item { transition: none; }
  /* 证书无限轮播静止，仅展示首屏卡片 */
  .cert-track { animation: none; }
}

/* ==========================================================================
   移动端顶栏强制吸顶（必须放在上方 sticky / [id] / .hero 兜底规则之后：
   同特异性时源顺序在后者胜出，才能覆盖 #siteHeader 的 sticky）
   旧内核（微信内置浏览器、旧 iOS Safari 等）的 sticky 会因祖先 overflow
   或自身支持缺陷被静默忽略，移动端唯一可靠的吸顶手段是 fixed
   ========================================================================== */
@media (max-width: 960px) {
  /* 顶栏固定视口顶部；单行重排后高度 ≈ 72px（10+52+10） */
  #siteHeader { position: fixed; top: 0; left: 0; right: 0; }
  /* 顶栏脱离文档流后，内页内容整体下移避开：72px 顶栏 + 原 26px 上间距。
     全站 12 个内页均恰好一个 .inner-wrap，首页无此类名不受影响 */
  .inner-wrap { padding-top: 98px; }
  /* Hero 原靠负 margin 上滑到顶栏之下；fixed 后顶栏不再占文档流，
     归零即可让透明顶栏悬浮在大图上，视觉与桌面一致 */
  body:has(.hero-slider) .hero { margin-top: 0; }
  /* 锚点滚动补偿：fixed 顶栏永久遮挡视口顶部 72px，留 8px 呼吸间距 */
  [id] { scroll-margin-top: 80px; }
}
