/* ============================================================
   星闪商城 — 暖米白 × 石墨 × 品牌金 · mobile-first
   ============================================================ */
:root {
  --gold: #f5b301;
  --gold-deep: #d89a00;
  --navy-950: #080809;
  --navy-900: #101012;
  --navy-700: #212126;
  --ink: #20242b;
  --muted: #62626b;
  --bg: #f7f6f2;
  --bg-soft: #efede6;
  --card: #ffffff;
  --line: #e4e1d8;
  --white: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;
  --shadow-1: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.1);
  --nav-h: 60px;
  --tabbar-h: 58px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 15px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- 导航 ---------- */
.mall-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 14px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 96px; height: auto; max-height: 26px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 17px; letter-spacing: 0.5px; }
.brand-text span { font-size: 8px; letter-spacing: 0.08em; opacity: 0.65; white-space: nowrap; }
.nav-links { display: none; align-items: center; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--muted); padding: 6px 0; }
.nav-links a.active, .nav-links a:hover { color: var(--navy-900); font-weight: 600; }
.lang-toggle {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: var(--shadow-1);
  margin-left: auto;
}
.nav-cart { position: relative; display: grid; place-items: center; width: 36px; height: 36px; font-size: 19px; }
.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cart-badge[hidden] { display: none; }
.burger { display: grid; place-items: center; width: 36px; height: 36px; }
.burger span, .burger span::before, .burger span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  position: relative;
}
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }
.drawer-open .mall-tabbar { display: none; }
.drawer-open .nav-links {
  display: flex;
  position: fixed;
  inset: var(--nav-h) 0 auto;
  flex-direction: column;
  gap: 0;
  background: #fff;
  padding: 12px 20px 18px;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.drawer-open .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--bg-soft); font-size: 16px; }

