/* ============================================================
   黑猫查档 - 全局样式
   深色科技风 + 霓虹渐变 + 玻璃拟态
   断点：1024(平板) / 768(手机) / 480(小屏手机)
   ============================================================ */

:root {
  --bg: #070713;
  --bg-2: #0c0c20;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eaeaf6;
  --text-dim: #9aa1c4;
  --text-faint: #6b719a;
  --brand: #6366f1;
  --brand-2: #a855f7;
  --cyan: #22d3ee;
  --pink: #f43f5e;
  --green: #22c55e;
  --amber: #f59e0b;
  --grad-main: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --grad-cyan: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
  --grad-green: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
  --grad-amber: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.65);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 40px -12px rgba(99, 102, 241, 0.55);
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  min-height: 100%;
}
body { overflow-x: hidden; line-height: 1.6; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1,h2,h3,h4,p { margin: 0; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 背景光斑 ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 620px at 12% -8%, rgba(99,102,241,.30), transparent 62%),
    radial-gradient(760px 540px at 88% 4%, rgba(168,85,247,.24), transparent 60%),
    radial-gradient(700px 520px at 50% 108%, rgba(34,211,238,.16), transparent 60%),
    linear-gradient(180deg, #070713 0%, #0a0a1c 45%, #070713 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 72%);
}

.container { width: min(1220px, 100% - 40px); margin-inline: auto; }

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(9, 9, 24, 0.72);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.navbar .nav-inner {
  width: min(1220px, 100% - 40px); margin-inline: auto;
  display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .4px; flex-shrink: 0; }
.logo .logo-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-main); font-size: 21px; overflow: hidden;
  box-shadow: 0 8px 26px -6px rgba(168, 85, 247, .8);
  animation: floatY 3.6s ease-in-out infinite;
}
.logo .logo-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text b { font-size: 17px; }
.logo-text span { font-size: 10px; color: var(--text-faint); letter-spacing: 2px; }

.nav-spacer { flex: 1; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-link {
  position: relative; padding: 10px 18px; border-radius: 12px;
  font-size: 15px; font-weight: 600; color: var(--text-dim);
  transition: .25s; white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
}
.nav-link i { font-style: normal; font-size: 16px; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: #fff; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.nav-link.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -1px;
  width: 26px; height: 3px; border-radius: 3px; background: var(--grad-main);
  box-shadow: 0 0 12px rgba(168,85,247,.9);
}

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 13px; font-size: 14.5px; font-weight: 650;
  border: 1px solid transparent; transition: .22s cubic-bezier(.4,0,.2,1); white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad-main); color: #fff; box-shadow: 0 10px 28px -10px rgba(168,85,247,.85); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(168,85,247,1); filter: brightness(1.08); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-cyan { background: var(--grad-cyan); color: #04121a; box-shadow: 0 10px 28px -10px rgba(34,211,238,.8); }
.btn-green { background: var(--grad-green); color: #04160c; }
.btn-danger { background: linear-gradient(135deg,#f43f5e,#b91c1c); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }

.cart-btn {
  position: relative; width: 44px; height: 44px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 19px; transition: .22s;
}
.cart-btn:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); }
.cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 11px; background: var(--grad-amber); color: #fff;
  font-size: 11.5px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(244,63,94,.6);
}
.cart-badge.bump { animation: bump .42s cubic-bezier(.36,1.56,.64,1); }

.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; height: 44px;
  border-radius: 22px; background: var(--surface); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; transition: .22s;
}
.user-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px;
  background: var(--grad-cyan); color: #04121a; font-weight: 800;
}
.user-chip .level {
  font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(245,158,11,.16); color: var(--amber);
}

.mobile-only { display: none !important; }

/* 底部 Tab（移动端） */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: none; height: calc(62px + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(9, 9, 24, .9);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid var(--border);
}
.tabbar-inner { display: flex; height: 62px; }
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--text-faint); transition: .2s; position: relative;
}
.tab-item i { font-style: normal; font-size: 21px; line-height: 1; }
.tab-item.active { color: #fff; }
.tab-item.active i { filter: drop-shadow(0 0 8px rgba(168,85,247,.9)); transform: translateY(-1px) scale(1.08); }
.tab-item .dot {
  position: absolute; top: 8px; right: 50%; margin-right: -22px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--grad-amber);
  color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center;
}

/* ============================================================
   通用区块
   ============================================================ */
