/* 小程序风格订货商城 — 参考多租户商城平台 Figma 原型 */
:root {
  --primary: #fd7a78;
  --primary-active: #ea5b23;
  --primary-light: #fff0ee;
  --price: #fd7a78;
  --bg: #f5f5f5;
  --card: #fff;
  --text: #03130f;
  --text-secondary: #626262;
  --muted: #979797;
  --border: #eef0f3;
  --radius: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --header-gradient: linear-gradient(91deg, #ffd8b4 0.9%, #fd7a78 101.76%);
  /* 字号规范：正文≥15、辅助≥13、角标≥11、标题 17 */
  --fs-badge: 11px;
  --fs-caption: 13px;
  --fs-body: 15px;
  --fs-subtitle: 16px;
  --fs-title: 17px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

.page { display: none; min-height: 100vh; padding-bottom: calc(56px + var(--safe-bottom)); }
.page.active { display: block; }
.page--sub { padding-bottom: var(--safe-bottom); }

/* 导航栏 */
.mp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.mp-nav--brand { background: linear-gradient(135deg, #1677ff, #4096ff); border: none; }
.mp-nav--brand .mp-nav-title { color: #fff; }
.mp-nav--sub {
  position: sticky;
  top: 0;
  justify-content: flex-start;
  padding: 0 12px;
  gap: 8px;
}
.mp-nav--sub .mp-nav-back {
  position: relative;
  left: auto;
  flex-shrink: 0;
  z-index: 2;
}
.mp-nav--sub .mp-nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 96px);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.mp-nav--sub .mp-nav-action {
  position: relative;
  right: auto;
  margin-left: auto;
  flex-shrink: 0;
  z-index: 2;
}
.mp-nav--transparent { background: transparent; border: none; position: absolute; width: 100%; }
.mp-nav--transparent .mp-nav-title { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.mp-nav--transparent .mp-nav-back { color: #fff; background: rgba(0,0,0,.25); }
.mp-nav-title { font-size: 17px; font-weight: 600; }
.mp-nav-back {
  position: absolute;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

/* 首页 — Figma 已登录首页 */
.home-header {
  background: var(--header-gradient);
  padding: 12px 12px 16px;
  border-radius: 0 0 20px 20px;
}
.home-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-brand-name {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  max-width: 38%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  background: #fff;
  border-radius: 17px;
  padding: 0 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  cursor: pointer;
}
.search-icon { width: 16px; height: 16px; object-fit: contain; opacity: .6; flex-shrink: 0; }
.search-placeholder { color: var(--muted); font-size: 14px; }

.banner-swiper { position: relative; margin: 10px 12px 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 702 / 350; }
.banner-track { display: flex; transition: transform .35s ease; height: 100%; }
.banner-slide {
  min-width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1677ff, #69b1ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 0 20px;
  text-align: center;
}
.banner-slide.has-image { background-size: cover; background-position: center; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.banner-caption { padding: 0 16px; text-align: center; font-size: 18px; font-weight: 600; }
.banner-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.banner-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.banner-dot.active { width: 16px; border-radius: 3px; background: var(--primary-active); }

.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 0;
  padding: 8px 12px;
  background: #fff7e6;
  border-radius: 8px;
  font-size: 13px;
  color: #ad6800;
}
.notice-tag {
  flex-shrink: 0;
  background: #ffa940;
  color: #fff;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
}

.panel {
  margin: 10px 12px 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 8px;
}

.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 4px; }
.category-item { text-align: center; cursor: pointer; }
.category-item .icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-item .icon .category-icon-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.category-item .name { font-size: 14px; color: var(--text-secondary); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 12px 8px;
}
.section-head--center { justify-content: center; padding-top: 20px; }
.section-head-title { font-size: 16px; font-weight: 700; }
.section-head--center .section-head-title { font-size: 17px; }
.section-head-more { font-size: 13px; color: var(--muted); }

/* 商品网格（双列，小程序常见） */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 12px 12px;
}
.product-grid--compact { padding: 8px; }
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.product-card .thumb {
  aspect-ratio: 1;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 10px; }
.product-card .name {
  font-size: 14px;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
}
.product-card .price { color: var(--price); font-size: 16px; font-weight: 700; }
.product-card .price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.product-card .add-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

/* 分类页 — Figma 商品列表 */
.category-page-head { background: var(--card); padding: 4px 12px 0; border-bottom: 1px solid var(--border); }
.category-page-title { text-align: center; font-size: 17px; font-weight: 600; padding: 10px 0 8px; color: var(--text); }
.category-search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.category-search-row input {
  flex: 1;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}
.category-search-btn {
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.category-quick {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.category-quick-item {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  cursor: pointer;
}
.category-quick-item .icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-quick-item .icon .category-icon-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.category-quick-item .name { font-size: 13px; color: var(--text-secondary); padding: 2px 4px; border-radius: 10px; }
.category-quick-item.active .name { color: var(--primary-active); background: var(--primary-light); font-weight: 600; }

.category-layout { display: flex; height: calc(100vh - 200px - 56px - var(--safe-bottom)); min-height: 320px; }
.category-side {
  width: 80px;
  background: #f5f5f5;
  overflow-y: auto;
  flex-shrink: 0;
}
.category-side-item.active {
  background: var(--card);
  color: var(--primary-active);
  font-weight: 600;
  border-left-color: var(--primary-active);
}
.product-list-rows { padding: 0 10px 12px; background: var(--card); }
.product-row {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.product-row .thumb {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f5f5;
}
.product-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.product-row .name {
  font-size: 14px;
  line-height: 1.4;
  max-height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-row .tag {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}
.product-row .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.product-row .price { color: var(--price); font-size: 16px; font-weight: 700; }
.category-side-item {
  padding: 14px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.category-main { flex: 1; overflow-y: auto; background: var(--card); }

.search-bar { display: flex; gap: 8px; padding: 10px 12px; background: var(--card); }
.search-bar input {
  flex: 1;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 14px;
  outline: none;
  font-size: 14px;
}
.search-btn {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

/* 商品详情 — Figma 商品详情 */
.detail-page { padding-bottom: calc(56px + var(--safe-bottom)); background: var(--bg); }
.detail-nav {
  position: sticky;
  top: 0;
  z-index: 110;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.detail-nav-back {
  position: absolute;
  left: 8px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.detail-nav-back img { width: 20px; height: 20px; }
.detail-nav-title { font-size: 17px; font-weight: 700; color: var(--text); }
.detail-scroll { padding-bottom: 8px; }

.detail-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f0f2f5;
  overflow: hidden;
}
.detail-gallery-track { display: flex; height: 100%; transition: transform .35s ease; }
.detail-gallery-slide { min-width: 100%; height: 100%; }
.detail-gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.detail-gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.detail-gallery-dot.active { width: 16px; border-radius: 3px; background: var(--primary-active); }

.detail-price-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.detail-price-main { display: flex; align-items: baseline; gap: 2px; color: var(--price); }
.detail-price-symbol { font-size: 14px; font-weight: 700; }
.detail-price { font-size: 24px; font-weight: 700; line-height: 1; }
.detail-price-label { font-size: 13px; color: var(--text); opacity: .6; margin-left: 8px; font-weight: 500; }
.detail-unit { font-size: 13px; color: var(--muted); }

.detail-info-card,
.detail-desc-card {
  background: #fff;
  padding: 16px;
  margin-bottom: 10px;
}
.detail-name { font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--text); }
.detail-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(253,122,120,.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}
.detail-supply {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: .85;
  flex-wrap: wrap;
}
.detail-supply img { width: 16px; height: 16px; opacity: .7; }
.detail-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: .85;
}
.detail-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.detail-desc-card .block-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.desc { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.detail-desc-images { margin-top: 12px; }
.detail-desc-images img { width: 100%; display: block; border-radius: 4px; margin-bottom: 8px; }

.block-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.sku-area { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.sku-label { font-size: 13px; color: var(--text-secondary); }
.sku-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sku-tag {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}
.sku-tag.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.stepper button { width: 32px; height: 32px; border: none; background: #fafafa; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.stepper .qty-input,
.stepper input[type="text"] {
  width: 48px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  outline: none;
  background: #fff;
  padding: 0 4px;
  -moz-appearance: textfield;
}
.stepper input[type="text"]::-webkit-outer-spin-button,
.stepper input[type="text"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 加购弹层 */
.cart-sheet {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.cart-sheet.open { display: flex; }
.cart-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}
.cart-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + var(--safe-bottom));
  z-index: 1;
  animation: sheet-up .28s ease;
}
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cart-sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.cart-sheet-head { display: flex; gap: 12px; padding-right: 28px; margin-bottom: 16px; }
.cart-sheet-thumb {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}
.cart-sheet-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-sheet-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.cart-sheet-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-sheet-price { color: var(--price); font-size: 20px; font-weight: 700; }
.cart-sheet-price .detail-price-symbol { font-size: 13px; }
.cart-sheet-unit { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.cart-sheet-stock { font-size: 13px; color: var(--text-secondary); }
.cart-sheet-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 20px;
}
.cart-sheet-panel .sku-area { margin-top: 0; padding-top: 0; border-top: none; }
.cart-sheet-submit { width: 100%; height: 44px; font-size: 15px; border-radius: 22px; }
.cart-sheet-submit.df-btn--outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.cart-sheet-submit.df-btn--primary {
  background: var(--primary);
  color: #fff;
  border: none;
}

.detail-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(50px + var(--safe-bottom));
  padding: 6px 12px calc(6px + var(--safe-bottom));
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 -4px 12px rgba(0,0,0,.04);
  z-index: 200;
}
.detail-action-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  min-width: 40px;
}
.detail-action-icon img { width: 20px; height: 20px; opacity: .85; }
.detail-action-icon span { font-size: 12px; color: var(--text-secondary); }
.df-btn { height: 40px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; flex: 1; min-width: 0; }
.df-btn--outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 20px;
}
.df-btn--primary { background: var(--primary); color: #fff; }
.df-btn--pill { border-radius: 20px; }

.address-card-icon { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }

/* 购物车 — 淘宝风格 */
.mp-nav--cart { background: #fff; border-bottom: 1px solid #f0f0f0; }
.mp-nav--cart .mp-nav-title { text-align: center; width: 100%; }

.cart-list { padding: 8px 10px calc(112px + var(--safe-bottom)); }

.cart-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.cart-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cart-check-icon {
  width: 20px;
  height: 20px;
  border: 2px solid #c8c8c8;
  border-radius: 50%;
  background: #fff;
  display: block;
  transition: all .15s ease;
}
.cart-check input:checked + .cart-check-icon {
  border-color: #ff5000;
  background: #ff5000;
  box-shadow: inset 0 0 0 3px #fff;
}
.cart-check--item { align-self: center; margin-top: 0; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: 12px;
  padding: 12px 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.cart-item .thumb {
  width: 88px;
  height: 88px;
  background: #fafafa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .info { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.cart-item .name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item .spec { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cart-spec-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 8px;
  border: none;
  border-radius: 4px;
  background: #f5f5f5;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  max-width: 100%;
}
.cart-spec-picker:active { background: #ebebeb; }
.cart-spec-arrow { color: #999; font-size: 13px; line-height: 1; }
.cart-item .line-bottom { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.cart-item .line-price { color: #ff5000; font-size: 16px; font-weight: 700; font-family: Arial, sans-serif; }
.cart-item .line-price span { font-size: 13px; font-weight: 400; color: #999; margin-left: 2px; }
.cart-item .qty {
  display: flex;
  align-items: center;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.cart-item .qty button {
  width: 28px;
  height: 26px;
  border: none;
  background: #fafafa;
  cursor: pointer;
  flex-shrink: 0;
  color: #333;
  font-size: 16px;
  line-height: 1;
}
.cart-item .qty input {
  width: 36px;
  height: 26px;
  border: none;
  border-left: 1px solid #e8e8e8;
  border-right: 1px solid #e8e8e8;
  text-align: center;
  font-size: 13px;
  outline: none;
  background: #fff;
  padding: 0 2px;
}

.cart-footer {
  position: fixed;
  bottom: calc(56px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  padding: 8px 12px;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -1px 6px rgba(0,0,0,.08);
  z-index: 250;
  pointer-events: auto;
}
.cart-footer.show { display: flex; }
.cart-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
  color: #333;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-footer-total { flex: 1; min-width: 0; text-align: right; }
.cart-total-line { line-height: 1.2; }
.cart-total-label { font-size: 13px; color: #333; }
.cart-total-price {
  color: #ff5000;
  font-size: 20px;
  font-weight: 700;
  font-family: Arial, sans-serif;
}
.cart-freight-line { font-size: 13px; color: #999; margin-top: 2px; }
.cart-settle-btn {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  min-width: 88px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(90deg, #ff9000 0%, #ff5000 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(255, 80, 0, .25);
}
.cart-settle-btn:active { opacity: .88; transform: scale(.98); }
.cart-settle-btn:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

/* 结算 — 确认订单页 */
.page-checkout { background: #f5f5f5; }
.checkout-body { padding: 10px 12px calc(72px + var(--safe-bottom)); }
.checkout-card {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.checkout-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  padding: 14px 14px 0;
}
.checkout-goods-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 0;
}
.checkout-goods-count { font-size: 13px; color: #999; }

.checkout-address-card { padding: 0; }
.checkout-address-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.checkout-addr-icon { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.checkout-address-body { flex: 1; min-width: 0; }
.checkout-address-main { font-size: 14px; line-height: 1.5; color: var(--text); min-height: 20px; }
.checkout-address-main .addr-name { font-weight: 600; margin-right: 8px; }
.checkout-address-main .addr-phone { color: var(--text-secondary); font-size: 13px; }
.checkout-address-main .addr-full { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 13px; }
.checkout-address-main:empty::before,
.checkout-address-main:not(:has(.addr-name)) { color: #999; }
.checkout-cell-arrow { font-size: 18px; color: #ccc; flex-shrink: 0; }

.checkout-goods-list { padding: 10px 14px 4px; }
.checkout-goods-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}
.checkout-goods-item:last-child { border-bottom: none; }
.checkout-goods-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #f7f7f7;
  overflow: hidden;
  flex-shrink: 0;
}
.checkout-goods-thumb img { width: 100%; height: 100%; object-fit: cover; }
.checkout-goods-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.checkout-goods-name {
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.checkout-goods-spec { font-size: 13px; color: #999; margin-top: 4px; }
.checkout-goods-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}
.checkout-goods-price { color: #ff5000; font-size: 15px; font-weight: 700; }
.checkout-goods-qty { font-size: 13px; color: #999; }

.checkout-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid #f5f5f5;
  font-size: 14px;
}
.checkout-cell-label { color: #333; flex-shrink: 0; }
.checkout-coupon-row { cursor: pointer; }
.checkout-coupon-value { color: #ff5000; font-size: 13px; }
.checkout-coupon-value.muted { color: #999; }
.checkout-remark-row input {
  flex: 1;
  border: none;
  outline: none;
  text-align: right;
  font-size: 13px;
  color: #333;
  background: transparent;
  min-width: 0;
}
.checkout-remark-row input::placeholder { color: #ccc; }

.checkout-pay-list { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 0; }
.checkout-pay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  font-size: 14px;
}
.checkout-pay-item:last-child { border-bottom: none; }
.checkout-pay-item input[type="radio"] {
  order: 2;
  margin-left: auto;
  width: 18px;
  height: 18px;
  accent-color: #ff5000;
  flex-shrink: 0;
}
.checkout-pay-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.checkout-pay-icon img { width: 22px; height: 22px; object-fit: contain; }
.checkout-pay-label { flex: 1; color: #333; }

.checkout-credit-hint {
  font-size: 13px;
  color: #ad6800;
  background: #fff7e6;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 10px 14px 0;
  line-height: 1.5;
}
.checkout-price-card { padding: 14px; }
.checkout-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #666;
  padding: 5px 0;
}
.checkout-price-total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed #eee;
  font-size: 15px;
  color: #222;
}
.checkout-price-total em {
  color: #ff5000;
  font-style: normal;
  font-size: 18px;
  font-weight: 700;
}

.checkout-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -2px 10px rgba(0,0,0,.08);
  z-index: 200;
}
.checkout-footer-info { flex: 1; min-width: 0; }
.checkout-footer-label { font-size: 13px; color: #999; display: block; }
.checkout-footer-total {
  font-size: 22px;
  font-weight: 700;
  color: #ff5000;
  font-family: Arial, sans-serif;
  line-height: 1.2;
}
.checkout-submit-btn {
  flex-shrink: 0;
  min-width: 120px;
  height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(90deg, #ff9000 0%, #ff5000 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 80, 0, .25);
}
.checkout-submit-btn:active { opacity: .88; transform: scale(.98); }

/* 结算 — 通用块（订单详情等复用） */
.address-card {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.address-card-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.address-card textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
}
.checkout-block {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.checkout-block input, .checkout-block textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.checkout-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.checkout-item:last-child { border-bottom: none; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.pay-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.summary-block .summary-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
.summary-block .total-line { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 15px; color: var(--text); }
.summary-block .total-line em { color: var(--price); font-style: normal; font-weight: 700; }
.submit-btn {
  height: 44px;
  padding: 0 28px;
  border: none;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* 订单 */
.order-tabs {
  display: flex;
  background: transparent;
  padding: 0 4px;
  border-bottom: none;
  overflow-x: auto;
}
.order-tab {
  flex: 1;
  min-width: 64px;
  padding: 12px 4px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.order-tab.active { color: var(--primary); font-weight: 600; position: relative; }
.order-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.order-list { padding: 10px 12px; }
.order-card {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  cursor: pointer;
}
.order-card .head {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.order-card .status { color: var(--primary); font-weight: 500; }
.order-card .status.status--danger { color: #f56c6c; }
.order-reject-hint { padding: 0 14px 8px; font-size: 13px; color: #f56c6c; line-height: 1.5; }
.order-action-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}
.order-action-btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.od-reject-block {
  background: #fef0f0;
  border: 1px solid #fde2e2;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.od-reject-title { font-size: 13px; font-weight: 600; color: #f56c6c; margin-bottom: 6px; }
.od-reject-text { font-size: 13px; color: #606266; line-height: 1.5; }
.submit-btn--outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  flex: 1;
}
#od-action-footer { gap: 10px; }
#od-action-footer .submit-btn { flex: 1; }

.order-status-hint {
  font-size: 13px;
  color: rgba(255,255,255,.85);
  margin-top: 6px;
  line-height: 1.4;
}
.order-status-no-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.od-copy-btn {
  border: 1px solid rgba(255,255,255,.6);
  background: transparent;
  color: #fff;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.od-progress-steps {
  display: flex;
  justify-content: space-between;
  padding: 8px 4px 4px;
}
.od-progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  color: var(--muted);
  font-size: 13px;
}
.od-progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.od-progress-step.done:not(:last-child)::after { background: var(--primary); }
.od-progress-dot {
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: #fff;
  font-size: 13px;
  margin: 0 auto 6px;
  position: relative;
  z-index: 1;
}
.od-progress-step.done .od-progress-dot { background: var(--primary); }
.od-progress-step.active .od-progress-dot {
  box-shadow: 0 0 0 3px rgba(64,158,255,.2);
}
.od-progress-step.failed .od-progress-dot { background: #f56c6c; }
.od-progress-step.done { color: var(--text); }
.od-progress-step.active { color: var(--primary); font-weight: 500; }
.od-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.od-item-row:last-child { border-bottom: none; }
.od-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f5f5;
  flex-shrink: 0;
}
.od-item-info { flex: 1; min-width: 0; }
.od-item-name { font-size: 14px; line-height: 1.3; }
.od-item-spec { font-size: 13px; color: var(--muted); margin-top: 2px; }
.od-item-price { font-size: 13px; color: var(--muted); margin-top: 4px; }
.od-item-qty { font-size: 13px; color: var(--text-secondary); padding-top: 4px; }
.od-item-amt { font-size: 14px; font-weight: 500; color: var(--price); padding-top: 2px; white-space: nowrap; }
.od-logs { display: flex; flex-direction: column; gap: 0; }
.od-log-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.od-log-item:last-child { border-bottom: none; }
.od-log-head { display: flex; justify-content: space-between; font-size: 13px; }
.od-log-action { font-weight: 500; color: var(--text); }
.od-log-time { color: var(--muted); font-size: 13px; }
.od-log-body { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }
.od-logs-empty { padding: 8px 0; }

.mine-credit-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 12px rgba(245,245,245,.8);
}
.mine-credit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.mine-credit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}
.mine-credit-grid .label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.mine-credit-grid em { font-style: normal; font-size: 15px; font-weight: 600; color: var(--text); }
.mine-credit-grid em.avail { color: #67c23a; }
.mine-credit-grid em.debt { color: var(--price); }
.mine-prepaid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 12px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.mine-prepaid-row em.prepaid { color: #409eff; font-style: normal; font-weight: 700; font-size: 16px; }
.prepaid-summary .ledger-summary-main em { color: #409eff; }

/* 优惠券 */
.mp-nav-action { font-size: 14px; color: var(--primary); cursor: pointer; white-space: nowrap; }
.coupon-tabs, .ledger-filter { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; background: transparent; }
.coupon-tab, .ledger-filter-btn {
  flex-shrink: 0; border: 1px solid var(--border); background: transparent; color: var(--text-secondary);
  font-size: 14px; padding: 7px 14px; border-radius: 16px; cursor: pointer;
}
.coupon-tab.active, .ledger-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.coupon-list { padding: 12px; }
.coupon-card {
  display: flex; align-items: stretch; background: linear-gradient(90deg, #fff5f0 0%, #fff 28%);
  border: 1px solid #ffd4c2; border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; min-height: 88px;
}
.coupon-card--disabled { opacity: .55; filter: grayscale(.2); }
.coupon-card--compact { min-height: 72px; margin-bottom: 0; }
.coupon-card-value {
  width: 92px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: var(--price); font-size: 22px; font-weight: 700; border-right: 1px dashed #ffd4c2;
}
.coupon-card-info { flex: 1; padding: 12px 10px; min-width: 0; }
.coupon-card-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.coupon-card-desc, .coupon-card-meta { font-size: 13px; color: var(--muted); line-height: 1.4; }
.coupon-card-status { align-self: center; padding-right: 12px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.coupon-claim-btn {
  align-self: center; margin-right: 12px; border: none; background: var(--primary); color: #fff;
  padding: 8px 12px; border-radius: 16px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.summary-discount { color: #67c23a; }
.coupon-picker-modal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 3000;
  align-items: flex-end; justify-content: center;
}
.coupon-picker-modal.show { display: flex; }
.coupon-picker-panel {
  width: 100%; max-width: 480px; max-height: 70vh; background: #fff; border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
}
.coupon-picker-head {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid var(--border); font-weight: 600;
}
.coupon-picker-head button { border: none; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.coupon-picker-list { overflow-y: auto; padding: 12px; }
.coupon-picker-item { margin-bottom: 10px; border-radius: var(--radius); border: 2px solid transparent; }
.coupon-picker-item.selected { border-color: var(--primary); }
.coupon-picker-item.disabled { opacity: .5; pointer-events: none; }
.coupon-picker-name { padding: 16px; background: var(--card); border-radius: var(--radius); text-align: center; }
.mine-credit-tip { font-size: 14px; color: var(--text-secondary); }
.mine-credit-tip em { font-style: normal; color: var(--price); font-weight: 600; margin-left: 8px; }
.ledger-credit-summary {
  margin: 0 12px 12px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: var(--radius);
  font-size: 13px;
}
.mine-credit-row, .ledger-credit-summary .mine-credit-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.mine-credit-row em, .ledger-credit-summary em { font-style: normal; font-weight: 600; }
.mine-credit-row em.avail { color: #67c23a; }
.mine-credit-tip-only { color: var(--muted); font-size: 13px; text-align: center; padding: 8px 0; }
.order-card .body { padding: 12px 14px; font-size: 14px; color: var(--text-secondary); }
.order-card .amount { text-align: right; padding: 0 14px 12px; font-size: 15px; }
.order-card .amount em { color: var(--price); font-style: normal; font-weight: 700; }

.order-status-card {
  background: var(--header-gradient);
  border-radius: var(--radius);
  padding: 20px 16px;
  color: #fff;
  margin-bottom: 10px;
}
.order-status-text { font-size: 20px; font-weight: 700; }
.order-status-no, .order-status-time { font-size: 13px; opacity: .85; margin-top: 6px; }
.od-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: var(--text-secondary); }
.od-text { font-size: 14px; line-height: 1.5; }
.od-item { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* 我的 — 参考扫码富商城个人中心 */
.mine-header {
  background: linear-gradient(180deg, #ffece3 0%, #fff6f0 55%, #f5f5f5 100%);
  padding: 16px 16px 0;
}
.mine-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 16px;
  cursor: pointer;
}
.mine-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #ffb347, #ff5000);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 80, 0, .2);
  overflow: hidden;
}
.mine-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mine-user-info { flex: 1; min-width: 0; }
.mine-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mine-name { font-size: 17px; font-weight: 700; color: #222; line-height: 1.3; }
.mine-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  background: linear-gradient(90deg, #3d3428, #5c4d38);
  color: #f5d78e;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.mine-vip-badge::before { content: '👑'; font-size: 11px; }
.mine-phone { font-size: 13px; color: #999; margin-top: 4px; }
.mine-qr-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,.7);
  border-radius: 8px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mine-qr-btn:active { background: #fff; }

.mine-assets {
  display: flex;
  background: transparent;
  padding: 4px 8px 16px;
}
.mine-asset-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
  padding: 4px 0;
}
.mine-asset-item em {
  display: block;
  font-style: normal;
  font-size: 18px;
  font-weight: 700;
  color: #222;
  font-family: Arial, sans-serif;
  line-height: 1.2;
}
.mine-asset-item span {
  display: block;
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}
.mine-asset-item:active { opacity: .7; }

.mine-body { padding: 0 12px 12px; margin-top: 0; }
.mine-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.mine-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #222;
}
.mine-panel-link { font-size: 13px; color: #999; font-weight: 400; cursor: pointer; }
.mine-order-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mine-order-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  padding: 4px 0;
}
.mine-order-icon-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mine-order-icon-wrap--muted { opacity: .65; }
.mine-order-icon { width: 32px; height: 32px; object-fit: contain; display: block; }

.mine-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #fff5f0 0%, #ffe8dc 100%);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 120, 80, .12);
}
.mine-promo-text { flex: 1; min-width: 0; }
.mine-promo-text strong { display: block; font-size: 15px; color: #222; margin-bottom: 4px; }
.mine-promo-text span { font-size: 13px; color: #ff5000; }
.mine-promo-art { font-size: 36px; line-height: 1; margin-left: 8px; }
.mine-promo:active { opacity: .92; }

.mine-service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
.mine-service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  padding: 4px 0;
}
.mine-service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mine-service-icon img { width: 24px; height: 24px; object-fit: contain; opacity: .75; }
.mine-service-item:active { opacity: .7; }

/* 登录 — Figma 业务员登录 */
.page-login { background: #fff; }
.login-nav { background: #fff; border-bottom: none; }
.login-nav .mp-nav-back img { width: 18px; height: 18px; }
.login-page { padding: 24px 24px 40px; text-align: center; max-width: 360px; margin: 0 auto; }
.login-brand { margin-bottom: 40px; }
.login-logo { width: 100px; height: 100px; margin: 0 auto 18px; border-radius: 20px; overflow: hidden; background: var(--primary-light); display: flex; align-items: center; justify-content: center; }
.login-logo.has-image { background: transparent; }
.login-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.login-page h2 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 0; }
.login-demo-fields { margin-bottom: 16px; text-align: left; }
.login-demo-fields input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  margin-bottom: 10px;
  font-size: 14px;
  outline: none;
}
.login-btn--pill {
  width: 100%;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
}
.login-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.login-agree input { margin-top: 3px; flex-shrink: 0; }
.login-agree a { color: var(--primary); text-decoration: none; }
.login-register-link { margin-top: 16px; font-size: 13px; color: var(--text-secondary); }
.login-register-link a { color: var(--primary); text-decoration: none; font-weight: 500; }

/* 注册 / 地址表单 */
.register-page { padding: 16px 16px 40px; }
.register-tip { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; padding: 10px 12px; background: #fff7e6; border-radius: 8px; color: #ad6800; }
.form-card { background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.form-row { display: flex; align-items: center; padding: 14px 14px; border-bottom: 1px solid var(--border); gap: 12px; }
.form-row:last-child { border-bottom: none; }
.form-row label { width: 72px; flex-shrink: 0; font-size: 14px; color: var(--text); }
.form-row input { flex: 1; border: none; outline: none; font-size: 14px; min-width: 0; background: transparent; }
.register-agree { margin-bottom: 16px; padding: 0 4px; }
.addr-default-row { display: flex; align-items: center; gap: 8px; padding: 14px; font-size: 14px; color: var(--text-secondary); cursor: pointer; }

/* 注册结果 */
.result-page { padding: 48px 24px; text-align: center; }
.result-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: #f0f9eb; color: #67c23a; font-size: 32px; line-height: 64px; font-weight: 700; }
.result-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.result-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; }

/* 地址列表 */
.checkout-address-card.address-card--pick { cursor: pointer; }

.address-card--pick { cursor: pointer; align-items: center; }
.address-card--pick .address-card-main,
.checkout-address-main { font-size: 14px; line-height: 1.5; color: var(--text); min-height: 20px; }
.address-card--pick .address-card-main .addr-name,
.checkout-address-main .addr-name { font-weight: 600; margin-right: 8px; }
.address-card--pick .address-card-main .addr-phone,
.checkout-address-main .addr-phone { color: var(--text-secondary); font-size: 13px; }
.address-card--pick .address-card-main .addr-full,
.checkout-address-main .addr-full { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 13px; }
.address-card-arrow { font-size: 20px; color: var(--muted); flex-shrink: 0; }
.address-list { padding: 12px; padding-bottom: calc(70px + var(--safe-bottom)); }
.address-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  border: 2px solid transparent;
  position: relative;
}
.address-item.default { border-color: var(--primary); }
.address-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.address-item-name { font-weight: 600; font-size: 15px; }
.address-item-phone { color: var(--text-secondary); font-size: 13px; }
.address-item-tag { font-size: 12px; color: var(--primary); background: var(--primary-light); padding: 2px 6px; border-radius: 4px; }
.address-item-body { font-size: 13px; color: var(--text-secondary); line-height: 1.5; padding-right: 24px; }
.address-item-actions { display: flex; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; }
.address-item-actions button { border: none; background: none; color: var(--text-secondary); cursor: pointer; padding: 0; }
.address-item-actions button.danger { color: #f56c6c; }
.address-item-select { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; accent-color: var(--primary); }
.address-add-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--card);
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.address-add-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* 支付页 */
.pay-page { padding: 12px; padding-bottom: calc(80px + var(--safe-bottom)); }
.pay-amount-card { background: var(--card); border-radius: var(--radius); padding: 24px 16px; text-align: center; margin-bottom: 12px; }
.pay-amount-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.pay-amount-value { font-size: 36px; font-weight: 700; color: var(--price); margin-bottom: 8px; }
.pay-amount-value span { font-size: 36px; }
.pay-order-no { font-size: 13px; color: var(--muted); }
.pay-method-list { display: flex; flex-direction: column; gap: 0; }
.pay-method-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.pay-method-item:last-child { border-bottom: none; }
.pay-method-icon { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.pay-method-icon--text { font-size: 24px; width: 28px; text-align: center; }
.pay-method-name { flex: 1; font-size: 15px; }
.pay-method-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); color: transparent; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pay-method-item.active .pay-method-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.pay-wechat-panel { margin-top: 12px; text-align: center; }
.pay-qr-placeholder { padding: 16px; }
.pay-qr-box {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  background: #f5f5f5;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.pay-countdown { font-size: 13px; color: var(--muted); margin-top: 12px; }
.pay-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--card);
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.pay-confirm-btn { width: 100%; border-radius: 22px; }

/* TabBar */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--card);
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 200;
}
.tabbar.hidden { display: none; }
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  position: relative;
}
.tabbar-item.active { color: var(--primary-active); }
.tab-icon { width: 25px; height: 25px; object-fit: contain; display: block; margin: 0 auto 2px; }
.tabbar-item .badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  background: var(--price);
  color: #fff;
  font-size: 11px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  display: none;
  max-width: 80%;
  text-align: center;
}
.toast.show { display: block; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 14px; }
.empty a { color: var(--primary); text-decoration: none; }

/* 物流时间线 D-003 */
.mall-timeline { margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--border); }
.mall-timeline-item { position: relative; padding: 0 0 14px 14px; font-size: 13px; color: var(--text-secondary); }
.mall-timeline-item::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.mall-timeline-item.active { color: var(--text); font-weight: 500; }
.mall-timeline-item.active::before { background: var(--primary); }
.mall-timeline-item .time { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* 往来账 — 钱包风格头部 */
.page-ledger { background: #f5f6f8; }
.ledger-hero {
  background: linear-gradient(180deg, #dceeff 0%, #eef6ff 45%, #f5f6f8 100%);
  padding-bottom: 4px;
}
.mp-nav--ledger {
  background: transparent;
  border-bottom: none;
}
.mp-nav--ledger .mp-nav-back { color: #1a1a1a; }
.mp-nav--ledger .mp-nav-title { color: #1a3a5c; font-weight: 700; }

.ledger-wallet-card {
  margin: 4px 12px 10px;
  padding: 16px 16px 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(64, 128, 200, .1);
}
.ledger-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.ledger-wallet-name {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ledger-wallet-badge {
  flex-shrink: 0;
  font-size: 13px;
  color: #409eff;
  background: #ecf5ff;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.ledger-wallet-badge::before { content: '🛡 '; font-size: 13px; }
.ledger-wallet-main { margin-bottom: 16px; }
.ledger-wallet-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 6px;
}
.ledger-wallet-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ledger-wallet-amount {
  font-size: 36px;
  font-weight: 700;
  color: #1677ff;
  font-family: Arial, sans-serif;
  line-height: 1.1;
  letter-spacing: -.5px;
}
.ledger-wallet-arrow { font-size: 22px; color: #ccc; flex-shrink: 0; }
.ledger-wallet-tip { font-size: 13px; color: #999; margin-top: 6px; }
.ledger-wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 4px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}
.ledger-wallet-stat { text-align: center; min-width: 0; }
.ledger-wallet-stat .stat-label {
  display: block;
  font-size: 13px;
  color: #999;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ledger-wallet-stat .stat-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  font-family: Arial, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ledger-wallet-stat .stat-value--green { color: #52c41a; }
.ledger-wallet-pending {
  margin-top: 12px;
  padding: 6px 10px;
  background: #fff7e6;
  border-radius: 8px;
  font-size: 13px;
  color: #ad6800;
  text-align: center;
}

.ledger-bill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  cursor: pointer;
}
.ledger-bill-bar:active { opacity: .88; }
.ledger-bill-tag {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1677ff;
}
.ledger-bill-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ledger-bill-arrow { flex-shrink: 0; color: #ccc; font-size: 18px; }

/* 预收款流水 — 钱包风格头部（仅原有字段） */
.page-prepaid { background: #f5f6f8; }
.prepaid-hero {
  background: linear-gradient(180deg, #dceeff 0%, #eef6ff 45%, #f5f6f8 100%);
  padding-bottom: 4px;
}
.mp-nav--prepaid {
  background: transparent;
  border-bottom: none;
}
.mp-nav--prepaid .mp-nav-back { color: #1a1a1a; }
.mp-nav--prepaid .mp-nav-title { color: #1a3a5c; font-weight: 700; }
.prepaid-wallet-card {
  margin: 4px 12px 10px;
  padding: 20px 16px 18px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(64, 128, 200, .1);
}
.prepaid-wallet-main { text-align: left; }
.prepaid-wallet-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}
.prepaid-wallet-amount {
  font-size: 36px;
  font-weight: 700;
  color: #1677ff;
  font-family: Arial, sans-serif;
  line-height: 1.1;
  letter-spacing: -.5px;
}
.prepaid-wallet-tip {
  font-size: 13px;
  color: #999;
  margin-top: 10px;
  line-height: 1.4;
}
.page-prepaid .prepaid-filter { padding: 12px; }
.page-prepaid .ledger-list { padding: 0 12px 20px; }
.page-prepaid .prepaid-item .head .type { color: #fd7a78; }
.page-prepaid .prepaid-item .head .time { color: #333; font-size: 13px; }
.page-prepaid .prepaid-item .amt-plus { color: #fd7a78; font-size: 16px; font-weight: 600; }
.page-prepaid .prepaid-item .amt-minus { color: #67c23a; font-size: 16px; font-weight: 600; }
.page-prepaid .prepaid-item .meta { color: #999; font-size: 13px; }

.ledger-summary {
  margin: 12px 12px 0;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius);
  font-size: 14px;
}
.ledger-summary-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ledger-summary-tip {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.ledger-summary em { color: var(--price); font-style: normal; font-weight: 600; font-size: 18px; }
.ledger-filter {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
}
.ledger-filter-btn {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 16px;
  cursor: pointer;
}
.ledger-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.ledger-list { padding: 0 12px 20px; }
.ledger-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 14px;
}
.ledger-item--link { cursor: pointer; }
.ledger-item--link:active { opacity: .85; }
.ledger-item--pending { border-left: 3px solid #e6a23c; }
.ledger-item .head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.ledger-item .type { color: var(--primary); font-weight: 500; }
.ledger-item .pending-tag {
  font-style: normal;
  font-size: 13px;
  color: #e6a23c;
  font-weight: normal;
}
.ledger-order-no { color: var(--text-secondary); margin-bottom: 4px; }
.ledger-amt { font-weight: 500; margin-bottom: 2px; }
.ledger-item .amt-plus { color: var(--price); }
.ledger-item .amt-minus { color: #67c23a; }
.ledger-item .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

.order-card .card-actions { margin-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
.order-card .receive-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
}
