/* ===== Apple 风格基础样式 ===== */
:root {
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --border: #d2d2d7;
  --gray-50: #808080;   /* 50% 灰（在白色背景上等同于 50% 黑度的灰，正中间灰） */
  --radius: 18px;
  --nav-h: 66px;
  --maxw: 980px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
a, button { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.nav-inner {
  width: 100%; max-width: 1024px; padding: 0 22px;
  display: flex; align-items: center; gap: 28px;
}
.nav-logo { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; }
/* 移动端汉堡按钮（桌面隐藏；小屏 .nav-links 变为下拉面板时显示） */
.nav-burger {
  display: none; margin-left: auto; flex: 0 0 auto;
  width: 44px; height: 44px; padding: 11px 10px;
  flex-direction: column; justify-content: center; gap: 5px;
  border: 0; background: transparent; cursor: pointer;
}
.nav-burger span { height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-links { display: flex; align-items: center; gap: 34px; margin-left: auto; }
/* 顶层链接：直接子链接 或 下拉项（.nav-item）里的主链接；下拉面板内的链接不受此规则影响 */
.nav-links > a, .nav-item > .nav-link {
  font-size: 16px; color: var(--text-secondary); transition: color 0.2s;
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-links > a:hover, .nav-item > .nav-link:hover { color: var(--text); }

/* 导航下拉菜单（「产品」分类） */
.nav-item { position: relative; height: var(--nav-h); display: flex; align-items: center; }
.nav-item .caret {
  width: 0; height: 0; margin-top: 2px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .55;
  transition: transform 0.2s ease;
}
.nav-item:hover .caret { transform: rotate(180deg); }
/* 移动端二级菜单的折叠按钮：桌面隐藏（宽屏下拉走 :hover 或触屏「先点展开」）。
   「产品」文字本身仍是链接，这个按钮只负责开合子菜单。 */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 48px; height: 44px; margin: -6px 0;
  border: 0; background: transparent; cursor: pointer;
  color: var(--text-secondary); border-radius: 10px;
}
.nav-toggle:hover { color: var(--text); background: var(--bg-soft); }
.nav-toggle .toggle-icon {
  width: 9px; height: 9px; margin-top: -5px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);            /* 直角边框转 45° 得到「向下」箭头 */
  transition: transform 0.24s ease, margin-top 0.24s ease;
}
.nav-item.open .nav-toggle .toggle-icon { transform: rotate(-135deg); margin-top: 5px; }
.nav-drop {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 240px; padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 120;
}
.nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-drop .nav-drop-link {
  display: block; padding: 9px 14px; border-radius: 10px;
  font-size: 14px; line-height: 1.4; color: var(--text-secondary); white-space: nowrap;
}
.nav-drop .nav-drop-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-drop .nav-drop-link:first-child { font-weight: 600; color: var(--text); }

/* 触屏宽屏（手机横屏 / 平板，≥769px）：桌面下拉只认 :hover，手指点不出来，
   所以由 footer 脚本在第一次点击时给 .nav-item 加 .open 来展开；
   这里的规则限定 ≥769px，避免覆盖移动端「下拉内联展开」的样式。
   有鼠标的桌面设备行为不变（仍走 :hover + 点击直接跳转）。 */
@media (min-width: 769px) {
  .nav-item.open .nav-drop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
  .nav-item.open .caret { transform: rotate(180deg); }
}

/* 语言切换器 */
.lang-switch { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; }
.lang-switch a { color: var(--text-secondary); padding: 2px 4px; border-radius: 6px; }
.lang-switch a.active { color: var(--accent); font-weight: 600; }
.lang-switch a:hover { color: var(--text); }
.lang-switch .sep { color: var(--border); }

/* 容器 */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }

/* Hero */
.hero {
  text-align: center; padding: 110px 22px 90px;
  background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 100%);
}
.hero h1 {
  font-size: 64px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.05; margin-bottom: 14px;
}
/* 限宽居中：宽度与下方大图（.hero-img 的 min(1200px,100%)）保持一致，文字与图左右齐平；
   超宽屏/缩小浏览器缩放时也不会拉成一行。pre-line 保留后台敲的回车换行（不解析 HTML，安全） */
