/* ===== 移动端 CSS ===== */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root{
  --brand:#00b386;
  --brand-2:#00d4aa;
  --danger:#e34d59;
  --warning:#e88c04;
  --info:#0052d9;
  --text:#111;
  --muted:#999;
  --bg:#f5f5f5;
  --card:#fff;
  --line:#f0f0f0;
  --shadow:0 1px 4px rgba(0,0,0,.06);
  --radius:12px;
}
body { font-family: -apple-system,'PingFang SC','Microsoft YaHei',sans-serif; background: var(--bg); overflow: hidden; color: var(--text); }

/* Phone Shell */
.phone-shell {
  display: flex; justify-content: center; align-items: center;
  min-height: 100vh; background: linear-gradient(135deg,#1a2332 0%,#2d3f55 100%);
  padding: 20px;
}
.phone {
  width: 390px; height: 844px;
  background: #fff; border-radius: 44px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 10px #111, 0 0 0 12px #333;
  overflow: hidden; position: relative; display: flex; flex-direction: column;
}
.phone-status-bar {
  height: 44px; background: #fff; display: flex;
  align-items: center; justify-content: space-between;
  padding: 0 24px; font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.phone-content {
  flex: 1; overflow: visible; position: relative;
  display: flex; flex-direction: column;
}
.phone-home-indicator {
  height: 34px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.home-bar { width: 120px; height: 5px; background: #222; border-radius: 3px; }

/* Page System */
.page {
  position: absolute; inset: 0; background: #f5f5f5;
  overflow: visible;
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.page.active { transform: translateX(0); }
.page.prev   { transform: translateX(-100%); }

/* Top Nav */
.top-nav {
  height: 48px; background: #fff; display: flex;
  align-items: center; padding: 0 16px; gap: 10px;
  border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
  position: sticky; top: 0; z-index: 10;
}
.nav-back { font-size: 18px; cursor: pointer; padding: 4px 8px 4px 0; }
.nav-title { flex: 1; font-size: 16px; font-weight: 600; color: #111; }
.nav-right { font-size: 13px; color: var(--brand); cursor: pointer; }

/* Hidden scrollbar */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }

/* Bottom Tab */
.bottom-tab {
  height: 56px; background: #fff; border-top: 1px solid #f0f0f0;
  display: flex; align-items: center; flex-shrink: 0;
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 100;
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; cursor: pointer; padding: 4px 0;
}
.tab-btn .tab-icon { width: 24px; height: 24px; }
.tab-btn:nth-child(1) .tab-icon { background: url('../assert/2/home_unselected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(1).active .tab-icon { background: url('../assert/2/home_selected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(2) .tab-icon { background: url('../assert/2/category_unselected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(2).active .tab-icon { background: url('../assert/2/category_selected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(3) .tab-icon { background: url('../assert/2/cart_unselected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(3).active .tab-icon { background: url('../assert/2/cart_selected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(4) .tab-icon { background: url('../assert/2/profile_unselected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(4).active .tab-icon { background: url('../assert/2/profile_selected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(5) .tab-icon { background: url('../assert/2/profile_unselected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn:nth-child(5).active .tab-icon { background: url('../assert/2/profile_selected.png') no-repeat center center; background-size: 24px 24px; }
.tab-btn .tab-label { font-size: 10px; color: #999; margin-top: 2px; }
.tab-btn.active .tab-label { color: #00b386; }

/* Banner */
.banner {
  margin: 10px 12px; border-radius: 12px; overflow: hidden;
  height: 160px; position: relative; background: linear-gradient(135deg,#1a8a6e,var(--brand-2));
  display: flex; align-items: center;
}
.banner-content { padding: 20px; color: #fff; }
.banner-title { font-size: 22px; font-weight: 700; line-height: 1.2; }
.banner-sub { font-size: 12px; opacity: .8; margin-top: 6px; }
.banner-img { position: absolute; right: 20px; font-size: 80px; opacity: .9; }
.banner-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); }
.dot.active { background: #fff; width: 16px; border-radius: 3px; }

/* Category Nav */
.cat-nav { background: #fff; margin: 0 12px 10px; border-radius: 12px; padding: 12px 0; }
.cat-scroll { display: flex; gap: 0; overflow-x: auto; padding: 0 8px; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px 14px; flex-shrink: 0; cursor: pointer;
}
.cat-btn .cat-emoji { font-size: 28px; color:#52a41e;}
.cat-btn .cat-name { font-size: 11px; color: #555; }
.cat-btn.active .cat-name { color: var(--brand); font-weight: 600; }

/* Section header */
.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 8px; font-size: 15px; font-weight: 700; color: #111;
}
.section-hd .more { font-size: 12px; color: #999; font-weight: 400; cursor: pointer; }

/* Coupon strip */
.coupon-strip {
  display: flex; gap: 8px; padding: 10px 12px 10px; overflow-x: auto;
}
.coupon-strip::-webkit-scrollbar { display: none; }
.coupon-card {
  flex-shrink: 0; background: linear-gradient(135deg,#ff6b35,#e34d59);
  border-radius: 10px; padding: 4px 30px; color: #fff; min-width: 100px;
}
.coupon-card.green { background: linear-gradient(135deg,#00b386,#00d4aa); }
.coupon-card.blue  { background: linear-gradient(135deg,#0052d9,#1677ff); }
.coupon-val { font-size: 20px; font-weight: 800; }
.coupon-val span { font-size: 12px; font-weight: 400; }
.coupon-cond { font-size: 10px; opacity: .8; margin-top: 2px; }
.coupon-name { font-size: 11px; margin-top: 4px; }

/* Flash sale */
.flash-hd {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px;
  background: linear-gradient(90deg,#fff7e6,#fff);
}
.flash-hd .more { font-size: 12px; color: #999; font-weight: 400; cursor: pointer; }
.flash-title { font-size: 15px; font-weight: 700; color: #e88c04; }
.flash-timer { display: flex; gap: 3px; align-items: center; }
.time-block {
  background: #e34d59; color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 5px; border-radius: 4px;
}
.time-sep { font-size: 12px; color: #e34d59; font-weight: 700; }
.flash-scroll { display: flex; gap: 10px; padding: 0 12px 12px; overflow-x: auto; }
.flash-scroll::-webkit-scrollbar { display: none; }
.flash-card {
  flex-shrink: 0; width: 110px; background: #fff;
  border-radius: 10px; overflow: hidden; cursor: pointer;
}
.flash-card .fi { font-size: 48px; text-align: center; padding: 12px 0 12px; background: #ffffff; height: 108px; }
.flash-card .fn { font-size: 12px; padding: 6px 8px 2px; font-weight: 500; }
.flash-card .fp-row { display: flex; align-items: baseline; gap: 4px; padding: 0 8px 8px; }
.flash-card .fp { font-size: 15px; font-weight: 700; color: #e34d59; }
.flash-card .fop { font-size: 10px; color: #ccc; text-decoration: line-through; }

/* Presale Products */
.presale-tip { font-size: 11px; color: #666; padding: 8px 16px; background: #f0f7ff; margin: 0 12px; border-radius: 6px; }
.presale-card .flash-title { color: #0052d9; }
.presale-img-wrap { position: relative; }
.presale-tag {
  position: absolute; top: 4px; right: 4px;
  background: #0052d9; color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  font-weight: 600;
}

/* Product grid */
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px 10px; }
.prod-card {
  background: #fff; border-radius: 12px; overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.prod-img { height: 140px; background: #f9f9f9; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.prod-info { padding: 10px; }
.prod-name { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.prod-sub { font-size: 11px; color: #999; margin-bottom: 6px; }
.prod-price-row { display: flex; align-items: center; justify-content: space-between; }
.prod-price { font-size: 16px; font-weight: 700; color: #e34d59; }
.prod-price span { font-size: 12px; }
.add-btn {
  width: 26px; height: 26px; background: var(--brand); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0;
}

/* 列表行内的数量增减器（- N +） */
.li-stepper {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  min-width: 26px; justify-content: flex-end;
}
.li-stepper.presale-stepper { /* 预售列表内嵌时与价格同行 */
  margin-left: 8px;
}
.stepper-add {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 600;
  cursor: pointer; flex-shrink: 0; line-height: 1;
  background: var(--brand);
  transition: transform .15s;
}
.stepper-add[data-presale="1"] { background: #0052d9; }
.stepper-add:active { transform: scale(0.9); }
.stepper-minus {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-size: 20px; font-weight: 600;
  border: 1px solid var(--brand); background: #fff;
  cursor: pointer; flex-shrink: 0; line-height: 1;
  transition: transform .15s;
}
.stepper-minus[data-presale="1"] { color: #0052d9; border-color: #0052d9; }
.stepper-minus:active { transform: scale(0.9); }
.stepper-num {
  min-width: 22px; text-align: center;
  font-size: 14px; font-weight: 600; color: #333;
  font-variant-numeric: tabular-nums;
}
.stepper-num[data-presale="1"] { color: #0052d9; }

/* Category page */
.cat-page-layout { display: flex; flex: 1; overflow: hidden; }
.cat-sidebar {
  width: 80px; background: #fff; border-right: 1px solid #f0f0f0;
  overflow-y: auto; flex-shrink: 0;
}
.cat-sidebar::-webkit-scrollbar { display: none; }
.cat-side-item {
  padding: 14px 0; text-align: center; font-size: 12px; color: #555;
  cursor: pointer; border-left: 3px solid transparent;
}
.cat-side-item.active { color: #00b386; font-weight: 600; border-left-color: #00b386; background: #f0fff9; }
.cat-side-presale { margin-top: 8px; border-top: 1px dashed #e0e0e0; padding-top: 18px; color: #0052d9; }
.cat-side-presale.active { color: #0052d9; border-left-color: #0052d9; background: #e6f0ff; }
.cat-side-item .ci { font-size: 22px; display: block; margin-bottom: 4px; }
.cat-content { flex: 1; overflow-y: auto; background: #f5f5f5; padding-bottom: 66px; }
.cat-content::-webkit-scrollbar { display: none; }
.sub-cat-title { font-size: 13px; color: #888; padding: 12px 12px 6px; font-weight: 500; }
.cat-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 10px 8px; }
.cat-prod-item {
  background: #fff; border-radius: 10px; padding: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
}
.cat-prod-item .cpi-img { font-size: 40px; margin-bottom: 6px; }
.cat-prod-item .cpi-name { font-size: 12px; font-weight: 500; text-align: center; }
.cat-prod-item .cpi-price { font-size: 13px; font-weight: 700; color: #e34d59; margin-top: 3px; }

/* Product Detail */
.detail-img { height: 320px; background: linear-gradient(180deg,#f5f9f5,#e8f5e8); display: flex; align-items: center; justify-content: center; font-size: 120px; }
.detail-info { background: #fff; padding: 16px; }
.detail-price { font-size: 26px; font-weight: 800; color: #e34d59; }
.detail-price span { font-size: 14px; }
.detail-old { font-size: 12px; color: #ccc; text-decoration: line-through; margin-left: 6px; }
.detail-name { font-size: 17px; font-weight: 600; margin-top: 8px; color: #111; }
.detail-sub { font-size: 12px; color: #999; margin-top: 4px; }
.detail-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag { background: #e6fff8; color: #00b386; font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.spec-row { background: #fff; margin-top: 8px; padding: 14px 16px; }
.spec-title { font-size: 13px; color: #666; margin-bottom: 10px; }
.spec-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.spec-opt {
  padding: 6px 14px; border: 1.5px solid #e0e0e0; border-radius: 20px;
  font-size: 13px; color: #333; cursor: pointer; transition: all .2s;
}
.spec-opt.active { border-color: #00b386; color: #00b386; background: #f0fff9; font-weight: 600; }
.qty-row { background: #fff; margin-top: 8px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.qty-ctrl { display: flex; align-items: center; gap: 12px; }
.qty-op { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #e0e0e0; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; }
.qty-op.plus { border-color: #00b386; color: #00b386; }
.desc-block { background: #fff; margin-top: 8px; padding: 14px 16px; }
.detail-footer {
  position: sticky; bottom: 0; background: #fff; padding: 10px 16px;
  display: flex; gap: 10px; border-top: 1px solid #f0f0f0;
}
.cart-add-btn { flex: 1; height: 44px; background: #ffcc44; border: none; border-radius: 22px; font-size: 15px; font-weight: 600; cursor: pointer; color: #333; }
.buy-btn { flex: 1; height: 44px; background: #00b386; border: none; border-radius: 22px; font-size: 15px; font-weight: 600; cursor: pointer; color: #fff; }

/* Cart page */
.cart-shop-group { background: #fff; margin: 10px 12px; border-radius: 12px; overflow: hidden; }
.cart-shop-hd { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #f5f5f5; font-size: 14px; font-weight: 600; }
.cart-prod-item { display: flex; gap: 12px; padding: 12px 14px; align-items: center; border-bottom: 1px solid #f5f5f5; }
.cart-check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; font-size: 12px; background: var(--brand); color: #fff; }
.cart-prod-img { font-size: 48px; flex-shrink: 0; }
.cart-prod-info { flex: 1; }
.cart-prod-name { font-size: 13px; font-weight: 500; }
.cart-prod-spec { font-size: 11px; color: #999; margin: 3px 0; }
.cart-prod-price { font-size: 14px; font-weight: 700; color: #e34d59; }
.cart-qty-ctrl { display: flex; align-items: center; gap: 6px; }
.cqb { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ddd; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; transition: transform 0.15s ease; }
.cqb-plus { border-color: var(--brand); color: var(--brand); }
.cart-del { font-size: 12px; color: #999; cursor: pointer; padding-left: 8px; }
.cart-del:hover { color: #e34d59; }
.cart-prod-img-wrap { font-size: 48px; flex-shrink: 0; position: relative; }
.cart-presale-tag {
  position: absolute; top: 0; right: 0;
  background: #0052d9; color: #fff;
  font-size: 9px; padding: 1px 4px; border-radius: 3px;
  font-weight: 600;
}
.presale-badge {
  display: inline-block;
  background: #e6f0ff; color: #0052d9;
  font-size: 10px; padding: 2px 5px; border-radius: 4px;
  margin-left: 4px; font-weight: 500;
}
.cart-presale-tip {
  display: flex; align-items: center; gap: 6px;
  background: #e6f0ff; color: #0052d9;
  font-size: 12px; padding: 8px 14px;
  margin: 10px 12px;
  border-radius: 8px;
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  background: #e34d59;
  color: #fff;
  font-size: 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transition: transform 0.2s ease;
}
.nav-cart {
  position: relative;
  cursor: pointer;
}
.cart-footer {
  position: fixed; bottom: 56px; left: 0; right: 0; background: #fff; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; border-top: 1px solid #f0f0f0; z-index: 99;
}
.cart-total-area { flex: 1; }
.cart-total-label { font-size: 12px; color: #999; }
.cart-total-val { font-size: 18px; font-weight: 700; color: #e34d59; }
.checkout-btn { height: 44px; padding: 0 28px; background: #00b386; border: none; border-radius: 22px; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }

/* Order Submit */
.order-block { background: #fff; margin: 10px 12px; border-radius: 12px; padding: 14px 16px; }
.order-block-title { font-size: 13px; color: #999; margin-bottom: 10px; }
.addr-row { display: flex; align-items: center; gap: 10px; }
.addr-info { flex: 1; }
.addr-name { font-size: 14px; font-weight: 600; }
.addr-detail { font-size: 12px; color: #999; margin-top: 3px; }
.delivery-opts { display: flex; gap: 10px; }
.d-opt {
  flex: 1; border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 12px;
  cursor: pointer; transition: all .2s; text-align: center;
}
.d-opt.sel { border-color: #00b386; background: #f0fff9; }
.d-opt .do-icon { font-size: 24px; margin-bottom: 4px; }
.d-opt .do-name { font-size: 13px; font-weight: 500; color: #333; }
.d-opt.sel .do-name { color: #00b386; }
.d-opt .do-sub { font-size: 11px; color: #999; margin-top: 2px; }

/* Delivery Options - New */
.delivery-main-opts { display: flex; gap: 10px; margin-bottom: 10px; }
.dm-opt {
  flex: 1; border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 14px;
  cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 8px;
}
.dm-opt.sel { border-color: #00b386; background: #f0fff9; }
.dm-opt .dm-icon { color: #666; }
.dm-opt.sel .dm-icon { color: #00b386; }
.dm-opt .dm-name { font-size: 14px; font-weight: 600; color: #333; }
.dm-opt.sel .dm-name { color: #00b386; }
.dm-opt .dm-arrow { margin-left: auto; color: #999; }
.delivery-sub-panel { background: #f9f9f9; border-radius: 8px; padding: 8px; margin-top: 8px; }
.delivery-sub-panel.hidden { display: none; }
.ds-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 6px; cursor: pointer; transition: all .2s;
}
.ds-opt.active { background: #fff; border: 1px solid #00b386; }
.ds-opt .ds-icon { color: #666; }
.ds-opt.active .ds-icon { color: #00b386; }
.ds-opt .ds-info { flex: 1; }
.ds-opt .ds-name { font-size: 13px; font-weight: 500; color: #333; }
.ds-opt.active .ds-name { color: #00b386; }
.ds-opt .ds-desc { font-size: 11px; color: #999; margin-top: 2px; }
.ds-opt .ds-check { color: #00b386; opacity: 0; }
.ds-opt.active .ds-check { opacity: 1; }

/* Station Selector */
.station-selector { margin-top: 10px; }
.station-selector.hidden { display: none; }
.ss-title { font-size: 13px; color: #666; margin-bottom: 8px; }
.ss-list { display: flex; flex-direction: column; gap: 6px; }
.ss-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #fff; border-radius: 8px; cursor: pointer; border: 1px solid #f0f0f0;
}
.ss-item.active { border-color: #00b386; background: #f0fff9; }
.ss-item .ss-left { width: 20px; }
.ss-item .ss-info { flex: 1; }
.ss-item .ss-name { font-size: 13px; font-weight: 500; color: #333; }
.ss-item.active .ss-name { color: #00b386; }
.ss-item .ss-dist { font-size: 11px; color: #999; }
.ss-item .ss-check { width: 18px; }

/* Runleg Option */
.runleg-option { margin-top: 12px; background: #fff7e6; border-radius: 8px; padding: 12px; }
.ro-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #333; cursor: pointer; }
.ro-box { width: 18px; height: 18px; border: 1.5px solid #e88c04; border-radius: 4px; }
.ro-check.active .ro-box { background: #e88c04; position: relative; }
.ro-check.active .ro-box::after { content: '✓'; color: #fff; font-size: 12px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ro-panel { margin-top: 12px; }
.ro-panel.hidden { display: none; }
.ro-addr { margin-bottom: 10px; }
.ro-label { font-size: 12px; color: #666; margin-bottom: 4px; }
.ro-addr-input { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #fff; border-radius: 6px; font-size: 13px; color: #333; cursor: pointer; }
.ro-fee { margin-bottom: 10px; }
.ro-fee-val { font-size: 14px; font-weight: 600; color: #e34d59; }
.ro-pay-opts { display: flex; gap: 8px; }
.rp-opt { padding: 6px 12px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 12px; cursor: pointer; color: #666; }
.rp-opt.active { border-color: #00b386; background: #f0fff9; color: #00b386; }

.coupon-sel-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.order-prod-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.order-prod-name { flex: 1; font-size: 13px; }
.order-prod-spec { font-size: 11px; color: #999; }
.order-prod-price { font-size: 13px; font-weight: 600; color: #e34d59; }
.order-prod-group-title {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 0 4px; font-size: 12px; color: #555;
}
.opg-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
.opg-tag-presale { background: #e6f0ff; color: #0052d9; }
.order-prod-presale { background: #fafbff; }
.order-prod-img-wrap { position: relative; flex-shrink: 0; }
.order-prod-img-wrap .presale-tag {
  position: absolute; top: -2px; right: -4px;
  background: #0052d9; color: #fff;
  font-size: 9px; padding: 1px 4px; border-radius: 4px;
}
.op-spec-tip {
  display: inline-block; margin-left: 6px;
  font-size: 10px; color: #0052d9;
  background: #e6f0ff; padding: 1px 5px; border-radius: 4px;
}
.order-prod-presale-tip {
  margin-top: 8px; padding: 8px 10px;
  background: #e6f0ff; border-radius: 6px;
  font-size: 12px; color: #0052d9;
  display: flex; align-items: center;
}
.price-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: #555; }
.price-row.total { font-size: 15px; font-weight: 700; color: #111; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.submit-btn-wrap { padding: 12px 16px; }
.submit-btn { width: 100%; height: 48px; background: #00b386; border: none; border-radius: 24px; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }

/* My Orders */
.order-item-card { background: #fff; margin: 0 12px 10px; border-radius: 12px; overflow: hidden; }
.order-item-hd { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f5f5f5; }
.order-num { font-size: 12px; color: #999; }
.order-status { font-size: 12px; font-weight: 600; color: #00b386; }
.order-status.pending { color: #e88c04; }
.order-status.wait { color: #0052d9; }
.order-item-body { display: flex; gap: 10px; padding: 12px 14px; }
.order-item-img { font-size: 48px; }
.order-item-info { flex: 1; }
.order-item-name { font-size: 13px; font-weight: 500; }
.order-item-spec { font-size: 11px; color: #999; margin-top: 2px; }
.order-item-ft { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px 12px; }
.order-total { font-size: 13px; color: #555; }
.order-total strong { color: #e34d59; }
.order-actions { display: flex; gap: 8px; }
.oa-btn { padding: 6px 14px; border-radius: 16px; font-size: 12px; cursor: pointer; border: 1.5px solid #e0e0e0; background: #fff; color: #555; }
.oa-btn.primary { background: #00b386; color: #fff; border-color: #00b386; }

/* Profile */
.profile-header { background: linear-gradient(135deg,#1a8a6e,#00d4aa); padding: 16px 16px 50px; color: #fff; }
.profile-user { display: flex; align-items: center; gap: 12px; }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.profile-name { font-size: 18px; font-weight: 600; }
.profile-phone { font-size: 13px; opacity: .8; margin-top: 3px; }
.profile-stats { display: flex; margin-top: 20px; }
.ps-item { flex: 1; text-align: center; }
.ps-val { font-size: 22px; font-weight: 700; }
.ps-label { font-size: 11px; opacity: .7; margin-top: 2px; }
.member-card-strip {
  background: #fff; margin: -28px 16px 0; border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 4px 16px rgba(0,0,0,.1);
  display: flex; align-items: center; gap: 10px;
}

/* Member Code Modal */
.member-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.6); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.member-modal-content {
  background: #fff; border-radius: 20px; width: 300px;
  overflow: hidden; position: relative;
}
.member-modal-header {
  background: linear-gradient(135deg,#1a8a6e,#00d4aa);
  padding: 20px; text-align: center; position: relative;
}
.member-modal-close {
  position: absolute; top: 10px; right: 15px;
  font-size: 28px; color: #fff; cursor: pointer; line-height: 1;
}
.member-modal-body { padding: 30px 20px; text-align: center; }
.member-code-title { font-size: 18px; font-weight: 700; color: #1a2332; margin-bottom: 10px; }
.member-code-number {
  font-size: 14px; color: #666; margin-bottom: 20px;
  background: #f5f5f5; padding: 8px 16px; border-radius: 8px;
  display: inline-block;
}
.member-code-qr {
  background: #fff; padding: 20px; border-radius: 12px;
  border: 2px solid #f0f0f0; margin-bottom: 16px;
}
.qr-placeholder {
  width: 180px; height: 180px; background: url('../assert/qr-code-line.png') no-repeat center center; background-size: contain; margin: 0 auto;
}
.member-code-tip { font-size: 13px; color: #999; }
.member-code { font-size: 11px; color: #999; margin-top: 2px; }
.qr-icon { margin-left: auto; font-size: 28px; cursor: pointer; }
.menu-list { background: #fff; margin: 12px; border-radius: 12px; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.menu-icon { font-size: 20px; width: 24px; text-align: center; }
.menu-text { flex: 1; font-size: 14px; color: #333; }
.menu-arrow { color: #ccc; font-size: 14px; }
.menu-badge-red { background: #e34d59; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 8px; }

/* Search bar */
.search-input-wrap { display: flex; gap: 8px; padding: 10px 12px; background: #fff; }
.search-input { flex: 1; height: 36px; background: #f5f5f5; border: none; border-radius: 18px; padding: 0 14px; font-size: 14px; outline: none; }
.search-btn { height: 36px; padding: 0 16px; background: var(--brand); border: none; border-radius: 18px; color: #fff; font-size: 14px; cursor: pointer; }

/* Notification dot */
.notif-dot { width: 8px; height: 8px; background: #e34d59; border-radius: 50%; display: inline-block; margin-left: 2px; vertical-align: middle; }

/* Order filter tabs */
.order-filter-tab { display: flex; background: #fff; border-bottom: 1px solid #f0f0f0; flex-shrink: 0; }
.oft-item { flex: 1; text-align: center; padding: 12px 0; font-size: 12px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; }
.oft-item.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Home header */
.home-hd {
  background: var(--card);
  padding: 10px 16px 0;
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.home-loc { flex: 1; min-width: 0; }
.home-loc-main {
  font-size: 14px;
  font-weight: 600;
  display:flex;
  align-items:center;
  gap:6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-loc-main .chev { font-size: 12px; color: var(--brand); flex-shrink: 0; }
.home-actions { display:flex; align-items:center; gap: 2px; }
.home-action {
  position: relative;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  display:flex;
  align-items:center;
  gap:6px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 10px;
  user-select: none;
  transition: background .15s ease;
}
.home-action:active { background: #f5f5f5; }
.home-action img { width:18px;height:18px;object-fit:contain; }
.home-action .red-dot {
  position:absolute;
  top:6px;
  right:6px;
  width:8px;
  height:8px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}

/* Sub category tabs */
.subcat-tabs {
  display: flex;
  overflow-x: auto;
  padding: 10px 10px 0;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid #f5f5f5;
}
.subcat-tabs::-webkit-scrollbar { display:none; }
.sct {
  padding: 8px 14px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  flex-shrink: 0;
  border-bottom: 2px solid transparent;
  transition: all .15s ease;
}
.sct.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* List rows */
.list-wrap { padding: 10px; background: #fff; }
.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}
.list-row:last-child { border-bottom: none; }
.list-row .li-img { width: 48px; height: 48px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.list-row .li-img img { width:48px; height:48px; object-fit:contain; }
.list-row .li-body { flex: 1; min-width: 0; }
.list-row .li-title { font-size: 13px; font-weight: 600; color: #111; }
.list-row .li-sub { font-size: 11px; color: #999; margin-top: 2px; }
.list-row .li-price { font-size: 15px; font-weight: 800; color: var(--danger); flex-shrink:0; }
.li-img-presale { position: relative; }
.li-img-presale .presale-tag {
  position: absolute; top: 0; right: 0;
  background: #0052d9; color: #fff;
  font-size: 9px; padding: 1px 4px; border-radius: 4px;
}
.li-price-row { display:flex; align-items:baseline; gap:6px; margin-top: 3px; }
.li-market { font-size: 11px; color: #999; text-decoration: line-through; }

/* Review block */
.review-block { margin-top: 10px; background: #fff; }

/* Nav icon */
.nav-icon { font-size: 18px; }

/* Coupon Page Styles */
.coupon-tabs {
  display: flex;
  background: #fff;
  padding: 10px 15px;
  gap: 20px;
  border-bottom: 1px solid #f5f5f5;
}
.coupon-tab {
  font-size: 14px;
  color: #666;
  padding: 8px 0;
  position: relative;
  cursor: pointer;
}
.coupon-tab.active {
  color: var(--brand);
  font-weight: 600;
}
.coupon-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
}

.coupon-redeem {
  display: flex;
  gap: 10px;
  padding: 12px 15px;
  background: #fff;
  margin: 10px;
  border-radius: 8px;
}
.redeem-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.redeem-btn {
  padding: 0 20px;
  height: 36px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.coupon-list {
  padding: 0 10px;
}
.coupon-item {
  display: flex;
  background: #fff;
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.coupon-left {
  width: 100px;
  background: linear-gradient(135deg, #e34d59 0%, #ff6b6b 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  color: #fff;
}
.coupon-amount {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.coupon-condition {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.9;
}
.coupon-right {
  flex: 1;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.coupon-info-wrap {
  flex: 1;
}
.coupon-name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}
.coupon-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.coupon-tag {
  font-size: 10px;
  color: var(--brand);
  background: rgba(0,179,134,0.1);
  padding: 1px 5px;
  border-radius: 2px;
}
.coupon-info {
  font-size: 11px;
  color: #999;
}
.coupon-desc {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.coupon-use-btn {
  padding: 6px 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 10px;
}

.no-more {
  text-align: center;
  font-size: 12px;
  color: #999;
  padding: 20px 0;
}

.history-link {
  text-align: center;
  font-size: 13px;
  color: #666;
  padding: 15px 0;
  cursor: pointer;
}

/* ============== 预售专区面板（多多买菜风格） ============== */
.presale-panel {
  /* 内容由 .cat-content 控制背景 */
}

/* 顶部蓝色 banner */
.presale-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 10px 8px;
  padding: 14px 14px;
  background: linear-gradient(135deg, #0052d9 0%, #1677ff 50%, #4096ff 100%);
  border-radius: 12px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.presale-banner::before {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.presale-banner::after {
  content: '';
  position: absolute;
  right: 30px; bottom: -40px;
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.presale-banner-icon {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.presale-banner-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.presale-banner-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.presale-banner-sub {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 4px;
  line-height: 1.4;
}
.presale-banner-cta {
  text-align: right;
  position: relative; z-index: 1;
  flex-shrink: 0;
}
.presale-banner-cta-label {
  font-size: 10px;
  opacity: 0.85;
}
.presale-banner-cta-time {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  margin-top: 2px;
  background: rgba(0,0,0,0.18);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

/* 规则提示条 */
.presale-rules {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 10px 8px;
  padding: 8px 12px;
  background: #e6f0ff;
  color: #0052d9;
  font-size: 12px;
  border-radius: 8px;
  line-height: 1.4;
}
.presale-rules strong {
  color: #003a99;
  font-weight: 700;
}

/* 子分类 tabs 在预售面板中需去掉外边距 */
.presale-panel .subcat-tabs {
  margin: 0;
  border-radius: 0;
}

/* 商品列表 */
.presale-list {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 单个预售商品卡片 */
.presale-item {
  background: #fff;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.presale-item:active {
  transform: scale(0.99);
  background: #fafbff;
}
.presale-item-img {
  width: 100px;
  height: 100px;
  background: #fafafa;
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.presale-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.presale-item-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #0052d9;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(0,82,217,0.3);
}
.presale-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.presale-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}
.presale-item-sub {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.presale-item-sales {
  font-size: 10px;
  color: #999;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.presale-item-countdown {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #0052d9;
  background: #f0f5ff;
  padding: 3px 6px;
  border-radius: 4px;
  margin-top: 4px;
  align-self: flex-start;
}
.presale-cd-val {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.presale-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 8px;
}
.presale-item-prices {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.presale-item-market {
  font-size: 10px;
  color: #aaa;
  text-decoration: line-through;
}
.presale-item-presale {
  font-size: 16px;
  font-weight: 800;
  color: #e34d59;
  letter-spacing: -0.3px;
}
.presale-item-addbtn {
  width: 28px;
  height: 28px;
  background: #0052d9;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,82,217,0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}
.presale-item-addbtn:hover { background: #003a99; }
.presale-item-addbtn:active { transform: scale(0.9); }

/* 底部规则说明 */
.presale-footnote {
  margin: 12px 10px 0;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
}
.presale-footnote-title {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.presale-footnote-title::before {
  content: '';
  width: 3px;
  height: 12px;
  background: #0052d9;
  border-radius: 2px;
}
.presale-footnote-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.presale-footnote-list li {
  font-size: 11px;
  color: #666;
  line-height: 1.7;
  padding-left: 0;
}
