/* ==========================================================
   成旭优选 · H5 前台样式
   ========================================================== */
:root {
  --bg: #f6f4f1;
  --card: #ffffff;
  --ink: #17171a;
  --ink-2: #5f5b55;
  --ink-3: #9a948c;
  --line: #ece8e2;
  --brand: #17171a;
  --accent: #d6452b;
  --accent-soft: #fdeeea;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(23, 23, 26, .06);
  --tabbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
svg { width: 22px; height: 22px; display: block; }

.page { padding: 0 14px; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 999; max-width: 88vw; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; color: #fff; background: rgba(23, 23, 26, .9);
  box-shadow: var(--shadow); animation: toastIn .25s ease;
}
.toast-success { background: #1f8a5b; }
.toast-error { background: #c0392b; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ---------- 顶部搜索 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: 12px 14px 10px;
  background: rgba(246, 244, 241, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.searchbar {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-3); font-size: 13px;
}
.searchbar svg { width: 18px; height: 18px; }
.searchbar input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-size: 13px;
}
.searchbar input::placeholder { color: var(--ink-3); }

/* ---------- 轮播 ---------- */
.banner-wrap { padding: 2px 14px 0; }
.banner-scroll {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; border-radius: var(--radius);
}
.banner-scroll::-webkit-scrollbar { display: none; }
.banner-slide {
  flex: 0 0 100%; scroll-snap-align: center;
  border-radius: var(--radius); overflow: hidden; position: relative;
  aspect-ratio: 16 / 9; background: #ddd;
}
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-copy {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 22px; color: #fff;
  background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 48%, rgba(0,0,0,0) 80%);
}
.banner-copy .en { font-size: 9px; letter-spacing: 3px; opacity: .72; }
.banner-copy h3 { margin: 7px 0 5px; font-size: 25px; font-weight: 800; letter-spacing: .5px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.banner-copy p { margin: 0; font-size: 12px; opacity: .92; }
.banner-copy .badge {
  position: absolute; top: 14px; right: 14px; background: #ffd166; color: #5a3d00;
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.banner-copy .go {
  margin-top: 14px; align-self: flex-start; background: #fff; color: #17171a;
  font-size: 11px; font-weight: 700; padding: 7px 16px; border-radius: 999px;
}
.banner-dots { display: flex; gap: 5px; justify-content: center; padding: 10px 0 2px; }
.banner-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: #d3cec7; transition: .2s;
}
.banner-dots i.on { width: 16px; border-radius: 3px; background: var(--ink); }

/* ---------- 公告 ---------- */
.notice {
  margin: 10px 14px 0; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 12px; background: #fff;
  font-size: 12px; color: var(--ink-2); border: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
}
.notice b {
  flex: none; font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 2px 7px; border-radius: 6px;
}
.notice span { overflow: hidden; text-overflow: ellipsis; }

/* ---------- 分类金刚区 ---------- */
.cats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  margin: 14px 14px 0; padding: 16px 8px 14px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cat-item .ico {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #f3efe9; font-size: 20px; color: var(--ink);
}
.cat-item .ico img { width: 26px; height: 26px; object-fit: contain; }
.cat-item span { font-size: 12px; color: var(--ink-2); }

/* ---------- 双栏活动 ---------- */
.promo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 14px 0; }
.promo-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1 / .72; background: #eee;
}
.promo-card img { width: 100%; height: 100%; object-fit: cover; }
.promo-card .cap {
  position: absolute; inset: auto 0 0 0; padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.45)); color: #fff;
  font-size: 13px; font-weight: 600;
}

/* ---------- 区块标题 ---------- */
.section { margin-top: 22px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 14px 10px;
}
.section-head h2 { margin: 0; font-size: 17px; letter-spacing: .3px; }
.section-head h2 small { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 6px; letter-spacing: 0; }
.section-head a { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 1px; }
.section-head a svg { width: 15px; height: 15px; }