.hero p { font-size: 24px; color: var(--text-secondary); max-width: min(1200px, 100%); margin: 0 auto 28px; line-height: 1.6; white-space: pre-line; }
/* 区块主图显示盒（hero 与 feature 共用）：16:10 定盒（桌面宽上限 1200px → 高 750px），
   图片 cover 填满——比例一致的图完整显示零裁切，比例不同的图居中裁切超出部分；
   移动端宽度撑满视口、按 16:10 自动变矮 */
.hero-img, .feature-img {
  margin: 40px auto 0; width: min(1200px, 100%);
  aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--text-secondary);
}
.feature-img { margin-top: 36px; }

/* 产品详情副标题：限宽 980px，与下方 980×600 主图左右齐平（首页/栏目页 hero 仍为 1200px，互不影响）。
   仅在该产品确实有主图时模板才会加 .hero-product——无图时回落用整幅 hero-img 占位，副标题保持 1200px */
.hero-product p { max-width: min(980px, 100%); }

/* 产品详情主图：显示盒固定 980×600（49:30），图片以 cover 填满裁切（见模板内联样式）；
   移动端等比缩到视口宽度 */
.product-hero-img { margin: 30px auto 0; width: 980px; max-width: 100%; height: 600px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--radius);
  background: var(--bg-soft); }
.product-hero-img img { display: block; border-radius: var(--radius); }

/* 产品详情：描述要紧跟主图。hero 下方原本留 90px、正文 section 又补 80px（合计 170px）太空，
   这里把详情页 hero 的下边距收到 56px，并让紧随其后的 section 不再叠加顶部内边距。
   用 .hero-detail 与相邻兄弟选择器限定范围，首页 / 栏目页的 hero 不受影响 */
.hero-detail { padding-bottom: 56px; }
.hero-detail + .section { padding-top: 0; }

/* 产品描述（详情页正文首段）：字号比原来的 20px 略收，颜色由灰字改为正文黑，
   宽度与上方主图（980px）对齐并居中 */
.product-desc { font-size: 18px; color: var(--text); max-width: min(980px, 100%);
  margin: 0 auto; text-align: center; line-height: 1.6; white-space: pre-line; }

/* 产品标语（hero 里的副标题）：字号与上方产品描述保持一致（原随 .hero p 为 24px） */
.hero-detail p { font-size: 18px; }

/* 产品特性：去掉胶囊外框，纯文字 + 竖线分隔。
   字号 38.5px = 原 55px 的 70%（即缩小 30%），颜色为 50% 灰；
   竖线用 ::before 伪元素贴在第 2 个及之后的特性左侧，1px 宽、1em 高（＝当前字号，与文字等高），
   随字号自动缩放；横向间距全部交给竖线的左右留白，容器不再设列间距，避免间距翻倍 */
.product-features { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 16px 0; margin-top: 34px; }
.product-feature { font-size: 38.5px; font-weight: 700; letter-spacing: -0.02em; color: var(--gray-50);
  display: inline-flex; align-items: center;
  font-family: "PingFang SC", "Heiti SC", "Hiragino Sans GB", "Microsoft YaHei", "SimHei", "Noto Sans SC", sans-serif; }
.product-feature + .product-feature::before { content: ""; flex: none;
  width: 1px; height: 1em; background: var(--border); margin: 0 30px; }
/* 换行时落在行首的特性，其左侧竖线会被移除（由 product_detail.ejs 末尾的小脚本打标），
   否则行首会孤零零竖一根线 */
.product-feature.no-sep::before { display: none; }

