/* ============================================================
   抖蓝商城 · 设计系统 v2（高端蓝金主题）
   - 主色取自品牌 logo：抖蓝 #1B6BFF
   - 深海军蓝（头部/页脚/后台侧栏）× 品牌蓝渐变 × 橙红价格 × 克制金色点缀
   - 移动优先，768px 以上切换 PC 布局；:has() 精确避让底栏，杜绝重叠
   ============================================================ */

:root {
  /* 品牌 */
  --brand: #1b6bff;
  --brand-dark: #0d55d6;
  --brand-light: #ebf2ff;
  --brand-grad: linear-gradient(135deg, #3e8bff 0%, #1b6bff 55%, #0d55d6 100%);
  --navy-grad: linear-gradient(150deg, #13295e 0%, #0b1d45 55%, #071430 100%);
  --gold: #e8b04b;
  --accent: #ff3d2e;
  /* 促销 / 优惠券专用色：促销走橙红、券走券红，避免与品牌蓝语义混淆 */
  --promo-grad: linear-gradient(135deg, #ff8f4d 0%, #ff5a2e 55%, #ef3a12 100%);
  --coupon-grad: linear-gradient(135deg, #ff7a63 0%, #ff4d3d 55%, #ee2f1e 100%);

  --green: #10b981;
  --amber: #f59e0b;
  --blue: #2563eb;
  --purple: #7c3aed;

  /* 中性 */
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #101a30;
  --text-2: #4b5876;
  --text-3: #8a96af;
  --border: #e3e8f2;
  --border-2: #edf0f6;

  /* 形状与投影 */
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 30, 74, .04), 0 8px 24px -14px rgba(13, 30, 74, .12);
  --shadow-md: 0 6px 20px -6px rgba(13, 30, 74, .14);
  --shadow-lg: 0 20px 50px -16px rgba(13, 30, 74, .28);
  --ring: 0 0 0 3px rgba(27, 107, 255, .14);

  /* 尺寸（移动端头部为双行：32 + 9 + 38 + 9 + 10 = 98） */
  --header-h: 98px;
  --tabbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* 内容区最大宽度（2026-10-09 柴总：两侧安全距离过大 → 收窄留白、放大有效区间）
   * 上限 1440px；窄屏时只留 32px 的呼吸边（左右各 16px），几乎铺满 */
  --maxw: min(1440px, 100% - 32px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "MiSans", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1100px 460px at 50% -180px, rgba(27, 107, 255, .09), transparent 62%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

::selection { background: rgba(27, 107, 255, .18); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c6cfe0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #aeb9d0; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 启动动画 ---------- */
.boot-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100dvh; gap: 16px; background: var(--navy-grad);
}
.boot-logo { height: 84px; display: flex; align-items: center; justify-content: center; animation: bob 1.4s ease-in-out infinite; }
.boot-logo img {
  width: 64px; height: 64px; border-radius: 18px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 40px -8px rgba(62, 139, 255, .55);
}
.boot-text { color: rgba(255, 255, 255, .6); font-size: 13px; letter-spacing: .2em; text-indent: .2em; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ============================================================
   布局骨架
   ============================================================ */
.app-root { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page {
  flex: 1;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  animation: pageIn .3s ease;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* 页面含底部结算栏时，为浮动栏预留空间，内容永不被遮挡 */
.page:has(.bottom-bar) { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 100px); }
.page:has(.bottom-bar.no-tab) { padding-bottom: calc(var(--safe-b) + 100px); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 12px; }

/* ---------- 顶部栏（移动端双行：品牌+操作 / 搜索） ---------- */
.hd {
  position: sticky; top: 0; z-index: 80;
  background: var(--navy-grad);
  color: #fff;
  box-shadow: 0 12px 32px -16px rgba(7, 20, 48, .55);
}
.hd-inner { height: var(--header-h); display: flex; align-items: center; gap: 10px; padding: 0 12px; max-width: var(--maxw); margin: 0 auto; }
.hd-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; white-space: nowrap; letter-spacing: .01em; }
.hd-logo .em { font-size: 20px; }
.hd-logo .logo-img {
  width: 28px; height: 28px; border-radius: 8px; object-fit: cover; background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 3px 10px -2px rgba(0, 0, 0, .4);
}
.hd-logo span { text-shadow: 0 1px 2px rgba(0, 0, 0, .18); }

/* ---------- 资质水印 ---------- */
.wm { position: relative; display: inline-block; overflow: hidden; }
.wm::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='120'%3E%3Ctext x='85' y='62' font-size='13' font-family='PingFang SC, Microsoft YaHei, sans-serif' fill='%23000000' fill-opacity='0.15' text-anchor='middle' transform='rotate(-24 85 62)'%3E%E6%8A%96%E8%93%9D%E5%95%86%E5%9F%8E%C2%B7%E8%B5%84%E8%B4%A8%E5%85%AC%E7%A4%BA%3C/text%3E%3C/svg%3E");
  background-size: 170px 120px;
}

/* ---------- 店铺证照查看页（#/shop-cert/:id，bare 布局） ---------- */
.cert-topbar { background: #fff; border-bottom: 1px solid var(--line); }
.cert-topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.cert-topbar .shop-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-1); font-weight: 700; font-size: 16px; }
.cert-back { font-size: 13px; color: var(--text-2); text-decoration: none; }
.cert-back:hover { color: var(--primary); }
.cert-main { max-width: 860px; }
.cert-license { padding: 4px 0 18px; }
.cert-license + .cert-license { border-top: 1px dashed var(--line); padding-top: 18px; }
.cert-license-hd { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.cert-license-hd b { font-size: 16px; }
.cert-license-hd .muted { font-size: 12.5px; }
.cert-wm { display: block; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 14px; }
.cert-wm img { max-width: 100%; max-height: 62vh; border-radius: 6px; }
.cert-note { margin: 14px 0 0; font-size: 12.5px; color: var(--text-3); }

.hd-search {
  order: 3; flex: 1 1 100%; display: flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 999px; padding: 0 5px 0 15px; height: 38px;
  min-width: 0; box-shadow: 0 4px 16px -6px rgba(4, 12, 32, .35), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.hd-search:focus-within { box-shadow: 0 0 0 2px rgba(62, 139, 255, .55), 0 4px 16px -6px rgba(4, 12, 32, .35); }
.hd-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--text); height: 100%;
}
.hd-search input::placeholder { color: var(--text-3); }
.hd-search .go {
  border: 0; background: var(--brand-grad); color: #fff; border-radius: 999px;
  height: 29px; padding: 0 15px; font-size: 13px; cursor: pointer; white-space: nowrap; font-weight: 600;
  box-shadow: 0 3px 10px -3px rgba(27, 107, 255, .6);
}
.hd-search .go:active { transform: scale(.96); }
.hd-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
.hd-actions:empty { display: none; } /* 游客态无右侧按钮（登录/购物车已在顶部工具条） */
.hd-ut a[data-act] { cursor: pointer; } /* 弹窗登录入口无 href，需补指针样式 */
.hd-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; padding: 0 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; font-size: 13px; white-space: nowrap;
  transition: background .16s;
}
.hd-icon-btn:hover { background: rgba(255, 255, 255, .24); }
.hd-icon-btn .ic { font-size: 15px; line-height: 1; }
.hd-icon-btn .lb { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 顶栏返回键（移动端专用；PC 有导航与浏览器后退，不显示） ---------- */
.hd-back {
  display: none; flex: none;
  width: 32px; height: 32px; padding: 0;
  align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px;
  cursor: pointer; transition: background .16s, transform .16s;
}
.hd-back:hover { background: rgba(255, 255, 255, .24); }
.hd-back:active { transform: scale(.94); }
.hd-back[hidden] { display: none !important; }

/* 商品详情页迷你头部：PC 完全不出现（详情页顶部保持收起，面包屑回首页），
   移动端只出一条带返回键的窄条（手机没有面包屑，返回键必须有） */
.hd-inner-min { display: none; }

/* ---------- 顶部工具条 + 搜索热点（京东式，仅 PC 展示；移动端隐藏） ---------- */
.hd-ut { display: none; }
.hd-hot { display: none; }
/* PC 下搜索框+热点包成一个块；移动端 display:contents 让表单保持双行通栏布局 */
.hd-search-wrap { display: contents; }

/* ---------- PC 顶部第二行：分类导航 ---------- */
.hd-nav { background: #fff; border-bottom: 1px solid var(--border); display: none; }
.hd-nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 12px; display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; }
.hd-nav-inner::-webkit-scrollbar { display: none; }
.hd-nav a { padding: 6px 13px; border-radius: 999px; color: var(--text-2); font-size: 14px; white-space: nowrap; transition: .15s; }
.hd-nav a:hover { background: var(--brand-light); color: var(--brand); }
.hd-nav a.on { background: var(--brand-light); color: var(--brand); font-weight: 600; }

/* ---------- 底部 Tabbar（移动端） ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-3); font-size: 10.5px; position: relative; transition: color .15s;
}
.tabbar a .ic { font-size: 21px; line-height: 1; transition: transform .18s; }
.tabbar a.on { color: var(--brand); font-weight: 600; }
.tabbar a.on .ic { transform: translateY(-1px) scale(1.06); }
.tabbar a.on::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand-grad);
}
.tabbar .dot {
  position: absolute; top: 3px; right: 50%; margin-right: -20px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
  font-style: normal; box-shadow: 0 2px 6px rgba(255, 61, 46, .4);
}

/* ============================================================
   通用组件
   ============================================================ */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid rgba(16, 35, 74, .05);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border-2); }
.card-hd h3 { font-size: 15px; letter-spacing: 0; }
.card-bd { padding: 16px; }
/* 商品详情富文本（v-html 渲染）：详情图一律自适应宽度、块级排列，避免溢出与首尾多余空白 */
.detail-rich > :first-child { margin-top: 0; }
.detail-rich > :last-child { margin-bottom: 0; }
.detail-rich p { margin: 0 0 10px; }
.detail-rich img { display: block; max-width: 100%; height: auto; margin: 10px auto; border-radius: 8px; }
.detail-rich ul, .detail-rich ol { padding-left: 22px; margin: 0 0 10px; }
.detail-rich li { margin: 4px 0; }
.detail-rich table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.detail-rich td, .detail-rich th { border: 1px solid var(--border-2); padding: 6px 8px; }
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.center { display: flex; align-items: center; justify-content: center; }
.muted { color: var(--text-3); font-size: 12.5px; }
.muted-2 { color: var(--text-2); font-size: 13px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hidden { display: none !important; }
.text-r { text-align: right; }
.text-c { text-align: center; }

/* 价格 */
.price { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.price .cur { font-size: .72em; margin-right: 1px; }
.price .big { font-size: 1.32em; }
.price-old { color: var(--text-3); text-decoration: line-through; font-size: 12px; font-weight: 400; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 14px; cursor: pointer; transition: .18s; white-space: nowrap; font-weight: 500;
}
.btn:hover { border-color: #c8d6f2; background: #f7faff; }
.btn:active { transform: scale(.985); }
.btn-primary {
  background: var(--brand-grad); color: #fff; border: 0;
  box-shadow: 0 8px 18px -8px rgba(27, 107, 255, .65);
}
.btn-primary:hover { filter: brightness(1.07); background: var(--brand-grad); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(27, 107, 255, .75); }
.btn-primary:active { transform: none; }
/* 领券按钮：与券红语义统一，不用品牌蓝 */
.btn-coupon {
  background: var(--coupon-grad); color: #fff; border: 0;
  box-shadow: 0 8px 18px -8px rgba(238, 47, 30, .6);
}
.btn-coupon:hover { filter: brightness(1.07); background: var(--coupon-grad); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(238, 47, 30, .72); }
.btn-coupon:active { transform: none; }
.btn-dark { background: var(--text); color: #fff; border: 0; }
.btn-ghost { background: var(--brand-light); color: var(--brand); border: 1px solid rgba(27, 107, 255, .28); }
.btn-ghost:hover { background: #dfeaff; border-color: rgba(27, 107, 255, .4); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-link { border: 0; background: none; color: var(--brand); padding: 0; height: auto; }

/* 表单 */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field .req::after { content: '*'; color: var(--accent); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fbfcfe; outline: 0; transition: .16s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 13px; resize: vertical; line-height: 1.6; }
.input:hover, .select:hover, .textarea:hover { border-color: #c8d6f2; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: #fff; box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238a96af' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chk {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px;
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; background: #fff; transition: .15s;
}
.chk:hover { border-color: #c8d6f2; }
.chk.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand); font-weight: 600; }

/* 权限矩阵：按模块分组勾选，替代一长串权限码 */
.perm-matrix {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px;
  max-height: 46vh; overflow: auto; padding-right: 4px;
}
.perm-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.perm-group-hd {
  padding: 8px 12px; background: #f7f9fc; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}
.perm-group-hd label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.perm-group-bd { padding: 6px 12px 10px; display: grid; grid-template-columns: 1fr; gap: 2px; }
.perm-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 2px;
  font-size: 13px; cursor: pointer; border-radius: 6px;
}
.perm-item:hover { background: #f7f9fc; }
.perm-item code { font-size: 11px; color: var(--text-3); margin-left: auto; }
.perm-item-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: #fff;
}

/* 秒杀会场 */
.sk-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(120deg, var(--accent) 0%, #ff7a59 100%); color: #fff;
}
.sk-hero-l { display: flex; align-items: baseline; gap: 10px; }
.sk-hero-l b { font-size: 19px; letter-spacing: .5px; }
.sk-hero-l span { font-size: 12.5px; opacity: .92; }
.sk-hero-r { font-size: 12.5px; opacity: .92; font-variant-numeric: tabular-nums; }
.sk-cd { font-variant-numeric: tabular-nums; color: var(--accent); }
.sk-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.sk-card {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px solid var(--border-2); border-radius: 12px; background: #fff; transition: .15s;
}
.sk-card:hover { border-color: #ffd7cf; box-shadow: 0 6px 18px rgba(255, 90, 60, .08); }
.sk-cover img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; background: #fafafa; }
.sk-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.sk-title { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.45; }
.sk-progress { position: relative; height: 17px; border-radius: 999px; background: #ffe9e5; overflow: hidden; }
.sk-progress i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), #ff8a6b); border-radius: 999px; }
.sk-progress span {
  position: relative; display: block; text-align: center; font-size: 11px; line-height: 17px;
  color: #fff; font-weight: 600; text-shadow: 0 0 3px rgba(0, 0, 0, .25);
}
.sk-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
@media (min-width: 760px) {
  .sk-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  .perm-group-bd { grid-template-columns: 1fr 1fr; }
  .perm-matrix { grid-template-columns: 1fr 1fr; }
}

/* 标签 / 徽章 */
.tag {
  display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 4px;
  font-size: 11px; background: var(--brand-light); color: var(--brand); border: 1px solid rgba(27, 107, 255, .22); white-space: nowrap;
}
.tag-gray { background: #f3f5f9; color: var(--text-2); border-color: var(--border); }
.tag-green { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.tag-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tag-blue { background: #eff6ff; color: var(--blue); border-color: #bfdbfe; }
.tag-purple { background: #f5f3ff; color: var(--purple); border-color: #ddd6fe; }
.tag-plain { border: 0; background: none; padding: 0; color: var(--text-3); }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge.gray { background: #f1f3f8; color: var(--text-2); }
.badge.red { background: #ffeceb; color: var(--accent); }
.badge.green { background: #e7f8f1; color: #059669; }
.badge.amber { background: #fff6e5; color: #b45309; }
.badge.blue { background: #e8f1ff; color: var(--brand); }

/* 空状态 */
.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }
.empty .ic {
  font-size: 30px; width: 76px; height: 76px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-light); border-radius: 50%; opacity: .9;
}
.empty p { font-size: 13.5px; }
.empty .btn { margin-top: 16px; }

/* 骨架屏 */
.sk { background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 分割 */
.divider { height: 1px; background: var(--border-2); margin: 12px 0; }
.dashed { border-top: 1px dashed var(--border); margin: 12px 0; }

/* 列表单元格 */
.cell { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--border-2); transition: background .15s; }
.cell:last-child { border-bottom: 0; }
.cell .ic { font-size: 19px; width: 24px; text-align: center; flex: none; }
.cell .arrow { color: #c3cbd9; font-size: 15px; }
.cell:active { background: #f7faff; }

/* 分段 / Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--border-2); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: none; padding: 13px 14px; color: var(--text-2); font-size: 14px;
  cursor: pointer; position: relative; white-space: nowrap; transition: color .15s;
}
.tabs button.on { color: var(--brand); font-weight: 600; }
.tabs button.on::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-grad);
}
.tabs button .n { font-size: 11px; color: var(--text-3); margin-left: 2px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 6px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--border);
  font-size: 13px; white-space: nowrap; cursor: pointer; color: var(--text-2); transition: .15s;
}
.chip:hover { border-color: #c8d6f2; }
.chip.on { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 600; box-shadow: 0 4px 12px -4px rgba(27, 107, 255, .55); }

/* 模态 */
.modal-root { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(8, 17, 40, .5); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  pointer-events: auto; animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 420px;
  max-height: 86vh; max-height: 86dvh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: popIn .22s cubic-bezier(.2, .9, .3, 1.15);
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-hd { padding: 17px 20px 12px; font-size: 16px; font-weight: 700; }
.modal-bd { padding: 0 20px 4px; overflow-y: auto; flex: 1; }
.modal-ft { padding: 14px 20px calc(16px + var(--safe-b)); display: flex; gap: 10px; }
.modal-ft .btn { flex: 1; }

/* Toast */
.toast-root { position: fixed; top: calc(var(--header-h) + 14px); left: 0; right: 0; z-index: 10001; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; } /* 高于登录弹窗蒙层(9999)：弹窗内切换登录方式/校验报错的提示不能被蒙层盖住 */
.toast {
  background: rgba(16, 26, 48, .93); color: #fff; padding: 10px 19px; border-radius: 999px;
  font-size: 13.5px; max-width: 82%; box-shadow: var(--shadow-md); animation: toastIn .2s ease;
  backdrop-filter: blur(6px);
}
.toast.err { background: rgba(220, 38, 38, .95); }
.toast.ok { background: rgba(5, 150, 105, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* 表格（后台） */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.tbl th {
  text-align: left; padding: 11px 12px; background: #f7f9fc; color: var(--text-3);
  font-weight: 600; font-size: 12.5px; white-space: nowrap; letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
table.tbl td { padding: 12px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: #f7faff; }
table.tbl .nowrap { white-space: nowrap; }
.tbl-empty { padding: 44px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0 4px; flex-wrap: wrap; }
.pager button {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 13px; color: var(--text-2); transition: .15s;
}
.pager button:hover { border-color: #c8d6f2; color: var(--brand); }
.pager button.on { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 600; box-shadow: 0 4px 10px -4px rgba(27, 107, 255, .55); }
.pager button[disabled] { opacity: .4; pointer-events: none; }

/* 统计数字 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  background: #fff; border-radius: var(--radius); padding: 15px; border: 1px solid rgba(16, 35, 74, .05);
  box-shadow: var(--shadow-sm); border-left: 3px solid var(--brand); transition: .18s;
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat .lb { font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.stat .vl { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat .sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.stat.b { border-left-color: var(--blue); } .stat.g { border-left-color: var(--green); }
.stat.a { border-left-color: var(--amber); } .stat.p { border-left-color: var(--purple); }

/* 进度条（迷你柱状） */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 8px 2px 0; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.bars .bar .v { width: 100%; background: var(--brand-grad); border-radius: 5px 5px 0 0; min-height: 3px; transition: height .5s ease; }
.bars .bar .t { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.bars .bar:hover .v { filter: brightness(1.12); }

/* ============================================================
   业务组件
   ============================================================ */

/* 商品网格 */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pgrid.g3 { grid-template-columns: repeat(3, 1fr); }
.p-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: .22s;
}
.p-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: rgba(27, 107, 255, .18); }
.p-card .pic { position: relative; aspect-ratio: 1/1; background: #f4f6fa; overflow: hidden; }
.p-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.p-card:hover .pic img { transform: scale(1.04); }
.p-card .flag {
  position: absolute; top: 8px; left: 8px; background: var(--promo-grad); color: #fff;
  font-size: 10.5px; padding: 2.5px 8px; border-radius: 999px; font-weight: 600;
  backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(239, 58, 18, .42);
}
.p-card .bd { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.p-card .tt { font-size: 13.5px; line-height: 1.45; min-height: 2.9em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-card .priceline { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.p-card .priceline .dj { font-size: 11px; color: var(--text-3); }
.p-card .priceline .mp { font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.p-card .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.p-card .meta { display: flex; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.p-card .shoprow { display: flex; align-items: center; gap: 4px; margin-top: auto; font-size: 11.5px; color: var(--text-3); }
.p-card .shoprow .shop { flex: 1; min-width: 0; }
.p-card .shoprow .go { flex: none; color: var(--brand); font-weight: 600; }
.p-card .foot { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin-top: auto; }
.p-card .foot .price { white-space: nowrap; }
.p-card .sold { font-size: 11.5px; color: var(--text-3); white-space: nowrap; flex: none; }

/* 京东店铺卡（jd 变体，2026-10-09 柴总指定按截图 1:1）：图片 + 两行标题 + 价格(已售) + 右下红＋
 * 与通用卡区别：无 tags / 到手价 / 店铺行；「已售」紧跟价格右侧（京东式上标位）。 */
.p-card.jd { border-color: transparent; box-shadow: none; }
.p-card.jd:hover { transform: none; box-shadow: 0 10px 26px -16px rgba(16, 35, 74, .3); }
.p-card.jd .bd { padding: 7px 9px 10px; gap: 6px; }
.p-card.jd .tt { font-size: 13px; line-height: 1.5; min-height: 0; font-weight: 400; }
.p-card.jd .buyrow { display: flex; align-items: flex-start; gap: 5px; margin-top: auto; }
.p-card.jd .buyrow .price { color: #e2231a; font-size: 14px; white-space: nowrap; }
.p-card.jd .buyrow .price .big { font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.p-card.jd .buyrow .price .cur { font-weight: 700; }
.p-card.jd .buyrow .sold { font-size: 11px; color: var(--text-3); white-space: nowrap; margin-top: 3px; }
/* 右下角红＋ = 加入购物车（2026-10-09 柴总确认） */
.p-card.jd .buyrow .plus {
  margin-left: auto; flex: none; color: #e2231a; font-size: 21px; font-weight: 400;
  line-height: 1; margin-top: -2px; cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .12s; outline: 0;
}
.p-card.jd .buyrow .plus:hover { background: #fdeceb; }
.p-card.jd .buyrow .plus:active { transform: scale(.86); }
.p-card.jd .buyrow .plus.busy { opacity: .5; pointer-events: none; }

/* 商品列表（横排） */
.p-row { display: flex; gap: 12px; padding: 12px; background: #fff; border-radius: var(--radius); border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-sm); }
.p-row .pic { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; flex: none; background: #f4f6fa; }
.p-row .pic img { width: 100%; height: 100%; object-fit: cover; }
.p-row .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

/* 购物车项 */
.c-item { display: flex; gap: 10px; padding: 13px 12px; align-items: flex-start; border-bottom: 1px solid var(--border-2); }
.c-item:last-child { border-bottom: 0; }
.c-item .pic { width: 78px; height: 78px; border-radius: 10px; overflow: hidden; flex: none; background: #f4f6fa; }
.c-item .pic img { width: 100%; height: 100%; object-fit: cover; }
.c-item.invalid { opacity: .55; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; height: 28px; background: #fff; }
.stepper button { width: 28px; height: 100%; border: 0; background: #f7f9fc; cursor: pointer; font-size: 15px; color: var(--text-2); line-height: 1; }
.stepper button:active { background: #e9eef7; color: var(--brand); }
.stepper input { width: 40px; height: 100%; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; outline: 0; font-size: 13px; }
.stepper.sm { height: 24px; } .stepper.sm button { width: 24px; } .stepper.sm input { width: 34px; font-size: 12px; }

/* 复选框 */
.cbx {
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #c3cbd9; flex: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: #fff; transition: .15s;
}
.cbx:hover { border-color: var(--brand); }
.cbx.on { background: var(--brand-grad); border-color: transparent; box-shadow: 0 2px 8px -2px rgba(27, 107, 255, .55); }
.cbx.on::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.cbx.sq { border-radius: 5px; }

/* 底部结算栏（购物车/商品/结算） */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 70;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); padding: 9px 12px;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 -6px 24px -12px rgba(13, 30, 74, .18);
}
.bottom-bar.no-tab { bottom: 0; padding-bottom: calc(9px + var(--safe-b)); }
.bottom-bar .total { flex: 1; min-width: 0; }
.bottom-bar .inner { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.bottom-bar .inner .col { flex: none; }
.bottom-bar .inner .btn { min-width: 0; }

/* 订单卡片 */
.o-card { background: #fff; border-radius: var(--radius); border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-sm); margin-bottom: 12px; overflow: hidden; }
.o-hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border-2); font-size: 13px; }
.o-hd .shop { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.o-item { display: flex; gap: 10px; padding: 12px 14px; }
.o-item .pic { width: 66px; height: 66px; border-radius: 9px; overflow: hidden; flex: none; background: #f4f6fa; }
.o-item .pic img { width: 100%; height: 100%; object-fit: cover; }
.o-ft { padding: 12px 14px; border-top: 1px solid var(--border-2); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.o-sum { padding: 10px 14px; text-align: right; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--border-2); }

/* 结算单 */
.checkout-group { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-sm); }
.addr-card { display: flex; gap: 10px; padding: 15px; background: #fff; border-radius: var(--radius); border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-sm); align-items: center; }
.addr-card .ic { font-size: 20px; }
.addr-line { font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* 支付 */
.pay-amount { text-align: center; padding: 32px 20px 26px; }
.pay-amount .n { font-size: 36px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.pay-amount .n .cur { font-size: 19px; }
.pay-qrbox { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px; }
.pay-qrbox .qr { width: 190px; height: 190px; border: 1px solid var(--border); border-radius: 14px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 10px; box-shadow: var(--shadow-sm); }
.pay-qrbox .qr img { width: 100%; height: 100%; }

/* 优惠券 */
.coupon {
  display: flex; background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-sm); margin-bottom: 10px; position: relative;
}
.coupon .left {
  width: 104px; flex: none; background: var(--coupon-grad); color: #fff; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 6px; gap: 2px;
}
.coupon .left::after {
  content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(16, 35, 74, .05);
}
.coupon .left .v { font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.coupon .left .v .u { font-size: 12px; font-weight: 500; }
.coupon .body { flex: 1; padding: 12px 16px; min-width: 0; }
.coupon.used .left { background: #b6bfd0; }
.coupon.used .left::after { background: #fff; }
.coupon .pick { display: flex; align-items: center; padding-right: 14px; }
/* 券名：最多两行，避免长券名撑破卡片 */
.coupon .cp-name {
  font-weight: 600; font-size: 14px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 首页领券中心：完整券卡网格（不再横向滑动截断） */
.coupon-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 768px) {
  .coupon-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 秒杀「立省」标签 */
.p-card .save { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* 店铺页顶栏（京东式）：店招品牌 + 搜本店/搜全站 —— 替代商城全局头部 */
/* 店铺页顶栏（京东式 v2，无框融底）：透明底、无下边框，品牌与搜索融进页面底色 */
.shop-topbar { background: transparent; border-bottom: 0; }
.shop-topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 12px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.shop-topbar-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-2);
  background: #fff; color: var(--text-2); font-size: 19px; line-height: 1; flex: none; cursor: pointer;
}
/* 站点品牌（京东式 logo+字标）：商城 logo 图（/img/logo.jpg）+ 粗体站名 */
.shop-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 100%; text-decoration: none; }
.shop-brand .brand-logo {
  width: 40px; height: 40px; border-radius: 10px; flex: none; object-fit: cover;
  box-shadow: 0 2px 8px -4px rgba(16, 35, 74, .35);
}
.shop-brand .nb { font-weight: 800; font-size: 24px; color: #e2231a; letter-spacing: 2px; }
.shop-search { flex: 1 1 100%; min-width: 0; }
/* 搜索框（京东式）：红边白底输入框 + 搜本店（浅红）/搜全站（实红）双按钮，选中范围实红高亮 */
.ss-box { display: flex; height: 38px; border: 2px solid #e2231a; border-radius: 4px; overflow: hidden; background: #fff; }
.ss-box input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 12px; font-size: 16px; background: transparent; }
.ss-box .ss-scope {
  border: 0; cursor: pointer; padding: 0 18px; font-size: 14px; font-weight: 600;
  background: #fde3e1; color: #e2231a; white-space: nowrap;
}
.ss-box .ss-scope + .ss-scope { border-left: 1px solid #f5b5b1; }
.ss-box .ss-scope.on { background: #e2231a; color: #fff; }
.ss-box .ss-scope:active { filter: brightness(.96); }

/* 店铺信息条（京东式 1:1 白卡，v2）：logo + 店名/资质下拉/星级 ｜ 店铺客服 + 关注店铺 */
.shop-hd { position: relative; padding: 2px 0 0; }
.shop-hd .sib {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid rgba(16, 35, 74, .06); border-radius: 12px;
  padding: 15px 18px; box-shadow: 0 8px 22px -16px rgba(16, 35, 74, .28);
}
.shop-hd .sib-logo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: #f4f6fa; }
.shop-hd .sib-main { min-width: 0; flex: 1; }
.shop-hd .sib-row1 { display: flex; align-items: center; gap: 10px; }
.shop-hd .sib-name { font-size: 18px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 「店铺资质 ∨」：JD 式文字链接，悬停展开面板（触屏点按同样可开） */
.sib-qual-wrap { position: relative; flex: none; }
.shop-hd .sib-qual {
  border: 0; background: none; color: var(--text-3); font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px;
}
.shop-hd .sib-qual i { font-style: normal; font-size: 11px; }
.shop-hd .sib-qual:hover, .shop-hd .sib-qual.on { color: var(--brand); }
/* 悬停面板（京东式 1:1）：四项评分 / 证照信息-查看 / 店铺简介 / 开店时间
 * ⚠️ 外层 .sib-qual-pop 必须**紧贴**触发文字（top:100%，不写 +8px），
 *    视觉上的 8px 间隙用 padding-top 做「透明桥」，白卡放内层 .qp-card。
 *    原因：写成 top: calc(100% + 8px) 会在文字与面板之间留下 8px 死区，
 *    鼠标下移穿缝时指针已不在 .sib-qual-wrap 内 → mouseleave 触发 → 面板收起，
 *    面板里的「查看」永远点不到（柴总 2026-10-08 反馈）。 */
.sib-qual-pop {
  position: absolute; top: 100%; left: 0; z-index: 30;
  padding-top: 8px; width: 470px; max-width: 78vw;
  display: block;
}
.qp-card {
  display: block;
  background: #fff; border: 1px solid var(--border-2); border-radius: 10px;
  box-shadow: 0 16px 36px -18px rgba(16, 35, 74, .4); padding: 16px 18px 14px;
  font-size: 12.5px; color: var(--text);
}
.qp-scores { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--border-2); }
.qp-score { text-align: center; min-width: 0; }
.qp-score .qp-num { display: block; font-size: 25px; font-weight: 700; color: #e2231a; line-height: 1.1; }
.qp-score .qp-num i { font-style: normal; font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.qp-score .qp-label { display: block; margin-top: 5px; font-size: 12.5px; color: var(--text-2); }
.qp-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-2); align-items: flex-start; }
.qp-row:last-child { border-bottom: 0; padding-bottom: 0; }
.qp-k { flex: none; min-width: 60px; color: var(--text-2); font-weight: 600; }
.qp-v { color: var(--text-3); min-width: 0; line-height: 1.5; }
.qp-view { margin-left: auto; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 12.5px; padding: 0; }
.qp-view:hover { color: var(--brand); }
.qp-view i { font-style: normal; }
.qp-certs { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border-2); }
.shop-hd .sib-row2 { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 13px; }
.shop-hd .sib-stars { color: #e2231a; font-size: 15px; letter-spacing: 2px; }
.shop-hd .sib-row2 b { color: #e2231a; }
.shop-hd .sib-btns { display: flex; gap: 10px; flex: none; }
.shop-hd .sib-btns .btn {
  height: 34px; padding: 0 16px; border-radius: 6px;
  display: inline-flex; align-items: center; font-size: 13.5px; text-decoration: none;
}
.shop-hd .sib-svc { background: #f5f7fa; border: 1px solid var(--border-2); color: var(--text-2); }
.shop-hd .sib-svc:hover { color: var(--brand); border-color: rgba(27, 107, 255, .3); }
.shop-hd .sib-follow { background: #e2231a; border: 1px solid #e2231a; color: #fff; font-weight: 600; }
.shop-hd .sib-follow:hover { background: #c81623; }
.shop-hd .sib-follow.followed { background: #f5f7fa; border-color: var(--border-2); color: var(--text-2); font-weight: 500; }
/* 店招资质徽章（替代原「正常经营」状态标签）：点击看水印大图 */
.qual-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--text-2); background: #f5f7fa;
  border: 1px solid var(--border-2); border-radius: 999px; padding: 3px 10px;
  cursor: pointer; white-space: nowrap;
}
.qual-chip:hover { color: var(--brand); border-color: rgba(27, 107, 255, .3); background: var(--brand-light); }

/* 店铺头图（京东式店招卡片） */
.shop-hd { position: relative; }
.shop-hd .banner { height: 140px; background: var(--navy-grad); overflow: hidden; }
.shop-hd .banner img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.shop-hd .info {
  background: #fff; margin: -36px 12px 0; border-radius: var(--radius); padding: 13px 15px;
  border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-md); position: relative; display: flex; gap: 12px; align-items: center;
}
.shop-hd .logo { width: 58px; height: 58px; border-radius: 13px; overflow: hidden; flex: none; border: 2px solid #fff; background: #f4f6fa; box-shadow: var(--shadow-md); }
/* 店招 meta 行：评分/类目/在售/销量/关注（合并原独立统计卡，去冗余） */
.shop-meta { font-size: 12.5px; color: var(--text-3); }
.shop-meta b { color: var(--text); font-weight: 600; }
.shop-meta .rate { color: #e8890c; font-weight: 600; }

/* 店铺主体（京东式两栏）：左店内分类 / 右排序+商品网格 */
.shop-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; }
.shop-side {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 0; position: sticky; top: 12px;
}
.shop-side .side-hd { padding: 10px 14px 8px; font-weight: 700; font-size: 13.5px; }
.shop-side .side-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 14px; font-size: 13.5px; color: var(--text-2); cursor: pointer;
  border-left: 3px solid transparent; transition: .15s;
}
.shop-side .side-item i { font-style: normal; font-size: 11.5px; color: var(--text-4); }
.shop-side .side-item:hover { color: var(--brand); background: var(--brand-light); }
.shop-side .side-item.on {
  color: var(--brand); font-weight: 600; background: var(--brand-light); border-left-color: var(--brand);
}
.shop-side .side-item.on i { color: var(--brand); }
/* 排序条（综合/销量/新品/价格） */
.shop-sort {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; gap: 2px; padding: 4px 8px; margin-bottom: 12px;
}
.shop-sort a { padding: 7px 14px; font-size: 13.5px; color: var(--text-2); cursor: pointer; position: relative; border-radius: 6px; white-space: nowrap; }
.shop-sort a:hover { color: var(--brand); }
.shop-sort a.on { color: var(--brand); font-weight: 700; }
.shop-sort a.on::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 2.5px; border-radius: 2px; background: var(--brand-grad);
}
.shop-sort .dir { font-size: 11px; }

/* ============================================================
   独立登录页（商家后台 / 平台管理后台，bare 全屏布局）
   ============================================================ */
.bare-root { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; }
.auth-brand {
  flex: 1.15; background: var(--navy-grad); color: #fff; position: relative; overflow: hidden;
  padding: 52px 48px 36px; display: flex; flex-direction: column;
}
.auth-brand .glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; }
.auth-brand .glow.g1 { width: 420px; height: 420px; background: #2f6bff; top: -140px; right: -120px; }
.auth-brand .glow.g2 { width: 320px; height: 320px; background: #0e7a6f; bottom: -120px; left: -100px; opacity: .22; }
.auth-brand-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; }
.auth-logo img { width: 34px; height: 34px; border-radius: 9px; }
.auth-tag {
  font-size: 11px; letter-spacing: .18em; color: rgba(255, 255, 255, .75);
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 4px 12px;
}
.auth-wrap.admin .auth-tag { color: #f0d9a6; border-color: rgba(232, 176, 75, .55); }
.auth-brand-mid { position: relative; z-index: 1; margin-top: auto; margin-bottom: auto; padding: 48px 0; }
.auth-hero-ic {
  width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 22px; backdrop-filter: blur(6px);
}
.auth-brand-mid h1 { font-size: 30px; letter-spacing: .5px; margin: 0 0 10px; }
.auth-brand-mid > p { color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 1.8; max-width: 420px; margin: 0; }
.auth-feats { display: flex; flex-direction: column; gap: 16px; margin-top: 30px; }
.auth-feats .fi { display: flex; gap: 12px; align-items: flex-start; }
.auth-feats .fi .ic {
  width: 38px; height: 38px; flex: none; border-radius: 11px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.auth-feats .fi b { display: block; font-size: 14px; font-weight: 600; }
.auth-feats .fi i { display: block; font-style: normal; color: rgba(255, 255, 255, .62); font-size: 12.5px; margin-top: 2px; }
.auth-brand-ft { position: relative; z-index: 1; color: rgba(255, 255, 255, .45); font-size: 12px; }

.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 20px; }
.auth-card {
  width: 100%; max-width: 408px; background: #fff; border-radius: var(--radius-lg);
  border: 1px solid rgba(16, 35, 74, .05); box-shadow: var(--shadow-lg); padding: 32px 30px 24px;
}
.auth-card-hd .auth-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  color: var(--brand); background: var(--brand-light); border-radius: 999px; padding: 4px 12px;
}
.auth-wrap.admin .auth-card-hd .auth-chip { color: #8a6420; background: #faf3e3; }
.auth-card-hd h2 { font-size: 21px; margin: 14px 0 6px; }
.auth-card-hd p { font-size: 13px; margin: 0 0 16px; }
.auth-err {
  background: #fff1f0; color: #c5301f; border: 1px solid #ffd6d1;
  border-radius: 10px; font-size: 12.5px; padding: 9px 12px; margin: 14px 0 0; line-height: 1.6;
}
.auth-card .btn { margin-top: 18px; }
.auth-foot { margin-top: 16px; font-size: 12.5px; text-align: center; color: var(--text-3); }
.auth-foot a { color: var(--brand); text-decoration: none; }
.auth-sep { margin: 0 8px; color: var(--border); }
.auth-hint { margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--text-3); }

/* 京东式输入行：左侧图标 + 细边框 + 4px 圆角 */
.lg2-f-row {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px;
  border: 1px solid #dcdfe6; border-radius: 4px; background: #fff; margin-bottom: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.lg2-f-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(27, 107, 255, .08); }
.lg2-f-row .ic { font-size: 14px; color: #c0c4cc; flex: none; }
.lg2-f-row input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none;
  height: 100%; font-size: 14px; color: var(--text);
}
.lg2-f-row input::placeholder { color: #b6bcc8; }
.lg2-f-row .eye { cursor: pointer; color: #c0c4cc; font-size: 14px; flex: none; }
.lg2-f-row .eye.on { color: var(--brand); }
.lg2-agree {
  display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 4px;
  font-size: 12.5px; color: var(--text-2); line-height: 1.7;
}
.lg2-agree .cbx { margin-top: 3px; }
/* ---------- 登录弹窗（1:1 复刻京东弹窗结构：福利横幅 + 扫码列/密码列 + 第三方行） ---------- */
.lgm-mask {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 26, 48, .48); backdrop-filter: blur(2px); padding: 20px;
  animation: lgmFade .18s ease;
}
@keyframes lgmFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes lgmPop { from { transform: translateY(14px) scale(.985); opacity: 0 } to { transform: none; opacity: 1 } }
.lgm {
  position: relative; width: 100%; max-width: 640px; border-radius: 8px; overflow: visible;
  background: #fff; box-shadow: 0 30px 80px -20px rgba(6, 18, 42, .45); animation: lgmPop .22s ease;
}
/* 京东式：✕ 悬浮在卡片右上角外侧 */
.lgm-x {
  position: absolute; right: -46px; top: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: #fff; color: #9aa3b2; cursor: pointer; font-size: 13px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center;
}
.lgm-x:hover { color: #1a1a1a; }

.lgm-banner {
  padding: 20px 26px 18px; color: #fff; border-radius: 8px 8px 0 0;
  background: linear-gradient(115deg, #0f46c2 0%, #1b6bff 52%, #4f97ff 100%);
}
.lgm-banner-hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.lgm-banner-hd h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.lgm-banner-hd .tip { font-size: 11.5px; opacity: .85; }
.lgm-banner-hd .tip i { font-style: normal; margin-right: 2px; }
.lgm-perks { display: flex; gap: 26px; flex-wrap: wrap; }
.lgm-perks .pk { display: flex; gap: 10px; align-items: center; flex: 1; }
.lgm-perks .ic {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .2);
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none;
}
.lgm-perks b { display: block; font-size: 13.5px; font-weight: 700; }
.lgm-perks i { display: block; font-style: normal; font-size: 11.5px; opacity: .85; margin-top: 2px; }

.lgm-bd { position: relative; padding: 16px 26px 24px; }
.lgm-ent { position: absolute; right: 20px; top: 12px; font-size: 12px; color: #9aa3b2; text-decoration: none; }
.lgm-ent:hover { color: var(--brand); }

.lgm-cols { display: flex; min-height: 300px; }
/* 左列：扫码登录（结构与京东一致；无扫码后端，功能位明示敬请期待） */
.lgm-col-l {
  flex: 1 1 46%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 24px 18px 4px; border-right: 1px solid #f0f1f4;
}
.lgm-col-l h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #1a1a1a; }
.lgm-qr-sup { margin: 0 0 16px; font-size: 12px; color: #9aa3b2; }
.lgm-qr-sup b { color: #333; font-weight: 600; margin: 0 2px; }
.lgm-qr-sup a { color: #2f6fdc; text-decoration: none; margin-left: 2px; }
.lgm-qr { display: flex; flex-direction: column; align-items: center; }
.lgm-qr canvas { display: block; border: 1px solid #eceff5; border-radius: 4px; }
.lgm-qr .soon { margin-top: 10px; font-size: 11px; color: #b0b6c2; }

/* 右列：密码登录 */
.lgm-col-r { flex: 1 1 54%; display: flex; flex-direction: column; justify-content: center; padding: 18px 4px 18px 24px; }
.lgm-tabs2 { display: flex; gap: 22px; margin-bottom: 18px; }
.lgm-tabs2 button { border: 0; background: none; cursor: pointer; font-size: 15px; font-weight: 700; color: #333; padding: 2px 0; }
.lgm-tabs2 button.on { color: var(--brand); }
.lgm-tabs2 button:hover { color: var(--brand); }

.lg2-f-row.lgm-f { background: #f7f8fa; border-color: #f0f1f4; height: 42px; margin-bottom: 12px; border-radius: 4px; }
.lg2-f-row.lgm-f:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(27, 107, 255, .07); }
.lg2-f-row.lgm-f .pre {
  font-size: 13px; color: #333; flex: none; padding-right: 10px; margin-right: 2px;
  border-right: 1px solid #e5e7ec; line-height: 1; white-space: nowrap;
}
.lg2-f-row.lgm-f .pre i { font-style: normal; font-size: 10px; color: #9aa3b2; margin-left: 3px; }
.lg2-f-row.lgm-f .eye { cursor: pointer; color: #c0c4cc; font-size: 13px; flex: none; }
.lg2-f-row.lgm-f .eye.on { color: var(--brand); }

.lgm-btn {
  width: 100%; height: 42px; margin-top: 8px; border: 0; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, #6f9dff, #8fb4ff); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: 10px; text-indent: 10px;
  transition: filter .15s;
}
.lgm-btn:hover { filter: brightness(1.04); }
.lgm-btn.disabled { opacity: .6; cursor: not-allowed; }

.lgm-bottom {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin-top: 18px; font-size: 12.5px;
}
.lgm-bottom a { color: #6b7280; text-decoration: none; cursor: pointer; white-space: nowrap; }
.lgm-bottom a:hover { color: var(--brand); }
.lgm-bottom .sep { color: #e5e7ec; }

@media (max-width: 760px) {
  /* 弹窗：✕ 收回卡内；左右列改上下堆叠 */
  .lgm { max-width: 100%; }
  .lgm-x { right: 10px; top: 10px; background: rgba(0, 0, 0, .28); color: #fff; box-shadow: none; }
  .lgm-cols { flex-direction: column; min-height: 0; }
  .lgm-col-l { border-right: 0; border-bottom: 1px solid #f0f1f4; padding: 14px 0 20px; }
  .lgm-col-r { padding: 18px 0 6px; }
  .lgm-perks { gap: 12px; }
  .lgm-perks .pk:nth-child(3) { display: none; }
  .lgm-bd { padding: 14px 18px 20px; }
}


/* 商城会员登录页（shop 壳内） */
.login-logo {
  width: 64px; height: 64px; border-radius: 18px; object-fit: cover; display: inline-block;
  background: #fff; box-shadow: 0 0 0 1px rgba(16, 35, 74, .07), 0 12px 26px -12px rgba(7, 20, 48, .45);
}
.login-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--brand); background: var(--brand-light); border: 1px solid rgba(27, 107, 255, .18);
  border-radius: 999px; padding: 6px 16px;
}
.login-portals {
  margin-top: 14px; border: 1px dashed var(--border); border-radius: var(--radius);
  background: #fff; padding: 4px 14px;
}
.login-portals a {
  display: flex; align-items: center; gap: 6px; padding: 10px 2px; font-size: 13px;
  color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--border-2);
}
.login-portals a:last-child { border-bottom: 0; }
.login-portals a:hover { color: var(--brand); }

/* 小屏：登录页上下结构，品牌区收紧为横幅 */
@media (max-width: 860px) {
  .auth-wrap { flex-direction: column; }
  .auth-brand { padding: 22px 20px 26px; flex: none; }
  .auth-brand-mid { padding: 26px 0 0; }
  .auth-brand-mid h1 { font-size: 22px; }
  .auth-brand-mid > p { font-size: 13px; }
  .auth-feats { display: none; }
  .auth-hero-ic { width: 48px; height: 48px; font-size: 23px; border-radius: 14px; margin-bottom: 14px; }
  .auth-main { padding: 22px 16px 36px; align-items: flex-start; }
  .auth-card { padding: 26px 20px 20px; }
}

/* ---------- 独立注册页（京东式三步：验证手机号 → 填写账号信息 → 注册成功） ---------- */
.reg { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.reg-top {
  display: flex; align-items: baseline; gap: 12px;
  max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 26px 12px 18px;
  border-bottom: 1px solid #eceff5;
}
.reg-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.reg-logo img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; align-self: center; }
.reg-logo b { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.reg-welcome { font-size: 15px; color: var(--text-2); }
.reg-top-r { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.reg-top-r a { color: var(--brand); text-decoration: none; cursor: pointer; font-weight: 600; }
.reg-top-r a:hover { text-decoration: underline; }

.reg-main { width: 100%; max-width: 420px; margin: 0 auto; padding: 34px 20px 40px; flex: 1; }

/* 三步进度条：当前步蓝色实心，完成步打勾，连接虚线 */
.reg-steps { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.reg-step { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 72px; }
.reg-step .dot {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; background: #eef1f6; color: #b3bac6; transition: .2s;
}
.reg-step .txt { font-size: 12px; color: #b3bac6; white-space: nowrap; }
.reg-step.on .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(27, 107, 255, .14); }
.reg-step.on .txt { color: var(--brand); font-weight: 600; }
.reg-step.done .dot { background: #34b26b; color: #fff; }
.reg-step.done .txt { color: #34b26b; }
.reg-dash, .reg-steps .dash { flex: 1 1 30px; height: 0; border-top: 2px dotted #d9dee7; margin: 0 6px 20px; }
.reg-steps .dash.passed { border-top-color: #9fd8b8; }

.reg-card { display: flex; flex-direction: column; }
.reg-f { height: 48px; margin-bottom: 16px; background: #fff; }
.reg-f .pre { font-size: 13.5px; color: var(--text); font-weight: 600; padding-right: 12px; margin-right: 2px; border-right: 1px solid #e5e7ec; line-height: 1; white-space: nowrap; }
.reg-f .pre i { font-style: normal; font-size: 10px; color: #9aa3b2; margin-left: 4px; }
.reg-f .lab { font-size: 13.5px; color: var(--text-2); flex: none; letter-spacing: 1px; }

/* 人机验证按钮：点击后转「验证通过」绿态（后续可平替为滑块/极验） */
.reg-verify {
  width: 100%; height: 48px; margin-bottom: 16px; border: 1px solid #dcdfe6; border-radius: 4px;
  background: #f7f8fa; color: var(--text-2); font-size: 14px; cursor: pointer; font-family: inherit;
  transition: .2s;
}
.reg-verify:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.reg-verify:disabled { cursor: default; }
.reg-verify.ok { background: #f0faf4; border-color: #9fd8b8; color: #34b26b; font-weight: 600; }

.reg-send {
  flex: none; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--brand);
  padding: 0 2px 0 10px; border-left: 1px solid #e5e7ec; font-family: inherit; white-space: nowrap;
}
.reg-send:disabled { color: #b3bac6; cursor: not-allowed; }
.reg-send:hover:not(:disabled) { text-decoration: underline; }

.reg-btn {
  width: 100%; height: 48px; margin-top: 8px; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600; letter-spacing: 4px;
  font-family: inherit; transition: background .15s, opacity .15s;
}
.reg-btn:hover:not(:disabled) { background: #155fe0; }
.reg-btn:disabled { background: #a9c4f5; cursor: not-allowed; }
.reg-btn.disabled { opacity: .6; cursor: not-allowed; }

.reg-agree { margin: 14px 2px 0; }
.reg-tip { margin: 14px 0 0; font-size: 12px; color: var(--text-3); text-align: center; }

/* 注册成功 */
.reg-done { text-align: center; padding: 26px 0 10px; }
.reg-done .ok {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 50%; background: #34b26b; color: #fff; font-size: 30px; margin-bottom: 18px;
  box-shadow: 0 0 0 8px rgba(52, 178, 107, .12);
}
.reg-done h3 { margin: 0 0 8px; font-size: 22px; color: var(--text); }
.reg-done p { margin: 0 0 24px; font-size: 13px; color: var(--text-3); }

.reg-ft { padding: 20px 0 30px; text-align: center; border-top: 1px solid #eceff5; }
.reg-ft-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: #b0b6c2; }
.reg-ft-links a { color: #8f97a6; text-decoration: none; }
.reg-ft-links a:hover { color: var(--brand); }
.reg-ft-links span { color: #e2e6ee; }
.reg-copy { font-size: 12px; color: #b0b6c2; margin: 10px 0 0; line-height: 1.8; }

@media (max-width: 560px) {
  .reg-top { padding: 18px 16px 14px; }
  .reg-logo img { width: 34px; height: 34px; }
  .reg-logo b { font-size: 17px; }
  .reg-welcome { font-size: 13.5px; }
  .reg-main { padding: 24px 16px 32px; }
  .reg-step { min-width: 58px; }
  .reg-step .txt { font-size: 11px; }
}


/* 分类页：顶部分类条（横向滚动）+ 满宽商品区 */.cat-page { display: flex; flex-direction: column; }
.cat-top {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px;
  background: #fff; border-bottom: 1px solid var(--border-2);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cat-top::-webkit-scrollbar { display: none; }
.cat-pill {
  flex: none; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border);
  background: #f5f7fb; color: var(--text-2); font-size: 13px; white-space: nowrap;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.cat-pill:hover { border-color: #c8d6f2; color: var(--brand); }
.cat-pill.on {
  background: var(--brand-grad); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 4px 10px -4px rgba(27, 107, 255, .55);
}
.cat-main { padding: 12px; }

/* 小屏：分类条更紧凑；商品卡「单列横卡」（参考电商列表：左大图 + 右信息列） */
@media (max-width: 767.98px) {
  .app-root:has(.cat-page) .site-footer { display: none; }
  .cat-top { padding: 9px 10px; gap: 7px; }
  .cat-pill { font-size: 12.5px; padding: 6px 13px; }
  .cat-main { padding: 10px; }

  /* —— 商品卡：双列竖卡 → 单列横卡 —— */
  .pgrid { grid-template-columns: 1fr; gap: 9px; }
  .pgrid.g3 { grid-template-columns: 1fr; }
  .p-card { flex-direction: row; align-items: stretch; }
  .p-card:hover { transform: none; }
  .p-card .pic {
    width: 132px; max-width: 38vw; height: auto; min-height: 132px;
    align-self: flex-start; aspect-ratio: 1/1; border-radius: 10px; flex: none;
  }
  .p-card .pic img { transform: none; }
  .p-card .bd { padding: 8px 10px 9px; gap: 4px; }
  .p-card .tt { font-size: 13.5px; min-height: 0; }
  .p-card .priceline { gap: 4px; margin-top: 1px; }
  .p-card .priceline .dj { font-size: 10.5px; }
  .p-card .priceline .mp { font-size: 11px; }
  .p-card .meta { font-size: 11px; }
  .p-card .shoprow { font-size: 11px; }
  .p-card .flag { top: 6px; left: 6px; font-size: 10px; padding: 2px 7px; }

  /* —— 券卡移动端紧凑化：金额、名称、有效期、按钮完整可见 —— */
  .coupon .left { width: 92px; }
  .coupon .left .v { font-size: 20px; }
  .coupon .body { padding: 10px 12px; gap: 2px; }
  .coupon .cp-name { font-size: 13px; }
  .coupon .pick { padding-right: 10px; }
  .coupon-grid { gap: 8px; }
}

/* 首页 */
.hero { border-radius: var(--radius-lg); overflow: hidden; position: relative; aspect-ratio: 16/7; background: #e6ebf4; box-shadow: var(--shadow-md); }
.hero-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.hero-slide { min-width: 100%; height: 100%; position: relative; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .5); transition: .25s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.hero-dots i.on { width: 18px; background: #fff; }

/* 注：列数跟随一级类目数（当前 11 个，见 api/app/database/DemoCatalog::categories）。
   移动端 4 列 → 4+4+3；PC 端 11 列一行排满。类目增减时必须同步这两处的列数，
   否则末行会只剩一两个图标，视觉上明显失衡。 */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px 0; }
.cat-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: 12px; transition: .15s; }
.cat-grid a:hover { background: #f7faff; }
.cat-grid a:active { background: var(--brand-light); }
.cat-grid .em { font-size: 26px; filter: drop-shadow(0 3px 5px rgba(13, 30, 74, .12)); }
.cat-grid span { font-size: 11.5px; color: var(--text-2); }

.sec-hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 2px 11px; }
.sec-hd h2 { font-size: 17.5px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.sec-hd h2::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--brand-grad); box-shadow: 0 2px 6px rgba(27, 107, 255, .4); }
.sec-hd .more { font-size: 12.5px; color: var(--text-3); }
.sec-hd .more:hover { color: var(--brand); }

/* 倒计时 / 秒杀 */
.countdown { display: inline-flex; gap: 2px; align-items: center; font-size: 12px; color: var(--text-2); }
.countdown b { background: var(--text); color: #fff; border-radius: 4px; padding: 1.5px 5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   后台（商户 / 平台）
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.admin-side {
  width: 216px; flex: none; background: var(--navy-grad); color: #b9c4d9; padding: 0 0 20px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
}
.admin-side::-webkit-scrollbar { width: 5px; }
.admin-side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); }
.admin-side .brand { display: flex; align-items: center; gap: 9px; padding: 19px 18px 16px; color: #fff; font-weight: 700; font-size: 15.5px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.admin-side .brand .em { font-size: 19px; flex: none; }
.admin-side .brand-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-side .brand-txt b { font-size: 14.5px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-side .brand-txt i { font-size: 11px; font-style: normal; font-weight: 400; color: #7e8bab; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 身份标签（商家账号 / 平台管理员），与账号昵称区分 */
.id-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: rgba(27, 107, 255, .1); color: var(--brand);
  border: 1px solid rgba(27, 107, 255, .24); white-space: nowrap;
}
.admin-side .grp { padding: 15px 18px 6px; font-size: 11px; color: #5f6c8c; letter-spacing: .12em; text-transform: uppercase; }
.admin-side a {
  display: flex; align-items: center; gap: 9px; padding: 10px 18px; font-size: 13.5px;
  color: #b9c4d9; border-left: 3px solid transparent; cursor: pointer; transition: .15s; margin: 1px 0;
}
.admin-side a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side a.on {
  background: linear-gradient(90deg, rgba(62, 139, 255, .24), rgba(62, 139, 255, .04));
  color: #fff; border-left-color: #3e8bff; font-weight: 600;
}
.admin-side a .ic { font-size: 15px; width: 18px; text-align: center; }
.admin-side a .n {
  margin-left: auto; background: var(--accent); color: #fff; font-size: 10.5px; min-width: 17px; height: 17px;
  line-height: 17px; text-align: center; border-radius: 999px; padding: 0 5px; font-style: normal;
  box-shadow: 0 2px 6px rgba(255, 61, 46, .4);
}

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  height: 58px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 18px; position: sticky; top: 0; z-index: 50;
}
.admin-top h1 { font-size: 16.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-top .muted { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body { padding: 18px; flex: 1; }
.admin-menu-btn { display: none; }

/* 平台管理员「进店管理」预览提示条 */
.preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; font-size: 12.5px; line-height: 1.5;
  background: #fff8e6; color: #8a5a00; border-bottom: 1px solid #ffe3a3;
}
.preview-bar b { color: #7a4e00; }
.preview-bar button { flex: none; }

/* ============================================================
   协议与规则（后台编辑 + 前台展示）
   ============================================================ */
.ag-grid { display: grid; grid-template-columns: 258px 1fr; gap: 14px; align-items: start; }
.ag-item {
  padding: 11px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 4px;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.ag-item:hover { background: var(--bg); }
.ag-item.on { background: var(--brand-light); border-color: rgba(27, 107, 255, .3); }
.ag-editor {
  font-family: ui-monospace, Menlo, Consolas, 'Courier New', monospace;
  font-size: 12.5px; line-height: 1.9; resize: vertical;
  min-height: 420px; height: auto; padding: 12px 14px;
}

/* 协议正文排版 */
.doc-body { font-size: 13.5px; line-height: 1.95; color: var(--text); }
.doc-body h2 { font-size: 15px; font-weight: 700; margin: 22px 0 9px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 14px; font-weight: 700; margin: 18px 0 7px; }
.doc-body h4 { font-size: 13.5px; font-weight: 700; margin: 14px 0 6px; }
.doc-body p { margin: 0 0 11px; }
.doc-body ul { margin: 0 0 12px; padding-left: 20px; }
.doc-body li { margin-bottom: 6px; }

/* 商城页脚（深海军蓝 · 高端收尾） */
.site-footer {
  background: var(--navy-grad); color: rgba(255, 255, 255, .66);
  margin-top: 32px; padding: 30px 0 22px;
}
.site-footer .ft-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.site-footer .ft-title { font-size: 13.5px; font-weight: 600; margin-bottom: 11px; color: #fff; letter-spacing: .02em; }
.site-footer .ft-links { display: flex; flex-direction: column; gap: 8px; }
.site-footer .ft-links a { font-size: 12.5px; color: rgba(255, 255, 255, .6); transition: color .15s; }
.site-footer .ft-links a:hover { color: #fff; }
.site-footer .ft-copy {
  margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12px; color: rgba(255, 255, 255, .45); line-height: 1.8;
}

/* 备案与资质（工信部要求：备案号与经营许可证必须展示且可点击核验） */
.site-footer .ft-legal {
  margin-top: 14px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px;
  font-size: 12px; line-height: 1.7;
}
.site-footer .ft-legal a { color: rgba(255, 255, 255, .5); transition: color .15s; }
.site-footer .ft-legal a:hover { color: #fff; }
.site-footer .ft-legal .lg-sep { color: rgba(255, 255, 255, .22); }
.auth-legal {
  position: relative; z-index: 1; margin-top: 9px;
  display: flex; flex-wrap: wrap; gap: 4px 8px;
  font-size: 11.5px; line-height: 1.7; color: rgba(255, 255, 255, .38);
}
.auth-legal a { color: rgba(255, 255, 255, .45); transition: color .15s; }
.auth-legal a:hover { color: #fff; }
.auth-legal .lg-sep { color: rgba(255, 255, 255, .2); }

/* ============================================================
   响应式：移动端微调
   ============================================================ */
@media (max-width: 767px) {
  /* 头部双行化：第 1 行品牌+操作，第 2 行通栏搜索 —— 结构性杜绝挤压重叠 */
  .hd-inner { height: auto; flex-wrap: wrap; padding: 9px 12px 10px; row-gap: 9px; }
  .hd-logo, .hd-actions { order: 1; height: 32px; }
  /* 返回键：仅移动端出现在品牌左侧（一级页面由 [hidden] 隐藏） */
  .hd-back { display: inline-flex; order: 1; }
  .hd-search { order: 3; }
  .hd-actions { gap: 4px; }
  /* 操作按钮只留图标，防溢出（功能入口不变，移动端底部 tab 亦有同样入口） */
  .hd-icon-btn { padding: 0 9px; }
  .hd-icon-btn .lb { display: none; }

  /* 移动端输入 16px，避免 iOS 聚焦自动放大造成布局跳动 */
  .input, .select, .textarea, .hd-search input { font-size: 16px; }

  /* 店铺页两栏折叠：侧栏变横滑胶囊条（手机无侧栏空间） */
  .shop-body { display: block; }
  /* 店铺信息条：窄屏三段换行（logo+名称资质 / 评分 / 按钮），防止文字被挤成竖排 */
  .shop-hd .sib { flex-wrap: wrap; row-gap: 10px; padding: 13px 14px; }
  .shop-hd .sib-main { flex: 1 1 160px; }
  .shop-hd .sib-btns { margin-left: auto; }
  .sib-qual-pop { left: auto; right: 0; }
  .shop-side {
    display: flex; align-items: center; gap: 4px; overflow-x: auto;
    position: static; padding: 5px 8px; margin-bottom: 12px;
  }
  .shop-side::-webkit-scrollbar { display: none; }
  .shop-side .side-hd { display: none; }
  .shop-side .side-item {
    flex: none; white-space: nowrap; border-left: 0;
    border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px;
  }
  .shop-side .side-item.on { border-color: transparent; }

  /* 店铺顶栏（移动端）：品牌一行 + 搜索一行，返回键可见 */
  .shop-brand { flex: 1 1 auto; }
  .shop-search { flex: 1 1 100%; }
  .shop-topbar-back { display: inline-flex; }

  /* 底栏避让加强 */
  .site-footer { margin-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
  .app-root:has(.bottom-bar) .site-footer { margin-bottom: calc(var(--tabbar-h) + var(--safe-b) + 78px); }

  .admin-body { padding: 12px; }
  .admin-top { padding: 0 12px; gap: 8px; }
  .stat-grid { gap: 8px; }
  .stat { padding: 12px; }
  .stat .vl { font-size: 19px; }
  .card-hd { padding: 12px 14px; }
  .card-bd { padding: 13px 14px; }
  .pay-amount .n { font-size: 32px; }
  .toast-root { top: calc(var(--header-h) + 8px); }
}

@media (max-width: 860px) {
  .ag-grid { grid-template-columns: 1fr; }
  .site-footer { margin-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
  .site-footer .ft-links { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }

  /* 移动端后台：侧栏抽屉 */
  .admin-side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 210; transform: translateX(-100%);
    transition: transform .25s ease; height: 100vh; height: 100dvh;
  }
  .admin-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .admin-menu-btn { display: inline-flex; }
  .admin-mask { position: fixed; inset: 0; background: rgba(8, 17, 40, .5); z-index: 205; animation: fadeIn .16s ease; }
}

/* ============================================================
   响应式：PC
   ============================================================ */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  body { font-size: 14px; }
  .page { padding-bottom: 28px; }
  .page:has(.bottom-bar) { padding-bottom: 112px; }
  .tabbar { display: none; }

  /* —— 京东式顶栏（PC）：工具条 / 品牌搜索行 / 频道导航，白底 —— */
  .hd {
    position: static;                 /* 京东式头部不吸顶：三层太高，滚动时留给内容 */
    background: #fff; color: var(--text);
    box-shadow: 0 1px 0 var(--border);
  }
  /* 第 1 层：工具条（问候 + 登录注册 + 常用入口） */
  .hd-ut {
    display: block; background: #f7f8fa;
    border-bottom: 1px solid var(--border);
    color: var(--text-3); font-size: 12.5px;
  }
  .hd-ut-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 0 12px; height: 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
  }
  .hd-ut-l, .hd-ut-r { display: flex; align-items: center; min-width: 0; }
  .hd-ut-inner a { color: var(--text-2); padding: 0 9px; position: relative; cursor: pointer; white-space: nowrap; }
  .hd-ut-l a:first-child, .hd-ut-r a:first-child { padding-left: 0; }
  .hd-ut-l a + a::before, .hd-ut-r a + a::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 1px; height: 10px; background: #dcdfe4;
  }
  .hd-ut-inner a:hover { color: var(--brand); }
  .hd-ut-inner a.strong { color: var(--brand); font-weight: 600; }
  /* 第 2 层：品牌搜索行（大 logo + 大搜索框 + 搜索热点 + 操作区） */
  .hd-inner { gap: 28px; height: auto; padding: 16px 12px 10px; }
  .hd-logo { font-size: 24px; gap: 10px; }
  .hd-logo .logo-img {
    width: 44px; height: 44px; border-radius: 10px;
    box-shadow: 0 0 0 1px var(--border), 0 3px 10px -2px rgba(0, 0, 0, .15);
  }
  .hd-logo span { text-shadow: none; }
  .hd-search-wrap { display: block; order: 0; flex: 1 1 auto; max-width: 660px; min-width: 0; }
  .hd-search {
    order: 0; flex: none; width: 100%; max-width: none; height: 42px;
    padding: 0; gap: 0; border-radius: 8px; border: 2px solid var(--brand);
    box-shadow: none;
  }
  .hd-search:focus-within { box-shadow: 0 0 0 3px rgba(27, 107, 255, .15); }
  .hd-search input { padding: 0 14px; }
  .hd-search .go { height: 100%; border-radius: 0 6px 6px 0; padding: 0 28px; font-size: 15px; box-shadow: none; }
  .hd-hot { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 7px; font-size: 12.5px; }
  .hd-hot a { color: var(--text-3); white-space: nowrap; }
  .hd-hot a:hover { color: var(--brand); }
  .hd-hot a:first-child { color: var(--brand); font-weight: 600; }
  .hd-actions { margin-left: auto; gap: 8px; }
  .hd-icon-btn { background: #f5f7fa; color: var(--text-2); border: 1px solid var(--border); }
  .hd-icon-btn:hover { background: var(--brand-light); color: var(--brand); border-color: rgba(27, 107, 255, .3); }
  /* 第 3 层：频道导航 —— 文字条 + 分隔线 + 选中下划线（导航条本身只走中性细线，
     蓝色下划线只属于选中项，避免「整条蓝线 + 选中蓝线」叠成怪异双线） */
  .hd-nav { display: block; border-bottom: 1px solid var(--border); }
  .hd-nav-inner { height: 42px; gap: 0; padding: 0 18px; }
  .hd-nav a {
    border-radius: 0; padding: 0 15px; font-size: 14.5px; color: var(--text);
    font-weight: 500; position: relative; height: 100%;
    display: inline-flex; align-items: center;
  }
  .hd-nav a + a::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 1px; height: 12px; background: #e3e6ea;
  }
  .hd-nav a:hover { color: var(--brand); background: none; }
  .hd-nav a.on { color: var(--brand); background: none; font-weight: 700; }
  .hd-nav a.on::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 0;
    height: 3px; border-radius: 2px; background: var(--brand-grad);
  }

  .container { padding: 0 18px; }
  /* 店铺顶栏（PC，京东式）：品牌区不缩放、搜索靠右收窄、隐藏移动端返回键 */
  .shop-topbar-inner { padding: 14px 18px; gap: 26px; flex-wrap: nowrap; }
  .shop-topbar-back { display: none; }
  .shop-brand { flex: none; }
  .shop-brand .brand-logo { width: 44px; height: 44px; border-radius: 11px; }
  .shop-brand .nb { font-size: 28px; }
  .shop-search { margin-left: auto; flex: 0 1 460px; }
  .ss-box { height: 40px; }
  .ss-box .ss-scope { padding: 0 24px; font-size: 14.5px; }
  /* 店铺商品区（京东式）：侧栏 200px : 商品区 5 列窄卡 */
  .shop-body .pgrid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .pgrid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .pgrid.g5 { grid-template-columns: repeat(5, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid.one { grid-template-columns: 1fr; }
  .bottom-bar {
    bottom: 0; padding: 14px 0; background: transparent; box-shadow: none; border: 0;
    max-width: var(--maxw); margin: 0 auto; left: 0; right: 0;
  }
  .bottom-bar .inner {
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    border-radius: var(--radius); border: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 10px 16px; display: flex; align-items: center; gap: 12px; width: 100%;
  }
  /* 分类页 PC：直接沿用 4/5 列商品网格。
     顶栏（hd-nav）已展示「全部分类 + 各分类」，页内分类条（.cat-top / .cat-chips）
     不再重复展示；移动端顶栏分类隐藏，页内分类条仍承担切换职责，故只在 PC 隐藏 */
  .cat-page { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
  .cat-top, .cat-chips { display: none; }
  .cat-main { padding: 18px 0 0; }
  .hero { aspect-ratio: 21/7; }
  .cat-grid { grid-template-columns: repeat(11, 1fr); }
  .admin-body { padding: 22px; }
  .modal { max-width: 480px; }
  .modal.wide { max-width: 680px; }
  .toast-root { top: 78px; }
}

@media (min-width: 1100px) {
  .pgrid { grid-template-columns: repeat(5, 1fr); }
  .pgrid.g3 { grid-template-columns: repeat(4, 1fr); }
  .detail-layout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
  .checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
}

/* 详情页布局 v7 —— 京东式「卡片分区」：页面极浅灰底 + 白色卡片，对比度压低
   ① 第一行 .detail-head：店铺卡 ｜ 搜索卡（625:375，同一 grid 行 stretch → 两卡严格等高）
   ② 第二行 .detail-top：左 .detail-left（主图卡 + 内容卡）｜ 右 .detail-right（购买卡）
      · 主图卡是独立白卡，与右侧购买卡顶部齐平
      · 内容卡 = 锚点 tab + 大家评 / 店铺 / 商品详情 / 售后保障（同一张卡片）
      · 购买卡 sticky 跟随；卡内 flex：正文可滚，按钮钉在卡片底部常驻可见
   ③ 「看了又看」仍是底部通屏 */
.page:has(.detail-top) { background: #f7f8fa; }
.detail-head { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
.detail-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.detail-right { min-width: 0; padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
/* 主图卡（独立白卡，与右栏购买卡顶部齐平） */
.detail-media { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid rgba(16, 35, 74, .06); border-radius: 12px; padding: 12px; }
/* 内容卡：锚点 tab + 大家评/店铺/商品详情/售后保障 同属一张卡片 */
.detail-body { background: var(--card); border: 1px solid rgba(16, 35, 74, .06); border-radius: 12px; padding: 0 16px 8px; }
/* 购买卡（京东式白卡）：卡内 flex 纵向 —— 正文 .dr-scroll 可滚，按钮 .detail-btns 钉在卡底 */
.dr-sticky { display: flex; flex-direction: column; background: var(--card); border: 1px solid rgba(16, 35, 74, .06); border-radius: 12px; padding: 14px 16px; scrollbar-width: thin; }
.dr-scroll { flex: 1 1 auto; min-height: 0; }
/* 内容卡内的 tab / 区块：去独立卡片框，用细分隔线分区；tab 吸顶时必须不透明（否则透字） */
.detail-body > .detail-tabs { border: 0; box-shadow: none; border-bottom: 2px solid #f0f1f4; border-radius: 0; padding: 0 2px; margin: 0; background: var(--card); }
.detail-body > .dsec { border: 0; box-shadow: none; border-radius: 0; padding: 16px 2px; margin: 0; }
.detail-body > .dsec + .dsec { border-top: 1px solid var(--border-2); }
@media (min-width: 768px) {
  .detail-head { grid-template-columns: 625fr 375fr; }
  .detail-top { display: grid; grid-template-columns: 625fr 375fr; gap: 12px; align-items: stretch; }
  /* 购买卡 sticky 跟随：左栏长内容滚动时钉住不动，滚到左栏底部随页面一起走；
     max-height 兜底小屏：正文超视口时只在 .dr-scroll 内滚动，按钮永远钉在卡底可见 */
  .dr-sticky { position: sticky; top: 12px; max-height: calc(100vh - 24px); }
  .dr-scroll { overflow-y: auto; overscroll-behavior: contain; }
  /* 售后保障条目 */
  .svc-item { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border-2); }
  .svc-item:last-child { border-bottom: 0; }
  .svc-item b { flex: none; font-size: 13.5px; }
  /* 面包屑：详情页顶部不放首页导航类元素 */
  .crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); padding: 2px 2px 10px; }
  .crumb a { color: var(--text-3); }
  .crumb a:hover { color: var(--brand); }
  .crumb i { color: var(--border-2); font-style: normal; }
  .gallery-main { flex: 1; width: 100%; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; background: #f4f6fa; }
  .gallery-main img { width: 100%; height: 100%; object-fit: cover; }
  .gallery-thumbs { display: flex; flex-direction: column; gap: 8px; width: 64px; flex: none; max-height: 480px; overflow-y: auto; margin-top: 0; }
  .gallery-thumbs img { width: 62px; height: 62px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 2px solid transparent; transition: .15s; }
  /* PC 按钮在右栏（京东式），隐藏底部通栏 */
  .bottom-bar { display: none; }
  .gallery-thumbs img:hover { border-color: #c8d6f2; }
  .gallery-thumbs img.on { border-color: var(--brand); box-shadow: var(--ring); }
}
@media (max-width: 767px) {
  .gallery-main { width: 100%; aspect-ratio: 1/1; background: #f4f6fa; }
  .gallery-main img { width: 100%; height: 100%; object-fit: cover; }
  /* 移动端也要能切到视频位，故不再隐藏缩略条，改为横向滚动 */
  .gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .gallery-thumbs img, .gallery-thumbs .vthumb { width: 54px; height: 54px; flex: none; }
  .detail-tabs .dtab { padding: 9px 12px; font-size: 13px; }
  .detail-btns { display: none; }
}

/* —— 京东式商详：视频位 / 店铺条 / 送至 / 规格行 —— */
.gallery-main video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.gallery-thumbs .vthumb { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: .15s; }
.gallery-thumbs .vthumb img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.gallery-thumbs .vthumb:hover { border-color: #c8d6f2; }
.gallery-thumbs .vthumb.on { border-color: var(--brand); box-shadow: var(--ring); }
.gallery-thumbs .vthumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-style: normal; text-shadow: 0 1px 5px rgba(0, 0, 0, .65); }
.gallery-thumbs .vthumb em { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; line-height: 14px; text-align: center; font-style: normal; }

/* 店铺卡（第一行左卡，京东式「无框融底」）：默认与页面同色、看不出框；
   鼠标移上去才浮出白卡 + 阴影，关注/客服按钮同时淡入（京东式浮层观感）。
   .detail-head 是 grid 行 → 与右侧搜索卡自动等高（stretch） */
.detail-shop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: transparent; border: 0; border-radius: 12px; transition: background .18s ease, box-shadow .18s ease; }
.detail-shop:hover { background: #fff; box-shadow: 0 12px 30px -14px rgba(16, 35, 74, .32), 0 0 0 1px rgba(16, 35, 74, .07); }
.detail-shop .ds-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; text-decoration: none; color: inherit; cursor: pointer; }
.detail-shop .ds-left:hover .ds-name { color: #e2231a; }
.detail-shop .ds-fav { color: #e2231a; }
.detail-shop .ds-logo { width: 56px; height: 56px; border-radius: 12px; flex: none; object-fit: cover; }
.detail-shop .ds-main { min-width: 0; }
.detail-shop .ds-name { font-weight: 600; font-size: 16px; }
.detail-shop .ds-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.detail-shop .ds-btns { display: flex; gap: 8px; flex: none; opacity: 0; transition: opacity .18s ease; }
.detail-shop:hover .ds-btns { opacity: 1; }

/* 搜索卡（第一行右卡，同样「无框融底 + hover 浮卡」）：红框输入框是控件本身样式；
   与左侧店铺卡同一 grid 行 → 严格等高（内容垂直居中） */
.shop-search { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; border-radius: 12px; background: transparent; transition: background .18s ease, box-shadow .18s ease; }
.shop-search:hover { background: #fff; box-shadow: 0 12px 30px -14px rgba(16, 35, 74, .32), 0 0 0 1px rgba(16, 35, 74, .07); }
.shop-search .ss-row { display: flex; gap: 10px; }
.shop-search .ss-input { flex: 1; min-width: 0; height: 42px; border: 2px solid #e2231a; border-radius: 4px; padding: 0 14px; font-size: 15px; outline: none; color: var(--text); background: #fff; }
.shop-search .ss-input::placeholder { color: var(--text-3); }
.shop-search .ss-input:focus { box-shadow: 0 0 0 3px rgba(226, 35, 26, .12); }
.shop-search .ss-btn { flex: none; height: 42px; padding: 0 20px; border: 0; border-radius: 4px; background: #e2231a; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.shop-search .ss-btn.alt { background: #c81623; }
.shop-search .ss-btn:active { transform: scale(.97); }
.shop-search .ss-hot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.shop-search .ss-hot span[data-w] { cursor: pointer; }
.shop-search .ss-hot span[data-w]:hover { color: #e2231a; }

.detail-title { font-size: 19px; line-height: 1.45; margin-top: 12px; font-weight: 600; }
.price-box { margin-top: 12px; padding: 12px 14px; background: #fff8f7; border: 1px solid #ffe3df; border-radius: 10px; }
.info-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border-2); font-size: 13px; }
.info-row .lbl { color: var(--text-3); flex: none; width: 46px; }
.info-row .val { flex: 1; min-width: 0; line-height: 1.6; }
.spec-area { padding: 2px 0; }
.spec-line { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.spec-line .lbl { color: var(--text-3); flex: none; width: 46px; font-size: 13px; line-height: 30px; }
.spec-line .chk { padding: 5px 12px; font-size: 13px; }
/* 颜色规格的带图卡片（京东式）：上 40px 图 + 下文字，纵向布局 */
.spec-line .chk.img-chk { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 6px 5px; line-height: 1.2; }
.spec-line .chk.img-chk .chk-img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; display: block; background: #f4f6fa; }
.spec-line .chk.img-chk .chk-txt { font-size: 11.5px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* —— 右栏底部大按钮组（京东式）+ 标题收藏 + 送至有货标 —— */
.detail-btns { display: flex; gap: 12px; margin-top: 16px; }
.detail-btns .btn { flex: 1; height: 46px; font-size: 15.5px; font-weight: 600; border-radius: 10px; }
.detail-btns .btn-buy { background: linear-gradient(90deg, #ff6034, #ee0a24); color: #fff; border: 0; }
.fav-mini { flex: none; font-size: 12.5px; color: var(--text-2); cursor: pointer; border: 1px solid var(--border-2); border-radius: 14px; padding: 4px 10px; user-select: none; }
.fav-mini:hover { color: #e2231a; border-color: #ffc9c2; }
.stock-ok { color: #0a7d43; font-weight: 600; margin-left: 6px; }

/* —— 锚点 tab（京东式，2026-10-08 v5：收进左栏、栏内吸顶）：点击平滑定位 + scrollspy 点亮 —— */
.detail-tabs { position: sticky; top: 0; z-index: 40; display: flex; gap: 4px; margin: 16px 0 12px; padding: 0 10px; background: #fff; border: 1px solid rgba(16, 35, 74, .05); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; scrollbar-width: none; }
.detail-tabs::-webkit-scrollbar { display: none; }
.detail-tabs .dtab { flex: none; padding: 12px 18px; font-size: 14.5px; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; user-select: none; white-space: nowrap; }
.detail-tabs .dtab:hover { color: var(--brand); }
.detail-tabs .dtab.on { color: #e2231a; border-bottom-color: #e2231a; }
/* 锚点区块（大家评/店铺/商品详情/售后保障/推荐）：白卡通栏纵向堆叠，可从店铺一路下拉到底 */
.dsec { background: #fff; border: 1px solid rgba(16, 35, 74, .05); border-radius: var(--radius); padding: 16px 18px 20px; margin-bottom: 12px; scroll-margin-top: 66px; font-size: 13.5px; }
/* 看了又看：底部**通屏**区块（不局限在左栏），同样去框融底，用细线跟上文分隔 */
.detail-rec { background: transparent; border: 0; border-top: 1px solid var(--border-2); border-radius: 0; box-shadow: none; padding: 18px 0 10px; margin-bottom: 0; }
.dsec .sec-hd { margin-bottom: 10px; }
/* 评价者头像占位块：无头像时用昵称首字 + 昵称散列色（演示买家无头像，避免空白圆） */
.rv-ava {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600; line-height: 1;
  user-select: none;
}
/* 进店逛逛（店铺区）：左店招 / 中名称评分 / 右三档评分 + 按钮（京东式） */
.shop-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fafbfc; border: 1px solid var(--border-2); border-radius: 10px; }
.shop-banner .sb-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; text-decoration: none; color: inherit; cursor: pointer; }
.shop-banner .sb-left:hover .sb-name { color: #e2231a; }
.shop-banner .ds-logo { width: 52px; height: 52px; border-radius: 10px; flex: none; object-fit: cover; }
.shop-banner .sb-main { min-width: 0; flex: 1; }
.shop-banner .sb-name { font-weight: 700; font-size: 15.5px; }
.shop-banner .ds-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-3); margin-top: 3px; }
.shop-banner .sb-scores { display: flex; gap: 24px; flex: none; }
.shop-banner .sb-score { text-align: center; }
.shop-banner .sb-score b { display: block; font-size: 12px; color: var(--text-2); font-weight: 600; }
.shop-banner .sb-score span { font-size: 12.5px; color: #e2231a; font-weight: 700; }
.shop-banner .ds-btns { display: flex; gap: 8px; flex: none; }

/* —— 移动端商详适配（放文件末尾，确保覆盖前文同名规则） —— */
@media (max-width: 767px) {
  /* 缩略条横排到大图**下方**（DOM 顺序 thumbs 在前，用 column-reverse 翻转；京东 App 式） */
  .detail-media { display: flex; flex-direction: column-reverse; }
  .gallery-thumbs { flex-direction: row; width: auto; max-height: none; overflow-x: auto; margin-top: 8px; }
  .gallery-main { width: 100%; flex: none; }
  .detail-btns { display: none; }             /* 移动端按钮走底部通栏 */
  /* 详情页收起头部：PC 只留账号工具条；移动端 .hd-ut 为 PC 专用（display:none），
     剩下迷你头部 = 仅返回键的窄条（hd-inner 整块在详情页不渲染）。 */
  .hd.hd-detail { box-shadow: none; }
  .hd-inner-min { display: flex; height: 46px; padding: 0 12px; order: 0; }
  .detail-shop { flex-wrap: wrap; row-gap: 8px; }
  .detail-shop .ds-btns { flex-basis: 100%; justify-content: flex-end; margin-left: auto; }  /* 按钮独占一行，店铺名/评分横排不挤压 */
  .shop-banner { flex-wrap: wrap; row-gap: 10px; }
  .shop-banner .sb-scores { flex-basis: 100%; justify-content: space-around; }
  .shop-banner .ds-btns { flex-basis: 100%; justify-content: flex-end; }
}
@media (max-width: 767px) {
  .detail-title { font-size: 17px; }
  .detail-shop { flex-wrap: wrap; }
  .info-row .lbl, .spec-line .lbl { width: 40px; }
  /* v7 结构：PC 上第一行是「店铺卡｜搜索卡」(.detail-head)，第二行两栏是
     左栏（主图卡 + 内容卡）/ 右栏（购买卡）。移动端拆栏重排：
     店铺卡 → 搜索卡（.detail-head 纵向）→ 主图 → 购买区 → 内容卡（tab + 各区块），
     保证加购/立购等购买选择仍紧跟主图（不被长内容挤到底部） */
  .detail-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .detail-top { display: flex; flex-direction: column; gap: 10px; }
  .detail-left, .detail-right { display: contents; }
  .dr-sticky { position: static; max-height: none; display: block; padding: 12px; }
  .detail-body { padding: 0 12px 8px; }
  .detail-tabs { position: static; }
  .detail-rec { padding: 14px 12px 8px; }
  /* 触屏没有 hover：店铺卡按钮与 hover 卡片常显 */
  .detail-shop .ds-btns { opacity: 1; }
  .detail-shop:hover, .shop-search:hover { background: transparent; box-shadow: none; }
}

/* 悬浮操作条 */
.floating-actions { position: fixed; right: 14px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 88px); z-index: 60; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 768px) { .floating-actions { bottom: 96px; } }
.fab {
  width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  cursor: pointer; font-size: 18px; transition: .18s;
}
.fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
