/* 重置与通用基础样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: #26282D;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
input, textarea, select { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
s { text-decoration: line-through; }
[hidden] { display: none !important; }

/* 图标 */
.ic {
  width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.ic-fill { fill: currentColor; stroke: none; }

/* 文本 */
.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ellipsis-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.muted { color: var(--text-3); }
.small { font-size: 12px; }

/* 价格：¥ 小于数字 */
.price {
  display: inline-flex; align-items: baseline; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap;
}
.price i { font-style: normal; font-size: .62em; font-weight: 700; margin-right: 1px; }
.price small { font-size: .7em; font-weight: 700; }
.price.dark { color: var(--text); }
.price.md { font-size: 18px; }
.price.lg { font-size: 24px; }
.price.xl { font-size: 36px; }

/* 页面骨架 */
.page { height: 100%; display: flex; flex-direction: column; position: relative; background: var(--bg); }
.page-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.page-foot {
  flex: none; background: #fff; border-top: 1px solid var(--divider);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; z-index: 5;
}
.bottom-space { height: 24px; }

/* 自定义导航栏 */
.nav {
  height: 44px; flex: none; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; background: #fff; position: sticky; top: 0; z-index: 10;
}
.nav-title { font-size: 17px; font-weight: 600; white-space: nowrap; }
.nav-center { position: absolute; left: 50%; transform: translateX(-50%); }
.nav-back {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; margin-left: -6px;
}
.nav-back .ic { width: 22px; height: 22px; }
.nav-right { min-width: 32px; display: flex; align-items: center; }
body[data-mode="wechat"] .nav { padding-right: 104px; }
body[data-mode="android"] .nav-back { display: none; }
/* 沉浸式头部（订单详情 / 支付结果 / 秒杀）为悬浮返回按钮让位 */
body:not([data-mode="android"]) .order-status, body:not([data-mode="android"]) .seckill-hd { padding-left: 52px; }
body:not([data-mode="android"]) .pay-result-hd { padding-left: 52px; padding-right: 52px; }

/* 横向滚动 */
.scroll-x {
  display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.scroll-x::-webkit-scrollbar { display: none; }
