:root {
  --brand: #16a34a;
  --brand-dark: #15803d;
  --brand-soft: #ecfdf5;
  --promo: #ff5a1f;
  --promo-red: #ef4444;
  --bg: #f5f7f6;
  --card: #ffffff;
  --text: #111827;
  --text-sub: #6b7280;
  --border: #edf0ee;
  --tabbar-h: 60px;
  --header-h: 52px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #e9eeeb;
  color: var(--text);
}

.mp-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
}

/* ==================== 顶部导航栏 ==================== */
.mp-header {
  flex-shrink: 0;
  height: var(--header-h);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  z-index: 40;
}

.mp-header.header-home {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #ffffff;
  border-bottom: none;
}

.mp-header.header-promo {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: #ffffff;
  border-bottom: none;
}

/* 胶囊式双按钮：[ < 返回 | ⌂ 主页 ] */
.dual-nav-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.12);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.dual-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dual-nav-btn:active {
  background: rgba(22, 163, 74, 0.1);
}

.dual-nav-divider {
  width: 1px;
  height: 16px;
  background: rgba(15, 23, 42, 0.14);
}

.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 700;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-loc-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
  flex: 1;
  max-width: 190px;
  cursor: pointer;
}

.home-loc-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.wx-capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

/* ==================== 主体内容 ==================== */
.mp-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + 18px);
  scroll-behavior: smooth;
}

.mp-body.has-quick-bar {
  padding-bottom: calc(var(--tabbar-h) + 74px);
}

.mp-body.no-scroll {
  overflow: hidden;
  padding-bottom: var(--tabbar-h);
  display: flex;
  flex-direction: column;
}

/* ==================== 首页组件 ==================== */
.home-hero-top {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 55%, #f5f7f6 100%);
  padding: 6px 12px 12px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border-radius: 999px;
  padding: 0 12px;
  height: 36px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  background: transparent;
}

.delivery-toggle-mini {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 2px;
}

.delivery-toggle-mini button {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.delivery-toggle-mini button.active {
  background: #ffffff;
  color: var(--brand-dark);
}

/* 新人尝鲜价 */
.newbie-card {
  background: linear-gradient(135deg, #ff5a1f 0%, #fb7185 100%);
  border-radius: 14px;
  padding: 10px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.22);
}

.newbie-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.newbie-title {
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.newbie-sub {
  font-size: 11px;
  opacity: 0.92;
  font-weight: 400;
}

.newbie-more {
  background: rgba(255, 255, 255, 0.22);
  border: none;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.newbie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.newbie-item {
  background: #fff;
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
}

.newbie-item-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 4px 0 2px;
}

.newbie-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--promo-red);
}

.newbie-item-price s {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 400;
  margin-left: 2px;
}

