/* ==========================================================================
   百易商城国际版 · 前台样式（科技感深色主题）
   ========================================================================== */

:root {
  --bg:          #070b18;
  --bg-soft:     #0b1224;
  --panel:       rgba(17, 25, 47, .72);
  --panel-solid: #101829;
  --panel-2:     #16203a;
  --line:        rgba(96, 132, 214, .18);
  --line-2:      rgba(96, 132, 214, .34);
  --text:        #e7eeff;
  --text-2:      #b9c7e8;
  --muted:       #7f8fb8;
  --accent:      #22d3ee;
  --accent-2:    #8b5cf6;
  --accent-3:    #38bdf8;
  --ok:          #34d399;
  --warn:        #fbbf24;
  --danger:      #f87171;
  --radius:      14px;
  --radius-lg:   20px;
  --shadow:      0 18px 50px -18px rgba(0, 0, 0, .85);
  --glow:        0 0 0 1px rgba(34, 211, 238, .35), 0 8px 30px -8px rgba(34, 211, 238, .45);
  --header-h:    64px;
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono:        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

/* ---------- 背景装饰 ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(96, 132, 214, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 132, 214, .055) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-glow::before, .bg-glow::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .38;
}
.bg-glow::before { width: 560px; height: 560px; top: -220px; left: -120px; background: radial-gradient(circle, #22d3ee, transparent 70%); }
.bg-glow::after  { width: 620px; height: 620px; top: -260px; right: -180px; background: radial-gradient(circle, #7c3aed, transparent 70%); }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

.site-header, .site-main, .site-footer, .announce, .mobile-drawer, .drawer-mask, .toast-wrap, .to-top { position: relative; z-index: 2; }

/* ---------- 公告条 ---------- */
.announce {
  background: linear-gradient(90deg, rgba(34, 211, 238, .14), rgba(139, 92, 246, .16));
  border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--text-2);
}
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 38px; text-align: center; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 2s infinite; flex: 0 0 auto; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0;
  /* 必须高于 .site-main / .site-footer（同为 z-index:2 且 DOM 在后），
     否则头部溢出的下拉菜单会被正文盖住，PC 端语言/币种/用户菜单点不动 */
  z-index: 100;
  background: rgba(8, 12, 24, .82);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
/* z-index 必须高于下方 .main-nav 内的 .container(z-index:1)，
   否则头部溢出的下拉菜单第一项会被第二行导航条盖住点不动 */
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; letter-spacing: .2px; white-space: nowrap; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }

.header-search {
  flex: 1 1 auto; max-width: 520px; display: flex; align-items: center; gap: 8px;
  background: rgba(11, 18, 36, .9); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 5px 5px 5px 14px; transition: .2s;
}
.header-search:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.header-search .hs-icon { color: var(--muted); flex: 0 0 auto; }
.header-search input { flex: 1 1 auto; background: none; border: 0; outline: none; min-width: 0; font-size: 14px; }
.header-search input::placeholder { color: var(--muted); }
.hs-btn {
  border: 0; cursor: pointer; border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 600; color: #04141c;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
}
.hs-btn:hover { filter: brightness(1.08); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(17, 25, 47, .7); border: 1px solid var(--line); color: var(--text-2);
  cursor: pointer; transition: .18s; position: relative;
}
.icon-btn:hover { color: var(--accent); border-color: var(--line-2); background: rgba(34, 211, 238, .08); }
.cart-btn .badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: linear-gradient(135deg, #f43f5e, #f97316); color: #fff;
  font-size: 11px; font-style: normal; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px rgba(8, 12, 24, .9);
}

.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
  border-radius: 999px; background: rgba(17, 25, 47, .7); border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer; font-size: 13px; transition: .18s;
}
.pill-btn:hover { color: var(--accent); border-color: var(--line-2); }
.user-btn .avatar {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #051018;
  font-size: 12px; font-weight: 800;
}

