/* =========================================================
   earchshop.com —— 国际化设计系统 (Design Tokens v1.0)
   1. 设计令牌  2. 基础重置  3. 布局  4. 组件  5. 页面  6. 响应式/动效
   ========================================================= */

/* ---------------- 1. 设计令牌 ---------------- */
:root {
  /* 品牌色 */
  --brand: #1a56db;
  --brand-600: #1e40af;
  --brand-500: #2563eb;
  --brand-100: #dbeafe;
  --accent: #f59e0b;
  --accent-600: #d97706;
  --ok: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --info: #0ea5e9;

  /* 中性色 */
  --bg: #f6f8fb;
  --bg-elev: #ffffff;
  --bg-soft: #f1f5f9;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* 阴影 / 圆角 / 间距 */
  --radius-xs: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);
  --shadow-brand: 0 10px 26px rgba(26, 86, 219, .22);
  --sp: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;

  /* 字体 */
  --font: "Inter", "Segoe UI", -apple-system, "Helvetica Neue", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans", "Noto Sans Arabic", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* 动效 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .28s;

  --header-h: 132px;
  --maxw: 1400px;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-elev: #111a2e;
  --bg-soft: #172240;
  --text: #e8eefc;
  --text-2: #a8b6d3;
  --text-3: #6b7b9e;
  --border: #22304f;
  --border-strong: #33456d;
  --brand: #3b82f6;
  --brand-600: #60a5fa;
  --brand-100: #1e3a8a;
  --shadow: 0 6px 22px rgba(0, 0, 0, .45);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, .55);
}

/* ---------------- 2. 基础重置 ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.2rem; } h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-soft); padding: 2px 6px; border-radius: var(--radius-xs); }
input, select, textarea, button { font: inherit; color: inherit; }
table { width: 100%; border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-3) 0; }
::selection { background: var(--brand); color: #fff; }

.container { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.section { padding: var(--sp-4) 0; }
.section-sm { padding: var(--sp-2) 0; }
.muted { color: var(--text-2); }
.small { font-size: .86rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mt { margin-top: var(--sp-3); }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.block { display: block; width: 100%; }
.inline { display: inline-block; }
[dir="rtl"] .container { direction: rtl; }

/* ---------------- 3. 布局 ---------------- */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; }

.grid { display: grid; gap: var(--sp-2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.span-2 { grid-column: 1 / -1; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--sp-2); }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-2); }
.page-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--sp-3); align-items: start; }
.user-layout { display: grid; grid-template-columns: 240px 1fr; gap: var(--sp-3); align-items: start; }

