/* ============================================
   资源站外壳 · 对齐 wpx 主题结构
   ============================================ */
:root {
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --primary-l: #eff6ff;
  --radius: 12px;

  --ink: #1f2937;
  --ink-2: #455a64;
  --ink-3: #8a94a6;
  --line: #eef1f5;
  --bg: #f7f8fa;
  --card: #fff;
  --price: #ff685c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.wpx-container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   顶部 Header
   ============================================ */
.wpx-header {
  position: sticky; top: 0; z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.wpx-header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.wpx-logo { flex-shrink: 0; }
.wpx-logo-text {
  font-size: 19px; font-weight: 800;
  color: #0f172a; letter-spacing: -0.5px;
  white-space: nowrap;
}

.wpx-header-nav-btns { display: flex; gap: 2px; }
.wpx-header-nav-btn {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  padding: 7px 11px; border-radius: 10px;
  min-width: 66px; transition: background 0.16s;
}
.wpx-header-nav-btn:hover { background: #f4f7ff; }
.wpx-header-nav-icon { display: grid; place-items: center; }
.wpx-header-nav-icon svg { width: 26px; height: 26px; display: block; }
.wpx-header-nav-label { font-size: 12px; color: #333; line-height: 1.15; white-space: nowrap; }

.wpx-nav { display: flex; gap: 2px; }

.wpx-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.wpx-btn {
  height: 38px; padding: 0 20px;
  border-radius: 9px; font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; white-space: nowrap;
  transition: 0.16s;
}
.wpx-btn-ghost { border-color: #dfe4ec; color: #374151; background: #fff; }
.wpx-btn-ghost:hover { border-color: #c3ccda; background: #fafbfc; }
.wpx-btn-primary { background: var(--primary); color: #fff; }
.wpx-btn-primary:hover { background: var(--primary-d); }
.wpx-btn-gold {
  background: linear-gradient(135deg, #ffd24d, #ffb020);
  color: #6b4a00; font-weight: 600;
}
.wpx-btn-lg { height: 46px; font-size: 15px; border-radius: 11px; width: 100%; }

.wpx-mobile-toggle { display: none; }

/* ============================================
   Hero
   ============================================ */
.wpx-hero {
  background: linear-gradient(180deg, #eaf2ff 0%, #f5f9ff 55%, #fff 100%);
  padding: 54px 0 38px;
  text-align: center;
  border-bottom: 1px solid #f2f5fa;
}
.wpx-hero-title {
  font-size: 34px; font-weight: 800;
  letter-spacing: -1px; color: #0f172a;
  display: inline-flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center;
}
.wpx-hero-title .bolt {
  width: 30px; height: 30px;
  display: inline-block;
}
.wpx-hero-desc {
  margin-top: 12px; font-size: 14.5px; color: #64748b;
}

.wpx-hero-actions { margin-top: 26px; }
.wpx-hero-search {
  max-width: 620px; margin: 0 auto;
  display: flex; align-items: center;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.08);
  transition: 0.2s;
}
.wpx-hero-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.16);
}
.wpx-hero-search-input {
  flex: 1; height: 42px;
  border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--ink);
}
.wpx-hero-search-input::placeholder { color: #9aa5b5; }
.wpx-hero-search-btn {
  width: 52px; height: 42px; flex-shrink: 0;
  border: none; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  transition: 0.16s;
}
.wpx-hero-search-btn:hover { background: var(--primary-d); }

/* ============================================
   分类跑马灯
   ============================================ */
.wpx-category-marquee-section {
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
/* 两侧渐隐，避免卡片被生硬切断 */
.wpx-category-marquee-section::before,
.wpx-category-marquee-section::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 72px; z-index: 2;
  pointer-events: none;
}
.wpx-category-marquee-section::before {
  left: 0;
  background: linear-gradient(90deg, #fff 10%, rgba(255, 255, 255, 0));
}
.wpx-category-marquee-section::after {
  right: 0;
  background: linear-gradient(270deg, #fff 10%, rgba(255, 255, 255, 0));
}
.wpx-category-marquee-track {
  display: flex; gap: 14px;
  width: max-content;
  /* 老 WebView 不认 max-content 时用 200% 兜底，否则 -50% 算出 0 位移看着就不动 */
  min-width: 200%;
  padding: 0 14px;
  animation: marquee 60s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
/* 只在真正的鼠标设备上悬停暂停；手机上 :hover 会粘住，动画就再也不动了 */
@media (hover: hover) and (pointer: fine) {
  .wpx-category-marquee-section:hover .wpx-category-marquee-track {
    animation-play-state: paused;
  }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
/* 手机屏窄，同样的百分比位移显得太慢，缩短周期 */
@media (max-width: 760px) {
  .wpx-category-marquee-track { animation-duration: 36s; }
}
/* 尊重系统「减弱动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  .wpx-category-marquee-track { animation: none; }
}

.wpx-category-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 14px;
  padding: 13px 20px 13px 16px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: 0.2s;
}
.wpx-category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.13);
  transform: translateY(-2px);
}
.wpx-category-card-icon { display: grid; place-items: center; }
.wpx-category-card-icon svg { width: 34px; height: 34px; display: block; }
.wpx-category-card-name {
  font-size: 14px; font-weight: 600; color: #1f2937;
  white-space: nowrap;
}

.wpx-cm-sm { min-width: 152px; }
.wpx-cm-md { min-width: 196px; }
.wpx-cm-lg { min-width: 236px; }
.wpx-cm-xl { min-width: 272px; }

/* 手机屏窄：卡片同步收紧，一屏能看到 2～3 张，滚动感才出来 */
@media (max-width: 760px) {
  .wpx-category-marquee-section { padding: 15px 0; }
  .wpx-category-card {
    gap: 9px; border-radius: 12px;
    padding: 10px 13px 10px 11px;
  }
  .wpx-category-card-icon svg { width: 25px; height: 25px; }
  .wpx-category-card-name { font-size: 12.5px; }
  .wpx-cm-sm { min-width: 112px; }
  .wpx-cm-md { min-width: 136px; }
  .wpx-cm-lg { min-width: 160px; }
  .wpx-cm-xl { min-width: 186px; }
  /* 渐隐层收窄，别把卡吃掉太多 */
  .wpx-category-marquee-section::before,
  .wpx-category-marquee-section::after { width: 40px; }
}

/* ============================================
   区块标题
   ============================================ */
.wpx-main { padding-bottom: 20px; }
.sec-head {
  display: flex; align-items: center; gap: 10px;
  margin: 36px 0 16px;
}
.sec-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.sec-head .bar {
  width: 4px; height: 17px; border-radius: 2px; background: var(--primary);
}
.sec-head .more {
  margin-left: auto; font-size: 13px; color: var(--ink-3);
}
.sec-head .more:hover { color: var(--primary); }

/* ============================================
   商品瀑布流
   ============================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  border-color: #e2e8f2;
}

.card-thumb { position: relative; overflow: hidden; }
.card-thumb .ph {
  width: 100%; height: 156px; display: grid; place-items: center;
  color: #fff; font-size: 30px; font-weight: 800;
  letter-spacing: 3px; opacity: 0.96;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.card-tag {
  position: absolute; left: 10px; top: 10px;
  background: rgba(20, 24, 35, 0.55); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  backdrop-filter: blur(4px);
}
.card-hot {
  position: absolute; right: 10px; top: 10px;
  background: var(--price); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
}
.card-body { padding: 12px 14px 13px; display: flex; flex-direction: column; flex: 1; }
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.5;
  color: var(--ink); height: 42px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-ex {
  font-size: 12px; color: var(--ink-3); margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px; border-top: 1px solid #f4f6f9;
  font-size: 12px; color: var(--ink-3);
}
.mi { display: inline-flex; align-items: center; gap: 4px; }
.price { color: var(--price); font-weight: 700; font-size: 14px; }
.price small { font-size: 11px; font-weight: 500; }

.empty {
  padding: 70px 0; text-align: center;
  color: var(--ink-3); font-size: 14px;
  break-inside: avoid;
}

/* ============================================
   详情页
   ============================================ */
.crumb { font-size: 13px; color: var(--ink-3); padding: 20px 0 16px; }
.crumb a { color: var(--ink-3); }
.crumb a:hover { color: var(--primary); }
.crumb span { margin: 0 6px; }

.detail { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.d-title { font-size: 22px; font-weight: 700; line-height: 1.45; letter-spacing: -0.3px; }
.d-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-top: 14px; font-size: 12.5px; color: var(--ink-3);
}
.d-meta b { color: var(--ink-2); font-weight: 500; }

.d-cover {
  margin-top: 18px; border-radius: 12px; overflow: hidden;
  height: 220px; display: grid; place-items: center;
  color: #fff; font-size: 34px; font-weight: 700; letter-spacing: 3px;
}

.d-body { margin-top: 22px; font-size: 14.5px; line-height: 1.9; color: var(--ink-2); }
.d-body h3 {
  font-size: 15px; color: var(--ink); font-weight: 700;
  margin: 22px 0 10px; padding-left: 11px; position: relative;
}
.d-body h3::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 2px; background: var(--primary);
}
.d-body > h3:first-child { margin-top: 0; }
.d-body p { margin-bottom: 10px; }
.d-body ul { padding-left: 20px; }
.d-body li { margin-bottom: 6px; }

.buy { position: sticky; top: 92px; }
.buy-price {
  display: flex; align-items: baseline; gap: 8px;
  padding-bottom: 18px; border-bottom: 1px dashed var(--line);
}
.buy-price .num { font-size: 34px; font-weight: 800; color: var(--price); letter-spacing: -1px; }
.buy-price .num small { font-size: 17px; font-weight: 600; }
.buy-price .old { font-size: 13px; color: var(--ink-3); text-decoration: line-through; }
.buy-price .save {
  font-size: 11.5px; color: var(--primary);
  background: var(--primary-l); padding: 2px 8px; border-radius: 5px;
}

.buy-list { list-style: none; margin: 16px 0 18px; font-size: 13px; color: var(--ink-2); }
.buy-list li { display: flex; gap: 8px; margin-bottom: 9px; align-items: flex-start; }
.buy-list svg { flex-shrink: 0; margin-top: 3px; }
.buy-btns { display: grid; gap: 10px; }

.deliver { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 18px; }
.deliver-h {
  font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.netdisk {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; background: #fafbfc; margin-bottom: 10px;
  display: grid; grid-template-columns: 32px 1fr; gap: 2px 10px;
  align-items: center;
}
.netdisk-ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: #e8f3ff; color: #2a7fff;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 12px; font-weight: 700;
  grid-row: span 2;
}
.netdisk-info { min-width: 0; }
.netdisk-name {
  font-size: 13px; color: var(--ink); font-weight: 500;
  line-height: 1.5; word-break: break-all;
}
.netdisk-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; line-height: 1.5; }
.netdisk .btn-sm {
  height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  white-space: nowrap;
}
.netdisk .btn-sm:hover { border-color: var(--primary); color: var(--primary); }

.locked {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #fafbfc;
  padding: 26px 16px; text-align: center;
}
.locked-mask {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, #f3f5f9, #f3f5f9 8px, #fafbfc 8px, #fafbfc 16px);
  opacity: 0.75;
}
.locked-in { position: relative; z-index: 1; }
.locked-in p { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }

/* ============================================
   会员页
   ============================================ */
/* 已开通会员的状态条 */
.vip-now {
  display: flex; align-items: center; gap: 9px;
  background: #eef6ff; border: 1px solid #d6e6ff; color: #1d4ed8;
  border-radius: 12px; padding: 12px 16px; font-size: 13px; margin-top: 18px;
  line-height: 1.6;
}
.vip-now svg { width: 18px; height: 18px; flex: none; }
.vip-now b { font-weight: 700; }

/* 方案数量由后台决定，用 auto-fit 避免落单的第三张卡只占半宽 */
.plans {
  display: grid; gap: 20px; margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}
.plan {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 26px; position: relative;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex; flex-direction: column;
}
.plan.hot { border: 2px solid var(--primary); }
.plan-badge {
  position: absolute; top: -12px; left: 26px;
  background: var(--primary); color: #fff; font-size: 11.5px;
  padding: 3px 11px; border-radius: 99px; font-weight: 600;
}
.plan h3 { font-size: 16px; font-weight: 700; }
.plan .desc { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.plan .amt { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 6px; }
.plan .amt b { font-size: 38px; font-weight: 800; color: var(--ink); letter-spacing: -1.5px; }
.plan .amt span { font-size: 13px; color: var(--ink-3); }
.plan ul { list-style: none; margin: 20px 0 22px; }
.plan li {
  font-size: 13.5px; color: var(--ink-2);
  padding: 7px 0; display: flex; gap: 9px; align-items: center;
  border-bottom: 1px solid #f6f7f9;
}
.plan li svg { flex-shrink: 0; }

/* ============================================
   页脚
   ============================================ */
.ft { background: #1f2534; color: #9aa3b5; margin-top: 56px; padding: 40px 0 26px; }
.ft-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; }
/* 页脚纯文本行（客服信息等），与链接同字号但不可点 */
.ft-line { font-size: 13px; margin-bottom: 9px; line-height: 1.7; }
.ft h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ft a { display: block; font-size: 13px; margin-bottom: 9px; }
.ft a:hover { color: #fff; }
.ft-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ft-desc { font-size: 12.5px; line-height: 1.9; max-width: 290px; }
.ft-bot {
  border-top: 1px solid #2f3546; margin-top: 30px; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: #6f7a8f;
}
.ft-bot a { display: inline; margin: 0 3px; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1180px) {
  .wpx-header-nav-btn { min-width: 58px; padding: 7px 7px; }
  .wpx-header-nav-icon svg { width: 24px; height: 24px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .wpx-header-nav-btns { display: none; }
  .detail { grid-template-columns: 1fr; }
  .buy { position: static; }
  .ft-in { grid-template-columns: 1fr 1fr; }
  .wpx-hero-title { font-size: 26px; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .wpx-hero { padding: 36px 0 28px; }
  .wpx-hero-title { font-size: 22px; }
  /* 手机上两个按钮都保留，只压缩尺寸 */
  .wpx-header-actions { gap: 7px; }
  .wpx-header-actions .wpx-btn { height: 33px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
  .wpx-header-actions .wpx-user-name { max-width: 72px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .wpx-logo-text { font-size: 16px; }
}

/* ============================================
   用户态 / 账号 / 封面图（新增）
   ============================================ */

/* 头部账号区 */
.wpx-user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  transition: 0.18s;
}
.wpx-user-chip:hover { border-color: var(--primary); }
.wpx-user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.wpx-user-name {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 已购买的提示链接 */
.own-tip {
  display: block; margin-top: 10px; text-align: center;
  font-size: 12.5px; color: var(--primary);
}

/* 商品封面图 */
.ph-img {
  width: 100%; height: 156px; object-fit: cover; display: block;
  background: #eef1f6;
}
.d-cover.has-img { background-size: cover; background-position: center; }

/* 网盘条目右侧动作 */
.netdisk-acts {
  grid-column: 2; display: flex; gap: 6px;
  flex-wrap: wrap; align-items: center; margin-top: 8px;
}
.netdisk .btn-sm.btn-open,
.netdisk .btn-sm.btn-open:hover {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ============================================
   手机端常驻购买条（仅详情页 ≤980px 显示）
   ============================================ */
.m-buybar { display: none; }

@media (max-width: 980px) {
  .m-buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.07);
  }
  .m-buybar-price {
    font-size: 22px; font-weight: 800; color: var(--price);
    letter-spacing: -0.5px; flex: none;
  }
  .m-buybar-price small { font-size: 13px; margin-right: 1px; }
  .m-buybar-btn {
    flex: 1; height: 44px; border: none; border-radius: 11px;
    background: var(--primary); color: #fff;
    font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  }
  .m-buybar-btn:active { background: #1d4ed8; }
  .m-buybar-btn:disabled { background: #dfe4ec; color: #8a94a6; cursor: default; }
  body[data-page="detail"] { padding-bottom: 74px; }
}

/* ============================================
   滚动公告条
   ============================================ */
.an-bar {
  display: flex; align-items: center; gap: 10px;
  background: #f5f8fd; border-bottom: 1px solid var(--line);
  padding: 9px max(20px, calc((100% - 1200px) / 2));
  font-size: 12.5px;
}
.an-badge {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  color: var(--primary); background: #e8f0ff;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
}
.an-view { flex: 1; overflow: hidden; height: 20px; }
.an-list { transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1); }
.an-item {
  display: flex; align-items: center; gap: 7px;
  height: 20px; line-height: 20px;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.an-item:hover { color: var(--primary); }
.an-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; }

/* ============================================
   移动端底部导航
   ============================================ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: none;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
  box-shadow: 0 -3px 14px rgba(15, 23, 42, 0.05);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #98a2b3; font-size: 10.5px; font-weight: 500; padding: 1px 0;
  -webkit-tap-highlight-color: transparent;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item.on { color: var(--primary); font-weight: 600; }

@media (max-width: 980px) {
  .tabbar { display: flex; }
  body.has-tabbar { padding-bottom: 64px; }
  /* 详情页购买条要叠在导航栏上方 */
  body.has-tabbar .m-buybar { bottom: 58px; }
  body.has-tabbar[data-page="detail"] { padding-bottom: 132px; }
}

/* ============================================
   首页会员方案
   ============================================ */
.hp-sub { font-size: 12.5px; color: var(--ink-3); margin: -2px 0 14px; line-height: 1.7; }
.hp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hp-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px 16px; transition: 0.18s;
}
.hp-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); }
.hp-card.hp-hot {
  border-color: #ffd9cf;
  background: linear-gradient(180deg, #fff9f7, #fff);
}
.hp-head { display: flex; align-items: center; gap: 8px; }
.hp-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.hp-badge {
  font-size: 10.5px; background: var(--price); color: #fff;
  padding: 1px 7px; border-radius: 999px;
}
.hp-price {
  font-size: 27px; font-weight: 800; color: var(--ink);
  letter-spacing: -1px; margin: 9px 0 5px;
}
.hp-price small { font-size: 14px; font-weight: 700; }
.hp-desc { font-size: 12px; color: var(--ink-3); line-height: 1.7; min-height: 40px; }
.hp-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 14px;
}
.hp-rate {
  display: inline-block;
  font-size: 11.5px; color: #7c3aed; background: #f3efff;
  padding: 3px 9px; border-radius: 6px;
}
.hp-go { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--primary); white-space: nowrap; }

/* 分类卡片支持上传的图标图片 */
.wpx-category-card-img {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover; display: block;
}

@media (max-width: 760px) {
  .hp-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .hp-desc { min-height: 0; }
}
@media (max-width: 520px) {
  .hp-grid { grid-template-columns: 1fr; }
}
