/* ==========================================================
   真实站点补充样式
   design.css 是原型设计系统，本文件只做三件事：
   1) 补 design.css 没有的类（页脚、侧边栏徽章）
   2) 真实浏览器的响应式适配（design.css 的响应式依赖原型壳的容器查询）
   3) 少量全局基础
   不要把业务样式写在这里，业务组件一律走 design.css + views.js
   ========================================================== */

/* ---------- 全局基础 ---------- */
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg2); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* 表格在窄屏可横向滚动（给卡片内容区加滚动容器，不改表格本身） */
.card-b { overflow-x: auto; }

/* ---------- 前台补充 ---------- */
.sitefoot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 18px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--ink4);
}

/* ---------- 后台侧边栏徽章 ---------- */
.sb-badge {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  line-height: 1.6;
  padding: 0 6px;
  border-radius: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- 中等屏（平板 / 小笔记本） ---------- */
@media (max-width: 1100px) {
  .wrapx { padding: 14px 14px 28px; }
}

/* ---------- 手机浏览（PC 版本兼顾手机，不做独立 APP） ---------- */
@media (max-width: 768px) {
  /* 网格降列 */
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g5 { grid-template-columns: repeat(3, 1fr); }
  .act3 { grid-template-columns: 1fr; }

  /* 前台导航简化 */
  .navbar .nin { padding: 0 12px; gap: 10px; height: 50px; }
  .navlink { display: none; }
  .wrapx { padding: 12px 12px 24px; }
  .rx-banner { padding: 16px; border-radius: 12px; }
  .rx-banner h2 { font-size: 19px; }
  .searchbar input { height: 42px; font-size: 14px; }
  .searchbar button { width: 78px; font-size: 13px; }

  /* 后台骨架：侧边栏变顶部横向菜单 */
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    min-height: auto;
    flex-shrink: 0;
  }
  .sidebar .sb-logo,
  .sidebar .sb-sec,
  .sidebar .sb-foot { display: none; }
  .sidebar .sb-i {
    padding: 11px 12px;
    white-space: nowrap;
    font-size: 12px;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .sidebar .sb-i.on {
    background: transparent;
    border-bottom-color: var(--brand);
    color: #fff;
  }
  .topbar { padding: 0 12px; height: auto; min-height: 48px; flex-wrap: wrap; }
  .topbar .bc { display: none; }
  .content { padding: 12px; }

  /* 平台专属组件的窄屏适配 */
  .maprow { grid-template-columns: 1fr; gap: 4px; }
  .wrow { grid-template-columns: 84px 1fr 44px; gap: 8px; }
  .srow { flex-wrap: wrap; }
  .dsrc { flex-wrap: wrap; }
  .dsrc .dv { text-align: left; }
}

@media (max-width: 480px) {
  .g5 { grid-template-columns: repeat(2, 1fr); }
  .bar .tt, .topbar .tt { font-size: 13px; }
  .stat .v { font-size: 20px; }
}

/* ==========================================================
   首页 Hero（左品牌视觉 + 右登录）
   设计意图：首页只做「品牌感知 + 登录」两件事，
   深度内容全部下沉到 /intro，避免未登录访客被信息淹没
   ========================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 420px;
  gap: 0;
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 560px;
}
.hero-l {
  background: linear-gradient(150deg, #123B31 0%, #0E2A22 55%, #0B8F6A 130%);
  color: #fff;
  padding: 40px 44px 28px;
  display: flex;
  flex-direction: column;
}
.hero-tag {
  display: inline-block;
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .1);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: .5px;
}
.hero-title {
  margin-top: 20px;
  font-size: 32px;
  line-height: 1.42;
  font-weight: 800;
  letter-spacing: .5px;
}
.hero-sub {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .82);
  max-width: 520px;
}
.hero-sub b { color: #8FE3C6; }
.hero-stats {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-stats > div {
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 132px;
}
.hero-stats b { display: block; font-size: 15px; }
.hero-stats span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .68); margin-top: 3px; }
.hero-art { margin-top: auto; padding-top: 20px; }
.hero-art svg { width: 100%; max-width: 520px; height: auto; display: block; }
.hero-foot { margin-top: 14px; font-size: 11px; color: rgba(255, 255, 255, .45); }
.hero-r {
  padding: 40px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
}
.hero-r > * { width: 100%; max-width: 380px; }
.hero-demo {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

/* ==========================================================
   产品素材：主图 + 缩略图 + 视频 + 详情长图
   ========================================================== */
.pgallery { display: flex; flex-direction: column; gap: 10px; }
.pimg {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.pimg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pimg-main { height: 320px; }
.pimg-main img { object-fit: contain; background: #F7FAF9; }
.pimg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.pimg-grid .pimg { height: 96px; }
.pdetail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.pdetail .pimg { height: 260px; }
.pdetail .pimg img { object-fit: contain; background: #F7FAF9; }
.pvideo-wrap { max-width: 720px; }
.pvideo {
  width: 100%;
  border-radius: 10px;
  background: #0E2A22;
  display: block;
}

/* ==========================================================
   企业 LOGO
   ========================================================== */
.plogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brand);
  vertical-align: middle;
}
.plogo.sm { width: 30px; height: 30px; border-radius: 7px; font-size: 13px; }
.plogo.lg { width: 72px; height: 72px; border-radius: 14px; font-size: 26px; }
.plogo.xs { width: 20px; height: 20px; border-radius: 5px; font-size: 11px; }
.plogo-txt { background: var(--brand-l); border-color: var(--brand-l); }
.av-img { object-fit: contain; background: #fff; }

/* ---------- Hero 响应式 ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-l { padding: 28px 24px 20px; }
  .hero-title { font-size: 25px; }
  .hero-art svg { max-width: 420px; }
  .hero-r { padding: 24px 16px 32px; }
}

@media (max-width: 768px) {
  .pimg-main { height: 230px; }
  .pdetail { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .pdetail .pimg { height: 190px; }
  .plogo.lg { width: 56px; height: 56px; }
}

/* 列表封面缩略图：选品是视觉决策，有主图就给图，没有给占位块保持列宽稳定 */
.pcover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #F7FAF9;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ink4);
}

/* ==========================================================
   推广二维码
   ========================================================== */
.qrbox { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.qr-img {
  width: 220px;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  flex-shrink: 0;
}
.qr-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: var(--ink4);
  background: var(--bg2);
  line-height: 1.8;
}
.qr-meta { flex: 1; min-width: 240px; }
.qr-url {
  margin-top: 6px;
  padding: 8px 11px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  word-break: break-all;
  color: var(--brand-d);
}

/* 合作需求：类型卡片选中态 */
.act3 .a3.on, .a3.on {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-l);
  background: var(--brand-ll);
}
.act3 .a3.on .t { color: var(--brand-d); }

/* ==========================================================
   首页轮播图
   ========================================================== */
.bn-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
}
.bn {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bn.on { opacity: 1; position: relative; }
.bn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-t {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(14, 42, 34, .72);
  color: #fff;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 7px;
  max-width: calc(100% - 28px);
}
.bn-dots {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.bn-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  cursor: pointer;
  display: block;
}
.bn-dots i.on { background: #fff; }

/* 站点 LOGO（前台导航） */
.site-logo { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; background: #fff; }

/* ---------- 主内容 + 右侧栏（如：发布产品页的素材整理教程） ---------- */
.page2 { display: flex; gap: 16px; align-items: flex-start; }
.page2-main { flex: 1; min-width: 0; }
.page2-side { width: 340px; flex: none; }
@media (max-width: 900px) {
  .page2 { flex-direction: column; }
  .page2-side { width: 100%; }
}

/* ---------- 销售渠道多选器（A-F） ---------- */
.chpick { display: flex; flex-wrap: wrap; gap: 8px; }
.chp {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; cursor: pointer; user-select: none; background: #fff;
}
.chp input { margin: 0; }
.chp b { color: var(--ink4); font-weight: 700; }
.chp.on { border-color: var(--brand); background: var(--brand-l); }
.chp.on b { color: var(--brand); }

/* ---------- 素材整理教程 ---------- */
.tut-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tut-item:last-child { border-bottom: 0; }
.tut-t { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.tut-s { color: var(--ink4); font-size: 12px; line-height: 1.6; }
.tut-body { font-size: 13px; line-height: 1.75; margin-top: 8px; }
.tut-body p { margin: 6px 0; }
.tut-body ul, .tut-body ol { margin: 6px 0 6px 18px; }
.tut-body li { margin: 3px 0; }
.tut-body blockquote {
  margin: 8px 0; padding: 8px 10px; background: var(--bg2);
  border-left: 3px solid var(--brand); font-size: 12px; line-height: 1.7;
}

/* ---------- 广播：企业选择器（企业多时要能搜、能分组、能整选） ---------- */
.bpick { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.bpick-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 11px; border-bottom: 1px solid var(--line); background: var(--bg2);
}
.bpick-list { max-height: 320px; overflow-y: auto; padding: 4px 0; }
.bpick-group { padding: 2px 0; }
.bpick-gh {
  padding: 7px 11px; background: var(--bg2); position: sticky; top: 0;
  border-bottom: 1px solid var(--line); font-size: 13px; z-index: 1;
}
.bpick-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 11px; cursor: pointer; font-size: 13px; line-height: 1.5;
}
.bpick-item:hover { background: var(--bg2); }
.bpick-item input { margin-top: 2px; }
.bpick-t { display: flex; flex-direction: column; }
.bpick-t .xs { font-weight: 400; }

/* ---------- 会员设置卡（超管后台「会员与权限」点「设置」后展开） ---------- */
.memform { border: 1px solid var(--brand-l); background: var(--brand-l); border-radius: 10px; padding: 12px 14px; }
.memf-h {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--line);
}
.memf-h .btn { margin-left: auto; }
.memf-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding-top: 12px; }
.memf-act { display: flex; gap: 8px; align-items: center; }