/* ---------------- 头部 ---------------- */
.header { position: sticky; top: 0; z-index: 60; background: var(--bg-elev); box-shadow: var(--shadow-xs); }
.topbar { background: var(--text); color: #cbd5e1; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: var(--sp-2); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: var(--sp-2); }
.topbar-item { opacity: .85; }
.topbar-link { color: #e2e8f0; }
.topbar-link:hover { color: #fff; }
.topbar-link.strong { color: var(--accent); font-weight: 600; }
.header-inner { display: flex; align-items: center; gap: var(--sp-3); padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
  font-weight: 800; letter-spacing: -.5px; box-shadow: var(--shadow-brand);
}
.logo-text small { font-weight: 500; color: var(--text-3); font-size: .8em; }

.search { flex: 1; max-width: 720px; }
.search-box { display: flex; border: 2px solid var(--brand); border-radius: var(--radius-full); overflow: hidden; background: var(--bg-elev); }
.search-select { border: 0; background: var(--bg-soft); padding: 0 12px; color: var(--text-2); outline: none; max-width: 160px; }
.search-box input { flex: 1; border: 0; padding: 11px 16px; outline: none; background: transparent; }
.search-box .btn { border-radius: 0; padding-inline: 24px; }

.header-actions { display: flex; align-items: center; gap: var(--sp); }
.action-btn { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-full); color: var(--text-2); transition: all var(--dur) var(--ease); }
.action-btn:hover { background: var(--bg-soft); color: var(--brand); }
.action-ico { font-size: 1.15rem; }
.badge-count {
  position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-full); background: var(--danger); color: #fff; font-size: .7rem;
  font-style: normal; display: grid; place-items: center;
}
.nav { border-top: 1px solid var(--border); }
.nav-inner { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a { white-space: nowrap; color: var(--text-2); font-size: .92rem; padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav-inner a:hover, .nav-inner a.active { color: var(--brand); border-color: var(--brand); }
.nav-hot { color: var(--danger) !important; font-weight: 600; }

/* 下拉 */
.dropdown { position: relative; }
.switcher, .user-chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-full); background: var(--bg-elev); color: var(--text-2); cursor: pointer; font-size: .85rem;
}
.switcher:hover, .user-chip:hover { border-color: var(--brand); color: var(--brand); }
.dropdown-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 190px; z-index: 80;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; display: none; animation: fadeUp .2s var(--ease);
}
.dropdown.open .dropdown-menu, .dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-xs); font-size: .88rem; color: var(--text-2); }
.dropdown-menu a:hover, .dropdown-menu a.active { background: var(--brand-100); color: var(--brand-600); }
.dropdown-menu a small { margin-inline-start: auto; color: var(--text-3); font-size: .74rem; }
.dropdown-scroll { max-height: 340px; overflow-y: auto; }
.caret { font-size: .7rem; opacity: .6; }
.icon-btn { background: transparent; border: 1px solid var(--border); border-radius: var(--radius-full); width: 30px; height: 30px; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .8rem; }
.avatar.lg { width: 46px; height: 46px; font-size: 1.1rem; }
.avatar.xl { width: 76px; height: 76px; font-size: 1.7rem; }

/* ---------------- 按钮 / 表单 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-full);
  background: var(--bg-soft); color: var(--text); font-weight: 600; font-size: .92rem;
  cursor: pointer; transition: transform .15s var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-500)); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn-light { background: #fff; color: var(--brand-600); }
.btn-text { background: transparent; color: var(--text-2); padding: 6px 10px; }
.btn-text:hover { color: var(--brand); }
.btn.danger { color: var(--danger); }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn.sm { padding: 6px 12px; font-size: .82rem; }
.btn-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--bg-soft); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }

.input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--text); outline: none; transition: border-color var(--dur), box-shadow var(--dur);
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.input.sm { padding: 5px 8px; font-size: .85rem; }
textarea.input { resize: vertical; }
.field { display: block; margin-bottom: var(--sp-2); }
.field > span { display: block; margin-bottom: 6px; font-size: .85rem; color: var(--text-2); font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text-2); }
.form .grid-2 { gap: var(--sp-2); }
.field-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-2); }
.link { color: var(--brand); }
.link:hover { text-decoration: underline; }

/* ---------------- 卡片 / 商品 ---------------- */
.panel-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-3); margin-bottom: var(--sp-2); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-2); }
.panel-head h3 { margin: 0; }
.link-more { color: var(--brand); font-size: .9rem; }

