/* ============================================================
   瑞源创 · 安防教学视频 & 产品商城 H5
   设计规范：柔和科技居家风
   - 浅白软质感 · 低饱和蓝主色 · 浅灰+淡绿辅助
   - 16px 圆角卡片 · 干净留白 · 扁平化轻质感
   - 纤细线性图标 · 白色背景 · 思源黑体
   ============================================================ */
:root{
  /* 色彩：低饱和蓝主色 + 淡绿/浅灰辅助 */
  --brand:#5B8DEF;
  --brand-2:#4A7DD9;
  --brand-weak:#EDF3FE;
  --brand-line:#D6E4FB;
  --free:#5FA983;            /* 正向语义，淡绿深 */
  --free-bg:#E9F6EE;
  --wx:#5FA983;
  --wx-bg:#E9F6EE;
  --bg:#F5F7FA;              /* 浅灰底 */
  --card:#fff;
  --line:#EAEEF3;
  --line-2:#EDF1F5;
  --text:#2E3644;
  --sub:#7A8596;
  --muted:#A6B0BF;
  /* 圆角：卡片16px / 按钮12px / 小元素8px / 胶囊999px */
  --r-s:8px;
  --r-m:12px;
  --r-l:16px;
  /* 阴影：极轻柔和 */
  --sh-1:0 2px 12px rgba(91,141,239,.08);
  --sh-2:0 4px 20px rgba(46,54,68,.10);
  --sh-up:0 -1px 8px rgba(46,54,68,.05);
  --navbar-h:44px;
  --tabbar-h:52px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;height:100%}
body{
  background:var(--bg);color:var(--text);
  font-family:"Source Han Sans SC","Noto Sans SC","PingFang SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:14px;line-height:1.5;overflow:hidden;
}
img{display:block;max-width:100%}
button,input{font:inherit;color:inherit}
a{color:inherit;text-decoration:none}

/* ---------- 布局骨架 ---------- */
#app{height:calc(100% - var(--tabbar-h));position:relative}
.view{display:none;flex-direction:column;height:100%}
.view.active{display:flex}
.scroll{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch}
.pad{padding:0 12px}

/* ---------- 导航栏：白底细线，柔和 ---------- */
.navbar{
  flex:0 0 auto;height:var(--navbar-h);display:flex;align-items:center;
  justify-content:center;position:relative;z-index:5;
  background:rgba(255,255,255,.94);backdrop-filter:saturate(160%) blur(12px);
  border-bottom:1px solid var(--line-2);
}
.navbar__title{font-size:17px;font-weight:600;letter-spacing:.2px;color:var(--text)}
.navbar__right{
  position:absolute;right:10px;top:0;height:var(--navbar-h);
  display:flex;align-items:center;gap:14px;color:var(--sub);
}
.navbar__back{
  position:absolute;left:8px;top:0;height:var(--navbar-h);
  display:flex;align-items:center;padding:0 4px;color:var(--sub);
}