.mall-tabbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.mall-tabbar a {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 180ms ease;
}
.mall-tabbar a.active { color: #916400; font-weight: 600; }
.tab-ico { position: relative; display: grid; place-items: center; width: 44px; height: 29px; border-radius: 12px; transition: background-color 180ms ease, transform 180ms ease; }
.tab-ico svg { display: block; flex: none; }
.tab-fill { fill: currentColor; fill-opacity: 0; transition: fill-opacity 180ms ease; }
.mall-tabbar a.active .tab-ico { background: #fff2cd; }
.mall-tabbar a.active .tab-fill { fill-opacity: 0.16; }
.mall-tabbar a.active .tab-spark { fill: var(--gold); stroke: #916400; }
.mall-tabbar a:active .tab-ico { transform: scale(0.92); }
.mall-tabbar a:focus-visible { outline: 2px solid #916400; outline-offset: -3px; border-radius: 8px; }
.mall-tabbar .cart-badge { top: -2px; left: 28px; right: auto; min-width: 16px; height: 16px; padding: 0 4px; border: 1.5px solid var(--card); border-radius: 8px; background: var(--gold); color: #493200; font-size: 9px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgba(145, 100, 0, 0.12); }
@media (prefers-reduced-motion: reduce) {
  .mall-tabbar a, .tab-ico, .tab-fill { transition: none; }
  .mall-tabbar a:active .tab-ico { transform: none; }
}

/* ---------- 通用组件 ---------- */
main { display: block; padding-top: var(--nav-h); padding-bottom: calc(var(--tabbar-h) + 16px); }
.section { padding: 26px 0; }
.section--soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title-wrap { display: flex; align-items: center; gap: 8px; }
.section-accent { width: 4px; height: 16px; border-radius: 2px; background: var(--gold); }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: 0.3px; }
.section-more { font-size: 12px; color: var(--muted); white-space: nowrap; }
.eyebrow { display: block; font-size: 10px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold); color: var(--navy-900); box-shadow: 0 6px 16px rgba(245, 179, 1, 0.3); }
.btn-ghost { border: 1px solid var(--line); background: var(--card); color: var(--navy-900); }
.btn-block { width: 100%; }

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-950);
  color: #fff;
}
.hero-swiper { position: relative; height: 340px; }
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px 22px 30px;
  background: linear-gradient(160deg, #1d1d22, #080809);
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide::before { content: none; }
.hero-eyebrow { position: relative; font-size: 10px; letter-spacing: 0.2em; color: #f5d382; margin-bottom: 12px; text-shadow: 0 1px 6px rgba(0,0,0,0.35); }
.hero-title { position: relative; font-size: 30px; line-height: 1.35; font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.hero-sub { position: relative; margin-top: 10px; font-size: 12px; color: #f0f0f3; letter-spacing: 0.4px; text-shadow: 0 1px 6px rgba(0,0,0,0.35); }
.hero-cta { position: relative; margin-top: 18px; align-self: flex-start; }
.hero-indicators { position: absolute; right: 22px; bottom: 14px; display: flex; gap: 6px; }
.hero-indicator { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); transition: all 0.3s; }
.hero-indicator.active { width: 18px; border-radius: 3px; background: var(--gold); }

.search-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 20px 0;
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
}
.search-panel .search-icon { color: var(--muted); font-size: 18px; }
.search-panel .search-text { flex: 1; font-size: 13px; color: #8a8f99; }
.search-panel .search-action { color: var(--gold-deep); font-weight: 700; font-size: 13px; }

.entries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.entry {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  text-align: center;
}
.entry-icon { width: 100%; max-width: 56px; aspect-ratio: 1; flex-shrink: 0; display: grid; place-items: center; border-radius: 16px; background: #fbf5e8; }
.entry-icon img { display: block; width: 100%; height: auto; object-fit: contain; }
.entry-name { font-size: 12px; color: var(--ink); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.product-card:hover { box-shadow: var(--shadow-2); border-color: #d5c58a; }
.product-media { position: relative; display: block; aspect-ratio: 1; background: #f2f2f3; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(8, 8, 9, 0.72);
  color: #f5d382;
  font-size: 10px;
  font-weight: 600;
}
.sold-overlay {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(8, 8, 9, 0.68);
  color: #fff;
  font-size: 10px;
}
.product-body { padding: 10px 12px 12px; }
.product-name { display: block; font-size: 14px; font-weight: 600; line-height: 1.45; min-height: 40px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 0 4px; margin-top: 8px; min-height: 44px; }
.price-main { grid-column: 1; grid-row: 1; display: flex; align-items: baseline; color: #c43d2b; white-space: nowrap; }
.price-sym { font-size: 12px; font-weight: 700; }
.price { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.original { grid-column: 1; grid-row: 2; font-size: 11px; color: #9aa0aa; text-decoration: line-through; }
.cart-add {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 3;
  margin-left: auto;
  width: 36px;
  min-width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-900);
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(245, 179, 1, 0.35);
  transition: transform 0.2s var(--ease);
}
.cart-add svg { display: block; width: 21px; height: 21px; }
.cart-add::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.cart-add:focus-visible { outline: 2px solid #916400; outline-offset: 3px; }
.cart-add:active { transform: scale(0.9); }
@media (max-width: 360px) {
  .product-body { padding-left: 10px; padding-right: 10px; }
  .price { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cart-add { transition: none; }
  .cart-add:active { transform: none; }
}

.empty { padding: 56px 24px; text-align: center; }
.empty-artwork { font-size: 54px; margin-bottom: 14px; }
.empty-text { font-size: 17px; font-weight: 700; }
.empty-hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
.empty-btn { margin-top: 18px; }

/* ---------- 商品详情 ---------- */
.goods-hero { position: relative; background: #f2f2f3; }
.goods-hero img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.goods-back {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 8, 9, 0.5);
  color: #fff;
  font-size: 22px;
}
.price-card { margin: -26px 16px 0; position: relative; padding: 18px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-1); }
.price-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price-left { display: flex; align-items: baseline; color: #c43d2b; }
.price-left .price { font-size: 30px; }
.saving-badge { display: flex; align-items: baseline; gap: 5px; padding: 4px 9px; border-radius: 8px; background: #fdf3d0; color: #8a6210; font-size: 11px; font-weight: 700; }
.price-meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.goods-name { margin-top: 10px; font-size: 19px; font-weight: 700; line-height: 1.5; }
.goods-desc { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { padding: 4px 9px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); font-size: 11px; }
.detail-card { margin: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.detail-rich { margin-top: 12px; font-size: 14px; line-height: 1.85; color: #45454d; }
.detail-gallery { display: grid; gap: 10px; margin-top: 14px; }
.detail-gallery img { width: 100%; border-radius: 10px; }
.param-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.param-table th, .param-table td { padding: 9px 10px; border-bottom: 1px solid var(--bg-soft); text-align: left; }
.param-table th { color: var(--muted); font-weight: 500; background: var(--bg-soft); }
.bottom-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
body[data-page="cart"] .bottom-bar,
body[data-page="goods"] .bottom-bar {
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.icon-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 52px; font-size: 10px; color: var(--muted); }
.icon-btn .icon { font-size: 21px; }
body[data-page="goods"] .icon-btn { min-width: 44px; min-height: 44px; gap: 3px; color: #66563b; }
body[data-page="goods"] .icon-btn .icon { display: grid; place-items: center; width: 32px; height: 28px; border-radius: 9px; background: #fbf3df; }
body[data-page="goods"] .icon-btn svg { display: block; width: 22px; height: 22px; }
body[data-page="goods"] .goods-back { display: grid; place-items: center; width: 44px; height: 44px; color: var(--white); }
body[data-page="goods"] .goods-back svg { display: block; width: 22px; height: 22px; }
body[data-page="goods"] .icon-btn:focus-visible,
body[data-page="goods"] .goods-back:focus-visible { outline: 2px solid #916400; outline-offset: 2px; }
body[data-page="goods"] .empty-artwork img { margin: 0 auto; }
.action-group { display: flex; flex: 1; gap: 10px; }
.action-btn { flex: 1; display: grid; place-items: center; border-radius: 12px; font-size: 15px; font-weight: 700; padding: 12px 8px; }
.action-btn--outline { border: 1px solid var(--gold); color: var(--gold-deep); background: #fff; }
.action-btn--gold { background: var(--gold); color: var(--navy-900); }

/* ---------- 购物车 ---------- */
.cart-banner {
  margin: 16px 16px 0;
  padding: 20px 18px;
  border-radius: var(--radius-m);
  background: linear-gradient(130deg, #17171a, #080809);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
}
.cart-banner .banner-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: rgba(245, 179, 1, 0.18); color: var(--gold); font-size: 22px; }
.cart-banner .banner-title { font-size: 19px; font-weight: 700; }
.cart-banner .banner-sub { margin-top: 3px; font-size: 12px; color: #c9c9cf; }
.cart-item { padding: 14px 0; border-bottom: 1px solid var(--bg-soft); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-top { display: flex; gap: 12px; }
.cart-thumb { flex: 0 0 86px; height: 86px; border-radius: 12px; overflow: hidden; background: #f2f2f3; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-name { font-size: 14px; font-weight: 600; line-height: 1.5; }
.cart-item-tags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.cart-item-tag { font-size: 10px; color: var(--muted); background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; }
.cart-item-price { margin-top: 8px; color: #c43d2b; font-weight: 800; font-size: 17px; }
.cart-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 32px; height: 30px; font-size: 17px; background: var(--bg-soft); }
.stepper input { width: 40px; height: 30px; border: 0; text-align: center; font-size: 13px; background: #fff; outline: none; }
.item-subtotal { font-size: 12px; color: var(--muted); }
.item-subtotal strong { display: block; color: var(--ink); font-size: 15px; }
.item-remove { color: #9aa0aa; font-size: 18px; padding: 6px; }
.summary { display: flex; flex-direction: column; justify-content: center; font-size: 11px; color: var(--muted); }
.total-row { display: flex; align-items: baseline; gap: 4px; color: #c43d2b; }
.total-label { font-size: 11px; color: var(--muted); }
.total-sym { font-size: 13px; font-weight: 700; }
.total-val { font-size: 24px; font-weight: 800; }
body[data-page="cart"] .empty-artwork { width: 200px; max-width: 100%; margin: 0 auto 24px; }
body[data-page="cart"] .empty-artwork img { width: 100%; height: auto; }
body[data-page="cart"] .banner-icon { flex-shrink: 0; border: 1px solid rgba(245, 179, 1, 0.25); }
body[data-page="cart"] .banner-icon svg { display: block; width: 26px; height: 26px; }
body[data-page="cart"] .banner-icon .tab-fill { fill-opacity: 0.14; }
body[data-page="cart"] .stepper button { display: grid; place-items: center; flex-shrink: 0; }
body[data-page="cart"] .stepper button svg { width: 14px; height: 14px; }
body[data-page="cart"] [data-remove] { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border-radius: 12px; color: #776b57; background: #fbf5e8; }
body[data-page="cart"] [data-remove] svg { width: 20px; height: 20px; }
body[data-page="cart"] [data-remove]:active { background: #f3e5c5; }
body[data-page="cart"] [data-remove]:focus-visible { outline: 2px solid #916400; outline-offset: 2px; }

/* ---------- 我的 ---------- */
.me-header {
  position: relative;
  padding: 24px 20px 26px;
  background: linear-gradient(140deg, #1d1d22, #080809);
  color: #fff;
  overflow: hidden;
}
.me-header::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 90% 10%, rgba(245, 179, 1, 0.22), transparent 60%); }
.user-row { position: relative; display: flex; align-items: center; gap: 14px; }
.avatar { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.12); font-size: 26px; }
.user-name { font-size: 20px; font-weight: 700; }
.user-sub { margin-top: 4px; font-size: 11px; color: #c9c9cf; }
.login-btn { margin-left: auto; padding: 7px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.4); font-size: 12px; }
.contact-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 16px 0;
  padding: 13px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  font-size: 13px;
}
.contact-strip .contact-strip-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-strip-action { color: var(--gold-deep); font-size: 12px; white-space: nowrap; }
.stats-card { margin: 14px 16px 0; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.stats-header { display: flex; align-items: baseline; justify-content: space-between; }
.stats-title { font-size: 16px; font-weight: 700; }
.stats-hint { font-size: 11px; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: center; margin-top: 14px; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 26px; font-weight: 800; color: var(--gold-deep); }
.stat-label { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.stat-divider { width: 1px; height: 28px; background: var(--line); }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); font-size: 12px; }
.quick-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; font-size: 22px; }
.quickIconCart { background: #fdf3d0; }
.quickIconShop { background: #e8eef7; }
.quickIconContact { background: #e8f3ec; }
.menu-card { margin: 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.menu { display: flex; align-items: center; gap: 12px; padding: 15px 14px; border-bottom: 1px solid var(--bg-soft); }
.menu:last-child { border-bottom: 0; }
.menu-icon-wrap { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-soft); font-size: 18px; }
.menu-name { font-size: 14px; font-weight: 600; }
.menu-desc { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.menu-arrow { margin-left: auto; color: #b6bdc7; font-size: 20px; }
.menu-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
/* 个人中心与底部导航共用同一套圆角 SVG 图标。 */
.nav-cart-icon { display: grid; place-items: center; }
body[data-page="me"] [data-me-icon] { flex-shrink: 0; }
body[data-page="me"] [data-me-icon] svg { display: block; }
body[data-page="me"] .avatar { color: #f5cf75; border: 1px solid rgba(245, 207, 117, 0.35); background: rgba(245, 179, 1, 0.1); }
body[data-page="me"] .avatar svg { width: 32px; height: 32px; }
body[data-page="me"] .avatar .tab-fill { fill-opacity: 0.12; }
body[data-page="me"] .quick-icon { color: #916400; background: #fff2cd; }
body[data-page="me"] .quick-icon svg { width: 26px; height: 26px; }
body[data-page="me"] .quick-icon .tab-fill,
body[data-page="me"] .menu-icon-wrap .tab-fill { fill-opacity: 0.12; }
body[data-page="me"] .quick-icon .tab-spark { fill: var(--gold); }
body[data-page="me"] .menu-icon-wrap { color: #916400; background: #fbf3df; }
body[data-page="me"] .menu-icon-wrap svg { width: 21px; height: 21px; }
body[data-page="me"] .contact-strip-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #916400; background: #fff2cd; }
body[data-page="me"] .contact-strip-icon svg { width: 18px; height: 18px; }
body[data-page="me"] .contact-strip-action { display: inline-flex; align-items: center; gap: 3px; color: #916400; }
body[data-page="me"] .inline-chevron { display: inline-flex; vertical-align: -2px; }
body[data-page="me"] .inline-chevron svg { width: 12px; height: 12px; }
body[data-page="me"] .menu-arrow svg { width: 16px; height: 16px; }
body[data-page="me"] button.menu { width: 100%; }
.wip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* ---------- 订单列表与详情 ---------- */
.order-header { padding: 18px 20px 0; }
.order-header-val { font-size: 22px; font-weight: 800; }
.tabs { display: flex; gap: 8px; padding: 12px 16px 0; overflow-x: auto; }
.tab { flex: none; padding: 7px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.tab.active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.order-card { margin: 14px 16px 0; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.order-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-no { font-size: 13px; font-weight: 700; letter-spacing: 0.2px; }
.order-source { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.order-status { flex: none; padding: 4px 9px; border-radius: 999px; font-size: 10px; border: 1px solid #f1dfbc; background: #fbf5e9; color: #8a6429; }
.order-status.confirmed { color: #0284c7; background: #e0f2fe; border-color: #bae6fd; }
.order-status.ended { color: #6b7280; background: #f3f4f6; border-color: #e5e7eb; }
.order-card-body { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 12px; }
.card-label { display: block; color: var(--muted); font-size: 11px; }
.card-val { display: block; margin-top: 3px; font-weight: 600; }
.card-amt { color: #c43d2b; font-size: 17px; font-weight: 800; }
.order-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--bg-soft); font-size: 11px; color: var(--muted); }
.card-arrow { color: var(--gold-deep); font-weight: 600; }
.list-foot { padding: 18px; text-align: center; font-size: 12px; color: var(--muted); }
.error-state { padding: 14px; }
.error-title { display: block; font-weight: 700; margin-bottom: 6px; }
.retry-btn { margin-top: 10px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 12px; }

.head-card { margin: 14px 16px 0; padding: 18px 16px; border-radius: var(--radius-m); background: linear-gradient(135deg, #1d1d22, #080809); color: #fff; }
.head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-eyebrow { font-size: 10px; color: #c9c9cf; letter-spacing: 0.1em; }
.head-order-no { margin-top: 6px; font-size: 17px; font-weight: 700; }
.head-order-time { margin-top: 6px; font-size: 11px; color: #c9c9cf; }
.amount-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.amount-label { font-size: 11px; color: #c9c9cf; }
.amount-value { display: block; margin-top: 4px; font-size: 26px; font-weight: 800; color: var(--gold); }
.summary-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.14); display: flex; justify-content: space-between; align-items: baseline; }
.summary-num { font-size: 18px; font-weight: 700; }
.sales-card { display: flex; align-items: center; gap: 12px; margin: 14px 16px 0; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.sales-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-900); color: var(--gold); font-size: 20px; font-weight: 700; }
.sales-name { font-size: 15px; font-weight: 700; }
.sales-role { margin-left: 8px; padding: 2px 7px; border-radius: 5px; background: var(--bg-soft); color: var(--muted); font-size: 10px; font-weight: 400; }
.sales-phone { margin-top: 3px; font-size: 12px; color: var(--muted); }
.sales-action { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 999px; background: var(--gold); color: var(--navy-900); font-size: 12px; font-weight: 700; }
.item-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bg-soft); }
.item-row:last-child { border-bottom: 0; }
.item-thumb { flex: 0 0 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #f2f2f3; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-name { font-size: 13px; font-weight: 600; line-height: 1.45; }
.item-code { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.item-bottom { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px; }
.item-price { font-size: 12px; color: var(--muted); }
.item-qty { font-size: 12px; color: var(--muted); }
.item-subtotal { font-size: 14px; font-weight: 700; color: #c43d2b; }
.remark-text { margin-top: 10px; font-size: 13px; color: #45454d; line-height: 1.75; }
.timeline { display: flex; gap: 12px; padding: 12px 0; }
.timeline-dot-col { display: flex; flex-direction: column; align-items: center; padding-top: 5px; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.timeline-dot-first { background: var(--gold); }
.timeline-line { width: 1px; flex: 1; margin-top: 4px; background: var(--line); }
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.timeline-tag { font-size: 13px; font-weight: 700; }
.timeline-time { font-size: 11px; color: var(--muted); }
.timeline-content { margin-top: 4px; font-size: 12px; color: var(--muted); }

/* ---------- 登录 ---------- */
.login-shell { padding: 24px 18px; }
.login-hero { padding: 8px 4px 20px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--navy-900); color: var(--gold); font-size: 22px; font-weight: 800; }
.brand-name { display: block; font-size: 17px; font-weight: 800; }
.brand-slogan { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.login-eyebrow { display: block; margin-top: 18px; font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }
.login-title { display: block; margin-top: 6px; font-size: 26px; font-weight: 800; }
.login-subtitle { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.login-card { padding: 20px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.card-title { font-size: 17px; font-weight: 700; }
.card-hint { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.field-group { margin-top: 18px; }
.field-label { display: block; margin-bottom: 7px; font-size: 12px; color: var(--muted); }
.input-row { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.input-row:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 179, 1, 0.16); }
.field-icon { color: var(--muted); font-size: 16px; }
.country-code { font-size: 13px; color: var(--muted); }
.divider { width: 1px; height: 18px; background: var(--line); }
.input-row input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 14px; background: transparent; }
.code-button { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--navy-900); color: #fff; font-size: 11px; font-weight: 600; }
.code-button:disabled { opacity: 0.5; }
.error { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fdeceb; color: #b42318; font-size: 12px; }
.error-dot { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #b42318; color: #fff; font-size: 10px; font-weight: 800; }
.agreement { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 11px; color: var(--muted); }
.agreement-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; line-height: 1.6; }
.agreement-link { color: var(--gold-deep); }
.submit-btn { width: 100%; margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--gold); color: var(--navy-900); font-size: 16px; font-weight: 800; box-shadow: 0 8px 18px rgba(245, 179, 1, 0.3); }
.cancel-btn { width: 100%; margin-top: 10px; padding: 11px; font-size: 12px; color: var(--muted); }
.security-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 10px; color: var(--muted); }
.legal-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(8, 8, 9, 0.6); backdrop-filter: blur(4px); }
.legal-overlay[hidden] { display: none; }
.legal-modal { width: min(100%, 520px); max-height: 80vh; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-l); overflow: hidden; }
.legal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.legal-title { font-size: 16px; font-weight: 700; }
.legal-close { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-soft); font-size: 18px; }
.legal-body { padding: 16px; overflow-y: auto; }
.legal-paragraph { display: flex; gap: 8px; margin-bottom: 12px; font-size: 13px; line-height: 1.8; color: #45454d; }
.legal-paragraph-index { color: var(--gold-deep); font-weight: 700; }
.legal-confirm { margin: 12px 16px 16px; padding: 12px; border-radius: 12px; background: var(--gold); color: var(--navy-900); font-weight: 700; }

/* ---------- Toast / Lightbox / 动效 ---------- */
.mall-toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  max-width: 80vw;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(8, 8, 9, 0.88);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-2);
  animation: toast-in 0.25s var(--ease);
}
.mall-toast.is-out { opacity: 0; transition: opacity 0.35s; }
.mall-lightbox { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 24px; background: rgba(3, 3, 4, 0.9); }
.mall-lightbox img { max-width: 100%; max-height: 80vh; border-radius: 10px; }
.lightbox-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #55555e; background: #1a1a1e; color: #fff; font-size: 19px; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-inview { opacity: 1; transform: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 响应式 ---------- */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .burger, .mall-tabbar { display: none; }
  main { padding-bottom: 40px; }
  .hero-swiper { height: 420px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .entries { grid-template-columns: repeat(4, 1fr); }
  body[data-page="cart"] .bottom-bar, body[data-page="goods"] .bottom-bar { bottom: 0; }
}
@media (min-width: 1025px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 350px) {
  .brand-text b { font-size: 15px; }
  .brand-text span { font-size: 7px; }
  .grid { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 分类页：左侧竖排分类栏 */
.catalog-body { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.catalog-sider { flex: 0 0 96px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--nav-h) + 12px); }
.sider-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 10px 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sider-item .sider-name { font-weight: 600; line-height: 1.45; }
.sider-item .sider-count { font-size: 10px; color: #9aa0aa; }
.sider-item.active {
  background: var(--card);
  border-color: #ecd98a;
  color: var(--navy-900);
  box-shadow: var(--shadow-1);
  position: relative;
}
.sider-item.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--gold);
}
.sider-item.active .sider-count { color: var(--gold-deep); }
.catalog-main { flex: 1; min-width: 0; }
@media (max-width: 350px) {
  .catalog-sider { flex-basis: 86px; }
  .sider-item { font-size: 11px; padding-left: 10px; }
}

/* 分类抽屉 */
.catalog-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-1);
}
.drawer-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(8, 8, 9, 0.42); backdrop-filter: blur(2px); }
.catalog-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  width: min(78vw, 300px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: calc(14px + env(safe-area-inset-top)) 14px 20px;
  background: var(--bg);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.16);
  transform: translateX(-105%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.drawer-open-catalog .catalog-drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 10px; }
.drawer-head strong { font-size: 16px; }
.drawer-head button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.catalog-drawer .sider-item { background: var(--card); border: 1px solid var(--line); padding: 12px; }
.catalog-drawer .sider-item.active { border-color: #ecd98a; }

/* 搜索与分类同一行 */
.catalog-tools { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.catalog-tools .search-panel { flex: 1; min-width: 0; margin: 0; padding: 8px 12px; }
.catalog-tools .search-panel .search-text { font-size: 12px; }
.catalog-tools .search-panel .search-icon { font-size: 16px; }
.catalog-tools .catalog-toggle { flex: none; margin-top: 0; white-space: nowrap; }
@media (max-width: 350px) {
  .catalog-tools { gap: 8px; }
  .catalog-tools .search-panel { padding: 7px 10px; }
  .catalog-tools .catalog-toggle { padding: 8px 10px; font-size: 11px; }
}

/* 分类抽屉：行式分类项 */
.catalog-drawer .sider-item { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 12px; }
.catalog-drawer .sider-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-soft); font-size: 18px; }
.catalog-drawer .sider-name { flex: 1; min-width: 0; font-size: 13px; }
.catalog-drawer .sider-count { flex: none; font-size: 10px; color: #9aa0aa; }
.catalog-drawer .sider-arrow { flex: none; color: #b6bdc7; font-size: 16px; line-height: 1; }
.catalog-drawer .sider-item.active .sider-ico { background: #fdf3d0; }
.catalog-drawer .sider-item.active .sider-arrow { color: var(--gold-deep); }