.p-card {
  display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.p-card-media { position: relative; aspect-ratio: 1 / 1; background: var(--bg-soft); overflow: hidden; }
.p-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.p-card:hover .p-card-media img { transform: scale(1.06); }
.p-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.p-card-title { font-size: .93rem; font-weight: 600; line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.p-card-price strong { color: var(--danger); font-size: 1.12rem; }
.p-card-market { color: var(--text-3); font-size: .84rem; }
.p-card-tier { font-size: .82rem; color: var(--ok); background: rgba(22, 163, 74, .09); padding: 2px 8px; border-radius: var(--radius-xs); align-self: flex-start; }
.p-card-meta, .p-card-foot { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-3); }
.tag { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: var(--radius-xs); font-size: .72rem; font-weight: 700; background: rgba(15, 23, 42, .75); color: #fff; }
.tag-b2b { background: var(--brand); }
.tag-green { background: var(--ok); top: 8px; left: 8px; }
[dir="rtl"] .tag { left: auto; right: 8px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: var(--radius-full); font-size: .75rem; font-weight: 600; background: var(--bg-soft); color: var(--text-2); }
.badge-active, .badge-completed, .badge-paid, .badge-delivered { background: rgba(22, 163, 74, .12); color: var(--ok); }
.badge-pending { background: rgba(245, 158, 11, .14); color: var(--accent-600); }
.badge-processing, .badge-shipped { background: rgba(14, 165, 233, .14); color: var(--info); }
.badge-cancelled, .badge-rejected { background: rgba(220, 38, 38, .12); color: var(--danger); }
.badge-warning { background: rgba(245, 158, 11, .18); color: var(--accent-600); }

/* ---------------- 首页 ---------------- */
.hero { background: linear-gradient(135deg, #0b1b3f 0%, #123a8a 55%, #1a56db 100%); color: #fff; padding: var(--sp-5) 0 var(--sp-4); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(245, 158, 11, .28), transparent 45%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--sp-4); align-items: center; }
.hero-copy h1 { font-size: clamp(1.8rem, 3.6vw, 3rem); margin-bottom: 14px; }
.hero-copy p { color: rgba(255, 255, 255, .82); font-size: 1.05rem; max-width: 46ch; }
.eyebrow { display: inline-block; padding: 4px 12px; border-radius: var(--radius-full); background: rgba(255, 255, 255, .14); font-size: .8rem; letter-spacing: .04em; margin-bottom: 14px; }
.hero-cta { display: flex; gap: var(--sp); flex-wrap: wrap; margin: var(--sp-2) 0 var(--sp-3); }
.hero-points { list-style: none; display: flex; gap: var(--sp-3); padding: 0; margin: 0; flex-wrap: wrap; }
.hero-points li { display: flex; flex-direction: column; }
.hero-points b { font-size: 1.35rem; color: var(--accent); }
.hero-points span { font-size: .82rem; color: rgba(255, 255, 255, .72); }

.orbit { position: relative; width: 320px; height: 320px; margin-inline: auto; }
.orbit-core { position: absolute; inset: 34%; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); font-size: 1.8rem; font-weight: 800; backdrop-filter: blur(6px); }
.orbit-dot { position: absolute; font-size: 1.5rem; animation: float 6s ease-in-out infinite; }
.orbit-dot.d1 { top: 4%; left: 46%; } .orbit-dot.d2 { top: 26%; right: 4%; animation-delay: .4s; }
.orbit-dot.d3 { bottom: 20%; right: 10%; animation-delay: .8s; } .orbit-dot.d4 { bottom: 4%; left: 44%; animation-delay: 1.2s; }
.orbit-dot.d5 { bottom: 26%; left: 2%; animation-delay: 1.6s; } .orbit-dot.d6 { top: 30%; left: 6%; animation-delay: 2s; }

.banner-slider { position: relative; height: 260px; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); background-size: cover; background-position: center; display: flex; align-items: center; }
.slide.active { opacity: 1; }
.slide-copy { padding: var(--sp-4); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.slide-copy h3 { font-size: 1.7rem; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--sp-2); }
.section-head h2 { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp); }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--sp-2) 8px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); transition: all var(--dur) var(--ease); }
.cat-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-ico { font-size: 1.6rem; }
.cat-name { font-size: .86rem; font-weight: 600; text-align: center; }
.cat-count { font-size: .72rem; color: var(--text-3); }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-2); }
.value-card { padding: var(--sp-3); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.value-card span { font-size: 1.8rem; }
.cta-band { background: linear-gradient(120deg, var(--brand-600), var(--accent-600)); color: #fff; padding: var(--sp-4) 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------------- 商品详情 ---------------- */
.breadcrumb { padding: var(--sp-2) 0; font-size: .86rem; color: var(--text-3); }
.breadcrumb a:hover { color: var(--brand); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.gallery-main { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-elev); }
.gallery-main img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb { width: 66px; height: 66px; padding: 0; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; background: none; cursor: pointer; }
.thumb.active, .thumb:hover { border-color: var(--brand); }
.detail-info h1 { font-size: 1.6rem; }
.subtitle { color: var(--text-2); }
.detail-price { display: flex; align-items: baseline; gap: 12px; padding: var(--sp-2); background: var(--bg-soft); border-radius: var(--radius); }
.price-label { font-size: .82rem; color: var(--text-2); }
.detail-price strong { font-size: 2rem; color: var(--danger); }
.detail-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: var(--sp-2) 0; font-size: .9rem; color: var(--text-2); }
.tier-table { margin: var(--sp-2) 0; }
.table.mini td, .table.mini th { padding: 6px 10px; font-size: .86rem; }
.qty-row { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-full); overflow: hidden; }
.qty.sm .input { width: 56px; text-align: center; border: 0; }
.qty-btn { width: 34px; height: 34px; border: 0; background: var(--bg-soft); cursor: pointer; font-size: 1.1rem; }
.qty-btn:hover { background: var(--brand-100); color: var(--brand-600); }
.buy-actions { display: flex; gap: var(--sp); flex-wrap: wrap; }
.detail-total { margin: var(--sp-2) 0; font-size: 1.05rem; }
.detail-total strong { color: var(--danger); font-size: 1.4rem; }
.shop-card { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.shop-meta { color: var(--text-3); font-size: .84rem; }
.tabs { display: flex; gap: var(--sp-2); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-2); }
.tab { padding: 10px 4px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; color: var(--text-2); font-weight: 600; }
.tab.active { color: var(--brand); border-color: var(--brand); }
.tab-panel { display: none; padding: var(--sp-2) 0; }
.tab-panel.active { display: block; animation: fadeUp .3s var(--ease); }
.rich-text img { max-width: 100%; height: auto; border-radius: var(--radius); }
.review { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.review-head { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.stars { color: var(--accent); letter-spacing: 2px; }
.star { color: var(--border-strong); } .star.on { color: var(--accent); }

/* ---------------- 购物车 / 结算 ---------------- */
.cart-group { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-2); margin-bottom: var(--sp-2); }
.cart-group-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.shop-link { color: var(--text-2); font-weight: 600; }
.cart-row { display: grid; grid-template-columns: auto 76px 1fr 110px 130px 120px auto; gap: var(--sp-2); align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.cart-thumb { width: 76px; height: 76px; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name a { font-weight: 600; }
.cart-name small { display: block; }
.cart-group-foot { display: flex; justify-content: space-between; padding-top: 10px; font-size: .9rem; }
.cart-bar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-2); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.cart-bar-right { display: flex; align-items: center; gap: var(--sp-2); }
.cart-total { font-size: 1.5rem; color: var(--danger); }

.steps { display: flex; gap: var(--sp-3); list-style: none; padding: 0; margin-bottom: var(--sp-2); font-weight: 600; }
.steps .active { color: var(--brand); }
.checkout { display: grid; grid-template-columns: 1fr 340px; gap: var(--sp-2); align-items: start; }
.checkout .checkout-summary { position: sticky; top: 150px; }
.checkout-summary { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-3); }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.price-lg { font-size: 1.5rem; color: var(--danger); }
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp); }
.address-item { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.address-item:has(input:checked) { border-color: var(--brand); background: var(--brand-100); }
.address-item p { margin: 2px 0; font-size: .88rem; }
.address-new { grid-column: 1 / -1; flex-direction: column; }
.new-address { display: grid; gap: 8px; margin-top: 10px; }
.method-list, .pay-list { display: grid; gap: var(--sp); }
.pay-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.method-item, .pay-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.method-item:has(input:checked), .pay-item:has(input:checked) { border-color: var(--brand); background: var(--brand-100); }
.method-fee { margin-inline-start: auto; font-weight: 700; }
.pay-ico { font-size: 1.4rem; }
.pay-group h5 { margin: var(--sp-2) 0 8px; text-transform: uppercase; font-size: .76rem; color: var(--text-3); letter-spacing: .06em; }
.review-group { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.review-row { display: grid; grid-template-columns: 56px 1fr auto auto; gap: var(--sp); align-items: center; padding: 6px 0; }
.review-row img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-xs); }