/* ---------- 商品卡 ---------- */
.prod-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px;
}
.prod-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(23,23,26,.04);
}
.prod-card .thumb {
  position: relative; aspect-ratio: 1 / 1; background: #ece7e0; overflow: hidden;
}
.prod-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prod-card:active .thumb img { transform: scale(1.03); }
.prod-card .tag {
  position: absolute; top: 8px; left: 8px; padding: 2px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 600; color: #fff; background: var(--accent);
}
.prod-card .body { padding: 9px 10px 12px; }
.prod-card .name {
  font-size: 13px; line-height: 1.4; height: 2.8em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.prod-card .price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.prod-card .price { color: var(--accent); font-weight: 700; font-size: 15px; white-space: nowrap; }
.prod-card .mprice { color: var(--ink-3); font-size: 11px; text-decoration: line-through; white-space: nowrap; }
.prod-card .sales { color: var(--ink-3); font-size: 11px; margin-left: auto; white-space: nowrap; }

/* 横滑商品 */
.hscroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 0 14px 4px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .prod-card { flex: 0 0 148px; scroll-snap-align: start; }
.hscroll .prod-card .sales { display: none; }

/* ---------- 底部 tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.94); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; color: var(--ink-3);
}
.tabbar-item svg { width: 23px; height: 23px; }
.tabbar-item.active { color: var(--ink); }
.tabbar-item.active svg { stroke-width: 1.9; }
.tabbar-icon { position: relative; }
.badge {
  position: absolute; top: -4px; right: -9px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 16px; text-align: center;
}

/* ---------- 内页顶栏 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  gap: 10px; height: 50px; padding: 0 12px;
  background: rgba(246,244,241,.94); backdrop-filter: blur(12px);
}
.navbar .back { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; padding: 0; }
.navbar h1 { font-size: 16px; margin: 0; flex: 1; text-align: center; font-weight: 600; }
.navbar .right { width: 34px; }

/* ---------- 分类页 ---------- */
.cat-layout { display: flex; height: calc(100vh - 50px - var(--tabbar-h) - var(--safe-b)); background: #fff; }
.cat-side {
  flex: 0 0 92px; background: #f3f0eb; overflow-y: auto; padding: 6px 0 80px;
}
.cat-side a {
  display: block; padding: 15px 8px; text-align: center; font-size: 13px; color: var(--ink-2);
  position: relative;
}
.cat-side a.on { background: #fff; color: var(--ink); font-weight: 600; }
.cat-side a.on::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 2px; background: var(--ink);
}
.cat-main { flex: 1; overflow-y: auto; padding: 12px 12px 90px; }
.subcats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.subcats a {
  font-size: 12px; color: var(--ink-2); background: #f7f5f2; border-radius: 10px;
  padding: 12px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.plist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plist .prod-card .body { padding: 8px 9px 10px; }
.plist .prod-card .name { font-size: 12px; }

/* ---------- 商品详情 ---------- */
.pd-gallery { position: relative; background: #ece7e0; }
.pd-gallery .main { aspect-ratio: 1 / 1; }
.pd-gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.pd-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px;
}
.pd-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.pd-dots i.on { background: #fff; width: 16px; border-radius: 3px; }
.pd-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; padding: 10px 12px;
}
.pd-topbar button {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.82); display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.pd-info { background: #fff; padding: 16px 16px 14px; }
.pd-price { display: flex; align-items: baseline; gap: 8px; }
.pd-price .now { color: var(--accent); font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.pd-price .old { color: var(--ink-3); text-decoration: line-through; font-size: 13px; }
.pd-price .off {
  margin-left: auto; font-size: 11px; color: var(--accent); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 6px;
}
.pd-title { font-size: 18px; font-weight: 600; margin: 8px 0 4px; line-height: 1.4; }
.pd-sub { color: var(--ink-3); font-size: 13px; }
.pd-meta { display: flex; gap: 18px; color: var(--ink-3); font-size: 12px; margin-top: 10px; }
.pd-rows { margin-top: 10px; background: #fff; }
.pd-row {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-top: 1px solid var(--line); font-size: 13px;
}
.pd-row .k { color: var(--ink-3); flex: none; width: 44px; }
.pd-row .v { flex: 1; color: var(--ink-2); }
.pd-row svg { width: 16px; height: 16px; color: var(--ink-3); }
.pd-detail { background: #fff; margin-top: 10px; padding: 16px; }
.pd-detail h3 { font-size: 14px; margin: 0 0 12px; }
.pd-detail img { width: 100%; border-radius: 10px; margin-bottom: 10px; }
.pd-detail p { margin: 0 0 10px; color: var(--ink-2); line-height: 1.8; }
.detail-h {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 700; margin: 20px 0 10px;
}
.detail-h::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--accent);
}
.detail-lead { font-size: 13px; color: var(--ink-3); }
.detail-points {
  margin: 0 0 12px; padding-left: 18px;
  color: var(--ink-2); font-size: 13px; line-height: 1.95;
}
.detail-points li::marker { color: var(--accent); }
.detail-scene {
  margin: 0 0 12px; padding: 12px 14px;
  background: #faf8f5; border-radius: 10px;
  color: var(--ink-2); font-size: 13px; line-height: 1.85;
}
.detail-params {
  width: 100%; border-collapse: collapse; margin: 12px 0 14px;
  font-size: 13px; color: var(--ink-2);
}
.detail-params td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.detail-params td:first-child {
  width: 96px; color: var(--ink-3); background: #faf8f5;
  border-top-left-radius: 8px; border-bottom-left-radius: 8px;
}

.pd-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + var(--safe-b));
  background: #fff; border-top: 1px solid var(--line);
}
.pd-actions .mini {
  width: 44px; text-align: center; font-size: 10px; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.pd-actions .mini svg { width: 21px; height: 21px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 22px; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 600; transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-line { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.btn-block { display: flex; width: 100%; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 999px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- SKU 弹层 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(20,18,16,.45);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + var(--safe-b));
  transform: translateY(102%); transition: transform .3s cubic-bezier(.32,.72,0,1);
  max-height: 82vh; overflow-y: auto;
}
.sheet.show { transform: translateY(0); }
.sheet-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.sheet-head img { width: 84px; height: 104px; border-radius: 10px; object-fit: cover; background: #eee; }
.sheet-head .price { color: var(--accent); font-size: 22px; font-weight: 700; }
.sheet-head .stock { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.sheet-close { margin-left: auto; background: none; border: 0; padding: 2px; color: var(--ink-3); }
.spec-title { font-size: 13px; color: var(--ink-2); margin: 14px 0 8px; }
.spec-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-opt {
  min-width: 58px; padding: 8px 14px; border-radius: 8px; font-size: 13px;
  background: #f5f2ee; border: 1px solid transparent; color: var(--ink-2); text-align: center;
}
.spec-opt.on { background: #fff; border-color: var(--ink); color: var(--ink); font-weight: 600; }
.spec-opt[disabled] { opacity: .35; text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: #f7f5f2; display: grid; place-items: center; }
.qty button svg { width: 14px; height: 14px; }
.qty span { width: 42px; text-align: center; font-size: 14px; }

/* ---------- 购物车 ---------- */
.cart-list { padding: 4px 14px; display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex; gap: 12px; background: #fff; border-radius: 14px; padding: 12px;
  box-shadow: 0 2px 8px rgba(23,23,26,.03);
}
.cart-item .thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #eee; flex: none; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item .name { font-size: 13px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cart-item .spec { font-size: 11px; color: var(--ink-3); background: #f5f2ee; border-radius: 5px; padding: 2px 6px; align-self: flex-start; margin-top: 6px; }
.cart-item .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.cart-item .price { color: var(--accent); font-weight: 700; font-size: 15px; }
.check {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #cfc9c1; flex: none;
  display: grid; place-items: center; background: #fff;
}
.check.on { background: var(--ink); border-color: var(--ink); }
.check.on::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 70;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #fff; border-top: 1px solid var(--line);
}
.cart-bar .sum { flex: 1; font-size: 12px; color: var(--ink-3); }
.cart-bar .sum b { color: var(--accent); font-size: 19px; display: block; }
.cart-empty { text-align: center; padding: 90px 20px; color: var(--ink-3); }
.cart-empty svg { width: 64px; height: 64px; margin: 0 auto 14px; color: #d6d0c8; }

/* ---------- 结算 ---------- */
.card { background: #fff; border-radius: 14px; margin: 10px 14px 0; padding: 14px; }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.addr-main { display: flex; align-items: center; gap: 10px; }
.addr-main .who { font-weight: 600; font-size: 15px; }
.addr-main .ph { color: var(--ink-3); font-size: 13px; }
.addr-text { color: var(--ink-2); font-size: 13px; margin-top: 6px; line-height: 1.6; }
.order-line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-line:last-child { border-bottom: 0; }
.order-line img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #eee; }
.order-line .nm { font-size: 13px; line-height: 1.4; }
.order-line .sp { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.order-line .pr { margin-left: auto; text-align: right; white-space: nowrap; }
.cost-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); padding: 6px 0; }
.cost-row.total { color: var(--ink); font-weight: 600; font-size: 15px; }
.cost-row.total b { color: var(--accent); font-size: 20px; }
.paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + var(--safe-b));
  background: #fff; border-top: 1px solid var(--line);
}
.paybar .amt { flex: 1; font-size: 12px; color: var(--ink-3); }
.paybar .amt b { color: var(--accent); font-size: 20px; display: block; }

.form-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.form-item:last-child { border-bottom: 0; }
.form-item label { flex: none; width: 64px; color: var(--ink-2); font-size: 13px; }
.form-item input, .form-item textarea, .form-item select {
  flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); padding: 2px 0;
}
.form-item select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9a948c 50%), linear-gradient(135deg, #9a948c 50%, transparent 50%); background-position: calc(100% - 12px) 12px, calc(100% - 7px) 12px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-item textarea { resize: none; min-height: 44px; }
.form-item input::placeholder { color: #b9b3ab; }

/* ---------- 订单 ---------- */
.tabs {
  display: flex; gap: 4px; padding: 8px 14px; overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 50px; z-index: 40; background: var(--bg);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line);
}
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.order-card { background: #fff; border-radius: 14px; margin: 10px 14px 0; padding: 14px; }
.order-card .hd { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.order-card .hd .st { color: var(--accent); font-weight: 600; }
.order-items { display: flex; gap: 8px; margin: 12px 0; overflow: hidden; }
.order-items img { width: 66px; height: 82px; border-radius: 8px; object-fit: cover; background: #eee; }
.order-card .ft { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
.order-card .ft .amt { font-size: 12px; color: var(--ink-3); }
.order-card .ft .amt b { color: var(--accent); font-size: 17px; }
.order-card .acts { display: flex; gap: 8px; }
.empty { text-align: center; padding: 70px 20px; color: var(--ink-3); }

/* ---------- 个人中心 ---------- */
.user-hero {
  padding: 26px 18px 54px; background: linear-gradient(135deg, #1d1d20, #3a3631);
  color: #fff; border-radius: 0 0 26px 26px;
}
.user-hero .row { display: flex; align-items: center; gap: 14px; }
.user-hero .avatar {
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.15);
  display: grid; place-items: center; font-size: 24px; overflow: hidden; flex: none;
}
.user-hero .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-hero .nm { font-size: 19px; font-weight: 600; }
.user-hero .sub { font-size: 12px; opacity: .7; margin-top: 3px; }
.user-stats {
  display: flex; justify-content: space-around; margin: -38px 14px 0; position: relative;
  background: #fff; border-radius: 16px; padding: 16px 0; box-shadow: var(--shadow);
}
.user-stats div { text-align: center; font-size: 11px; color: var(--ink-3); }
.user-stats b { display: block; font-size: 19px; color: var(--ink); margin-bottom: 2px; }
.order-shortcuts {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 14px 0;
  background: #fff; border-radius: 16px; padding: 16px 0;
}
.order-shortcuts a { text-align: center; font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 7px; align-items: center; }
.order-shortcuts svg { width: 24px; height: 24px; color: var(--ink); }
.menu-list { margin: 12px 14px 0; background: #fff; border-radius: 16px; overflow: hidden; }
.menu-list a {
  display: flex; align-items: center; gap: 12px; padding: 16px 16px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.menu-list a:last-child { border-bottom: 0; }
.menu-list svg { width: 19px; height: 19px; color: var(--ink-2); }
.menu-list .arrow { margin-left: auto; color: #c8c2ba; }

/* ---------- 登录注册 ---------- */
.auth { padding: 56px 28px 30px; }
.auth .logo { text-align: center; margin-bottom: 34px; }
.auth .logo .mark { font-size: 26px; font-weight: 700; letter-spacing: 5px; }
.auth .logo .sl { font-size: 12px; color: var(--ink-3); letter-spacing: 2px; margin-top: 6px; }
.auth .field { border-bottom: 1px solid #ded9d2; padding: 14px 2px; display: flex; align-items: center; gap: 10px; }
.auth .field input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; }
.auth .field svg { width: 19px; height: 19px; color: var(--ink-3); }
.auth .btn { margin-top: 28px; height: 48px; }
.auth .switch { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.auth .switch a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 404 / 空 ---------- */
.page-404 { text-align: center; padding: 100px 24px; }
.page-404 h2 { font-size: 20px; }
.page-404 p { color: var(--ink-3); }

/* ---------- 个人中心 · 资产与入口 ---------- */
.assets-row {
  display: flex; margin: 10px 14px 0; background: #fff;
  border-radius: 16px; padding: 14px 0; box-shadow: var(--shadow);
}
.assets-row a { flex: 1; text-align: center; }
.assets-row b { display: block; font-size: 17px; letter-spacing: -.3px; }
.assets-row span { font-size: 11px; color: var(--ink-3); }
.entry-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 12px 14px 0; background: #fff; border-radius: 16px; padding: 16px 8px;
}
.entry-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; color: var(--ink-2);
}
.eg-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.eg-ico svg { width: 20px; height: 20px; }

/* ---------- 团队推荐 ---------- */
.invite-hero {
  padding: 26px 18px 54px; color: #fff;
  background: linear-gradient(135deg, #b7331f, #e4703f);
  border-radius: 0 0 26px 26px;
}
.iv-title { font-size: 21px; font-weight: 700; }
.iv-sub { font-size: 12px; opacity: .82; margin-top: 6px; }
.iv-code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.iv-label { font-size: 11px; color: var(--ink-3); }
.iv-code { font-size: 22px; font-weight: 800; letter-spacing: 2px; margin-top: 2px; }
.iv-stats {
  display: flex; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.iv-stats div { flex: 1; text-align: center; }
.iv-stats b { display: block; font-size: 19px; }
.iv-stats span { font-size: 11px; color: var(--ink-3); }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); }
.step i {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  font-style: normal; font-size: 12px; display: grid; place-items: center;
}
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.m-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #f3efe9;
  display: grid; place-items: center; font-weight: 600; flex: none;
}
.m-info { flex: 1; display: flex; flex-direction: column; font-size: 13px; }
.m-info span { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.m-pts { color: var(--accent); font-weight: 700; font-size: 14px; }

/* ---------- 我的积分 ---------- */
.points-hero {
  padding: 26px 18px; color: #fff;
  background: linear-gradient(135deg, #a45a10, #dfa23f);
  border-radius: 0 0 26px 26px;
}
.p-label { font-size: 12px; opacity: .82; }
.p-num { font-size: 38px; font-weight: 800; margin-top: 4px; letter-spacing: -1px; }
.p-hint { font-size: 11px; opacity: .75; margin-top: 6px; }
.bill-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.bill-row:last-child { border-bottom: 0; }
.bill-row b { display: block; font-size: 13px; font-weight: 500; }
.bill-row span { font-size: 11px; color: var(--ink-3); }
.bill-row em { font-style: normal; font-weight: 700; font-size: 15px; }
.plus { color: #1b7a4a; }
.minus { color: var(--accent); }
.rule { font-size: 12px; color: var(--ink-2); line-height: 1.9; margin: 0; }

/* ---------- 我的团队 ---------- */
.team-hero {
  padding: 24px 18px; color: #fff;
  background: linear-gradient(135deg, #1e3a6b, #506fae);
  border-radius: 0 0 26px 26px;
}
.t-row { display: flex; }
.t-row div { flex: 1; text-align: center; }
.t-row b { display: block; font-size: 22px; }
.t-row span { font-size: 11px; opacity: .78; }

/* ---------- 固定操作栏页面的底部留白 ---------- */
.pd-page { padding-bottom: calc(72px + var(--safe-b)); }
.checkout-page, .order-page { padding-bottom: calc(96px + var(--safe-b)); }
.cart-page { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 84px); }

/* ---------- 桌面预览居中的手机框 ---------- */
@media (min-width: 560px) {
  body {
    max-width: 480px; margin: 0 auto;
    box-shadow: 0 0 0 1px #e4dfd8, 0 20px 60px rgba(0,0,0,.08);
    background: var(--bg);
  }
  .tabbar, .pd-actions, .cart-bar, .paybar {
    max-width: 480px; margin: 0 auto; left: 50%; transform: translateX(-50%); right: auto; width: 100%;
  }
  .tabbar { left: 50%; }
  .navbar, .topbar { position: sticky; }
}

/* ---------- 个人中心 · 订单面板 ---------- */
.order-panel { margin: 12px 14px 0; background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.order-panel .op-hd { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 12px; }
.order-panel .op-hd b { font-size: 14.5px; }
.order-panel .op-hd a { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-3); }
.order-panel .op-hd svg { width: 13px; height: 13px; }
.order-panel .order-shortcuts { margin: 0; padding: 4px 0 16px; background: none; border-radius: 0; }
.order-shortcuts a { position: relative; }
.os-ico { position: relative; display: inline-flex; }
.os-ico svg { width: 26px; height: 26px; }
.os-badge { position: absolute; top: -7px; right: -10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d6452b; color: #fff; font-size: 10px; font-style: normal; line-height: 17px; text-align: center; }

/* ---------- 优惠券 ---------- */
.coupon-tabs { display: flex; gap: 28px; padding: 14px 18px; background: #fff; font-size: 14px; }
.coupon-tabs a { color: var(--ink-3); position: relative; padding-bottom: 6px; }
.coupon-tabs a.on { color: var(--ink); font-weight: 600; }
.coupon-tabs a.on::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--ink); }
.coupon-wrap { padding: 4px 14px 0; }
.coupon { display: flex; background: #fff; border-radius: 14px; margin-top: 12px; overflow: hidden; box-shadow: var(--shadow); }
.cp-left { width: 108px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 20px 0; color: #fff; background: linear-gradient(135deg, #b7331f, #e4703f); }
.cp-left b { font-size: 25px; letter-spacing: -.5px; }
.cp-left span { font-size: 10.5px; opacity: .9; }
.cp-right { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 5px; position: relative; }
.cp-right b { font-size: 14px; }
.cp-right span { font-size: 11.5px; color: var(--ink-3); }
.cp-use { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #b7331f; border: 1px solid #e0b6ac; border-radius: 20px; padding: 4px 12px; }

/* ---------- 余额 ---------- */
.balance-hero { margin: 14px; padding: 24px 20px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #1f2a44, #3c4d6e); }
.b-label { font-size: 12.5px; opacity: .75; }
.b-num { font-size: 40px; font-weight: 600; letter-spacing: -1px; margin: 6px 0 18px; }
.b-actions { display: flex; gap: 10px; }
.b-btn { flex: 1; text-align: center; font-size: 13.5px; padding: 10px 0; border-radius: 12px; background: #fff; color: #1f2a44; font-weight: 600; }
.b-btn.ghost { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- 登录注册 v2 ---------- */
.auth-v2 { padding: 34px 26px 40px; }
.av-head { text-align: center; margin-bottom: 30px; }
.av-logo { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.av-slogan { margin-top: 7px; font-size: 12px; color: var(--ink-3); letter-spacing: 1.5px; }
.av-form h2 { font-size: 22px; margin: 0 0 6px; }
.av-sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 22px; }
.av-error { background: #fdf0ee; color: #b7331f; font-size: 12.5px; padding: 9px 12px; border-radius: 10px; margin: 0 0 12px; }
.av-field { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e3ded7; border-radius: 13px; padding: 0 14px; height: 50px; margin-bottom: 12px; transition: border-color .2s, box-shadow .2s; }
.av-field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,17,17,.05); }
.av-field svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.av-field input { flex: 1; border: 0; outline: 0; background: none; font-size: 14.5px; min-width: 0; }
.av-eye { border: 0; background: none; font-size: 12px; color: var(--ink-3); padding: 4px; flex: none; }
.av-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin: 4px 2px 22px; }
.av-row a { color: var(--ink-2); }
.av-check { display: flex; align-items: center; gap: 6px; }
.av-check input { width: 14px; height: 14px; accent-color: #111; }
.av-submit { height: 50px; font-size: 15px; border-radius: 14px; }
.av-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; color: var(--ink-3); font-size: 12px; }
.av-divider::before, .av-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-v2 .btn-line { height: 48px; border-radius: 14px; }
.av-agree { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 24px; line-height: 1.7; }
.av-agree a { color: var(--ink-2); }

/* ---------- 站点页脚 ---------- */
.site-foot { text-align: center; padding: 26px 16px calc(18px + var(--safe-b)); color: #a49e96; font-size: 11px; line-height: 1.9; }
.site-foot p { margin: 0; }
.site-foot a { color: #a49e96; }