/* 公告条 */
.notice-bar {
  margin: 8px 12px 10px;
  background: #ffffff;
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.notice-tag {
  flex-shrink: 0;
  background: #fef2f2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.notice-text {
  flex: 1;
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 10大金刚区 */
.kingkong-card {
  margin: 0 12px 10px;
  background: #ffffff;
  border-radius: 16px;
  padding: 12px 8px 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 4px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.kk-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.kk-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.kk-item:active .kk-icon-wrap {
  transform: scale(0.92);
}

.kk-icon-wrap svg {
  width: 34px;
  height: 34px;
}

.kk-badge {
  position: absolute;
  top: -4px;
  right: 4px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
}

.kk-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #1f2937;
}

/* 会员码+积分+满免快捷条 */
.quick-perks-strip {
  margin: 0 12px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.perk-pill {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  cursor: pointer;
}

.perk-pill strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.perk-pill span {
  font-size: 11px;
  color: var(--text-sub);
}

/* 限时秒杀 */
.seckill-card {
  margin: 0 12px 10px;
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 100%);
  border: 1px solid #fecdd3;
  border-radius: 16px;
  padding: 12px;
}

.seckill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.seckill-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #be123c;
}

.countdown-box {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #be123c;
}

.cd-num {
  background: #e11d48;
  color: #fff;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}

.seckill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.seckill-item {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 双列瀑布流商品卡 */
.section-head {
  margin: 12px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head h3 {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.section-head span {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

.waterfall-grid {
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.prod-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.prod-art {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.prod-art-sm {
  height: 54px;
  border-radius: 8px;
}

.prod-art-md {
  height: 118px;
}

.prod-art-lg {
  height: 185px;
}

.prod-art-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(22, 163, 74, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.prod-art-sub {
  font-size: 11px;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.65);
  margin-top: 2px;
}

.prod-card-body {
  padding: 9px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prod-name {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}

.prod-rebate {
  margin-top: 4px;
  display: inline-block;
  align-self: flex-start;
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.prod-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-wrap {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.price-now {
  font-size: 16px;
  font-weight: 800;
  color: var(--promo-red);
}

.price-now small {
  font-size: 11px;
}

.price-orig {
  font-size: 11px;
  color: #9ca3af;
  text-decoration: line-through;
}

.add-circle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.spec-pill-btn {
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.step-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.step-btn.plus {
  background: var(--brand);
  color: #fff;
}

.step-qty {
  font-size: 13px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

/* ==================== 分类快速下单页（蜜雪冰城风） ==================== */
.cat-top-bar {
  background: #fff;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mode-pills {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px;
}

.mode-pills button {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.mode-pills button.active {
  background: var(--brand);
  color: #fff;
}

.free-ship-tip {
  font-size: 11.5px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.cat-split {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

.cat-sidebar {
  width: 92px;
  flex-shrink: 0;
  background: #f3f5f4;
  overflow-y: auto;
  padding-bottom: 84px;
}

.cat-side-item {
  position: relative;
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #4b5563;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.cat-side-item.active {
  background: #ffffff;
  color: var(--brand);
  font-weight: 800;
}

.cat-side-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3.5px;
  background: var(--brand);
  border-radius: 0 4px 4px 0;
}

.cat-side-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cat-content {
  flex: 1;
  background: #ffffff;
  overflow-y: auto;
  padding: 10px 10px 90px;
}

.cat-group-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-prod-row {
  display: flex;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.cat-prod-thumb {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.cat-prod-thumb .prod-art-md {
  height: 82px;
}

.cat-prod-thumb .prod-art-emoji {
  font-size: 32px !important;
}

.cat-prod-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cat-prod-info .prod-name {
  min-height: auto;
  font-size: 13.5px;
}

.cat-prod-desc {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 分类页底部悬浮极速结算条 */
.quick-cart-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tabbar-h) + 8px);
  height: 50px;
  background: #1f2937;
  color: #ffffff;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 0 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
  z-index: 35;
}

.quick-cart-bar.hidden {
  display: none;
}

.qcb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.qcb-bag {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.qcb-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qcb-price {
  font-size: 16px;
  font-weight: 800;
}

.qcb-sub {
  font-size: 10.5px;
  color: #cbd5e1;
}

.qcb-btn {
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

/* ==================== 底部 5 大导航栏（全局常驻） ==================== */
.mp-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tabbar-h);
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
}

.tab-btn {
  position: relative;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--brand);
  font-weight: 800;
}

.tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 20px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==================== 通用卡片与页面组件 ==================== */
.page-pad {
  padding: 12px;
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.btn-primary {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ==================== 独立会员码页（1:1 复刻升级参考图） ==================== */
.member-code-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 26px 20px 24px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.mc-barcode-box {
  width: 100%;
  padding: 6px 4px;
  background: #ffffff;
}

.mc-number-row {
  margin: 12px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

.mc-copy-btn {
  border: none;
  background: transparent;
  color: #16a34a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mc-qr-box {
  display: inline-flex;
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.mc-user-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
  display: flex;
  justify-content: space-around;
  font-size: 12px;
  color: var(--text-sub);
}

.mc-user-meta strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-top: 2px;
}

/* ==================== 会员中心 ==================== */
.mine-hero {
  background: linear-gradient(135deg, #dcfce7 0%, #fef9c3 60%, #ffedd5 100%);
  padding: 16px 14px 18px;
  border-radius: 0 0 22px 22px;
}

.mine-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mine-user-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.mine-name {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}

.mine-level-pill {
  display: inline-block;
  margin-top: 4px;
  background: #1f2937;
  color: #fde047;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.mine-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.mine-stat-item {
  cursor: pointer;
}

.mine-stat-val {
  font-size: 19px;
  font-weight: 800;
  color: #111827;
}

.mine-stat-lbl {
  font-size: 11.5px;
  color: #4b5563;
  margin-top: 2px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
  text-align: center;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 4px;
  text-align: center;
}

.icon-tile {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #374151;
  cursor: pointer;
}

.icon-tile-emo {
  font-size: 22px;
}

.list-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
}

.list-menu-item:last-child {
  border-bottom: none;
}

/* ==================== 推广中心 ==================== */
.promo-banner {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: #fff;
  padding: 16px 14px 20px;
  border-radius: 0 0 22px 22px;
}

.promo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 6px;
}

.promo-kpi-grid strong {
  display: block;
  font-size: 18px;
}

.promo-kpi-grid span {
  font-size: 11px;
  opacity: 0.9;
}

/* ==================== 购物车 & 订单 ==================== */
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cart-item-row:last-child {
  border-bottom: none;
}

.check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  color: #fff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.check-circle.checked {
  border-color: var(--brand);
  background: var(--brand);
}

.cart-checkout-bar {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.order-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 10px;
}

.order-tabs button {
  border: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7280;
  border-radius: 9px;
  cursor: pointer;
}

.order-tabs button.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.status-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-pending_ship { background: #fff7ed; color: #ea580c; }
.status-shipping { background: #eff6ff; color: #2563eb; }
.status-completed { background: #ecfdf5; color: #16a34a; }
.status-refund { background: #fef2f2; color: #dc2626; }

/* ==================== 弹窗与 Toast ==================== */
.mp-modal-root {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mp-modal-root.center {
  align-items: center;
  padding: 16px;
}

.mp-modal-root.hidden {
  display: none;
}

.modal-sheet {
  width: 100%;
  max-height: 82%;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 16px;
  overflow-y: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px;
  max-height: 85%;
  overflow-y: auto;
}

.mp-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 120;
  max-width: 82%;
  text-align: center;
  pointer-events: none;
}

.mp-toast.hidden {
  display: none;
}

.spec-chip {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.spec-chip.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.input-field {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.input-field:focus {
  border-color: var(--brand);
}

/* ===== 窄屏排版修复（选规格按钮不再竖排） ===== */
.spec-pill-btn {
  white-space: nowrap;
  flex: 0 0 auto;
  line-height: 1.5;
}
.prod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.prod-footer .price-wrap {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

/* ===== 加购飞入购物车动画 ===== */
.fly-dot {
  position: fixed;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #86efac, #16a34a);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  pointer-events: none;
  transition: left .62s cubic-bezier(.45, -0.25, .85, .55),
              top .62s cubic-bezier(.45, -0.25, .85, .55),
              transform .62s ease, opacity .62s ease;
}
@keyframes cartBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.tab-btn.bump { animation: cartBump .42s ease; }

@media (max-width: 380px) {
  .cat-prod-thumb { width: 70px; height: 70px; }
  .cat-prod-thumb .prod-art-md { height: 70px; }
  .spec-pill-btn { font-size: 10.5px; padding: 4px 8px; }
  .price-orig { display: none; }
  .cat-prod-info .prod-name { font-size: 12.5px; }
  .prod-rebate { font-size: 10px; }
  .cat-prod-row { gap: 8px; }
}

/* ===== 更窄屏（<=380）细节修正 ===== */
@media (max-width: 380px) {
  .header-title {
    font-size: 14px;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .price-now { font-size: 15px; }
  .spec-pill-btn { font-size: 10px; padding: 4px 7px; }
  .prod-footer { gap: 4px; }
  .prod-rebate { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cat-delivery-switch button, .cat-delivery-switch .seg-btn { font-size: 11px; padding: 6px 8px; }
}

@media (max-width: 360px) {
  .header-title { display: none; }
  .dual-nav-btn { font-size: 11px; padding: 0 8px; }
  .wx-capsule { transform: scale(0.9); }
}

@media (max-width: 380px) {
  .cat-delivery-switch button,
  [data-cat-del] {
    white-space: nowrap;
    font-size: 10.5px;
    padding: 6px 8px;
  }
}

/* ===== 快速购物车抽屉：商品缩略图 ===== */
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.drawer-thumb {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
}
.drawer-thumb .prod-art-sm,
.drawer-thumb .prod-art-md {
  width: 100%;
  height: 46px;
  border-radius: 10px;
}
.drawer-thumb .prod-art-emoji {
  font-size: 22px !important;
}

/* ===== 分类页：连续滚动（划完一栏自动接下一栏） ===== */
.cat-sec {
  padding-bottom: 6px;
}
.cat-sec + .cat-sec {
  border-top: 8px solid #f3f5f4;
  margin-top: 2px;
}
.cat-sec .cat-group-title {
  position: sticky;
  top: -10px;
  z-index: 3;
  background: #ffffff;
  margin: -4px 0 10px;
  padding: 8px 0 8px;
}
.cat-empty {
  text-align: center;
  padding: 30px 10px;
  color: #9ca3af;
  font-size: 13px;
}

/* ===== 购物车凑单条：按钮不换行 ===== */
.quick-fill-bar .btn-outline,
#cart-continue-buy {
  white-space: nowrap;
  flex: 0 0 auto;
  margin-left: 8px;
}

/* ===== 分类商品行放大（客户要求更直观） ===== */
.cat-prod-row {
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.cat-prod-thumb {
  width: 118px !important;
  height: 118px !important;
  border-radius: 14px;
}
.cat-prod-thumb .prod-art-md {
  height: 118px !important;
}
.cat-prod-thumb .prod-art-emoji {
  font-size: 46px !important;
}
.cat-prod-info .prod-name {
  font-size: 15px !important;
  line-height: 1.35;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}
.cat-prod-desc {
  font-size: 12px !important;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-prod-info .price-now {
  font-size: 19px !important;
}

/* 分类行：不显示划线价，避免挤成 "¥3" */
.cat-prod-info .price-orig { display: none !important; }