.pay-page { max-width: 620px; }
.pay-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4); text-align: center; box-shadow: var(--shadow); }
.pay-amount { margin: var(--sp-2) 0; }
.pay-amount strong { display: block; font-size: 2.1rem; color: var(--danger); }
.pay-qr img { margin: var(--sp-2) auto; width: 240px; height: 240px; }
.pay-form > form { display: none; }
.bank-info { list-style: none; padding: 0; text-align: left; }
.bank-info li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pay-foot { display: flex; justify-content: space-between; margin-top: var(--sp-3); font-size: .88rem; color: var(--text-2); }

.result-page { max-width: 720px; }
.result-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4); text-align: center; }
.result-ico { width: 72px; height: 72px; margin: 0 auto var(--sp-2); border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff; }
.result-ico.ok { background: var(--ok); } .result-ico.pending { background: var(--accent); }
.result-amount { font-size: 1.6rem; font-weight: 700; color: var(--danger); }
.result-orders { margin: var(--sp-2) 0; }
.result-order { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.result-actions { display: flex; gap: var(--sp); justify-content: center; }

/* ---------------- 订单 ---------------- */
.page-title { margin-bottom: var(--sp-2); }
.page-title small { color: var(--text-3); font-weight: 500; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-2); }
.chip { padding: 5px 14px; border: 1px solid var(--border); border-radius: var(--radius-full); font-size: .85rem; color: var(--text-2); background: var(--bg-elev); }
.chip.active, .chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-100); }
.order-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-2); margin-bottom: var(--sp-2); }
.order-head { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.order-no { font-family: var(--font-mono); font-weight: 600; }
.order-body { display: grid; grid-template-columns: 1fr 260px; gap: var(--sp-2); padding-top: 10px; }
.order-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; }
.order-item img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-xs); }
.order-sum { border-inline-start: 1px solid var(--border); padding-inline-start: var(--sp-2); }
.order-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.order-status-line { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.order-total-box { margin-top: var(--sp-2); text-align: right; }
.order-total-box div { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: 4px 0; }
.order-total-box .grand { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; }
.order-foot { display: flex; gap: var(--sp); justify-content: flex-end; margin-top: var(--sp-2); }
.timeline { list-style: none; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.timeline li small { display: block; color: var(--text-3); font-size: .8rem; }
.mini-order, .mini-row, .mini-msg { display: flex; justify-content: space-between; align-items: center; gap: var(--sp); padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.msg-row { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.msg-row.unread { background: var(--brand-100); border-radius: var(--radius-xs); padding-inline: 10px; }
.msg-head { display: flex; justify-content: space-between; }
.empty { text-align: center; padding: var(--sp-5) 0; color: var(--text-2); }
.empty-ico { font-size: 3rem; margin-bottom: 10px; }
.cell-product { display: flex; align-items: center; gap: 10px; }
.cell-product img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-xs); }

/* ---------------- 用户中心 ---------------- */
.user-side, .panel-side { position: sticky; top: 100px; }
.user-card, .panel-shop { display: flex; gap: 12px; align-items: center; padding: var(--sp-2); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: var(--sp-2); }
.user-nav, .panel-nav { display: grid; gap: 4px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px; margin-bottom: var(--sp-2); }
.user-nav a, .panel-nav a, .panel-group a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius); color: var(--text-2); font-size: .92rem; }
.user-nav a:hover, .panel-nav a:hover, .panel-group a:hover { background: var(--bg-soft); color: var(--brand); }
.user-nav a.active, .panel-nav a.active, .panel-group a.active { background: var(--brand); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp); margin-bottom: var(--sp-2); }
.stat-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-2); display: flex; flex-direction: column; gap: 4px; }
.stat-card span { font-size: .82rem; color: var(--text-2); }
.stat-card b { font-size: 1.35rem; }
.kv-list div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.chart { display: flex; gap: 6px; align-items: flex-end; height: 200px; padding: var(--sp-2) 0; overflow-x: auto; }
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 22px; }
.chart-bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, var(--brand-500), var(--brand-100)); border-radius: 4px 4px 0 0; transition: height .6s var(--ease); }
.chart-col small { font-size: .66rem; color: var(--text-3); }