main { padding-bottom: 60px; }
.section { padding: 54px 0 10px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 25px; font-weight: 800; letter-spacing: .3px; }
.section-title::before { content: ""; width: 5px; height: 26px; border-radius: 4px; background: var(--grad-main); box-shadow: 0 0 16px rgba(168,85,247,.8); }
.section-sub { color: var(--text-faint); font-size: 13.5px; margin-top: 4px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* HEREO 区 */
.hero {
  position: relative; margin-top: 34px; padding: 54px 46px;
  border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(120deg, rgba(99,102,241,.22), rgba(168,85,247,.16) 45%, rgba(34,211,238,.16));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; width: 460px; height: 460px; right: -120px; top: -190px;
  background: radial-gradient(circle, rgba(168,85,247,.5), transparent 66%); filter: blur(24px);
  animation: floatBlob 8s ease-in-out infinite;
}
.hero::after {
  content: ""; position: absolute; width: 340px; height: 340px; left: -80px; bottom: -180px;
  background: radial-gradient(circle, rgba(34,211,238,.4), transparent 66%); filter: blur(24px);
  animation: floatBlob 10s ease-in-out infinite reverse;
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 100px;
  background: rgba(255,255,255,.1); border: 1px solid var(--border-strong);
  font-size: 12.5px; font-weight: 600; color: #dcd6ff; margin-bottom: 18px;
}
.hero-badge .dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: pulse 1.8s infinite; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.15; font-weight: 900; letter-spacing: -.5px; }
.hero h1 .grad {
  background: linear-gradient(100deg, #a5b4fc, #f0abfc 40%, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 20px rgba(168,85,247,.45));
}
.hero p { margin-top: 16px; color: var(--text-dim); font-size: 15.5px; max-width: 520px; }
.hero-stats { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 26px; font-weight: 850; background: linear-gradient(180deg,#fff,#a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat span { font-size: 12.5px; color: var(--text-faint); }

/* 分类卡片（电脑 / 平板 网格，手机 横向滑动） */
.cate-bar {
  display: grid; gap: 14px; padding: 6px 0 22px;
  grid-template-columns: repeat(auto-fit, minmax(174px, 1fr));
}
.cate-item {
  --c1: #6366f1; --c2: #a855f7;
  position: relative; overflow: hidden; text-align: left;
  display: flex; align-items: center; gap: 13px;
  padding: 15px 16px; border-radius: 18px;
  background: var(--surface); border: 1.5px solid var(--border);
  transition: .28s cubic-bezier(.2, .8, .3, 1);
}
/* 顶部一道渐变细线，未选中也能看出分类色 */
.cate-item::before {
  content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--c1), var(--c2)); opacity: .8;
}
.cate-ico {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  display: grid; place-items: center; font-size: 23px; line-height: 1;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 20px -8px var(--c1);
  transition: .28s;
}
.cate-txt { min-width: 0; flex: 1; }
.cate-txt b {
  display: block; font-size: 15px; font-weight: 750; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cate-txt .cnt {
  display: inline-block; margin-top: 5px; padding: 2px 9px; border-radius: 100px;
  font-size: 11.5px; font-weight: 650; color: var(--text-dim);
  background: rgba(255, 255, 255, .07);
}
.cate-item:hover {
  transform: translateY(-4px); border-color: var(--border-strong);
  background: var(--surface-2); box-shadow: 0 14px 30px -18px var(--c1);
}
.cate-item:hover .cate-ico { transform: scale(1.07) rotate(-5deg); }
.cate-item.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 18px 36px -16px var(--c1);
  transform: translateY(-2px);
}
.cate-item.active .cate-ico { background: rgba(255, 255, 255, .95); box-shadow: none; }
.cate-item.active .cate-txt b { color: #fff; }
.cate-item.active .cate-txt .cnt { background: rgba(0, 0, 0, .22); color: rgba(255, 255, 255, .92); }
/* 加载骨架跟着变卡片，避免刷新时闪一下小胶囊 */
.cate-bar .skeleton { width: auto !important; height: 78px !important; border-radius: 18px !important; }

/* 平板：卡片收窄，仍是网格 */
@media (max-width: 1023px) {
  .cate-bar { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .cate-ico { width: 42px; height: 42px; font-size: 21px; }
}
/* 手机：横向滑动，一屏约 2 张 */
@media (max-width: 640px) {
  .cate-bar {
    display: flex; gap: 11px; padding: 6px 2px 16px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .cate-bar::-webkit-scrollbar { display: none; }
  .cate-item { flex: 0 0 auto; min-width: 150px; scroll-snap-align: start; padding: 13px 14px; }
  .cate-ico { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
  .cate-txt b { font-size: 14px; }
}

/* 商品网格 */
.product-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.product-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(168,85,247,.5);
  box-shadow: 0 26px 54px -18px rgba(99,102,241,.65);
}
.product-media {
  position: relative; height: 186px; display: grid; place-items: center;
  font-size: 76px; overflow: hidden;
}
.product-media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.24), transparent 62%);
}
.product-media .emoji { position: relative; z-index: 2; filter: drop-shadow(0 14px 24px rgba(0,0,0,.42)); transition: .4s; }
.product-card:hover .product-media .emoji { transform: scale(1.14) rotate(-6deg); }
.product-media .tags { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; gap: 6px; flex-wrap: wrap; }
.tag-pill {
  padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 700;
  background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.22); color: #fff;
  backdrop-filter: blur(8px);
}
.tag-pill.hot { background: linear-gradient(135deg,#f43f5e,#f59e0b); border-color: transparent; }
.product-media .stock-flag {
  position: absolute; bottom: 12px; right: 12px; z-index: 3; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 8px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.2);
}
.product-body { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.product-name { font-size: 16.5px; font-weight: 750; letter-spacing: .2px; }
.product-sub {
  font-size: 12.5px; color: var(--text-faint); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px;
}
.product-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; }
.price-box { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now {
  font-size: 25px; font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(120deg, #fbbf24, #fb7185 55%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 12px rgba(251,113,133,.35));
}
.price-now small { font-size: 14px; font-weight: 700; }
.price-origin { font-size: 12.5px; color: var(--text-faint); text-decoration: line-through; }
.off-badge {
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px;
  background: rgba(244,63,94,.16); color: #fb7185; border: 1px solid rgba(244,63,94,.3);
}
.add-btn {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px;
  background: var(--grad-main); color: #fff; box-shadow: 0 8px 22px -8px rgba(168,85,247,.9); transition: .22s;
  flex-shrink: 0;
}
.add-btn:hover { transform: rotate(90deg) scale(1.08); }
.add-btn:active { transform: scale(.9); }
.add-btn[disabled] { background: rgba(255,255,255,.08); color: var(--text-faint); box-shadow: none; cursor: not-allowed; transform: none; }

/* 商品标签行（无商品图布局）与「下单」按钮 */
.product-tags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 21px; }
.buy-btn {
  width: auto; min-width: 66px; height: 38px; padding: 0 15px; border-radius: 12px;
  font-size: 14px; font-weight: 800; letter-spacing: .5px;
}
.buy-btn:hover { transform: translateY(-2px) scale(1.04); }
.buy-btn:active { transform: scale(.95); }

.sold-line { font-size: 11.5px; color: var(--text-faint); }

/* ============================================================
   购物车抽屉
   ============================================================ */
.drawer-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(3,3,12,.72);
  backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: .3s;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 210;
  width: min(430px, 100%); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d0d22, #08081a);
  border-left: 1px solid var(--border);
  transform: translateX(102%); transition: transform .38s cubic-bezier(.4,0,.2,1);
  box-shadow: -20px 0 70px -20px rgba(0,0,0,.9);
}
.drawer.show { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.drawer-head h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.drawer-head h3 .n {
  font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 8px;
  background: var(--grad-main); color: #fff;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); font-size: 17px; transition: .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); transform: rotate(90deg); }

.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: flex; gap: 13px; padding: 13px; border-radius: 15px;
  background: var(--surface); border: 1px solid var(--border);
  animation: slideIn .32s ease;
}
.cart-item .ci-media {
  width: 58px; height: 58px; border-radius: 13px; display: grid; place-items: center;
  font-size: 29px; flex-shrink: 0;
}
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name {
  font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item .ci-price { font-size: 13px; color: var(--amber); font-weight: 700; margin-top: 2px; }
.cart-item .ci-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 10px; }
.stepper { display: flex; align-items: center; gap: 2px; background: rgba(0,0,0,.3); border-radius: 10px; padding: 3px; border: 1px solid var(--border); }
.stepper button {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-size: 16px; font-weight: 700; color: var(--text-dim); transition: .18s;
}
.stepper button:hover { background: var(--surface-2); color: #fff; }
.stepper .qty { min-width: 30px; text-align: center; font-size: 14px; font-weight: 700; }
.ci-del { font-size: 13px; color: var(--text-faint); transition: .2s; }
.ci-del:hover { color: var(--pink); }

.drawer-foot { flex-shrink: 0; padding: 18px 20px calc(20px + var(--safe-b)); border-top: 1px solid var(--border); background: rgba(10,10,28,.6); }
.total-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.total-row .label { font-size: 13.5px; color: var(--text-faint); }
.total-row .amount {
  font-size: 30px; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(120deg,#fbbf24,#fb7185);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.total-row .amount small { font-size: 15px; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 60px 20px; color: var(--text-faint); text-align: center;
}
.empty .ico { font-size: 54px; opacity: .55; animation: floatY 3.4s ease-in-out infinite; }

/* ============================================================
   表单 / 弹窗
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 650; color: var(--text-dim); }
.field label .req { color: var(--pink); }
.input, .select, .textarea {
  width: 100%; padding: 13px 15px; border-radius: 13px; font-size: 15px;
  background: rgba(0,0,0,.26); border: 1px solid var(--border); transition: .22s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(168,85,247,.7);
  box-shadow: 0 0 0 4px rgba(168,85,247,.14); background: rgba(0,0,0,.36);
}
.textarea { resize: vertical; min-height: 78px; line-height: 1.6; }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa1c4' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.select option { background: #12122c; }
.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }
.code-btn {
  flex-shrink: 0; min-width: 118px; padding: 0 18px; border-radius: 13px; font-size: 14px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--cyan); transition: .22s;
}
.code-btn:hover:not(:disabled) { background: rgba(34,211,238,.14); }
.code-btn:disabled { color: var(--text-faint); cursor: not-allowed; }

.modal-mask {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px;
  background: rgba(3,3,12,.76); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: .28s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  border-radius: 22px; padding: 26px;
  background: linear-gradient(165deg, #12122e, #0a0a1e);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 90px -20px rgba(0,0,0,.9);
  transform: translateY(24px) scale(.96); transition: .32s cubic-bezier(.4,0,.2,1);
}
.modal-mask.show .modal { transform: translateY(0) scale(1); }
.modal-wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.modal-head h3 { font-size: 20px; font-weight: 850; }
.modal-body { display: flex; flex-direction: column; gap: 15px; }
.modal-foot { display: flex; gap: 12px; margin-top: 22px; }
.modal-foot .btn { flex: 1; }

/* 登录页 */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
  width: min(430px, 100%); padding: 38px 34px; border-radius: 26px;
  background: linear-gradient(165deg, rgba(18,18,46,.94), rgba(10,10,30,.94));
  border: 1px solid var(--border-strong);
  box-shadow: 0 44px 90px -24px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(20px);
  animation: riseIn .5s cubic-bezier(.4,0,.2,1);
}
.auth-card .auth-logo { display: grid; place-items: center; margin-bottom: 14px; }
.auth-card .auth-logo .m {
  width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; font-size: 33px;
  overflow: hidden;
  background: var(--grad-main); box-shadow: 0 14px 40px -10px rgba(168,85,247,.9);
  animation: floatY 3.6s ease-in-out infinite;
}
.auth-card .auth-logo .m img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.auth-card h2 { text-align: center; font-size: 25px; font-weight: 850; margin-bottom: 6px; }
.auth-card .tip { text-align: center; color: var(--text-faint); font-size: 13.5px; margin-bottom: 26px; }
.auth-form { display: flex; flex-direction: column; gap: 17px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 20px; font-size: 13px; color: var(--text-faint); }
.auth-links a { color: var(--cyan); font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.dev-tip {
  margin-top: 16px; padding: 11px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.7;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.28); color: #fcd34d;
}

/* 订单页 */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.filter-chip {
  padding: 9px 17px; border-radius: 11px; font-size: 13.5px; font-weight: 650;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: .22s;
  display: inline-flex; align-items: center; gap: 7px;
}
.filter-chip .cnt { font-size: 11px; opacity: .75; }
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-chip.active { background: var(--grad-main); color: #fff; border-color: transparent; box-shadow: 0 10px 26px -10px rgba(168,85,247,.85); }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.search-box .input { padding-left: 40px; }
.search-box .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .6; }

.order-card {
  border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: .26s;
}
.order-card:hover { border-color: var(--border-strong); box-shadow: 0 18px 44px -18px rgba(99,102,241,.5); }
.order-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border);
}
.order-no { font-size: 13px; font-weight: 700; letter-spacing: .4px; font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.copy-btn {
  font-size: 11.5px; padding: 3px 9px; border-radius: 7px; margin-left: 9px;
  background: rgba(255,255,255,.08); border: 1px solid var(--border); color: var(--text-dim); transition: .2s;
}
.copy-btn:hover { color: #fff; background: var(--surface-2); }
.order-time { font-size: 12.5px; color: var(--text-faint); }
.status-badge {
  padding: 5px 13px; border-radius: 100px; font-size: 12.5px; font-weight: 750;
  display: inline-flex; align-items: center; gap: 6px;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { background: rgba(245,158,11,.14); color: #fbbf24; border: 1px solid rgba(245,158,11,.32); }
.status-pending::before { animation: pulse 1.6s infinite; }
.status-paid { background: rgba(34,197,94,.14); color: #4ade80; border: 1px solid rgba(34,197,94,.32); }
.status-completed { background: rgba(34,211,238,.14); color: #22d3ee; border: 1px solid rgba(34,211,238,.32); }

/* 后台订单备注醒目框 */
.remark-box {
  padding: 16px;
  margin-top: 6px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251,191,36,.14), rgba(251,146,60,.10));
  border: 1.5px solid rgba(251,191,36,.45);
  box-shadow: 0 2px 10px rgba(251,191,36,.10);
}
.remark-box .rb-label {
  font-weight: 800; margin-bottom: 8px; color: #fbbf24;
  display: flex; align-items: center; gap: 6px; font-size: 15px;
}
.remark-box .rb-content {
  font-size: 15px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-all;
}
.remark-box.is-empty {
  background: rgba(148,163,184,.08); border-color: rgba(148,163,184,.28); box-shadow: none;
}
.remark-box.is-empty .rb-label { color: var(--text-faint); }
.remark-box.is-empty .rb-content { color: var(--text-faint); font-size: 14px; }

/* 订单列表备注列浅色框 */
td.remark-cell {
  background: rgba(251,191,36,.08);
  border-radius: 8px;
  font-size: 13px;
  max-width: 220px;
  color: var(--text);
}
.status-cancelled { background: rgba(148,163,184,.13); color: #94a3b8; border: 1px solid rgba(148,163,184,.28); }
.status-refunded { background: rgba(99,102,241,.14); color: #a5b4fc; border: 1px solid rgba(99,102,241,.32); }

/* ---------- 优惠券 ---------- */
.coupon-tag {
  display: inline-block; padding: 4px 11px; border-radius: 100px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap;
}
.coupon-tag.ct-5 { background: rgba(244,63,94,.16); color: #fb7185; border: 1px solid rgba(244,63,94,.36); }
.coupon-tag.ct-7 { background: rgba(56,189,248,.14); color: #38bdf8; border: 1px solid rgba(56,189,248,.34); }
.coupon-tag.ct-x { background: rgba(148,163,184,.13); color: #94a3b8; border: 1px solid rgba(148,163,184,.28); }
.coupon-tag.ct-8 { background: rgba(52,211,153,.14); color: #34d399; border: 1px solid rgba(52,211,153,.34); }
.coupon-tag.ct-9 { background: rgba(167,139,250,.14); color: #a78bfa; border: 1px solid rgba(167,139,250,.34); }
.coupon-tag.ct-95 { background: rgba(251,146,60,.14); color: #fb923c; border: 1px solid rgba(251,146,60,.34); }
.coupon-code {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; font-weight: 800; letter-spacing: .6px; color: var(--amber);
  background: rgba(251,191,36,.1); border: 1px dashed rgba(251,191,36,.42);
  border-radius: 8px; padding: 4px 10px;
}
.coupon-code.big { display: block; text-align: center; font-size: 16px; padding: 11px 12px; margin-bottom: 8px; }
.coupon-result { max-height: 320px; overflow: auto; }
.link-like { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.link-like:hover { color: var(--amber); }

.order-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; }
.order-reply {
  margin: 12px 18px 0;
  padding: 12px 14px;
  background: rgba(56,189,248,.1);
  border: 1px solid rgba(56,189,248,.32);
  border-radius: 12px;
}
.order-reply .or-head { font-weight: 800; color: #38bdf8; margin-bottom: 6px; font-size: 13px; }
.order-reply .or-body { white-space: pre-wrap; line-height: 1.6; font-size: 14px; color: var(--text); }
.order-reply .or-time { margin-top: 6px; font-size: 12px; color: var(--text-faint); }

/* 客服回复附件（客户在「查订单」页看到） */
.or-files { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.or-file {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: .22s;
}
.or-file:hover { background: rgba(255, 255, 255, .09); border-color: var(--border-strong); transform: translateY(-1px); }
.or-file .or-fico { font-size: 20px; flex-shrink: 0; }
.or-file .or-fname { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-file .or-fmeta { font-size: 11.5px; color: var(--text-faint); flex-shrink: 0; }
.or-file .or-fdl { font-size: 12.5px; color: #38bdf8; flex-shrink: 0; }
.or-file.img { flex-direction: column; align-items: flex-start; padding: 8px; }
.or-file.img img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 9px; background: rgba(0, 0, 0, .28); display: block; }
.or-file.img span { font-size: 12px; color: var(--text-dim); padding: 2px 4px; }

/* 后台订单详情：回复附件的编辑列表 */
.reply-files { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.reply-files:empty { display: none; }
.rf-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.rf-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 9px; flex-shrink: 0; display: block; }
.rf-ico { width: 46px; height: 46px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-size: 21px; background: rgba(255, 255, 255, .06); }
.rf-info { flex: 1; min-width: 0; }
.rf-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.online-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.online-dot.on { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.22); }
.online-dot.off { background: #94a3b8; }
.online-txt.on { color: #34d399; font-weight: 700; }
.online-txt.off { color: var(--text-faint); }
.oi-row { display: flex; align-items: center; gap: 13px; }
.oi-row .oi-media {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 24px; flex-shrink: 0;
}
.oi-row .oi-name { flex: 1; font-size: 14.5px; font-weight: 650; min-width: 0; }
.oi-row .oi-qty { font-size: 13px; color: var(--text-faint); flex-shrink: 0; }
.oi-row .oi-price { font-size: 14.5px; font-weight: 700; color: var(--amber); flex-shrink: 0; }
.order-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-top: 1px dashed var(--border); background: rgba(0,0,0,.14);
}
.order-foot .total { font-size: 14px; color: var(--text-dim); }
.order-foot .total b { font-size: 21px; color: #fb7185; font-weight: 850; }
.order-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.order-meta { font-size: 12.5px; color: var(--text-faint); display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ============================================================
   管理后台
   ============================================================ */
.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }
.admin-body { flex: 1; display: grid; grid-template-columns: 246px 1fr; gap: 0; }
.admin-side {
  position: sticky; top: var(--nav-h); align-self: start; height: calc(100vh - var(--nav-h));
  padding: 22px 14px; border-right: 1px solid var(--border); overflow-y: auto;
  background: rgba(9,9,24,.5);
  backdrop-filter: blur(12px);
}
.side-group { margin-bottom: 8px; }
.side-title {
  font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: var(--text-faint);
  text-transform: uppercase; padding: 12px 12px 8px;
}
.side-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px;
  font-size: 14.5px; font-weight: 600; color: var(--text-dim); transition: .22s; width: 100%; text-align: left;
}
.side-item i { font-style: normal; font-size: 17px; width: 22px; text-align: center; }
.side-item:hover { color: var(--text); background: var(--surface); }
.side-item.active {
  color: #fff; background: var(--grad-main);
  box-shadow: 0 10px 26px -12px rgba(168,85,247,.9);
}
.side-item .badge {
  margin-left: auto; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 7px;
  background: rgba(244,63,94,.9); color: #fff;
}
.admin-main { padding: 26px 30px 60px; min-width: 0; }
.admin-title { font-size: 22px; font-weight: 850; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.admin-sub { font-size: 13px; color: var(--text-faint); margin-bottom: 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card {
  position: relative; padding: 20px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); transition: .28s;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--glow); }
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  opacity: .28; filter: blur(6px);
}
.stat-card.c1::after { background: radial-gradient(circle, #6366f1, transparent 70%); }
.stat-card.c2::after { background: radial-gradient(circle, #22c55e, transparent 70%); }
.stat-card.c3::after { background: radial-gradient(circle, #f59e0b, transparent 70%); }
.stat-card.c4::after { background: radial-gradient(circle, #22d3ee, transparent 70%); }
.stat-card .sc-label { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; position: relative; z-index: 2; }
.stat-card .sc-value {
  font-size: 30px; font-weight: 900; margin-top: 8px; letter-spacing: -1px; position: relative; z-index: 2;
  background: linear-gradient(180deg,#fff,#a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-card .sc-extra { font-size: 12px; color: var(--text-faint); margin-top: 4px; position: relative; z-index: 2; }

.panel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; margin-bottom: 20px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.panel-head .actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.panel-body { padding: 18px 20px; }

.tool-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tool-bar .grow { flex: 1; min-width: 180px; }

/* 表格 —— 桌面表格 / 移动端自动转卡片 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.data th {
  text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 700; letter-spacing: .8px;
  color: var(--text-faint); text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,.055); vertical-align: middle; }
table.data tbody tr { transition: .2s; }
table.data tbody tr:hover { background: rgba(255,255,255,.04); }
table.data tbody tr:last-child td { border-bottom: none; }
.cell-flex { display: flex; align-items: center; gap: 11px; }
.cell-flex .mini-media {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 23px; flex-shrink: 0;
}
.cell-flex .t1 { font-weight: 700; font-size: 14.5px; }
.cell-flex .t2 { font-size: 12px; color: var(--text-faint); }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.mini-btn {
  padding: 6px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 650;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: .2s; white-space: nowrap;
}
.mini-btn:hover { color: #fff; background: var(--surface-2); border-color: var(--border-strong); }
.mini-btn.primary { background: var(--grad-main); color: #fff; border-color: transparent; }
.mini-btn.danger { background: rgba(244,63,94,.16); color: #fb7185; border-color: rgba(244,63,94,.3); }
.mini-btn.green { background: rgba(34,197,94,.16); color: #4ade80; border-color: rgba(34,197,94,.3); }
.mini-btn.amber { background: rgba(245,158,11,.16); color: #fbbf24; border-color: rgba(245,158,11,.3); }
.price-tag { font-weight: 750; color: var(--amber); white-space: nowrap; }
.muted { color: var(--text-faint); font-size: 12.5px; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; }
.switch-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.switch { width: 42px; height: 24px; border-radius: 100px; background: rgba(255,255,255,.14); position: relative; transition: .26s; flex-shrink: 0; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: .26s cubic-bezier(.4,0,.2,1);
}
.switch.on { background: linear-gradient(135deg,#6366f1,#a855f7); }
.switch.on::after { transform: translateX(18px); }

/* Toast */
.toast-host { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px; font-size: 14.5px; font-weight: 600;
  background: rgba(18,18,46,.96); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: 0 20px 50px -14px rgba(0,0,0,.9); backdrop-filter: blur(14px);
  animation: toastIn .34s cubic-bezier(.36,1.4,.64,1);
}
.toast.success { border-color: rgba(34,197,94,.45); box-shadow: 0 20px 50px -14px rgba(34,197,94,.4); }
.toast.error { border-color: rgba(244,63,94,.45); }
.toast.info { border-color: rgba(34,211,238,.4); }
.toast .ico { font-size: 17px; }
.toast.out { animation: toastOut .28s forwards; }

/* 骨架屏 */
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.1) 37%, rgba(255,255,255,.05) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.sk-card { height: 330px; }

.fade-up { animation: riseIn .5s cubic-bezier(.4,0,.2,1) both; }
.delay-1 { animation-delay: .06s; } .delay-2 { animation-delay: .12s; } .delay-3 { animation-delay: .18s; }
.delay-4 { animation-delay: .24s; } .delay-5 { animation-delay: .3s; }

/* ============================================================
   动画
   ============================================================ */
@keyframes floatY { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
@keyframes floatBlob { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(28px,22px) scale(1.12)} }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.6)} 70%{box-shadow:0 0 0 9px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }
@keyframes bump { 0%{transform:scale(.3)} 60%{transform:scale(1.35)} 100%{transform:scale(1)} }
@keyframes slideIn { from{opacity:0;transform:translateX(22px)} to{opacity:1;transform:translateX(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes riseIn { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }
@keyframes toastIn { from{opacity:0;transform:translateY(-24px) scale(.9)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes toastOut { to{opacity:0;transform:translateY(-16px) scale(.94)} }
@keyframes spin { to{transform:rotate(360deg)} }
.spin { animation: spin .8s linear infinite; display: inline-block; }

/* ============================================================
   响应式
   ============================================================ */

/* ---- 平板 / 小笔记本 ---- */
@media (max-width: 1024px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed; left: 0; top: var(--nav-h); bottom: 0; width: 250px; z-index: 90;
    transform: translateX(-102%); transition: transform .3s cubic-bezier(.4,0,.2,1);
    background: linear-gradient(180deg, #0d0d22, #08081a); border-right: 1px solid var(--border);
  }
  .admin-side.open { transform: translateX(0); box-shadow: 20px 0 60px -20px rgba(0,0,0,.9); }
  .admin-side-mask { position: fixed; inset: 0; top: var(--nav-h); z-index: 89; background: rgba(3,3,12,.7); display: none; }
  .admin-side-mask.show { display: block; }
  .admin-main { padding: 20px 18px 60px; }
  .hero { padding: 40px 30px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
}

/* ---- 平板 & 大手机：简化表格 ---- */
@media (max-width: 900px) {
  table.data { min-width: 640px; }
}

/* ---- 手机 ---- */
@media (max-width: 768px) {
  :root { --nav-h: 58px; }
  .container, .navbar .nav-inner { width: calc(100% - 28px); }
  .nav-menu { display: none !important; }         /* 顶部菜单 -> 底部 Tab */
  .tabbar { display: block; }
  .mobile-only { display: flex !important; }
  main { padding-bottom: calc(80px + var(--safe-b)); }
  .logo-text span { display: none; }
  .user-chip .txt { display: none; }
  .user-chip { padding: 6px; width: 44px; justify-content: center; }

  .hero { margin-top: 18px; padding: 30px 22px; border-radius: 22px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 22px; margin-top: 22px; }
  .hero-stats .stat b { font-size: 21px; }

  .section { padding: 34px 0 6px; }
  .section-head { margin-bottom: 18px; }
  .section-title { font-size: 20px; }
  .cate-bar { gap: 9px; }
  .cate-item { padding: 9px 15px; font-size: 13.5px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 13px; }
  .product-media { height: 124px; font-size: 50px; }
  .product-body { padding: 12px 12px 14px; gap: 6px; }
  .product-name { font-size: 14px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .product-sub { display: none; }
  .price-now { font-size: 19px; }
  .price-origin { display: none; }
  .add-btn { width: 36px; height: 36px; font-size: 17px; border-radius: 11px; }
  .buy-btn { width: auto; min-width: 54px; height: 32px; padding: 0 11px; font-size: 12.5px; }
  .sold-line { display: none; }

  .drawer { width: 100%; border-left: none; }
  .drawer-head { padding: 16px 18px; }
  .drawer-body { padding: 14px 16px; }
  .drawer-foot { padding: 16px 16px calc(16px + var(--safe-b)); }

  .order-head { padding: 12px 14px; gap: 8px; }
  .order-body { padding: 12px 14px; }
  .order-foot { padding: 12px 14px; }
  .order-actions .btn { flex: 1; }
  .order-no { font-size: 12px; word-break: break-all; }

  .auth-wrap { padding: 26px 16px 60px; align-items: start; }
  .auth-card { padding: 28px 22px; border-radius: 22px; }
  .auth-card h2 { font-size: 21px; }

  .modal { padding: 20px 18px; border-radius: 20px; width: 100%; }
  .modal-head h3 { font-size: 17px; }
  .input, .select, .textarea { font-size: 16px; }  /* 防 iOS 缩放 */

  .tool-bar .grow { min-width: 130px; }
  .filter-bar { gap: 8px; }
  .filter-chip { padding: 8px 13px; font-size: 12.5px; }
  .search-box { min-width: 100%; max-width: none; }

  /* ---- 客服组件：避开底部 Tab 栏 ---- */
  .chat-fab {
    right: 14px; bottom: calc(70px + var(--safe-b));
    width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%;
  }
  .chat-fab .chat-fab-label { display: none; }
  .chat-fab .chat-fab-icon { font-size: 24px; }
  .chat-panel {
    right: 10px; left: 10px; width: auto;
    bottom: calc(66px + var(--safe-b)); top: auto;
    height: min(70vh, calc(100vh - 130px));
    border-radius: 20px;
  }
  .chat-bubble { max-width: 84%; }
  .chat-bubble-img { max-width: 68%; }
  .chat-bubble-img img { max-height: 200px; }
  .chat-input-bar { gap: 7px; }
  .chat-send { padding: 0 15px; }
  .chat-lightbox { padding: 12px; }
  .chat-lb-close { top: 12px; right: 14px; }

  /* ---- 后台客服中心：双栏变单栏 ---- */
  .chat-admin-wrap { grid-template-columns: 1fr; }
  .chat-conv-list { max-height: 260px; }
  .chat-admin-body { height: 46vh; min-height: 240px; }

  /* 移动端：表格 -> 卡片式列表 */
  .table-wrap { overflow-x: visible; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data { min-width: 0; }
  table.data thead { display: none; }
  table.data tr {
    margin-bottom: 12px; padding: 14px; border-radius: 15px;
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
  }
  table.data td { padding: 6px 0; border-bottom: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: right; }
  table.data td::before {
    content: attr(data-label); font-size: 12px; color: var(--text-faint); font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px; text-align: left; flex-shrink: 0;
  }
  table.data td.cell-strong { flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
  table.data td.cell-strong::before { margin-bottom: 2px; }
  table.data td > * { max-width: 62%; }
  table.data td.cell-strong > .cell-flex { max-width: 100%; width: 100%; }
  .row-actions { justify-content: flex-end; width: 100%; flex-wrap: wrap; }
  .row-actions .mini-btn { flex: 1; min-width: 74px; text-align: center; }

  .toast-host { top: 70px; left: 14px; right: 14px; transform: none; }
  .toast { width: 100%; justify-content: center; font-size: 14px; }
}

/* ---- 小屏手机 ---- */
@media (max-width: 420px) {
  /* 后台弹窗表单：多列变单列 */
  .form-grid { grid-template-columns: 1fr !important; }
  .form-grid > .field { grid-column: span 1 !important; }
  .mobile-only-item { display: grid !important; }
  /* 后台弹窗表单：多列变单列 */
  .form-grid { grid-template-columns: 1fr !important; }
  .form-grid > .field { grid-column: span 1 !important; }
  .mobile-only-item { display: grid !important; }
  .admin-title { font-size: 19px; }
  .panel-body { padding: 14px 14px; }
  .panel-head { padding: 13px 14px; }

  .hero-stats { gap: 16px; }
  .hero-stats .stat b { font-size: 18px; }
  .product-grid { gap: 11px; }
  .product-media { height: 110px; font-size: 44px; }
  .hero h1 { font-size: 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .stat-card { padding: 15px; }
  .stat-card .sc-value { font-size: 23px; }
}

@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-media { height: 130px; font-size: 50px; }
}

/* ============================================================
   在线客服悬浮组件
   ============================================================ */
.chat-fab {
  position: fixed; right: 22px; bottom: 26px; z-index: 150;
  display: flex; align-items: center; gap: 9px;
  padding: 0 18px 0 14px; height: 54px; border-radius: 27px;
  background: var(--grad-main); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 16px 40px -12px rgba(168,85,247,.95), 0 0 0 1px rgba(255,255,255,.12) inset;
  transition: .3s cubic-bezier(.4,0,.2,1);
}
.chat-fab .chat-fab-icon { font-size: 22px; line-height: 1; }
.chat-fab:hover { transform: translateY(-4px) scale(1.03); filter: brightness(1.08); }
.chat-fab:active { transform: scale(.96); }
.chat-fab.active { box-shadow: none; opacity: 0; pointer-events: none; transform: translateY(10px) scale(.9); }
.chat-fab-dot {
  position: absolute; top: 4px; right: 8px; width: 13px; height: 13px; border-radius: 50%;
  background: #fb7185; border: 2px solid #0b0b1e; box-shadow: 0 0 10px rgba(251,113,133,.9);
  animation: pulse 1.6s infinite;
}

.chat-panel {
  position: fixed; right: 22px; bottom: 26px; z-index: 151;
  width: min(388px, calc(100vw - 32px)); height: min(600px, calc(100vh - 60px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #12122e, #0a0a1c);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 90px -24px rgba(0,0,0,.92);
  transform: translateY(24px) scale(.94); opacity: 0; pointer-events: none;
  transform-origin: bottom right;
  transition: .34s cubic-bezier(.4,0,.2,1);
}
.chat-panel.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; flex-shrink: 0;
  background: linear-gradient(120deg, rgba(99,102,241,.34), rgba(168,85,247,.3));
  border-bottom: 1px solid var(--border);
}
.chat-head-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.chat-avatar {
  width: 40px; height: 40px; border-radius: 13px; overflow: hidden; flex-shrink: 0;
  background: #fff; box-shadow: 0 6px 18px -6px rgba(0,0,0,.7);
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-title { font-size: 15.5px; font-weight: 800; }
.chat-status { font-size: 11.5px; color: var(--text-dim); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.chat-dot.online { background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: pulse 1.8s infinite; }
.chat-head-actions { display: flex; gap: 6px; flex-shrink: 0; }
.chat-icon-btn {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(0,0,0,.28); border: 1px solid var(--border); color: var(--text-dim); font-size: 15px; transition: .2s;
}
.chat-icon-btn:hover { color: #fff; background: rgba(0,0,0,.45); }

.chat-body {
  flex: 1; overflow-y: auto; padding: 16px 15px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin;
}
.chat-sys {
  align-self: center; max-width: 88%; text-align: center;
  font-size: 11.5px; color: var(--text-faint); line-height: 1.6;
  padding: 6px 14px; border-radius: 10px; background: rgba(255,255,255,.045);
}
.chat-msg { display: flex; gap: 8px; align-items: flex-end; animation: riseIn .3s ease both; }
.chat-msg.mine { justify-content: flex-end; }
.chat-msg-avatar { width: 28px; height: 28px; border-radius: 9px; overflow: hidden; flex-shrink: 0; background: #fff; }
.chat-msg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 15px 15px 15px 4px;
  font-size: 14px; line-height: 1.65; word-break: break-word; white-space: pre-wrap;
  background: var(--surface-2); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-msg.mine .chat-bubble {
  background: var(--grad-main); border-color: transparent; color: #fff;
  border-radius: 15px 15px 4px 15px;
  box-shadow: 0 8px 22px -10px rgba(168,85,247,.9);
}

.chat-card-form { display: flex; flex-direction: column; gap: 9px; }
.chat-field {
  width: 100%; padding: 10px 13px; border-radius: 11px; font-size: 14px;
  background: rgba(0,0,0,.28); border: 1px solid var(--border); transition: .22s;
}
.chat-field:focus { outline: none; border-color: rgba(168,85,247,.7); box-shadow: 0 0 0 3px rgba(168,85,247,.14); }

.chat-quick {
  display: flex; gap: 7px; padding: 0 15px 10px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none;
}
.chat-quick::-webkit-scrollbar { display: none; }
.chat-quick-btn {
  flex-shrink: 0; padding: 7px 13px; border-radius: 100px; font-size: 12.5px; font-weight: 600;
  color: var(--cyan); background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.26); transition: .22s;
}
.chat-quick-btn:hover { background: rgba(34,211,238,.2); border-color: rgba(34,211,238,.5); transform: translateY(-1px); }

.chat-input-bar {
  display: flex; align-items: flex-end; gap: 9px; padding: 12px 14px; flex-shrink: 0;
  border-top: 1px solid var(--border); background: rgba(0,0,0,.24);
  padding-bottom: calc(12px + var(--safe-b));
}
.chat-pick {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  font-size: 17px; background: rgba(255,255,255,.07); border: 1px solid var(--border); transition: .22s;
}
.chat-pick:hover { background: rgba(34,211,238,.16); border-color: rgba(34,211,238,.45); transform: translateY(-1px); }
.chat-pick:active { transform: scale(.93); }

/* ---- 图片消息 ---- */
.chat-bubble-img {
  padding: 4px; overflow: hidden; cursor: zoom-in; line-height: 0; position: relative;
  max-width: 60%; border-radius: 14px;
}
.chat-bubble-img img {
  display: block; width: 100%; max-height: 260px; object-fit: cover;
  border-radius: 11px; background: rgba(0,0,0,.2);
}
.chat-msg.mine .chat-bubble-img { background: var(--grad-main); border-radius: 14px 14px 4px 14px; }
.chat-bubble-img:hover img { filter: brightness(1.06); }
.chat-bubble-pending { position: relative; opacity: .72; }
.chat-up-mask {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; line-height: 1;
  background: rgba(0,0,0,.42); border-radius: 11px;
}

/* ---- 全屏图片预览 ---- */
.chat-lightbox {
  position: fixed; inset: 0; z-index: 9999; display: none; place-items: center; padding: 24px;
  background: rgba(6, 8, 20, .92); backdrop-filter: blur(8px); cursor: zoom-out;
}
.chat-lightbox.show { display: grid; animation: fadeIn .22s ease both; }
.chat-lightbox img {
  max-width: min(92vw, 900px); max-height: 86vh; border-radius: 14px; cursor: default;
  box-shadow: 0 30px 90px -20px rgba(0,0,0,.9); animation: riseIn .26s ease both;
}
.chat-lb-close {
  position: absolute; top: 20px; right: 24px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); cursor: pointer;
}
.chat-lb-close:hover { background: rgba(255,255,255,.22); }
.chat-input {
  flex: 1; min-height: 40px; max-height: 110px; padding: 10px 13px; border-radius: 13px;
  font-size: 14px; line-height: 1.5; resize: none; overflow-y: auto;
  background: rgba(0,0,0,.34); border: 1px solid var(--border); transition: .22s;
}
.chat-input:focus { outline: none; border-color: rgba(168,85,247,.7); box-shadow: 0 0 0 3px rgba(168,85,247,.13); }
.chat-send {
  flex-shrink: 0; height: 40px; padding: 0 18px; border-radius: 13px; font-size: 14px; font-weight: 700;
  background: var(--grad-main); color: #fff; box-shadow: 0 8px 22px -10px rgba(168,85,247,.9); transition: .22s;
}
.chat-send:hover { filter: brightness(1.08); transform: translateY(-1px); }
.chat-send:active { transform: scale(.95); }

/* ---------------- 后台客服中心补充样式 ---------------- */
.chat-admin-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.chat-conv-list { max-height: calc(100vh - 200px); overflow-y: auto; }
.chat-conv-item {
  display: flex; gap: 11px; padding: 13px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid transparent; transition: .22s; margin-bottom: 9px;
}
.chat-conv-item:hover { background: rgba(255,255,255,.07); border-color: var(--border); }
.chat-conv-item.active { background: rgba(99,102,241,.18); border-color: rgba(168,85,247,.5); }
.chat-conv-item .cca {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--grad-main); font-size: 17px; font-weight: 800; color: #fff; overflow: hidden;
}
.chat-conv-info { flex: 1; min-width: 0; }
.chat-conv-info .r1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-conv-info .name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conv-info .time { font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
.chat-conv-info .msg { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad-amber); color: #fff; font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.chat-conv-info .meta { display: flex; gap: 7px; align-items: center; margin-top: 5px; }
.chat-conv-info .meta .tag {
  font-size: 10.5px; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--text-faint);
}
.chat-admin-main { min-width: 0; }
.chat-admin-body { height: calc(100vh - 330px); min-height: 320px; }
.quick-reply-item {
  display: inline-block; padding: 7px 13px; border-radius: 100px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: .2s; cursor: pointer;
}
.quick-reply-item:hover { color: #fff; background: var(--surface-2); border-color: var(--border-strong); }
.customer-card { display: flex; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); }

/* 打印 & 无障碍 */
@media print {
  .navbar, .tabbar, .drawer, .toast-host, .side { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
 *  单品落地页（product.html）
 * ============================================================ */
.lp-hero {
  position: relative;
  margin-top: 14px;
  border-radius: var(--radius-lg);
  padding: 46px 22px 38px;
  text-align: center;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.lp-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.22), transparent 60%);
  pointer-events: none;
}
.lp-emoji { font-size: 76px; line-height: 1; filter: drop-shadow(0 8px 18px rgba(0,0,0,.35)); }
.lp-name {
  font-size: 26px; font-weight: 850; margin: 16px 0 8px;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.lp-cate {
  display: inline-block; font-size: 13px; font-weight: 700;
  padding: 4px 12px; border-radius: 100px;
  background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.25);
}
.lp-offline {
  display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700;
  padding: 5px 14px; border-radius: 100px;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.3);
}
.lp-card {
  margin-top: 14px; padding: 18px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(8px);
}
.lp-sp-head {
  font-size: 15px; font-weight: 800; margin-bottom: 10px;
  color: var(--text);
}
.lp-sp-body {
  font-size: 15px; line-height: 1.75; color: var(--text-dim);
  white-space: pre-wrap; word-break: break-word;
}
.lp-discount {
  text-align: center; font-weight: 800; font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, rgba(244,63,94,.9), rgba(249,115,22,.9));
  border: none;
}
.lp-meta { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.lp-meta > div { font-size: 14px; color: var(--text-dim); }
.lp-meta b { color: var(--text); font-weight: 800; margin-left: 4px; }
.lp-notice {
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.08);
}
.lp-notice-title { font-size: 14px; font-weight: 800; color: var(--amber); margin-bottom: 8px; }
.lp-notice p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-dim); }
.lp-buybar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(10,10,26,.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 60;
}
.lp-bb-info { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.lp-now { font-size: 24px; font-weight: 850; color: var(--pink); }
.lp-now small { font-size: 14px; font-weight: 700; }
.lp-origin { font-size: 13px; color: var(--text-faint); text-decoration: line-through; }
.lp-off {
  font-size: 12px; font-weight: 800; color: #fff;
  background: var(--pink); padding: 2px 8px; border-radius: 100px;
}
.lp-buybar .btn-lg { padding: 13px 30px; flex: none; }
/* 给底部固定栏留出空间（桌面端无 Tab，仅下单栏） */
body { padding-bottom: 78px; }
@media (min-width: 769px) {
  .lp-buybar { max-width: 720px; margin: 0 auto; left: 0; right: 0; border-radius: 18px 18px 0 0; }
}
/* 移动端底部有 Tab，下单栏需上移到 Tab 之上 */
@media (max-width: 768px) {
  .lp-buybar { bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}

/* 卖点框放大 + 高亮 */
.lp-sp {
  padding: 22px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(168,85,247,.10));
  border: 1px solid rgba(129,140,248,.35);
}
.lp-sp .lp-sp-head { font-size: 17px; margin-bottom: 12px; }
.lp-sp .lp-sp-body { font-size: 16px; line-height: 1.95; color: var(--text); }

/* 商品图集 */
.lp-gallery { padding: 18px 18px; }
.lp-imgs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lp-img { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.lp-img img { width: 100%; height: 160px; object-fit: cover; display: block; }
@media (min-width: 769px) { .lp-imgs { grid-template-columns: repeat(3, 1fr); } .lp-img img { height: 180px; } }

/* 资料下载 */
.lp-files { padding: 18px 18px; }
.lp-file-list { display: flex; flex-direction: column; gap: 10px; }
.lp-file {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; text-decoration: none;
  color: var(--text); background: var(--surface); transition: .15s;
}
.lp-file:hover { border-color: var(--brand-2); transform: translateY(-1px); }
.lp-file-ico { font-size: 22px; flex: none; }
.lp-file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lp-file-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-file-size { font-size: 12px; color: var(--text-faint); }
.lp-file-dl { color: var(--brand-2); font-weight: 700; font-size: 13px; white-space: nowrap; flex: none; }

/* 后台 · 商品附件上传区 */
.upload-zone { border: 1px dashed var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.upload-zone .up-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.up-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.up-item {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.up-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.up-ico { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--surface-2); border-radius: 8px; flex: none; }
.up-info { flex: 1; min-width: 0; }
.up-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-meta { font-size: 12px; color: var(--text-faint); }

/* ============ 收款码弹窗（PayQr） ============ */
.pq-modal { width: min(430px, 100%); }
.pq-body { padding-top: 4px; }

.pq-amount {
  display: flex; align-items: baseline; justify-content: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(244,63,94,.14), rgba(245,158,11,.1));
  border: 1px solid rgba(244,63,94,.28);
}
.pq-amount-label { font-size: 13px; color: var(--text-dim); }
.pq-amount-val { font-size: 28px; font-weight: 900; color: #fb7185; letter-spacing: .5px; }

.pq-qr-box {
  margin-top: 14px; padding: 16px; border-radius: 18px; text-align: center;
  background: #fff; border: 1px solid var(--border-strong);
  box-shadow: 0 10px 34px -14px rgba(0,0,0,.7);
}
.pq-qr {
  width: min(240px, 62vw); height: min(240px, 62vw); object-fit: contain; display: block; margin: 0 auto;
}
.pq-qr-tip { margin-top: 10px; font-size: 12px; color: #6b7280; }

.pq-qr-empty {
  margin-top: 14px; padding: 22px 16px; border-radius: 16px; text-align: center; font-size: 14px;
  background: var(--surface); border: 1px dashed var(--border-strong); color: var(--text-dim);
}

.pq-order {
  margin-top: 14px; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; overflow: hidden;
}
.pq-order b { font-size: 13.5px; flex: 1; min-width: 0; word-break: break-all; }

.pq-steps {
  margin-top: 12px; display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--text-dim);
}
.pq-steps div { display: flex; align-items: center; gap: 8px; }
.pq-steps b {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad-main); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* 醒目提示：付款后截图发给客服 */
.pq-alert {
  margin-top: 16px; padding: 14px 14px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 17px; font-weight: 900; letter-spacing: .3px; color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 55%, #f43f5e 100%);
  box-shadow: 0 10px 30px -10px rgba(239,68,68,.65);
  animation: pqPulse 1.6s ease-in-out infinite;
}
.pq-alert-icon { font-size: 20px; }
.pq-alert b { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pq-alert-sub {
  margin-top: 8px; text-align: center; font-size: 12.5px; color: var(--text-faint); line-height: 1.7;
}
@keyframes pqPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 30px -10px rgba(239,68,68,.55); }
  50% { transform: scale(1.018); box-shadow: 0 14px 38px -8px rgba(239,68,68,.85); }
}

.pq-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }

/* ============ 后台「收款码」页面 ============ */
.pq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pq-card {
  padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center;
}
.pq-card h4 { margin: 0; font-size: 15px; font-weight: 800; }
.pq-card .pq-preview {
  width: 170px; height: 170px; border-radius: 14px; background: #fff; padding: 8px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pq-card .pq-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pq-card .pq-none {
  width: 170px; height: 170px; border-radius: 14px; border: 1px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 13px; gap: 6px;
}
.pq-card .pq-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 480px) {
  .pq-amount-val { font-size: 24px; }
  .pq-alert { font-size: 15.5px; padding: 12px 12px; }
}

/* 待支付订单：提示需客服核实收款 */
.order-wait {
  margin: 12px 18px 0;
  padding: 11px 14px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.34);
  border-radius: 12px;
  font-size: 12.8px;
  line-height: 1.75;
  color: var(--text-dim);
}
.order-wait b { color: #fbbf24; }