/* 特性区块 */
.feature { text-align: center; padding: 70px 22px; }
.feature h2 { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.feature p { font-size: 21px; color: var(--text-secondary); max-width: min(1200px, 100%); margin: 0 auto 24px; line-height: 1.6; white-space: pre-line; }

/* ===== 关于我们 / 招聘 / 联系我们 的页面副标题 =====
   这三个页面只由 views/page.ejs 渲染（首页走 home.ejs，产品/文章页各有模板），
   因此把字号挂在 .page-sub 上，只影响这三页，首页与其他页面一行都不会动。
   「副标题」指两处：hero 大标题下那句 + 特性区块（如「我们的使命」）标题下的说明，
   字号统一到产品页描述的 18px（.product-desc）。
   选择器必须写成「.hero .page-sub」两段类名：特异性 (0,2,0) 高于上面的 .hero p / .feature p，
   否则 24px / 21px 会把这里盖回去。 */
.hero .page-sub, .feature .page-sub { font-size: 18px; }

/* 按钮 */
.btn {
  display: inline-block; font-size: 17px; padding: 12px 22px;
  border-radius: 980px; background: var(--accent); color: #fff;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: rgba(0, 113, 227, 0.08); }

/* 产品网格 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--bg-soft); border-radius: var(--radius); overflow: hidden;
  padding: 40px 28px; text-align: center; transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); }
.card-img { width: 100%; max-width: 480px; aspect-ratio: 1/1; border-radius: 12px;
  margin: 0 auto 22px; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card h3 { font-size: 26px; font-weight: 600; }
.card .tagline { color: var(--text-secondary); font-size: 17px; margin: 6px 0 14px; }
.card .price { font-weight: 600; color: var(--accent); }

/* hero / feature 区块主图：填满 16:10 定盒（cover，不变形；比例一致的图完整显示）；
   带链接时 <a> 撑满盒子避免缝隙 */
.hero-img img, .feature-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img > a, .feature-img > a { display: block; width: 100%; height: 100%; }

/* 悬停放大动效：产品页图片 */
.zoomable { cursor: zoom-in; transition: transform 0.35s ease; }
.zoomable:hover { transform: scale(1.05); }

/* ===== 图片描述（悬停提示）=====
   所有插图位置共用：后台给图片填了描述 → 鼠标悬停时在图片底部浮出说明；
   没填描述 → 模板根本不输出这个元素，前台连痕迹都没有（不会有空白条）。
   容器需要 position:relative 来定位、overflow:hidden 让提示跟随图片圆角裁切 */
.hero-img, .feature-img, .card-img, .post-thumb,
.product-hero-img, .gallery-item, .article-cover { position: relative; }
.img-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 10px 14px; font-size: 14px; line-height: 1.5; color: #fff; text-align: center;
  /* 纯色半透明底（50% 黑）：不再用「上边缘渐隐」的渐变，文字上方不会出现一条灰带 */
  background: rgba(0,0,0,.5);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
  /* 描述较长时最多三行，超出省略，避免把整张图盖住 */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-img:hover .img-cap, .feature-img:hover .img-cap, .card-img:hover .img-cap,
.post-thumb:hover .img-cap, .product-hero-img:hover .img-cap, .gallery-item:hover .img-cap,
.article-cover:hover .img-cap { opacity: 1; }
/* 触摸设备没有 hover：让提示常驻，否则手机上永远看不到描述 */
@media (hover: none) {
  .img-cap { opacity: 1; }
}
/* 缩略图很小（160×110），提示文字同步收小，否则一行放不下几个字 */
.post-thumb .img-cap { padding: 5px 7px; font-size: 11px; line-height: 1.35; -webkit-line-clamp: 2; }
/* 大图位（页面区块图、产品卡片/主图/图集、文章详情封面）说明文字放大到 18px，
   与产品页的标语 / 描述同字号（.product-desc / .hero-detail p 都是 18px）；
   首页的说明保持 14px 不变，列表小缩略图仍走上面的 11px 规则 */
.img-cap.lg { padding: 12px 16px; font-size: 18px; line-height: 1.55; }

/* 灯箱 / 相册浏览：浅色看图环境，底色与详情盒子一致 */
.lightbox { position: fixed; inset: 0; background: var(--bg-soft);
  display: none; align-items: center; justify-content: center; z-index: 1000; flex-direction: column; }
.lightbox.open { display: flex; }
/* 灯箱视口：居中展示图片，图片自适应窗口完整显示 */
.lightbox-stage { max-width: 92vw; max-height: 82vh; overflow: auto; display: flex;
  scrollbar-width: none; }
.lightbox-stage::-webkit-scrollbar { display: none; }
.lightbox-stage img { margin: auto; flex: 0 0 auto; display: block; background: var(--bg-soft);
  max-width: 92vw; max-height: 82vh; width: auto; height: auto;
  user-select: none; -webkit-user-drag: none; }
.lb-toolbar { position: absolute; top: 16px; right: 16px; display: flex; gap: 10px; z-index: 1001; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(0,0,0,.55);
  color: #fff; font-size: 20px; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s; }
.lb-btn:hover { background: rgba(0,0,0,.75); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 24px; cursor: pointer; z-index: 1001; }
.lb-nav:hover { background: rgba(0,0,0,.75); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-counter { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: var(--text-secondary); font-size: 14px; }
/* 大图说明：点开看大图时显示当前这张图的描述；没有描述时整条隐藏（由模板的 hidden 属性控制） */
.lb-caption { position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%);
  max-width: 80vw; padding: 10px 16px; border-radius: 10px; text-align: center;
  /* 与悬停提示统一：50% 黑底、18px（＝产品页标语/描述字号，灯箱只出现在非首页的大图页） */
  background: rgba(0,0,0,.5); color: #fff; font-size: 18px; line-height: 1.6;
  backdrop-filter: blur(6px); z-index: 1001; }
.lb-caption[hidden] { display: none; }
.lb-close { font-size: 24px; line-height: 1; padding: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 40px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); }
.gallery-item img { width: 100%; height: auto; display: block; }

/* 文章列表 */
.post-list { display: grid; gap: 18px; }
.post-item {
  display: flex; gap: 20px; background: var(--bg-soft); border-radius: var(--radius);
  padding: 20px; align-items: center; transition: transform 0.2s;
}
.post-item:hover { transform: translateY(-3px); }
.post-thumb { width: 160px; height: 110px; border-radius: 12px; background: #fff;
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: var(--text-secondary);
  overflow: hidden; }
/* 封面图填满缩略盒并裁切，避免 height:auto 的图溢出盒子、盖住圆角 */
.post-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.post-meta { font-size: 13px; color: var(--text-secondary); }
.post-item h3 { font-size: 21px; font-weight: 600; margin: 4px 0; }
.post-item p { color: var(--text-secondary); }

/* 页脚 */
.footer { background: var(--bg-soft); padding: 30px 22px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap;
  gap: 10px; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-secondary); }
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--text); }