/* ---------------- 面板（商家/后台） ---------------- */
.panel-topbar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2); height: 60px; background: var(--bg-elev); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.panel-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.panel-topbar-right { display: flex; align-items: center; gap: var(--sp); }
.panel-shell { display: grid; grid-template-columns: 240px 1fr; gap: var(--sp-2); padding: var(--sp-2); align-items: start; }
.panel-main { min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-2); }
.panel-header h1 { margin: 0; font-size: 1.4rem; }
.panel-group { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px; margin-bottom: var(--sp); }
.panel-group h5 { margin: 6px 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.page-admin { --brand: #3b82f6; }
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: start; font-size: .9rem; vertical-align: middle; }
.table th { color: var(--text-2); font-weight: 600; background: var(--bg-soft); }
.table tr:hover td { background: rgba(26, 86, 219, .03); }
.inline-form { display: flex; gap: 8px; margin-bottom: var(--sp-2); }

/* ---------------- 认证 ---------------- */
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: var(--sp-5); max-width: 520px; margin-inline: auto; width: 100%; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; margin-bottom: var(--sp-3); }
.auth-title { font-size: 1.6rem; }
.auth-sub { color: var(--text-2); margin-bottom: var(--sp-3); }
.auth-switch { margin-top: var(--sp-2); font-size: .9rem; color: var(--text-2); }
.auth-switch a { color: var(--brand); font-weight: 600; }
.auth-foot { display: flex; gap: 10px; margin-top: var(--sp-3); font-size: .86rem; color: var(--text-3); }
.auth-aside { background: linear-gradient(160deg, #0b1b3f, #1a56db); color: #fff; padding: var(--sp-5); display: flex; flex-direction: column; justify-content: center; }
.auth-aside h2 { font-size: 2rem; }
.auth-feature { list-style: none; padding: 0; }
.auth-feature li { padding: 8px 0 8px 26px; position: relative; opacity: .92; }
.auth-feature li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* ---------------- 组件：提示 / 分页 / 其他 ---------------- */
.flash-wrap { padding: var(--sp-2) 0 0; }
.alert { display: flex; justify-content: space-between; align-items: center; gap: var(--sp); padding: 10px 16px; border-radius: var(--radius); margin-bottom: 10px; background: var(--bg-soft); border: 1px solid var(--border); }
.alert-success { background: rgba(22, 163, 74, .1); border-color: rgba(22, 163, 74, .3); color: var(--ok); }
.alert-error { background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .3); color: var(--danger); }
.alert-close { background: none; border: 0; font-size: 1.2rem; cursor: pointer; line-height: 1; }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: var(--sp-2) 0; flex-wrap: wrap; }
.page-link { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-2); font-size: .88rem; }
.page-link.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-link.disabled { opacity: .5; pointer-events: none; }
.page-total { margin-inline-start: var(--sp); font-size: .84rem; color: var(--text-3); }
.toast-stack { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 200; display: grid; gap: 8px; }
.toast { padding: 12px 18px; border-radius: var(--radius); background: rgba(15, 23, 42, .92); color: #fff; box-shadow: var(--shadow-lg); animation: slideIn .3s var(--ease); }
.error-page { text-align: center; padding: var(--sp-5) 0; }
.error-code { font-size: 5rem; font-weight: 800; color: var(--brand); line-height: 1; }
.error-actions { display: flex; gap: var(--sp); justify-content: center; margin-top: var(--sp-2); }
.pending-card { text-align: center; }
.pending-ico { font-size: 3rem; }
.pending-info { list-style: none; padding: 0; max-width: 420px; margin: var(--sp-2) auto; text-align: start; }
.pending-info li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.apply-steps { display: flex; gap: var(--sp-3); list-style: none; padding: 0; }
.apply-steps li { display: flex; align-items: center; gap: 8px; }
.apply-steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; }
.tier-editor { display: grid; gap: 8px; margin-bottom: 8px; }
.tier-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.trans-list { max-height: 620px; overflow-y: auto; }
.trans-row { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; }
.trans-key { font-size: .78rem; color: var(--text-3); font-family: var(--font-mono); }
.thumb-preview { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius); margin-top: 8px; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-2); }
.shop-hero { background: linear-gradient(120deg, #0b1b3f, #1a56db); color: #fff; padding: var(--sp-4) 0; }
.shop-hero-inner { display: flex; gap: var(--sp-3); align-items: center; }
.shop-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.rich-page { max-width: 900px; }
.detail-head { display: flex; justify-content: space-between; align-items: center; }

/* ---------------- 底部 ---------------- */
.footer { background: var(--bg-elev); border-top: 1px solid var(--border); margin-top: var(--sp-5); padding-top: var(--sp-4); }
.footer-inner { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-3); padding-bottom: var(--sp-3); }
.footer-col h4 { margin-bottom: 10px; font-size: .95rem; }
.footer-col a { display: block; color: var(--text-2); font-size: .88rem; padding: 3px 0; }
.footer-col a:hover { color: var(--brand); }
.footer-desc { color: var(--text-2); font-size: .88rem; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-soft); }
.footer-select { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow: auto; }
.footer-select a { font-size: .82rem; }
.footer-bottom { border-top: 1px solid var(--border); padding: var(--sp-2) 0; font-size: .84rem; color: var(--text-3); }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp); }
.footer-links a { margin-inline-start: var(--sp); }