/* 下拉 */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 168px; padding: 8px;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); display: none; z-index: 60; animation: ddIn .16s ease;
}
.dropdown-menu.wide { min-width: 220px; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } }
.dropdown-menu a { display: block; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--text-2); }
.dropdown-menu a:hover { background: rgba(34, 211, 238, .1); color: var(--accent); }
.dropdown-menu a.active { color: var(--accent); background: rgba(34, 211, 238, .08); }
.dropdown-menu a.danger:hover { background: rgba(248, 113, 113, .12); color: var(--danger); }
.dropdown.open .dropdown-menu { display: block; }
.dd-balance {
  padding: 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted);
}
.dd-balance b { color: var(--accent); font-size: 16px; }

/* 主导航 */
.main-nav { border-top: 1px solid var(--line); background: rgba(9, 13, 26, .6); }
.nav-inner { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 8px 14px; border-radius: 10px; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: .18s;
}
.nav-link:hover { color: var(--text); background: rgba(96, 132, 214, .12); }
.nav-link.active { color: var(--accent); background: rgba(34, 211, 238, .1); }
.nav-link.accent { color: #fde68a; }
.nav-link.accent:hover, .nav-link.accent.active { color: #fcd34d; background: rgba(251, 191, 36, .12); }
.nav-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 8px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .18s; text-align: center; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #04141c; box-shadow: 0 10px 26px -12px rgba(34, 211, 238, .8); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-violet { background: linear-gradient(135deg, var(--accent-2), #6366f1); color: #fff; box-shadow: 0 10px 26px -12px rgba(139, 92, 246, .8); }
.btn-violet:hover { filter: brightness(1.1); }
.btn-ghost { background: rgba(17, 25, 47, .7); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(248, 113, 113, .14); border-color: rgba(248, 113, 113, .4); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, .24); }
.btn-ok { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .4); color: #6ee7b7; }
.btn-ok:hover { background: rgba(52, 211, 153, .24); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* ---------- 卡片 / 面板 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card-pad { padding: 22px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 16px; }
.card-head .sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.card-body { padding: 22px; }
.card-foot { padding: 16px 22px; border-top: 1px solid var(--line); }

.panel-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 15px;
}
.panel-title::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }

/* ---------- 首页 Hero ---------- */
.hero { padding: 56px 0 40px; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .3);
  color: var(--accent); font-size: 12.5px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.12; margin-bottom: 18px; letter-spacing: -.02em; }
.hero h1 .grad {
  background: linear-gradient(120deg, #22d3ee 0%, #60a5fa 45%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 16.5px; color: var(--text-2); max-width: 560px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hero-stat {
  padding: 14px 16px; border-radius: var(--radius); background: rgba(17, 25, 47, .6);
  border: 1px solid var(--line); text-align: center;
}
.hero-stat b { display: block; font-size: 22px; font-weight: 700; font-family: var(--mono);
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stat span { font-size: 12px; color: var(--muted); }

.hero-visual { position: relative; }
.hero-card {
  border-radius: 26px; padding: 26px; border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(34, 211, 238, .1), rgba(139, 92, 246, .1)), var(--panel-solid);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 70%); filter: blur(40px);
}
.hero-float {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; position: relative;
}
.hero-mini {
  padding: 14px; border-radius: 14px; background: rgba(9, 14, 28, .78); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.hero-mini i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(34, 211, 238, .12); font-style: normal; }
.hero-mini span { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }

/* ---------- 区块 ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(21px, 2.4vw, 28px); margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 4px; height: 22px; border-radius: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.section-head .sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.link-more { color: var(--accent); font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ---------- 商品卡片 ---------- */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 20px; }
.grid-products.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-products.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.p-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: .22s; position: relative;
}
.p-card:hover { border-color: rgba(34, 211, 238, .5); transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(34, 211, 238, .55); }
.p-thumb { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(150deg, #0d1526, #131d33); overflow: hidden; }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.p-card:hover .p-thumb img { transform: scale(1.05); }
.p-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.p-badges .right { position: absolute; top: 0; right: 0; }
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: rgba(34, 211, 238, .16); color: var(--accent); border: 1px solid rgba(34, 211, 238, .3);
  backdrop-filter: blur(6px);
}
.tag.violet { background: rgba(139, 92, 246, .18); color: #c4b5fd; border-color: rgba(139, 92, 246, .35); }
.tag.warn { background: rgba(251, 191, 36, .16); color: #fcd34d; border-color: rgba(251, 191, 36, .32); }
.tag.danger { background: rgba(248, 113, 113, .16); color: #fca5a5; border-color: rgba(248, 113, 113, .32); }
.tag.ok { background: rgba(52, 211, 153, .16); color: #6ee7b7; border-color: rgba(52, 211, 153, .32); }
.tag.muted { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .28); }

.p-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.p-cat { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.p-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.p-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.p-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.p-price-row { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.p-price { font-size: 20px; font-weight: 700; font-family: var(--mono); color: var(--accent); line-height: 1.1; }
.p-price small { font-size: 12px; color: var(--muted); font-weight: 400; display: block; font-family: var(--font); }
.p-compare { font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.p-actions { display: flex; gap: 8px; margin-top: 12px; }
.p-actions .btn { flex: 1; }

/* ---------- 筛选侧栏 ---------- */
.layout-list { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 26px; align-items: start; }
.filter-panel { position: sticky; top: calc(var(--header-h) + 58px); }
.filter-group { border-bottom: 1px solid var(--line); padding: 16px 18px; }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.filter-list { display: flex; flex-direction: column; gap: 2px; }
.filter-list a {
  padding: 7px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.filter-list a:hover { background: rgba(96, 132, 214, .12); color: var(--text); }
.filter-list a.active { background: rgba(34, 211, 238, .12); color: var(--accent); font-weight: 600; }
.filter-list a em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.price-row { display: flex; align-items: center; gap: 8px; }
.price-row input { flex: 1 1 0; min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(17, 25, 47, .6); font-size: 12.5px; color: var(--text-2); cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(34, 211, 238, .1); }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); margin-bottom: 20px;
}
.toolbar .count { font-size: 13.5px; color: var(--muted); }
.sort-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sort-tabs a { padding: 6px 13px; border-radius: 9px; font-size: 13px; color: var(--text-2); border: 1px solid transparent; }
.sort-tabs a:hover { color: var(--accent); }
.sort-tabs a.active { color: var(--accent); background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .3); }

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 16px; }
.form-row > label, .form-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.form-label .req { color: var(--danger); margin-left: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=datetime-local], input[type=date], input[type=tel], select, textarea {
  width: 100%; padding: 11px 14px; font-size: 16px; border-radius: 11px;
  background: rgba(9, 14, 28, .8); border: 1px solid var(--line-2); color: var(--text);
  outline: none; transition: .18s; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--glow); }
input::placeholder, textarea::placeholder { color: var(--muted); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checkbox { display: inline-flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--accent); margin-top: 2px; flex: 0 0 auto; }
.input-group { display: flex; gap: 10px; align-items: stretch; }
.input-group input { flex: 1 1 auto; }

/* ---------- 徽标 / 状态 ---------- */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.badge-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-status.ok { color: #6ee7b7; background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .3); }
.badge-status.warn { color: #fcd34d; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .3); }
.badge-status.info { color: #7dd3fc; background: rgba(56, 189, 248, .12); border-color: rgba(56, 189, 248, .3); }
.badge-status.danger { color: #fca5a5; background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); }
.badge-status.muted { color: #cbd5e1; background: rgba(148, 163, 184, .12); border-color: rgba(148, 163, 184, .3); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
table.tbl th {
  text-align: left; padding: 12px 14px; background: rgba(9, 14, 28, .7); color: var(--muted);
  font-weight: 600; font-size: 12.5px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover td { background: rgba(96, 132, 214, .06); }
table.tbl .strong { color: var(--text); font-weight: 600; }
table.tbl .mono { font-family: var(--mono); font-size: 12.5px; }
table.tbl .num { text-align: right; font-family: var(--mono); }

/* ---------- 楼层 / 结构 ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 18px 0 4px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb em { font-style: normal; opacity: .5; }

.page-head { padding: 8px 0 24px; }
.page-head h1 { font-size: clamp(22px, 2.8vw, 32px); margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; font-size: 14px; }

.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.split-2.rev { grid-template-columns: 340px minmax(0, 1fr); }

/* ---------- 商品详情 ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 34px; align-items: start; }
.pd-gallery { position: sticky; top: calc(var(--header-h) + 70px); }
.pd-main {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: #0d1526;
  aspect-ratio: 4 / 3; position: relative;
}
.pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.pd-thumbs img {
  width: 74px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line);
  cursor: pointer; opacity: .6; transition: .18s; flex: 0 0 auto;
}
.pd-thumbs img.active, .pd-thumbs img:hover { opacity: 1; border-color: var(--accent); }
.pd-info h1 { font-size: clamp(21px, 2.6vw, 30px); margin-bottom: 10px; }
.pd-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.pd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pd-price-box {
  padding: 18px 20px; border-radius: var(--radius); margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .09), rgba(139, 92, 246, .09));
  border: 1px solid var(--line-2);
}
.pd-price { font-size: 34px; font-weight: 700; font-family: var(--mono); color: var(--accent); line-height: 1.1; }
.pd-price small { font-size: 14px; color: var(--muted); font-family: var(--font); font-weight: 400; margin-left: 8px; }
.pd-price-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.pd-attrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-bottom: 22px; }
.pd-attr { display: flex; gap: 8px; font-size: 13.5px; }
.pd-attr span { color: var(--muted); min-width: 76px; flex: 0 0 auto; }
.pd-attr b { font-weight: 500; color: var(--text); }
.pd-save {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #fca5a5;
  background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .28);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.pd-save b { color: #f87171; font-family: var(--mono); }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.qty-box button { width: 42px; height: 44px; background: rgba(9, 14, 28, .8); border: 0; cursor: pointer; color: var(--text-2); font-size: 17px; }
.qty-box button:hover { color: var(--accent); }
.qty-box input { width: 62px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; height: 44px; padding: 0; background: rgba(9, 14, 28, .8); }
.pd-buy { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.pd-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 34px 0 0; overflow-x: auto; }
.pd-tab { padding: 10px 18px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; }
.pd-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.pd-tab-panel { padding: 22px 0; display: none; }
.pd-tab-panel.active { display: block; }
.rich { color: var(--text-2); font-size: 14.5px; line-height: 1.85; }
.rich h4 { color: var(--text); margin-top: 22px; }
.rich ul { padding-left: 20px; }
.rich li { margin-bottom: 6px; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }
.spec-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.spec-item span { color: var(--muted); min-width: 110px; flex: 0 0 auto; }
.hl-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.hl-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.hl-list li::before { content: ""; width: 7px; height: 7px; margin-top: 8px; border-radius: 2px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: 0 0 auto; }

/* 移动端底部固定购买栏 */
.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(8, 12, 24, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line-2);
  gap: 10px; align-items: center;
}
.buy-bar .bb-price { flex: 0 0 auto; }
.buy-bar .bb-price b { display: block; font-size: 19px; color: var(--accent); font-family: var(--mono); }
.buy-bar .bb-price span { font-size: 11px; color: var(--muted); }
.buy-bar .btn { flex: 1 1 0; }

/* ---------- 购物车 ---------- */
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-row {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) 132px 108px 44px; gap: 16px; align-items: center;
  padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
}
.cart-row .cr-img { width: 92px; height: 70px; border-radius: 10px; object-fit: cover; background: #0d1526; }
.cart-row .cr-title { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.cart-row .cr-meta { font-size: 12px; color: var(--muted); }
.cart-row .cr-price { font-family: var(--mono); color: var(--accent); font-size: 15px; }
.cart-row .cr-sub { font-family: var(--mono); font-weight: 700; }
.summary-box { position: sticky; top: calc(var(--header-h) + 70px); }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; color: var(--text-2); }
.sum-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 16px; color: var(--text); }
.sum-line.total b { font-size: 24px; color: var(--accent); font-family: var(--mono); }
.balance-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px;
  border-radius: 12px; background: rgba(9, 14, 28, .7); border: 1px solid var(--line); margin: 14px 0; font-size: 13.5px;
}
.balance-pill b { font-family: var(--mono); font-size: 17px; color: var(--accent); }
.balance-pill.lack { border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); }
.balance-pill.lack b { color: var(--danger); }

/* ---------- 充值 ---------- */
.steps { display: flex; gap: 0; margin-bottom: 28px; overflow-x: auto; padding-bottom: 4px; }
.step { display: flex; align-items: center; gap: 10px; padding-right: 26px; position: relative; flex: 0 0 auto; }
.step:not(:last-child)::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 1px; background: var(--line-2); }
.step i {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: 13px; font-weight: 700; background: rgba(96, 132, 214, .16); color: var(--muted); border: 1px solid var(--line-2);
}
.step.active i { background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #04141c; border-color: transparent; }
.step.done i { background: rgba(52, 211, 153, .18); color: var(--ok); border-color: rgba(52, 211, 153, .4); }
.step span { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.step.active span { color: var(--text); font-weight: 600; }

.amount-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.amount-opt {
  padding: 16px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(9, 14, 28, .6);
  text-align: center; cursor: pointer; transition: .18s;
}
.amount-opt:hover { border-color: var(--accent); }
.amount-opt.active { border-color: var(--accent); background: rgba(34, 211, 238, .1); box-shadow: var(--glow); }
.amount-opt b { display: block; font-size: 19px; font-family: var(--mono); color: var(--text); }
.amount-opt.active b { color: var(--accent); }
.amount-opt em { font-style: normal; font-size: 11.5px; color: var(--muted); }

.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.channel-opt {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(9, 14, 28, .6); cursor: pointer; transition: .18s;
}
.channel-opt:hover { border-color: var(--accent); }
.channel-opt.active { border-color: var(--accent); background: rgba(34, 211, 238, .1); }
.channel-opt .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; background: rgba(96, 132, 214, .14); flex: 0 0 auto; }
.channel-opt b { font-size: 14px; font-weight: 600; display: block; }
.channel-opt em { font-style: normal; font-size: 11.5px; color: var(--muted); }

.pay-box {
  padding: 18px; border-radius: var(--radius); border: 1px dashed var(--line-2);
  background: rgba(9, 14, 28, .6); display: grid; gap: 12px;
}
.kv-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.kv-line span { color: var(--muted); flex: 0 0 auto; }
.kv-line b { font-family: var(--mono); word-break: break-all; text-align: right; }
.qr-box { text-align: center; padding: 10px 0; }
.qr-box img { width: 190px; height: 190px; margin: 0 auto; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; padding: 8px; }
.qr-box p { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.notice-box {
  padding: 16px 18px; border-radius: var(--radius); border: 1px solid rgba(251, 191, 36, .3);
  background: rgba(251, 191, 36, .07); font-size: 13.5px; color: #fde68a;
}
.notice-box h4 { color: #fcd34d; font-size: 14px; margin: 0 0 8px; }
.notice-box ol { margin: 0; padding-left: 18px; color: #fef3c7; }
.notice-box li { margin-bottom: 5px; }
.info-box {
  padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: rgba(34, 211, 238, .06); font-size: 13.5px; color: var(--text-2);
}

/* 上传区 */
.upload-zone {
  border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 22px; text-align: center;
  background: rgba(9, 14, 28, .55); cursor: pointer; transition: .18s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: rgba(34, 211, 238, .07); }
.upload-zone .uz-icon { font-size: 26px; margin-bottom: 6px; }
.upload-zone p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.upload-zone small { color: var(--muted); font-size: 12px; }
.upload-preview { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.upload-preview img { width: 84px; height: 66px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- 账户中心 ---------- */
.acct-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; align-items: start; }
.acct-nav { position: sticky; top: calc(var(--header-h) + 70px); overflow: hidden; }
.acct-nav a {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 14px; color: var(--text-2);
  border-left: 3px solid transparent;
}
.acct-nav a:hover { background: rgba(96, 132, 214, .08); color: var(--text); }
.acct-nav a.active { background: rgba(34, 211, 238, .09); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.acct-nav .acct-bal { padding: 18px; border-bottom: 1px solid var(--line); }
.acct-nav .acct-bal span { font-size: 12px; color: var(--muted); display: block; }
.acct-nav .acct-bal b { font-size: 24px; font-family: var(--mono); color: var(--accent); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.stat-card span { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 6px; }
.stat-card b { font-size: 25px; font-family: var(--mono); color: var(--text); }
.stat-card.hl b { color: var(--accent); }

/* ---------- 订单 ---------- */
.order-card { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; margin-bottom: 16px; }
.order-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; background: rgba(9, 14, 28, .6); border-bottom: 1px solid var(--line); font-size: 13px;
}
.order-card-head .ono { font-family: var(--mono); color: var(--text); }
.order-card-body { padding: 16px 18px; }
.oi-row { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.oi-row:last-child { border-bottom: 0; }
.oi-row img { width: 62px; height: 50px; object-fit: cover; border-radius: 9px; background: #0d1526; flex: 0 0 auto; }
.oi-row .oi-t { flex: 1 1 auto; min-width: 0; font-size: 14px; }
.oi-row .oi-t em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.oi-row .oi-p { font-family: var(--mono); font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.order-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; border-top: 1px solid var(--line);
}
.order-card-foot .amt b { font-family: var(--mono); font-size: 19px; color: var(--accent); }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-tabs a { padding: 8px 16px; border-radius: 10px; font-size: 13.5px; color: var(--text-2); border: 1px solid var(--line); background: rgba(17, 25, 47, .5); }
.filter-tabs a:hover { border-color: var(--line-2); color: var(--text); }
.filter-tabs a.active { color: var(--accent); border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .1); }

.license-box {
  padding: 14px 16px; border-radius: 12px; background: rgba(9, 14, 28, .8); border: 1px solid rgba(52, 211, 153, .3);
  margin: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.license-key { font-family: var(--mono); font-size: 15px; color: #6ee7b7; letter-spacing: .5px; word-break: break-all; }

/* 物流时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(34, 211, 238, .16); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item b { display: block; font-size: 14px; }
.tl-item span { font-size: 12.5px; color: var(--muted); }

/* ---------- 帮助中心 / 富文本 ---------- */
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.help-nav { position: sticky; top: calc(var(--header-h) + 70px); }
.help-nav a { display: block; padding: 11px 16px; font-size: 14px; color: var(--text-2); border-left: 3px solid transparent; }
.help-nav a:hover { background: rgba(96, 132, 214, .08); color: var(--text); }
.help-nav a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(34, 211, 238, .08); }
.doc h2 { font-size: 21px; margin: 34px 0 14px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 16.5px; margin: 24px 0 10px; color: var(--text); }
.doc p, .doc li { color: var(--text-2); font-size: 14.5px; line-height: 1.85; }
.doc code { font-family: var(--mono); background: rgba(34, 211, 238, .1); color: var(--accent); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--panel); }
.faq-q { padding: 15px 18px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-q::after { content: "+"; color: var(--accent); font-size: 19px; }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a { display: none; padding: 0 18px 16px; color: var(--text-2); font-size: 14px; }
.faq-item.open .faq-a { display: block; }

/* ---------- 认证页 ---------- */
.auth-wrap { display: grid; place-items: center; padding: 48px 20px 72px; }
.auth-card { width: 100%; max-width: 460px; padding: 34px; }
.auth-card h1 { font-size: 25px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 12px; background: rgba(9, 14, 28, .7); border: 1px solid var(--line); margin-bottom: 24px; }
.auth-tabs a { flex: 1 1 0; text-align: center; padding: 9px; border-radius: 9px; font-size: 14px; color: var(--muted); }
.auth-tabs a.active { background: rgba(34, 211, 238, .12); color: var(--accent); font-weight: 600; }
.auth-side { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.auth-side a { color: var(--accent); }

/* ---------- 空状态 / 分页 ---------- */
.empty-state { text-align: center; padding: 62px 20px; }
.empty-state .es-icon { font-size: 46px; margin-bottom: 14px; opacity: .55; }
.empty-state h3 { font-size: 17px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; display: inline-grid; place-items: center;
  font-size: 13.5px; border: 1px solid var(--line); background: rgba(17, 25, 47, .6); color: var(--text-2);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .current { background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #04141c; border-color: transparent; font-weight: 700; }
.pager .disabled { opacity: .4; }

/* ---------- Toast / Modal ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 12px;
  background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font-size: 13.5px; animation: toastIn .24s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 17px; line-height: 1; margin-left: auto; }
.toast-ok { border-color: rgba(52, 211, 153, .45); }
.toast-warn { border-color: rgba(251, 191, 36, .45); }
.toast-error { border-color: rgba(248, 113, 113, .45); }

.modal-root:empty { display: none; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(4, 7, 16, .78); backdrop-filter: blur(4px);
  z-index: 300; display: grid; place-items: center; padding: 20px; animation: fadeIn .18s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 520px; max-height: 86vh; overflow: auto; background: var(--panel-solid);
  border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 15px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.modal-head button { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: rgba(6, 9, 18, .75); padding: 44px 0 22px; }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr) 1.2fr; gap: 32px; padding-bottom: 30px; }
.footer-brand p { font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.footer-brand .brand b { font-size: 16px; }
.footer-links h4, .footer-channels h4 { font-size: 13.5px; margin: 0 0 14px; color: var(--text); }
.footer-links a { display: block; font-size: 13px; color: var(--muted); padding: 5px 0; }
.footer-links a:hover { color: var(--accent); }
.channel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
}
.footer-meta a { color: var(--text-2); }
.footer-meta em { font-style: normal; margin: 0 8px; opacity: .5; }
.muted { color: var(--muted); }

/* ---------- 回顶 ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 24px; width: 44px; height: 44px; border-radius: 13px; z-index: 90;
  display: none; place-items: center; background: var(--panel-solid); border: 1px solid var(--line-2);
  color: var(--text-2); cursor: pointer;
}
.to-top.show { display: grid; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 移动端抽屉 ---------- */
.mobile-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 86vw; z-index: 150;
  background: var(--panel-solid); border-right: 1px solid var(--line-2); transform: translateX(-102%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1); display: flex; flex-direction: column;
}
.mobile-drawer.open { transform: none; }
.md-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.md-body { padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; flex: 1 1 auto; }
.md-search { display: flex; gap: 8px; margin-bottom: 14px; }
.md-search input { flex: 1 1 auto; }
.md-balance { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 12px; background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .28); margin-bottom: 14px; }
.md-balance span { font-size: 12px; color: var(--muted); display: block; }
.md-balance b { font-size: 19px; font-family: var(--mono); color: var(--accent); }
.md-link { display: block; padding: 12px 14px; border-radius: 11px; font-size: 14.5px; color: var(--text-2); }
.md-link:hover { background: rgba(96, 132, 214, .12); color: var(--text); }
.md-link.accent { color: #fcd34d; }
.md-link.danger { color: #fca5a5; }
.md-lang { display: flex; gap: 8px; padding: 14px 0; margin-top: 8px; border-top: 1px solid var(--line); }
.md-lang a { flex: 1 1 0; text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.md-lang a.active { color: var(--accent); border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .1); }
.md-auth { display: grid; gap: 10px; margin-top: 14px; }
.drawer-mask {
  position: fixed; inset: 0; background: rgba(4, 7, 16, .66); z-index: 140; opacity: 0; pointer-events: none; transition: .2s;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }

.only-mobile { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .grid-products.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
  .footer-channels { grid-column: span 3; }
}
@media (max-width: 1024px) {
  .layout-list { grid-template-columns: 1fr; }
  .filter-panel { position: static; margin-bottom: 18px; }
  .filter-panel .filter-body { display: none; }
  .filter-panel.expanded .filter-body { display: block; }
  .split-2, .split-2.rev { grid-template-columns: 1fr; }
  .summary-box, .pd-gallery, .acct-nav, .help-nav { position: static; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .pd { grid-template-columns: 1fr; gap: 24px; }
  .acct-layout { grid-template-columns: 1fr; }
  .acct-nav { display: flex; overflow-x: auto; }
  .acct-nav .acct-bal { display: none; }
  .acct-nav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .acct-nav a.active { border-left: 0; border-bottom-color: var(--accent); }
  .help-layout { grid-template-columns: 1fr; }
  .help-nav { display: flex; overflow-x: auto; }
  .help-nav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .help-nav a.active { border-left: 0; border-bottom-color: var(--accent); }
}
@media (max-width: 900px) {
  .header-search { display: none; }
  .main-nav { display: none; }
  .only-mobile { display: inline-grid; }
  .only-desktop { display: none !important; }
  .grid-products, .grid-products.cols-4, .grid-products.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-channels { grid-column: span 2; }
  .section { padding: 34px 0; }
  .hero { padding: 34px 0 26px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  body { font-size: 14.5px; }
  .container { padding: 0 15px; }
  .card-pad, .card-body { padding: 17px; }
  .card-head { padding: 14px 17px; }
  .theme-mobile-hide { display: none; }
  .cart-row {
    grid-template-columns: 74px minmax(0, 1fr); grid-template-areas: "img title" "img meta" "qty sub";
    gap: 10px 12px; align-items: center;
  }
  .cart-row .cr-img { width: 74px; height: 60px; grid-area: img; }
  .cart-row .cr-title { grid-area: title; }
  .cart-row .cr-meta { grid-area: meta; }
  .cart-row .cr-qty { grid-area: qty; }
  .cart-row .cr-subcell { grid-area: sub; text-align: right; }
  .buy-bar { display: flex; }
  body.has-buybar { padding-bottom: 78px; }
  .pd-attrs { grid-template-columns: 1fr; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .table-wrap.mobile-cards table.tbl { min-width: 0; }
  .table-wrap.mobile-cards thead { display: none; }
  .table-wrap.mobile-cards tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .table-wrap.mobile-cards td { display: flex; justify-content: space-between; gap: 14px; border: 0; padding: 6px 14px; text-align: right; }
  .table-wrap.mobile-cards td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex: 0 0 auto; }
  .toast-wrap { right: 12px; left: 12px; bottom: 78px; max-width: none; }
  .to-top { bottom: 82px; }
  .auth-card { padding: 24px 20px; }
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 90vh; animation: sheetUp .24s ease; }
  @keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .footer-channels { grid-column: span 2; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .grid-products, .grid-products.cols-4, .grid-products.cols-3 { grid-template-columns: 1fr; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .channel-grid { grid-template-columns: 1fr; }
}
@media (min-width: 901px) {
  .mobile-drawer, .drawer-mask { display: none !important; }
}