/* ---------- 搜索框：浅灰胶囊 ---------- */
.searchbar{flex:0 0 auto;padding:8px 12px 10px;background:#fff;border-bottom:1px solid var(--line-2)}
.search{
  display:flex;align-items:center;gap:8px;background:var(--bg);border-radius:999px;
  padding:8px 14px;color:var(--muted);
  transition:background .2s,box-shadow .2s;
}
.search:focus-within{background:#fff;box-shadow:0 0 0 2px var(--brand-line)}
.search svg{flex:0 0 auto;width:16px;height:16px}
.search input{flex:1;border:0;background:transparent;outline:0;font-size:13px;color:var(--text)}
.search input::placeholder{color:var(--muted)}
.search__btn{
  flex:0 0 auto;background:var(--brand);color:#fff;border:0;border-radius:999px;
  font-size:12px;padding:5px 14px;margin:-3px -8px -3px 0;
}

/* ---------- 首页 Banner：浅蓝→淡绿柔和渐变 ---------- */
.banner{position:relative;margin:12px 12px 0}
.banner__track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:var(--r-l)}
.banner__track::-webkit-scrollbar{display:none}
.banner__item{flex:0 0 100%;scroll-snap-align:center;position:relative;overflow:hidden;border-radius:var(--r-l)}
.banner__item img{width:100%;height:186px;object-fit:cover}
.banner__tag{
  position:absolute;left:12px;bottom:12px;background:rgba(46,54,68,.42);color:#fff;
  font-size:11px;padding:3px 10px;border-radius:999px;backdrop-filter:blur(6px);
}
.banner__dots{
  display:flex;justify-content:center;align-items:center;gap:5px;padding:10px 0 0;
  background:var(--bg);
}
.banner__dot{width:6px;height:6px;border-radius:999px;background:#D9DEE7;transition:.25s}
.banner__dot.on{width:16px;background:var(--brand)}

/* ---------- 九宫格分类：浅底圆角图标 ---------- */
.quickcats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px 0;padding:16px 8px 18px;background:var(--bg)}
.quickcat{display:flex;flex-direction:column;align-items:center;gap:7px;border:0;background:none;padding:0}
.quickcat img{width:44px;height:44px;border-radius:14px;object-fit:cover;box-shadow:var(--sh-1)}
.quickcat:active img{transform:scale(.94)}
.quickcat span{font-size:11.5px;color:var(--text);white-space:nowrap}
.quickcat__more{
  width:44px;height:44px;border-radius:14px;
  background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:var(--sh-1);
}
.quickcat__more svg{width:20px;height:20px}

/* ---------- 区块标题 ---------- */
.sectitle{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 12px 10px;background:var(--bg);
}
.sectitle h2{margin:0;font-size:16px;font-weight:600;display:flex;align-items:center;gap:7px}
.sectitle h2::before{
  content:'';width:3px;height:14px;border-radius:2px;background:var(--brand);
}
.sectitle a{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:2px}

/* ---------- 产品资料：两列网格（与产品列表同构） ---------- */
.doclist{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 12px}
/* 已被 .block（自身内边距 12px）包裹时不再叠加，避免双倍缩进 */
.block .doclist{padding-left:0;padding-right:0}
.docitem{
  display:flex;flex-direction:column;border-radius:var(--r-l);overflow:hidden;
  background:var(--card);box-shadow:var(--sh-1);text-decoration:none;color:inherit;
  transition:transform .18s,box-shadow .18s;
}
.docitem:active{transform:scale(.985);box-shadow:none}
/* 缩略图：3:2 比例框，按宽度撑高（老 X5/XWeb 内核也认，比 aspect-ratio 稳） */
.docitem__thumb{
  position:relative;flex:none;width:100%;height:0;padding-bottom:66%;background:var(--line-2);overflow:hidden;
}
.docitem__thumb img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;
}
.docitem__body{padding:8px 9px 10px;display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.docitem__title{
  font-size:13px;font-weight:600;line-height:1.35;margin:0;min-height:35px;color:var(--text);
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.docitem__meta{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:auto}
.docitem__cat{
  background:var(--brand-weak);color:var(--brand);padding:1px 7px;border-radius:999px;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
/* 资料详情页「相关资料」用的小号变体 */
.docitem--sm .docitem__title{font-size:12.5px;min-height:34px}

/* 资料页「配套产品」横向小卡 */
.prodminilist{display:flex;gap:10px;padding:0 12px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.prodmini{flex:0 0 120px;display:flex;flex-direction:column;gap:6px;text-decoration:none;color:inherit}
.prodmini img{width:120px;height:80px;object-fit:cover;border-radius:8px;background:var(--line-2)}
.prodmini span{
  font-size:12px;line-height:1.35;color:var(--text);
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}

/* ---------- 分类 / 产品 左右分栏 ---------- */
.split{flex:1;min-height:0;display:flex;background:#fff}
.side{
  flex:0 0 100px;width:100px;overflow-y:auto;overscroll-behavior:contain;
  background:var(--bg);padding:4px 0 8px;
}
.side__item{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  position:relative;width:100%;min-height:66px;padding:8px 6px;
  border:0;background:none;font-size:12px;line-height:1.25;color:var(--sub);text-align:center;
  transition:background .2s,color .2s;
}
/* 左栏圆形图标：由后台「分类圆形图标」下发 */
.side__ico{
  flex:0 0 auto;width:26px;height:26px;border-radius:50%;object-fit:cover;background:#fff;
  box-shadow:0 1px 4px rgba(46,54,68,.10);transition:transform .2s,box-shadow .2s;
}
/* 没配图标时的占位：首字圆形底 */
.side__ico--ph{
  display:flex;align-items:center;justify-content:center;
  font-style:normal;font-size:12px;font-weight:600;color:#fff;
  background:linear-gradient(135deg,#C6D0DC,#B3BFCC);box-shadow:none;
}
/* 产品页「全部」项：与具体分类的实拍图标区分，用品牌色实心块 */
.side__ico--all{
  display:flex;align-items:center;justify-content:center;
  font-style:normal;font-size:13px;font-weight:600;color:#fff;
  background:linear-gradient(135deg,#4F7FE0,#3D63BC);box-shadow:none;
}
.side__label{display:block;width:100%;word-break:break-all}
.side__item.on{background:#fff;color:var(--brand);font-weight:600}
.side__item.on .side__ico{transform:scale(1.1);box-shadow:0 2px 8px rgba(91,141,239,.28)}
.side__item.on::before{
  content:'';position:absolute;left:0;top:50%;transform:translateY(-50%);
  width:3px;height:20px;border-radius:0 3px 3px 0;background:var(--brand);
}
.pane{flex:1;min-width:0;display:flex;flex-direction:column;background:#fff}

/* 视图切换：胶囊分段控件 */
.viewswitch{display:flex;justify-content:flex-end;gap:8px;padding:10px 12px;background:#fff}
.vsbtn{
  display:flex;align-items:center;gap:4px;border:1px solid var(--line);background:var(--bg);
  border-radius:999px;font-size:12px;padding:5px 12px;color:var(--sub);
  transition:background .2s,color .2s,border-color .2s;
}
.vsbtn.on{
  background:var(--brand);border-color:transparent;color:#fff;
  box-shadow:var(--sh-1);
}

/* 卡片网格（分类-卡片视图） */
.cardgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px 8px;padding:4px 12px 20px}
.cardgrid__item{display:flex;flex-direction:column;align-items:center;gap:8px;border:0;background:none;padding:0}
.cardgrid__item img{
  width:73px;height:72px;border-radius:50%;object-fit:cover;background:var(--line-2);
  box-shadow:0 2px 10px rgba(46,54,68,.08);transition:transform .2s,box-shadow .2s;
}
.cardgrid__item:active img{transform:scale(.95)}
.cardgrid__item span{font-size:12px;color:var(--sub);text-align:center;line-height:1.35}
/* 全部视图下卡片显示所属一级分类 */
.cardgrid__item em{
  font-style:normal;font-size:10px;color:var(--muted);line-height:1.2;text-align:center;
  max-width:80px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}

/* 分组标题 */
.grouptitle{
  display:flex;align-items:center;justify-content:space-between;
  padding:6px 12px 12px;font-size:14px;font-weight:600;
}
.grouptitle span{font-size:12px;color:var(--muted);font-weight:400}
.notice{
  margin:0 12px 12px;padding:9px 12px;border-radius:var(--r-s);
  background:var(--brand-weak);color:var(--brand-2);font-size:12.5px;line-height:1.5;
}

/* ---------- 商品 ---------- */
.pane__head{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 12px;font-size:12.5px;color:var(--sub);background:#fff;
}
.productgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 12px 20px}
.product{
  background:#fff;border-radius:var(--r-l);overflow:hidden;display:flex;flex-direction:column;
  box-shadow:var(--sh-1);transition:transform .18s,box-shadow .18s;
}
.product:active{transform:scale(.985);box-shadow:none}
/* 主图：正方形比例框（源图都是 700×700 方图）。
   ⚠️ 原来写死 height:132px，而宽度是流式的 —— 窄屏（320px）下卡片只有 93px 宽，
   框就成了 93×132 的"瘦高"，object-fit:cover 会把左右各裁掉 30%，
   产品图上烧进去的文字直接被切掉（1080px 宽的手机反而只裁 0~3%，所以容易漏掉）。
   改用 padding-bottom:100% 按宽度撑出正方形（比 aspect-ratio 兼容性更稳，
   老 X5/XWeb 内核也认），并配 object-fit:contain 保证任何比例都不裁切。 */
.product__img{
  position:relative;flex:none;width:100%;height:0;padding-bottom:100%;
  background:var(--line-2);overflow:hidden;
}
.product__img img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:contain;display:block;
}
.product__body{padding:8px 9px 10px;display:flex;flex-direction:column;flex:1}
.product__name{
  font-size:13.5px;font-weight:600;line-height:1.35;margin:0 0 3px;min-height:36px;
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.product__sub{font-size:11.5px;color:var(--muted);margin-bottom:8px}
.product__foot{display:flex;align-items:center;justify-content:flex-end;margin-top:auto}
.addbtn{
  width:22px;height:22px;border-radius:50%;border:0;flex:0 0 auto;
  background:var(--brand);display:flex;align-items:center;justify-content:center;color:#fff;
}

/* ---------- 视频播放页：播放器为唯一深色焦点 ---------- */
/* 视频比例（2026-10-07 最终版）
   **待机态**：固定 16:9 —— 版面统一整齐（未播放时所有视频框一样大）
   **播放态**：点击播放后按视频真实比例自适应
     · 横屏 → aspect-ratio: w/h，铺满容器宽
     · 竖屏 → 容器铺满整宽或按视口收窄，视频 contain 居中
   两态由 JS 写 `--ar` / `--ar-w` / `--ar-max-h` / `data-orient` 驱动。
   ⚠️ 早期版本让容器也用 9:16 的 aspect-ratio，会把容器撑得过高、
      视频被 contain 缩成中间一条，上下大片空白 —— 已修正。
   `object-fit:contain` 兜底，画面任何情况下都不变形、不裁切。 */
.videobox{
  position:relative;background:#2B3440;
  /* 待机态默认 16:9 */
  aspect-ratio:var(--ar,16/9);
  max-height:var(--ar-max-h,none);
  width:var(--ar-w,100%);
  margin:0 auto;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  /* 竖屏"展开"过渡：width/height 可动画（aspect-ratio 变化本身不支持过渡） */
  transition:width .28s ease,height .28s ease;
}
/* 深色衬底（.scroll 背景是白底，没有它留白区会露白） */
.videobox::before{
  content:'';position:absolute;inset:0;background:#2B3440;z-index:0;
}
.videobox video{
  position:relative;z-index:1;
  width:100%;height:100%;
  display:block;background:transparent;
  object-fit:contain;          /* 关键：永不拉伸变形、不裁切 */
}
/* 竖屏播放态：容器高度/宽度由 JS 算出的变量决定 */
.videobox[data-orient="portrait"]{
  aspect-ratio:auto;              /* 不再按 9/16 撑高容器 */
  height:var(--ar-max-h,auto);
  width:var(--ar-w,100%);
  max-width:100%;
  max-height:none;
}
.videobox[data-orient="portrait"] video{
  width:100%;height:100%;max-width:100%;
}
/* 尊重"减少动态效果"偏好 */
@media (prefers-reduced-motion:reduce){
  .videobox{transition:none}
}
.videobox__play{
  position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;
  border:0;background:none;
}
.videobox__play i{
  width:54px;height:54px;border-radius:50%;background:rgba(255,255,255,.95);color:var(--brand);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 2px 14px rgba(0,0,0,.18);
}
.videobox__play i svg{width:22px;height:22px;margin-left:2px}
/* 加载中：点击播放后到首帧之间给一个即时反馈，
   否则网络稍慢时用户会以为"点了没反应"（2026-10-07 加）。
   由 .videobox[data-loading="1"] 驱动，JS 在 play 时点亮、playing 时熄灭。 */
.videobox__play i::after{
  content:'';width:0;height:0;
}
.videobox[data-loading="1"] .videobox__play{
  /* 加载态：按钮仍占位但不可点，避免重复触发 */
  pointer-events:none;
}
.videobox[data-loading="1"] .videobox__play i{
  background:transparent;box-shadow:none;
  width:44px;height:44px;
  border:3px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  animation:rycSpin .8s linear infinite;
}
.videobox[data-loading="1"] .videobox__play i svg{display:none}
@keyframes rycSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  .videobox[data-loading="1"] .videobox__play i{animation-duration:1.6s}
}
/* ---------- 自绘控制条（2026-10-07）----------
   原生 controls 会随鼠标移走自动隐藏 → 全屏按钮消失。
   改为自绘，**全屏按钮常亮**。
   常态半透明悬浮在底部，任何时候都可见（不随鼠标移走消失）。 */
.vbar{
  position:absolute;left:0;right:0;bottom:0;z-index:4;
  display:flex;align-items:center;gap:6px;
  padding:10px 10px 8px;color:#fff;font-size:11px;
  background:linear-gradient(transparent,rgba(0,0,0,.55) 42%,rgba(0,0,0,.78));
  transition:opacity .18s ease,transform .18s ease;
}
/* 按钮：默认常亮（opacity:1），不做自动隐藏 */
.vbtn{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  width:30px;height:30px;padding:0;border:0;border-radius:50%;
  background:rgba(255,255,255,.14);color:#fff;cursor:pointer;
  transition:background .15s ease,transform .1s ease;
  -webkit-tap-highlight-color:transparent;
}
.vbtn:hover{background:rgba(255,255,255,.26)}
.vbtn:active{transform:scale(.92)}
/* 全屏按钮：常亮 + 常态高对比，加一圈描边确保在亮画面上也看得见 */
.vbtn--full{
  background:rgba(255,255,255,.22);
  box-shadow:0 0 0 1px rgba(255,255,255,.35) inset;
}
.vbtn--full:hover{background:rgba(255,255,255,.34)}
.vbtn svg{display:block}
.vbtn--play svg,.vbtn--mute svg,.vbtn--full svg{width:17px;height:17px}

.vbar__time{
  flex:0 0 auto;font-variant-numeric:tabular-nums;
  letter-spacing:.2px;opacity:.92;white-space:nowrap;
}
/* 进度条：加高到 14px 提升可点区域，内部细条视觉 */
.vbar__line{
  flex:1 1 auto;height:14px;min-width:40px;display:flex;align-items:center;
  cursor:pointer;position:relative;touch-action:none;
}
/* 极窄屏：时间只留当前时间，省出空间给进度条与按钮 */
@media (max-width:340px){
  .vbar{gap:4px;padding:8px 6px 6px}
  .vbtn{width:28px;height:28px}
  .vbar__time{font-size:10px}
}
.vbar__line::before{
  content:'';position:absolute;left:0;right:0;height:3px;border-radius:3px;
  background:rgba(255,255,255,.34);
}
.vbar__line b{
  position:absolute;left:0;height:3px;border-radius:3px;
  background:var(--brand);width:0;transition:width .06s linear;
}
/* 拖动/悬停时把进度条加粗，给出可交互反馈 */
.vbar__line:hover::before,.vbar__line:hover b{height:5px}
.vbar__line b::after{
  content:'';position:absolute;right:-5px;top:50%;transform:translateY(-50%);
  width:10px;height:10px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.4);opacity:0;transition:opacity .15s ease;
}
.vbar__line:hover b::after{opacity:1}

.vhead{padding:14px 12px 14px;background:#fff}
.vhead h1{margin:0 0 8px;font-size:18px;font-weight:600;line-height:1.4;letter-spacing:.2px}
.vhead__meta{font-size:12px;color:var(--muted);margin-bottom:12px}
.vhead__row{display:flex;align-items:center;justify-content:flex-end}
.wxshare{
  display:flex;align-items:center;gap:5px;border:0;border-radius:999px;
  background:var(--wx-bg);color:var(--wx);font-size:13px;padding:8px 16px;font-weight:500;
}
.block{background:#fff;margin-top:10px;padding:14px 12px;border-radius:var(--r-l)}
.block h3{margin:0 0 8px;font-size:15px;font-weight:600;display:flex;align-items:center;gap:7px}
.block h3::before{content:'';width:3px;height:14px;border-radius:2px;background:var(--brand)}
.block p{margin:0;font-size:13px;color:var(--sub);line-height:1.75}
.tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.tag{background:var(--brand-weak);color:var(--brand);font-size:11.5px;padding:4px 10px;border-radius:999px}

/* ---------- 产品详情 ---------- */
.pd-gallery{background:#fff;border-radius:var(--r-l);overflow:hidden}
/* 详情页主图：同样是"宽度流式 + 高度写死 + cover"的坑 ——
   700×700 方图放进 366×280 的框里，cover 会上下裁掉 23%。
   改成跟着宽度撑成正方形（aspect-ratio 支持的引擎用它保证不跳动；
   不支持的引擎 height:auto 会退回图片自身比例，两者都不裁切）。 */
.pd-gallery__main{
  display:block;width:100%;height:auto;aspect-ratio:1/1;
  object-fit:contain;background:var(--line-2);
}
.pd-gallery__thumbs{display:flex;gap:8px;overflow-x:auto;padding:10px 12px;scrollbar-width:none}
.pd-gallery__thumbs::-webkit-scrollbar{display:none}
.pd-gallery__thumbs img{
  flex:0 0 56px;width:56px;height:56px;border-radius:8px;object-fit:cover;border:1.5px solid transparent;
}
.pd-gallery__thumbs img.on{border-color:var(--brand)}
.pd-info{background:#fff;padding:14px 12px;border-radius:var(--r-l);margin-top:10px}
.pd-info h1{margin:0 0 10px;font-size:16px;font-weight:600;line-height:1.45}
.pd-badges{display:flex;gap:6px;margin-bottom:10px}
.pd-badge{background:var(--brand-weak);color:var(--brand);font-size:11.5px;padding:3px 9px;border-radius:6px}
.pd-sold{font-size:12px;color:var(--muted);display:flex;gap:14px}
.specs{display:flex;flex-direction:column}
.spec{display:flex;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}
.spec:last-child{border-bottom:0}
.spec span{flex:0 0 76px;color:var(--muted)}
.spec b{flex:1;font-weight:400;color:var(--text)}
.pd-detailimg{width:100%;border-radius:8px;margin:10px 0}
/* 商品详情正文（HTML 直出）：图片撑满宽度、文字正常换行 */
.detailhtml{line-height:1.7;font-size:13.5px;color:var(--sub)}
.detailhtml img{width:100%;height:auto;display:block;margin:8px 0;border-radius:6px}
.detailhtml p{margin:0 0 8px}
.detailhtml br{content:"";display:block;margin:4px 0}
.features{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:9px}
.features li{display:flex;gap:8px;font-size:13px;color:var(--sub);line-height:1.6}
.features li::before{
  content:'';flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:var(--brand);margin-top:8px;
}
.consult{display:flex;gap:10px;margin-top:14px}
.consult button{
  flex:1;display:flex;align-items:center;justify-content:center;gap:6px;
  border:0;border-radius:var(--r-m);font-size:14px;padding:12px;color:#fff;
}
.consult .c-phone{background:var(--brand)}
.consult .c-wechat{background:var(--wx)}
.contactlist{margin-top:14px;border-top:1px solid var(--line);padding-top:6px}
.contactrow{display:flex;align-items:center;gap:10px;padding:9px 0;font-size:13px}
.contactrow span{flex:0 0 62px;color:var(--muted)}
.contactrow b{flex:1;font-weight:400}

/* ================= 「我的」页样式 =================
   已整体抽到 assets/mine.css（H5 真机与后台真机预览共用同一份，防视觉漂移）。
   这里不再定义 .minehero / .minesect / .minemod / .minebiz / .mineqr /
   .minealb / .minefoot 等类，避免两处定义互相覆盖。 */

/* ---------- TabBar ---------- */
.tabbar{
  position:fixed;left:0;right:0;bottom:0;height:var(--tabbar-h);
  background:rgba(255,255,255,.96);backdrop-filter:saturate(160%) blur(12px);
  border-top:1px solid var(--line-2);box-shadow:var(--sh-up);
  display:flex;z-index:50;padding-bottom:env(safe-area-inset-bottom);
}
.tabbar__item{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  border:0;background:none;color:var(--muted);font-size:11px;padding:0;position:relative;
  transition:color .2s;
}
.tabbar__item svg{width:22px;height:22px;transition:transform .2s}
.tabbar__item.on{color:var(--brand);font-weight:500}
.tabbar__item.on svg{transform:translateY(-1px) scale(1.06)}

/* ---------- 工信部备案号（tabbar 上方一行小字） ---------- */
.beian{
  position:fixed;left:0;right:0;bottom:var(--tabbar-h);z-index:49;
  text-align:center;font-size:10.5px;color:var(--muted);
  line-height:1.6;padding:4px 12px 2px;pointer-events:none;
}
.beian a{color:inherit;text-decoration:none;pointer-events:auto}
.beian a:active{opacity:.7}

/* ---------- 分享引导层 ---------- */
/* z-index 必须高于最上层的弹层（.alblayer 是 9999），
   否则在图册阅读器里点「分享」时引导层会被盖住 = 看起来"点了没反应" */
.wx-guide{position:fixed;inset:0;z-index:10050}
.wx-guide__mask{position:absolute;inset:0;background:rgba(46,54,68,.55)}
.wx-guide__body{position:absolute;inset:0;pointer-events:none}
.wx-guide__arrow{position:absolute;top:8px;right:14px;animation:wx-float 1.4s ease-in-out infinite}
.wx-guide__tip{position:absolute;top:70px;right:16px;left:16px;text-align:center;color:#fff;pointer-events:auto}
.wx-guide__title{margin:0 0 6px;font-size:17px;font-weight:500}
.wx-guide__line{margin:0 0 18px;font-size:13px;opacity:.85}
.wx-guide__btn{
  border:1px solid rgba(255,255,255,.6);background:transparent;color:#fff;
  font-size:13px;padding:7px 22px;border-radius:999px;
}
@keyframes wx-float{0%,100%{transform:translate(0,0)}50%{transform:translate(-5px,-5px)}}

/* ---------- 内容防下载：媒体元素禁止选中 / 拖拽 / 长按菜单 ---------- */
img,video{
  -webkit-user-drag:none;
  -webkit-user-select:none;
  -moz-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
/* 部分安卓内核会在视频控制条右侧露出下载按钮 */
video::-webkit-media-controls-download-button{display:none}
video::-webkit-media-controls-enclosure{overflow:hidden}

/* ---------- 技术文章 ---------- */
.artchips{
  display:flex;gap:8px;overflow-x:auto;padding:10px 12px;background:#fff;
  border-bottom:1px solid var(--line-2);scrollbar-width:none;
}
.artchips::-webkit-scrollbar{display:none}
.artchips__item{
  flex:0 0 auto;border:0;background:var(--bg);color:var(--sub);font-size:12.5px;
  padding:6px 14px;border-radius:999px;transition:background .18s,color .18s;
}
.artchips__item.on{background:var(--brand-weak);color:var(--brand);font-weight:600}
.artlist{padding:12px;display:flex;flex-direction:column;gap:10px}
.artcard{
  display:flex;gap:10px;padding:10px;border-radius:var(--r-l);
  background:var(--card);box-shadow:var(--sh-1);transition:transform .18s,box-shadow .18s;
}
.artcard:active{transform:scale(.99);box-shadow:none}
.artcard__cover{flex:0 0 106px;width:106px;height:76px;border-radius:var(--r-s);overflow:hidden;background:var(--line-2)}
.artcard__cover img{width:100%;height:100%;object-fit:cover}
.artcard__body{flex:1;min-width:0;display:flex;flex-direction:column}
.artcard__title{
  margin:0;font-size:14px;font-weight:600;line-height:1.4;color:var(--text);
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.artcard__desc{
  margin:4px 0 0;font-size:12px;color:var(--sub);line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.artcard__meta{display:flex;align-items:center;gap:8px;margin-top:auto;padding-top:6px;font-size:11.5px;color:var(--muted)}
.artcard__top{background:var(--free-bg);color:var(--free);padding:1px 7px;border-radius:999px;font-weight:600}

/* 文章详情正文：后台富文本原样渲染，这里只做移动端适配 */
.artview{background:#fff;padding:14px 12px;border-radius:var(--r-l);margin:10px}
.artview__title{margin:0 0 10px;font-size:19px;line-height:1.45;font-weight:600}
.artview__meta{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--muted);margin-bottom:12px}
.artview__cover{width:100%;border-radius:var(--r-m);margin-bottom:12px}
.artview__content{font-size:14px;color:var(--text);line-height:1.85;word-break:break-word}
.artview__content p{margin:0 0 12px}
.artview__content h1,.artview__content h2{font-size:16px;font-weight:600;margin:18px 0 8px}
.artview__content h3,.artview__content h4,.artview__content h5{font-size:15px;font-weight:600;margin:16px 0 8px}
.artview__content img{border-radius:var(--r-s);margin:6px 0 12px;height:auto}
.artview__content ul,.artview__content ol{margin:0 0 12px;padding-left:20px}
.artview__content li{margin:4px 0}
.artview__content blockquote{
  margin:0 0 12px;padding:8px 12px;border-left:3px solid var(--brand);
  background:var(--brand-weak);color:var(--sub);border-radius:0 var(--r-s) var(--r-s) 0;
}
.artview__content table{
  width:100%;border-collapse:collapse;margin:0 0 12px;font-size:13px;
  display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;
}
.artview__content th,.artview__content td{border:1px solid var(--line-2);padding:6px 10px;text-align:left}
.artview__content th{background:var(--bg);font-weight:600;white-space:nowrap}
.artview__content code{background:var(--bg);padding:1px 5px;border-radius:4px;font-size:12.5px}
.artview__content pre{background:var(--bg);padding:10px 12px;border-radius:var(--r-s);overflow-x:auto;margin:0 0 12px}
.artview__content a{color:var(--brand)}

/* ---------- 通用 ---------- */
.wx-toast{
  position:fixed;left:50%;bottom:22%;transform:translateX(-50%);z-index:10050;
  background:rgba(46,54,68,.82);color:#fff;font-size:13px;padding:9px 16px;border-radius:8px;
  max-width:80%;text-align:center;
}
.empty,.loading{text-align:center;color:var(--muted);font-size:13px;padding:50px 16px;line-height:1.6}
.loading::before{
  content:'';display:block;width:20px;height:20px;margin:0 auto 10px;border-radius:50%;
  border:2px solid var(--brand-line);border-top-color:var(--brand);animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms !important;transition-duration:.01ms !important}
}

/* ---------- PC / 普通浏览器：分享面板（复制链接 + 二维码） ----------
   PC 上没有微信 JS-SDK，唤起不了分享卡，改用"复制链接 + 二维码"。
   层级必须高于图册阅读器（.alblayer z-index:9999）。 */
.pc-share{position:fixed;inset:0;z-index:10060}
.pc-share__mask{position:absolute;inset:0;background:rgba(20,28,44,.55)}
.pc-share__box{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:340px;max-width:calc(100vw - 32px);box-sizing:border-box;
  padding:20px 22px 18px;border-radius:14px;background:#fff;
  box-shadow:0 18px 60px rgba(20,28,44,.28);
  text-align:center;
}
.pc-share__hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.pc-share__t{margin:0;font-size:16px;font-weight:600;color:var(--text,#1b2434)}
.pc-share__x{
  border:0;background:transparent;font-size:24px;line-height:1;
  color:var(--sub,#8a93a6);cursor:pointer;padding:0 2px;
}
.pc-share__x:hover{color:var(--text,#1b2434)}
/* ★ 改版：复制链接为主操作，二维码缩为辅助 */
.pc-share__link{display:flex;gap:8px;align-items:stretch;margin-top:2px}
.pc-share__qrrow{display:flex;flex-direction:column;align-items:center;margin:14px 0 0}
.pc-share__qr{display:flex;justify-content:center}
.pc-share__qr canvas{
  width:128px;height:128px;display:block;
  border:1px solid var(--line,#e6eaf2);border-radius:8px;background:#fff;
}
.pc-share__qr-cap{margin:6px 0 0;font-size:11px;color:var(--sub,#8a93a6)}
.pc-share__tip{margin:12px 0 0;font-size:12.5px;color:var(--sub,#6b7488);line-height:1.55}
.pc-share__tip b{color:var(--text,#1b2434)}
.pc-share__input{
  flex:1;min-width:0;height:36px;box-sizing:border-box;
  padding:0 10px;border:1px solid var(--line,#e0e5ef);border-radius:8px;
  font-size:12px;color:var(--sub,#6b7488);background:#f7f9fc;
  text-overflow:ellipsis;
}
.pc-share__copy{
  flex:none;height:36px;padding:0 14px;border:0;border-radius:8px;
  background:#2f6fd0;color:#fff;font-size:13px;cursor:pointer;white-space:nowrap;
}
.pc-share__copy:hover{background:#2560b8}
.pc-share__copy.is-done{background:#2fa96b}
.pc-share__note{margin:12px 0 0;font-size:12px;color:var(--sub,#8a93a6);line-height:1.5}
.pc-share__note b{color:var(--text,#1b2434)}

/* ---------- 桌面宽屏适配：收成手机宽度，真机（<520px）不受影响 ---------- */
@media (min-width:520px){
  body{
    max-width:414px;margin:0 auto;
    box-shadow:0 0 0 1px rgba(46,54,68,.05),0 10px 44px rgba(46,54,68,.08);
  }
  .tabbar{max-width:414px;left:50%;transform:translateX(-50%)}
  .wx-guide{max-width:414px;left:50%;transform:translateX(-50%)}
  .wx-toast{max-width:320px}
}

/* ================= 产品图册卡片（我的页区块） =================
   也已抽到 assets/mine.css（.minealb__*），与后台真机预览共用。 */

/* ================= 图册阅读器（弹窗） =================
   版式对齐原稿：蓝色顶栏 + 左右双页对开 + 两侧大箭头 + 底部控制条 */
.alblayer {
  position: fixed;
  inset: 0;
  z-index: 9999;              /* 必须高于底部 tabbar(z-index:50) */
  display: none;
}
.alblayer.is-open { display: block; }

/* 书区最大宽度：PC 上不能铺满（源图仅 760px 宽，铺到 1440 会放大发糊，
   且封面单页显示时左半页会留一大片空白）。
   用 CSS 变量统一控制，顶栏/控制条也按同宽居中，保证与书页左右对齐。 */
.alblayer {
  --alb-book-max: 100%;
  --alb-hot-gap: 3cm;    /* 咨询热线与「全屏」的间隔 */
  --alb-btn-gap: 2cm;    /* 「全屏」与「返回」的间隔 */
}

.alblayer__bg {
  position: absolute;
  inset: 0;
  background: #0d1524;
}

/* 顶部条：完全照抄 dima1 的 .reader-topbar。
   背景透明（浮在书页上方，靠文字阴影保证可读）；
   整条 pointer-events:none，只有按钮可点，避免遮挡书页翻页手势。 */
.albbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  color: rgba(255, 255, 255, .78);
  background: #3761C5;      /* 上色块（原为透明） */
  pointer-events: none;
}
/* PC 限宽：整条蓝底仍铺满视口（保持观感），但内容区收进书区宽度并居中，
   与书页左右对齐。用 padding 撑出两侧留白而不是 max-width，
   这样蓝色背景条依然通栏，不会出现两边断开的色块。 */
@media (min-width: 1024px) {
  .albbar {
    padding-left: calc(max(0px, (100% - var(--alb-book-max)) / 2) + 16px);
    padding-right: calc(max(0px, (100% - var(--alb-book-max)) / 2) + 16px);
  }
}
.albbar__t {
  flex: 1 1 auto;
  min-width: 0;              /* 关键：不设则不收缩，会把右侧元素挤出屏幕 */
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.albbar__acts {
  display: flex;
  align-items: center;
  flex: none;
}
/* 咨询热线：白粗体 + 文字阴影。
   margin-right 3cm 把它整体左移，与「全屏」按钮拉开距离。 */
.albhot {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  white-space: nowrap;
  margin-right: var(--alb-hot-gap);
}
.albbar__b {
  pointer-events: auto;
  flex-shrink: 0;
  padding: 6px 14px;
  border: none;
  border-radius: 16px;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(2px);
}
/* 「返回」左侧留 2cm：即「全屏」与「返回」之间的间隔 */
.albbar__b + .albbar__b { margin-left: var(--alb-btn-gap); }
.albbar__b:active { background: rgba(0, 0, 0, .6); }

/* 两侧大箭头（原稿左右各一个红色尖括号） */
.albside {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 4;
}
.albside::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  border-top: 3px solid #e23a3a;
  border-right: 3px solid #e23a3a;
}
.albside--prev::before { transform: translate(-62%, -50%) rotate(-135deg); }
.albside--next::before { transform: translate(-38%, -50%) rotate(45deg); }
.albside:active::before { border-color: #ff6b6b; }
.albside--prev { left: 10px; }
.albside--next { right: 10px; }

/* 书页容器：钉在顶栏与控制条之间。
   关键：StPageFlip 会给容器注入 .stf__parent{position:relative}，
   覆盖掉 absolute 并被书页高度撑大，必须用 !important 钉死。 */
/* 外层 wrapper：负责"钉位置 + 限宽居中"，是唯一被限宽的层。
   StPageFlip 会给里面的 #albBook 写内联 width:100%，
   于是它自然变成 wrapper 的宽度 —— 限宽因此生效。
   垂直位置由 JS 的 centerBook() 写 top 决定（与 dima1 一致），
   这里只给一个兜底 top，避免 JS 还没跑时贴到顶栏。 */
.albwrap {
  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: var(--alb-book-max, 100%);
}

/* 书页容器：完全照抄 dima1 的 .book-container，填满 wrapper。
   注意不能写 inset:44px 0 —— 上下避让交给 .albwrap，这里只负责撑满它。 */
.albbook {
  position: absolute;
  inset: 0;
  padding: 4px 12px;
}

/* StPageFlip 注入的 .stf__parent{position:relative} 会覆盖 absolute 并导致容器被书撑大，
   用 !important 强制容器固定为 wrapper 的尺寸，stretch 的尺寸缩放与居中才能正确计算 */
.albbook.stf__parent {
  position: absolute !important;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.alberr {
  padding: 40px 20px;
  text-align: center;
  color: #fff;
  opacity: .8;
  font-size: 13px;
}

/* 底部控制条 */
.albctrl {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  background: #3761C5;      /* 下色块（原为深色半透明） */
  z-index: 5;
}
/* PC：整条蓝底通栏，内容居中（本来就居中，这里只保证留白与书区呼应） */
@media (min-width: 1024px) {
  .albctrl { padding-left: 16px; padding-right: 16px; }
}
.albbtn {
  min-width: 70px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: #2f6fd0;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.albbtn:active { background: #245cb0; }
.albpage {
  min-width: 60px;
  text-align: center;
  color: #fff;
  font-size: 13px;
  opacity: .9;
  font-variant-numeric: tabular-nums;
}

/* ===== 伪全屏（微信内降级）：隐藏顶栏/底栏，书区占满，悬浮 ✕ 退出 =====
   为什么不用原生 requestFullscreen：
   iOS 微信(WKWebView)没有该 API（点击毫无反应）；安卓微信 XWEB 支持残缺
   （Promise 挂起 / 全屏后渲染合成异常）—— 真机「死机」高发；且微信内置浏览器
   没有地址栏可隐藏，弹层本来就 fixed 满屏。原生全屏只留给普通浏览器（albums.js 分流）。 */
.alblayer.is-cine .albbar,
.alblayer.is-cine .albctrl,
.alblayer.is-cine .albhot { display: none; }
/* 顶栏避让的 top 由 centerBook() 按伪全屏态重算（写内联样式）；
   bottom 的 44px 兜底在这里归零 —— 两者不能都交给 CSS，否则和 JS 的居中打架 */
.alblayer.is-cine .albwrap { bottom: 0 !important; }
.albcine {
  display: none;
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 21, 36, .74);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  z-index: 6;   /* 高于书区 canvas 与顶栏(z-index:5) */
}
.alblayer.is-cine .albcine { display: block; }

/* ===== 图册弹窗：窄屏适配（必须放在文件末尾，保证能覆盖上面的同名规则）===== */
@media (max-width: 719px) {
  .alblayer { --alb-hot-gap: 8px; --alb-btn-gap: 8px; }
  .albbar { padding: 8px 10px; }
  /* 窄屏优先保证「热线 + 分享 + 全屏 + 返回」完整可见，标题让位 */
  .albbar__t { display: none; }
  .albbar__acts { flex: 1 1 auto; justify-content: flex-end; }
  .albhot { font-size: 13px; }
  .albbar__b { padding: 6px 10px; font-size: 13px; }
}

/* 超窄屏（320px 级别）：顶栏有热线 + 3 个按钮，字号和留白再收一档，
   否则整行会溢出到贴边。必须放在上一个媒体查询之后。 */
@media (max-width: 359px) {
  .alblayer { --alb-hot-gap: 6px; --alb-btn-gap: 6px; }
  .albbar { padding: 8px 8px; }
  .albhot { font-size: 12px; }
  .albbar__b { padding: 5px 8px; font-size: 12px; }
}

/* ===== 图册弹窗：PC / 平板宽屏适配 =====
   ⚠️ 必须放在所有窄屏媒体查询之后，否则被 max-width 规则覆盖。

   限宽原理：把 .albwrap 收窄，里面的 #albBook 因库写的 width:100% 自动跟着变窄。
   ⚠️ 不能把限宽直接写在 #albBook 上 —— 库会给它写内联 width:100%，
      内联样式优先级高于外部 CSS，限宽会被覆盖掉（实测 bookW 仍是 1440）。 */
@media (min-width: 1024px) {
  .alblayer {
    /* 书区限宽 1100px：单页 550px，与源图 760×1024 同量级，
       不会放大发糊；封面单页显示时另一半也不会留出巨大的空白。 */
    --alb-book-max: 1100px;
    /* 顶栏间距：cm 是给原稿大屏调的，PC 上改成紧凑的 px，避免热线贴到标题 */
    --alb-hot-gap: 28px;
    --alb-btn-gap: 12px;
  }
  /* 两侧大箭头：跟着书区走，不要贴到视口最边上 */
  .albside--prev { left: max(10px, calc(50% - var(--alb-book-max) / 2 - 56px)); }
  .albside--next { right: max(10px, calc(50% - var(--alb-book-max) / 2 - 56px)); }
}

/* 超大宽屏（1920+）：再放宽一点，但仍受源图分辨率约束 */
@media (min-width: 1700px) {
  .alblayer { --alb-book-max: 1320px; }
}