/* 滚动浮现动画：仅在 JS 可用时先隐藏（html.js 由 head 内联脚本添加），
   禁用 JS 的浏览器/爬虫直接看到内容，避免整站空白。
   注意 .in 规则必须带 html.js 前缀，否则优先级低于 html.js .reveal 无法浮现 */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal { opacity: 0; transform: translateY(30px); }
html.js .reveal.in { opacity: 1; transform: none; }

/* 页面/区块标题（集中管理字号，移动端可在媒体查询中缩放） */
.page-title { text-align: center; font-size: 48px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.page-title-l { margin-bottom: 40px; }
.section-title { text-align: center; font-size: 38px; font-weight: 700; margin-bottom: 36px; }

/* 文章详情 */
.article { max-width: 720px; margin: 0 auto; padding: 60px 22px; }
.article h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.article .meta { color: var(--text-secondary); margin-bottom: 28px; font-size: 14px; }
.article p { font-size: 18px; margin-bottom: 18px; white-space: pre-wrap; }
.article .cover { border-radius: var(--radius); margin: 24px 0; background: var(--bg-soft);
  aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
/* 文章封面外包一层：只为了给「图片描述」提供定位与圆角裁切，封面图片自身样式（.cover）一行未改 */
.article-cover { margin: 24px 0; border-radius: var(--radius); overflow: hidden; }
.article-cover .cover { margin: 0; }

/* ===== 文章正文（富文本）排版 =====
   正文由 lib/richtext.js 生成白名单标签：p / h2 / h3 / ul / ol / blockquote / hr / a / img / figure。
   下面 p 与 li 的字号、行距跟原来的「纯文字正文」（.article p）**逐条一致**，
   所以没用任何格式标记的老文章看起来不会有任何变化——新增的只是标题、列表、引用、插图这几类的样式。
   作用域全部限定在 .post-body 内，首页 / 产品页 / 其它页面的同名标签不受影响。 */
.post-body p { font-size: 18px; margin-bottom: 18px; white-space: pre-wrap; }
.post-body > :last-child { margin-bottom: 0; }
.post-body h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 34px 0 14px; }
.post-body h3 { font-size: 21px; font-weight: 600; margin: 28px 0 12px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 26px; }
.post-body li { font-size: 18px; line-height: 1.65; margin-bottom: 6px; }
.post-body blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--border);
  color: var(--text-secondary); font-size: 18px; line-height: 1.65; white-space: pre-wrap; }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 34px 0; }