/* ---------------- 6. 响应式 & 动效 ---------------- */
@media (max-width: 1200px) {
  .hero-inner { grid-template-columns: 1fr; }
  .orbit { display: none; }
  .two-col, .checkout { grid-template-columns: 1fr; }
  .checkout .checkout-summary { position: static; }
  .page-layout { grid-template-columns: 200px 1fr; }
}
@media (max-width: 992px) {
  .detail { grid-template-columns: 1fr; }
  .order-body { grid-template-columns: 1fr; }
  .order-sum { border: 0; border-top: 1px solid var(--border); padding: 10px 0 0; }
  .panel-shell, .user-layout { grid-template-columns: 1fr; }
  .user-side, .panel-side { position: static; }
  .user-nav, .panel-nav { grid-auto-flow: column; overflow-x: auto; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .page-layout { grid-template-columns: 1fr; }
  .filters { position: static !important; }
  .cart-row { grid-template-columns: auto 60px 1fr; row-gap: 8px; }
  .cart-price, .cart-subtotal, .cart-row .btn { grid-column: span 1; }
  .cart-bar { flex-direction: column; align-items: stretch; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-points { gap: var(--sp-2); }
  .action-text { display: none; }
  .switcher-text { display: none; }
  .topbar-left { display: none; }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes shimmer { 100% { background-position: 200% 0; } }

.fade-up { animation: fadeUp .5s var(--ease) both; }
.skeleton { background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 37%, var(--bg-soft) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--radius); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