.post-body a { color: var(--accent); text-decoration: none; }
.post-body a:hover { text-decoration: underline; }
/* 正文插图：外包的 .post-figure 既做圆角裁切，也给悬停说明条（.img-cap）提供定位父级 */
.post-figure { position: relative; margin: 28px 0; border-radius: var(--radius); overflow: hidden; }
.post-figure img { display: block; width: 100%; height: auto; background: var(--bg-soft); }
.post-figure:hover .img-cap { opacity: 1; }
/* 行内插图（写在段落中间、没独占一行时不会有 .post-figure 包裹） */
.post-body p img { max-width: 100%; height: auto; border-radius: 10px; vertical-align: middle; }

/* ===== 响应式：平板 / 手机 ===== */
@media (max-width: 768px) {
  .container, .nav-inner { padding-left: 16px; padding-right: 16px; }

  /* —— 移动导航：汉堡按钮 + 下拉面板 —— */
  .nav-burger { display: flex; }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0; margin: 0; gap: 0;
    padding: 4px 16px 14px;
    background: #ffffff;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto; z-index: 150;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links > a, .nav-item > .nav-link {
    display: flex; align-items: center; gap: 6px;
    padding: 13px 2px; font-size: 17px; color: var(--text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  /* 「产品」行：左列是文字链接，右列是折叠按钮（子菜单 grid-column 独占下一行） */
  .nav-item {
    height: auto;
    display: grid; grid-template-columns: 1fr auto; align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);   /* 分隔线移到整行，才能横贯到按钮右侧 */
  }
  .nav-item > .nav-link { border-bottom: 0; }
  .nav-item .caret { display: none; }               /* 换成按钮里的 .toggle-icon */
  .nav-toggle { display: flex; }

  /* 二级菜单默认收起。
     用 display 而不是 max-height 控制：分类一多，max-height 会把超出的项裁掉且点不到。 */
  .nav-drop {
    grid-column: 1 / -1;
    position: static; min-width: 0; transform: none;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
    padding: 0 0 4px; transition: none;
    display: none;
  }
  .nav-item.open .nav-drop {
    display: block; opacity: 1; visibility: visible;
    animation: navDropIn 0.26s ease both;
  }
  @keyframes navDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }
  /* 关键修复：触屏 tap 会先触发 :hover，把桌面下拉的 transform:translateX(-50%)
     带进内联下拉——整块左移半个宽度移出面板裁剪区，表现为「子分类一片空白、
     点了没反应」（click 的命中目标从链接变成了 .nav-item，WebKit 实测复现）。
     这里把 hover/focus 引入的位移钉死，位置始终以内联为准。 */
  .nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { transform: none; }
  .nav-drop .nav-drop-link { white-space: normal; padding: 10px 2px 10px 14px; font-size: 15px; }
  .lang-switch { display: flex; align-items: center; padding: 12px 2px 4px; }

  /* —— 区块与标题 —— */
  /* 只改上下内边距，避免简写覆盖 .container 的左右内边距 */
  .section { padding-top: 56px; padding-bottom: 56px; }
  .hero { padding: 72px 16px 56px; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 19px; }
  .feature { padding: 52px 16px; }
  .feature h2 { font-size: 32px; }
  .feature p { font-size: 19px; }
  /* 关于/招聘/联系页副标题：与产品页描述同步收一号（18 → 17） */
  .hero .page-sub, .feature .page-sub { font-size: 17px; }
  .page-title { font-size: 34px; }
  .section-title { font-size: 30px; margin-bottom: 26px; }

  /* —— 产品网格：两列紧凑 —— */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card { padding: 14px 10px 16px; border-radius: 14px; }
  .card:hover { transform: none; box-shadow: none; }
  .card-img { margin-bottom: 10px; border-radius: 8px; }
  .card h3 { font-size: 17px; line-height: 1.3; }
  .card .tagline {
    font-size: 13px; margin: 4px 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .card .price { font-size: 15px; }

  /* —— 文章 —— */
  .post-item { flex-direction: column; align-items: flex-start; }
  .post-thumb { width: 100%; height: 160px; }
  .article { padding: 40px 16px; }
  .article h1 { font-size: 32px; }
  .article p { font-size: 17px; }
  /* 正文富文本同步降到 17px（与 .article p 一致），不写的话 18px 会把老文章撑大 */
  .post-body p, .post-body li, .post-body blockquote { font-size: 17px; }
  .post-body h2 { font-size: 23px; }
  .post-body h3 { font-size: 19px; }

  /* —— 详情主图等比缩到视口宽度（980×600，49:30）；相册两列 —— */
  .product-hero-img { width: 100%; height: auto; aspect-ratio: 49/30; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
  /* 详情页主图与描述的间距同步收紧；写在 .hero 之后，避免被上面那条覆盖 */
  .hero-detail { padding-bottom: 40px; }
  .product-features { gap: 14px 0; margin-top: 26px; }
  /* 桌面 38.5px 的特性在窄屏会撑爆一行，这里同步缩到 26.6px（仍保持 −30% 的比例）；
     竖线左右留白一并收窄。标语与描述同步收一号。
     这几条必须排在本段 .hero p 之后，否则会被 .hero p 的 19px 盖回去 */
  .product-feature { font-size: 26.6px; }
  .product-feature + .product-feature::before { margin: 0 20px; }
  .hero-detail p { font-size: 17px; }
  .product-desc { font-size: 17px; }
  /* 大图说明与标语/描述同步收一号，三档比例保持一致（18 → 17 → 16） */
  .img-cap.lg, .lb-caption { font-size: 17px; }

  /* —— 灯箱 —— */
  .lb-nav { width: 42px; height: 42px; font-size: 20px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}

@media (max-width: 480px) {
  .hero { padding: 56px 14px 44px; }
  .hero-detail { padding-bottom: 32px; }
  /* 手机宽度放不下三个 21px 特性 + 竖线，换行时竖线会孤零零落在行首（很难看），
     因此 ≤480px 起隐藏竖线；竖线一没，横向间距就得由 gap 补上（桌面端的间距是竖线撑出来的） */
  .product-features { gap: 10px 18px; }
  .product-feature { font-size: 21px; }
  .product-feature + .product-feature::before { display: none; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 17px; }
  /* 同上：必须排在本段 .hero p 之后才生效 */
  .hero-detail p { font-size: 16px; }
  .product-desc { font-size: 16px; }
  .img-cap.lg, .lb-caption { font-size: 16px; }
  .feature h2 { font-size: 27px; }
  .feature p { font-size: 17px; }
  /* 同上：三档 18 / 17 / 16 与产品页描述完全对齐 */
  .hero .page-sub, .feature .page-sub { font-size: 16px; }
  .page-title { font-size: 30px; }
  .section-title { font-size: 26px; }
  .article h1 { font-size: 28px; }
  .post-body p, .post-body li, .post-body blockquote { font-size: 16px; }
  .post-body h2 { font-size: 21px; }
  .post-body h3 { font-size: 18px; }
  .grid { gap: 10px; }
  .card { padding: 12px 8px 14px; }
  .card h3 { font-size: 16px; }
  .card .tagline { font-size: 12px; }
  .card .price { font-size: 14px; }
}
