/* ============================================================
 * 苗水堂多商户商城 — 样式表 v2（大气全套版）
 * 主题色：#0d6b45（苗水深绿） 辅助：#12b76a（鲜绿） 点缀：#d4af37（金）
 * ============================================================ */
:root {
  --green: #0d6b45;
  --green-2: #0a5638;
  --green-3: #12b76a;
  --gold: #d4af37;
  --bg: #f3f6f4;
  --card: #ffffff;
  --muted: #8b9691;
  --text: #1c2b24;
  --line: #e7edea;
  --danger: #e0442c;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(13, 107, 69, 0.08);
  --shadow-lg: 0 8px 28px rgba(13, 107, 69, 0.14);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { 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: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; outline: none; }

.mall { max-width: 640px; margin: 0 auto; min-height: 100vh; position: relative; padding-bottom: 56px; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 4px;
  height: 48px; padding: 0 8px;
  background: rgba(13, 107, 69, 0.97);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff;
}
.topbar__title {
  flex: 1; text-align: center; font-size: 16px; font-weight: 600;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.topbar__side { display: flex; gap: 2px; }
.topbar__btn {
  border: 0; background: none; color: inherit;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.topbar__btn:active { background: rgba(255, 255, 255, 0.14); }

/* ---------------- 页面 ---------------- */
.page { min-height: calc(100vh - 104px); }
.loading { text-align: center; color: var(--muted); padding: 48px 16px; font-size: 13px; }
.loading.small { padding: 24px 16px; }
.spinner {
  width: 28px; height: 28px; margin: 0 auto 10px;
  border: 3px solid rgba(13, 107, 69, 0.15); border-top-color: var(--green);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 56px 20px; font-size: 14px; line-height: 1.8; }
.empty.small { padding: 24px 16px; font-size: 13px; }
.empty__icon { font-size: 46px; margin-bottom: 10px; }

/* ---------------- 底部 Tab ---------------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 100;
  display: flex; background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 7px; color: #7a8680; font-size: 10px;
}
.tab svg { margin-bottom: 1px; }
.tab.active { color: var(--green); font-weight: 600; }
.tab__badge {
  position: absolute; margin-top: -38px; margin-left: 26px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; font-size: 10px;
  border-radius: 8px; line-height: 16px; text-align: center; font-weight: 600;
}

/* ---------------- 轻提示 ---------------- */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: 999; background: rgba(20, 30, 25, 0.92); color: #fff;
  padding: 10px 18px; border-radius: 20px; font-size: 13px;
  opacity: 0; transition: all 0.25s; pointer-events: none; white-space: nowrap;
  max-width: 82vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 按钮 ---------------- */
.btn {
  border: 0; border-radius: 22px; padding: 11px 22px; font-size: 14px; font-weight: 600;
  transition: transform 0.12s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: linear-gradient(135deg, var(--green), var(--green-3));
  color: #fff; box-shadow: 0 4px 14px rgba(13, 107, 69, 0.28);
}
.btn--primary:disabled { opacity: 0.6; }
.btn--ghost { background: #eef4f0; color: var(--green); }
.btn--block { display: block; width: 100%; }
.btn--sm { padding: 7px 14px; font-size: 12px; border-radius: 16px; }

/* ---------------- 首页 Hero ---------------- */
.hero { position: relative; background: linear-gradient(150deg, #0d6b45 0%, #12875a 55%, #1aa56b 100%); padding: 18px 16px 34px; color: #fff; overflow: hidden; }
.hero__deco { position: absolute; right: -40px; top: -50px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 65%); }
.hero__deco::after { content: ''; position: absolute; right: 40px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 175, 55, 0.3), transparent 70%); }
.hero__body { position: relative; z-index: 1; }
.hero__brand { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 12px; }
.hero__brand b { color: #f6d77a; }
.hero__search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 22px; padding: 9px 14px; color: #9aa5a0;
}
.hero__search input { border: 0; background: none; flex: 1; font-size: 13px; color: var(--text); }

/* ---------------- 轮播 ---------------- */
.banner { padding: 12px 12px 0; }
.banner__track { position: relative; height: 150px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.banner__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s; }
.banner__slide.active { opacity: 1; }
.banner__slide img { width: 100%; height: 100%; object-fit: cover; }
.banner__dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.banner__dots i { width: 6px; height: 6px; border-radius: 3px; background: #c9d4cf; transition: all 0.3s; }
.banner__dots i.on { width: 16px; background: var(--green); }

/* ---------------- 金刚区 ---------------- */
.grid-kings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 12px 0; }
.king {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-radius: 14px; padding: 13px 6px 10px; color: #fff;
  box-shadow: var(--shadow); transition: transform 0.15s;
}
.king:active { transform: scale(0.95); }
.king__icon { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.king__label { font-size: 11px; font-weight: 600; }

/* ---------------- 区块标题 ---------------- */
.sec { padding: 18px 12px 0; }
.sec__hd { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 10px; }
.sec__hd b { font-size: 16px; }
.sec__hd div span { font-size: 11px; color: var(--muted); margin-left: 8px; }
.sec__hd a { font-size: 12px; color: var(--green); }

/* ---------------- 首页横滑推荐 ---------------- */
.rec { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.rec::-webkit-scrollbar { display: none; }
.rec__card { flex: 0 0 132px; background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.rec__img { aspect-ratio: 1; background: #f0f3f1; }
.rec__img img { width: 100%; height: 100%; object-fit: cover; }
.rec__name { padding: 7px 8px 0; font-size: 12px; line-height: 1.4; height: 33px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rec__price { padding: 3px 8px 8px; font-size: 14px; color: var(--danger); font-weight: 700; }

/* ---------------- 首页驿站 ---------------- */
.h-stations { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.h-stations::-webkit-scrollbar { display: none; }
.h-station { flex: 0 0 108px; background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.h-station__img { position: relative; aspect-ratio: 1; background: #eef4f0; }
.h-station__img img { width: 100%; height: 100%; object-fit: cover; }
.h-station__tag { position: absolute; left: 6px; top: 6px; background: rgba(18, 183, 106, 0.92); color: #fff; font-size: 9px; padding: 2px 6px; border-radius: 8px; }
.h-station__name { padding: 7px 8px 0; font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.h-station__meta { padding: 2px 8px 8px; font-size: 10px; color: var(--muted); }

/* ---------------- 首页优惠券 ---------------- */
.h-coupons { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.h-coupons::-webkit-scrollbar { display: none; }
.h-coupon { flex: 0 0 250px; display: flex; align-items: center; background: linear-gradient(135deg, #fff7e6, #fff); border: 1px solid #f3e2b8; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.h-coupon__left { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.h-coupon__left b { color: var(--danger); font-size: 18px; }
.h-coupon__left span { font-size: 11px; color: #6b7480; }
.h-coupon__right { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 12px; border-left: 1px dashed #e8d9ae; }
.h-coupon__right span { font-size: 10px; color: var(--muted); }
.h-coupon__btn { border: 0; background: linear-gradient(135deg, #f7b733, #fc4a1a); color: #fff; font-size: 11px; padding: 5px 14px; border-radius: 12px; font-weight: 600; }

/* ---------------- 好物广场 ---------------- */
.p-search { display: flex; gap: 8px; padding: 12px 12px 4px; }
.p-search input {
  flex: 1; border: 1px solid var(--line); border-radius: 20px; background: #fff;
  padding: 9px 14px; font-size: 13px;
}
.p-search button { border: 0; border-radius: 20px; background: var(--green); color: #fff; padding: 0 18px; font-size: 13px; font-weight: 600; }
.cats { display: flex; gap: 8px; padding: 10px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 6px 14px; font-size: 12px; color: #5c6b64; }
.cat.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
.filters { display: flex; gap: 6px; padding: 12px 12px 4px; }
.filter {
  border: 1px solid var(--line); background: #fff; border-radius: 15px;
  padding: 6px 14px; font-size: 12px; color: #5c6b64;
}
.filter.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

/* ---------------- 商品双列网格 ---------------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
.card { background: var(--card); border-radius: 13px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s; }
.card:active { transform: scale(0.98); }
.card__img { position: relative; aspect-ratio: 1; background: #f0f3f1; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__tag { position: absolute; left: 6px; top: 6px; color: #fff; font-size: 9px; padding: 2px 7px; border-radius: 8px; font-weight: 600; }
.tag--station { background: linear-gradient(135deg, #12b76a, #0d8f52); }
.tag--svc { background: rgba(13, 107, 69, 0.85); }
.card__body { padding: 8px 10px 10px; }
.card__name { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; min-height: 16px; }
.card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.card__sales { font-size: 10px; color: var(--muted); }
.price { color: var(--danger); font-weight: 700; }
.old { color: #b3bcb7; font-size: 11px; font-weight: 400; text-decoration: line-through; margin-left: 4px; }

/* ---------------- 驿站列表墙 ---------------- */
.station-wall { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.s-card { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.s-card__banner { position: relative; height: 130px; }
.s-card__banner img { width: 100%; height: 100%; object-fit: cover; }
.s-card__open { position: absolute; left: 10px; top: 10px; background: rgba(18, 183, 106, 0.94); color: #fff; font-size: 10px; padding: 3px 9px; border-radius: 10px; font-weight: 600; }
.s-card__body { position: relative; padding: 30px 14px 12px; }
.s-card__logo { position: absolute; top: -24px; left: 14px; width: 48px; height: 48px; border-radius: 12px; border: 2px solid #fff; box-shadow: var(--shadow); object-fit: cover; }
.s-card__name { font-size: 15px; font-weight: 600; }
.s-card__meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.s-card__addr { font-size: 12px; color: #66736d; margin-top: 6px; }

/* ---------------- 店铺页 ---------------- */
.shop-hero { position: relative; height: 160px; overflow: hidden; }
.shop-hero__bg { width: 100%; height: 100%; object-fit: cover; }
.shop-hero__mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 40, 28, 0.15), rgba(10, 40, 28, 0.72)); }
.shop-hero__info { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 12px; color: #fff; }
.shop-hero__logo { width: 58px; height: 58px; border-radius: 14px; border: 2px solid #fff; box-shadow: var(--shadow-lg); object-fit: cover; }
.shop-hero__txt { display: flex; flex-direction: column; gap: 2px; }
.shop-hero__txt b { font-size: 17px; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.shop-hero__txt span { font-size: 11px; opacity: 0.95; }
.shop-desc { margin: 12px 12px 0; background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 12px; color: #66736d; line-height: 1.6; }
.shop-addr { margin: 8px 12px 0; font-size: 12px; color: #66736d; padding-left: 4px; }

/* ---------------- 商品详情 ---------------- */
.pd__img { aspect-ratio: 1; background: #f0f3f1; }
.pd__img img { width: 100%; height: 100%; object-fit: cover; }
.pd__thumbs { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; }
.pd__thumbs::-webkit-scrollbar { display: none; }
.pd__thumbs img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 2px solid transparent; opacity: 0.75; }
.pd__thumbs img.on { border-color: var(--green); opacity: 1; }
.pd__main { background: #fff; padding: 14px 16px; }
.pd__name { font-size: 17px; font-weight: 600; line-height: 1.45; }
.pd__svc { display: inline-block; margin: 8px 6px 0 0; background: #eef7f1; color: var(--green); font-size: 10px; padding: 2px 8px; border-radius: 9px; font-weight: 600; }
.pd__svc--station { background: linear-gradient(135deg, #12b76a, #0d8f52); color: #fff; }
.pd__tags { margin-top: 8px; }
.pd__price { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.pd__price .price { font-size: 24px; }
.pd__sales { font-size: 12px; color: var(--muted); }
.pd__stock { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pd__sec { background: #fff; margin: 10px 0; padding: 14px 16px; }
.pd__sec h3 { margin: 0 0 10px; font-size: 15px; }
.pd__desc { font-size: 13px; color: #44534c; line-height: 1.75; overflow: hidden; }
.specs { display: flex; flex-wrap: wrap; gap: 8px; }
.spec { background: #f4f7f5; border-radius: 8px; padding: 5px 10px; font-size: 12px; color: #5c6b64; }
.pd__shop { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f8faf9; border-radius: 12px; cursor: pointer; }
.pd__shop img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.pd__shop-logo-fallback { width: 46px; height: 46px; border-radius: 10px; background: linear-gradient(135deg, var(--green), var(--green-3)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.pd__shop div { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pd__shop b { font-size: 14px; }
.pd__shop span { font-size: 11px; color: var(--muted); }
.pd__shop-go { color: var(--green) !important; font-weight: 600; font-size: 12px !important; }
.pd__bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 99;
  display: flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.pd__bar-btn {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center;
  font-size: 9px; color: #6b7671; width: 52px; gap: 2px;
}
.pd__bar-btn.on, .pd__fav.on { color: var(--danger); }
.pd__bar-actions { flex: 1; display: flex; gap: 10px; justify-content: flex-end; }
.pd__bar-actions .btn { flex: 1; max-width: 140px; padding: 10px 0; }
.qty-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; color: var(--green); }

/* ---------------- 购物车 ---------------- */
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px 4px; }
.cart-head__store { font-size: 14px; font-weight: 600; }
.cart-head__count { font-size: 12px; color: var(--muted); }
.co-item { display: flex; gap: 10px; background: #fff; margin: 8px 12px 0; border-radius: 13px; padding: 10px; box-shadow: var(--shadow); position: relative; }
.co-item img { width: 78px; height: 78px; border-radius: 10px; object-fit: cover; background: #f0f3f1; }
.co-info { flex: 1; display: flex; flex-direction: column; }
.co-name { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.co-unit { font-size: 11px; color: var(--muted); margin-top: 2px; }
.co-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: #f7faf8; color: var(--green); font-size: 14px; line-height: 1; }
.qty span { min-width: 18px; text-align: center; font-size: 13px; }
.co-del { position: absolute; right: 8px; top: 8px; border: 0; background: none; color: #b3bcb7; font-size: 11px; }
.cart-foot {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 90;
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.cart-foot__total b { font-size: 17px; }

/* ---------------- 结算 ---------------- */
.wx-tip { margin: 10px 12px 0; background: #fff7e6; border: 1px solid #f3e2b8; color: #8a6d1f; border-radius: 10px; padding: 8px 12px; font-size: 12px; line-height: 1.6; }
.ck-sec { background: #fff; margin: 10px 12px 0; border-radius: 13px; padding: 12px 14px; box-shadow: var(--shadow); }
.ck-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; }
.ck-row .label { color: #44534c; }
.ck-row .val { color: #66736d; }
.ck-row--total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.ck-row--total .price { font-size: 19px; }
.ck-addr { display: flex; align-items: center; gap: 10px; }
.ck-addr__icon { font-size: 24px; }
.ck-addr div { flex: 1; display: flex; flex-direction: column; }
.ck-addr b { font-size: 14px; }
.ck-addr span { font-size: 11px; color: var(--muted); margin-top: 2px; }
.addr-edit { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.addr-edit__row input, .addr-edit input, .addr-edit textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; font-size: 13px; background: #fafcfb;
}
.addr-edit textarea { resize: none; }
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.radio {
  border: 1px solid var(--line); background: #fafcfb; border-radius: 17px;
  padding: 8px 16px; font-size: 12px; color: #5c6b64;
}
.radio.active { border-color: var(--green); background: #eef7f1; color: var(--green); font-weight: 600; }
.ck-goods { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f2f5f3; }
.ck-goods:last-child { border-bottom: 0; }
.ck-goods img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #f0f3f1; }
.ck-goods__info { flex: 1; display: flex; flex-direction: column; }
.ck-goods__name { font-size: 13px; line-height: 1.4; }
.ck-goods__price { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 12px; }
.ck-goods__qty { color: var(--muted); }
.ck-foot {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 90;
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.ck-foot__total b { font-size: 19px; }
.ck-foot .btn { min-width: 130px; }
.addr-item { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.addr-item--new { color: var(--green); font-weight: 600; text-align: center; }

/* ---------------- 支付结果 ---------------- */
.pay-result { text-align: center; padding: 70px 24px 20px; }
.pay-result__icon { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px; color: #fff; font-size: 38px; line-height: 74px; }
.pay-result__icon.ok { background: linear-gradient(135deg, #12b76a, #0d8f52); box-shadow: 0 8px 24px rgba(18, 183, 106, 0.35); }
.pay-result__icon.fail { background: linear-gradient(135deg, #f56a5a, #e0442c); box-shadow: 0 8px 24px rgba(224, 68, 44, 0.3); }
.pay-result h2 { margin: 0 0 8px; font-size: 20px; }
.pay-result p { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.pay-result__no { background: #f4f7f5; border-radius: 8px; padding: 8px; font-size: 12px; color: #66736d; margin-bottom: 24px; }
.pay-result__btns { display: flex; gap: 12px; justify-content: center; }
.pay-result__btns .btn { min-width: 120px; }

/* ---------------- 订单 ---------------- */
.order-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 48px; z-index: 50; }
.order-tabs button {
  flex: 1; border: 0; background: none; padding: 12px 4px; font-size: 13px; color: #5c6b64;
  border-bottom: 2px solid transparent;
}
.order-tabs button.active { color: var(--green); font-weight: 600; border-bottom-color: var(--green); }
.order-list { padding: 10px 12px 20px; }
.order-card { background: #fff; border-radius: 13px; box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.order-card__hd { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #f2f5f3; }
.order-card__no { font-size: 11px; color: var(--muted); }
.order-card__st { font-size: 12px; font-weight: 600; }
.order-card__st.st0 { color: #e67e22; }
.order-card__st.st1 { color: #2980b9; }
.order-card__st.st2 { color: #8e44ad; }
.order-card__st.st3 { color: var(--green); }
.order-card__st.st4, .order-card__st.st5 { color: var(--muted); }
.order-card__goods { display: flex; align-items: center; gap: 8px; padding: 12px; position: relative; }
.order-card__goods img { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; }
.order-card__more { position: absolute; right: 14px; bottom: 16px; background: rgba(0,0,0,0.5); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 8px; }
.order-card__ft { display: flex; justify-content: space-between; padding: 0 12px 8px; font-size: 12px; color: var(--muted); }
.order-card__amount b { font-size: 15px; }
.order-card__ops { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px 12px; }
.op { border: 1px solid var(--line); background: #fff; border-radius: 15px; padding: 6px 14px; font-size: 12px; color: #5c6b64; }
.op--primary { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

/* ---------------- 订单详情 ---------------- */
.od-st { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--green), var(--green-3)); color: #fff; padding: 20px 16px; }
.od-st__icon { font-size: 34px; }
.od-st__txt { display: flex; flex-direction: column; }
.od-st__txt b { font-size: 17px; }
.od-st__txt span { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.od-pickup { margin: 10px 12px 0; background: #eef7f1; color: var(--green); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.7; }
.od-sec { background: #fff; margin: 10px 12px 0; border-radius: 13px; padding: 12px 14px; box-shadow: var(--shadow); }
.od-sec__hd { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.od-goods { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f2f5f3; }
.od-goods:last-child { border-bottom: 0; }
.od-goods img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.od-goods__info { flex: 1; display: flex; flex-direction: column; }
.od-goods__name { font-size: 13px; line-height: 1.4; }
.od-goods__price { display: flex; justify-content: space-between; margin-top: auto; font-size: 12px; color: var(--muted); }
.od-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 12px; }
.od-row span { color: var(--muted); flex-shrink: 0; }
.od-row b { color: #44534c; font-weight: 400; text-align: right; word-break: break-all; }
.od-row--total b { font-weight: 700; }
.od-ops { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 12px 30px; }

/* ---------------- 个人中心 ---------------- */
.uc-hero {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(150deg, #0d6b45 0%, #12875a 55%, #1aa56b 100%);
  color: #fff; padding: 26px 16px 30px; position: relative; overflow: hidden;
}
.uc-hero::after { content: ''; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 65%); }
.uc-hero__avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 30px; border: 2px solid rgba(255,255,255,0.6); object-fit: cover; }
.uc-hero__info { flex: 1; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.uc-hero__info b { font-size: 17px; }
.uc-hero__info span { font-size: 12px; opacity: 0.9; }
.uc-hero__btn { border: 0; background: rgba(255,255,255,0.22); color: #fff; border-radius: 16px; padding: 7px 14px; font-size: 12px; position: relative; z-index: 1; }
.uc-assets {
  display: flex; margin: -16px 12px 0; background: #fff; border-radius: 13px;
  box-shadow: var(--shadow-lg); position: relative; z-index: 2; overflow: hidden;
}
.uc-asset { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 13px 4px; border-right: 1px solid #f2f5f3; }
.uc-asset:last-child { border-right: 0; }
.uc-asset b { font-size: 15px; color: var(--green); }
.uc-asset span { font-size: 11px; color: var(--muted); }
.uc-order { margin: 12px; background: #fff; border-radius: 13px; padding: 13px 14px; box-shadow: var(--shadow); }
.uc-order__hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.uc-order__hd b { font-size: 15px; }
.uc-order__hd a { font-size: 12px; color: var(--green); }
.uc-order__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.uc-order__e { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #44534c; }
.uc-order__e span { font-size: 22px; }
.uc-order__e b { font-size: 11px; font-weight: 500; }
.uc-menu { margin: 0 12px 16px; background: #fff; border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.uc-menu__item { display: flex; align-items: center; padding: 13px 14px; font-size: 14px; border-bottom: 1px solid #f4f7f5; }
.uc-menu__item:last-child { border-bottom: 0; }
.uc-menu__item:active { background: #f8faf9; }
.uc-menu__item--logout { color: var(--danger); justify-content: center; font-weight: 600; }

/* ---------------- 收藏 ---------------- */
.fav-list { padding: 12px; }
.fav-item { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; }
.fav-item img { width: 72px; height: 72px; border-radius: 9px; object-fit: cover; background: #f0f3f1; }
.fav-item__info { flex: 1; display: flex; flex-direction: column; }
.fav-item__name { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fav-item__tag { display: inline-block; width: fit-content; margin-top: 4px; background: #eef7f1; color: var(--green); font-size: 10px; padding: 1px 7px; border-radius: 8px; }
.fav-item__btm { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }

/* ---------------- 优惠券 ---------------- */
.cp-list { padding: 12px; }
.cp-card { display: flex; align-items: stretch; background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 10px; box-shadow: var(--shadow); }
.cp-card__left { width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(160deg, #0d6b45, #12875a); color: #fff; position: relative; }
.cp-card__left::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--bg); }
.cp-card__left b { font-size: 20px; }
.cp-card__left span { font-size: 10px; opacity: 0.9; padding: 0 8px; text-align: center; }
.cp-card__mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 12px; }
.cp-card__mid span { font-size: 12px; color: #44534c; }
.cp-card__mid small { font-size: 10px; color: var(--muted); }
.cp-card__right { display: flex; align-items: center; padding: 0 12px; }
.cp-card__btn { border: 0; background: linear-gradient(135deg, #f7b733, #fc4a1a); color: #fff; font-size: 12px; padding: 7px 18px; border-radius: 16px; font-weight: 600; }
.cp-card__btn:disabled { opacity: 0.6; }
.cp-card__st { font-size: 12px; color: var(--muted); }
.cp-card__st.ok { color: var(--green); font-weight: 600; }

/* ---------------- 余额 ---------------- */
.bal-hero { margin: 12px; background: linear-gradient(150deg, #0d6b45, #12875a); border-radius: 14px; color: #fff; padding: 22px 18px; box-shadow: var(--shadow-lg); }
.bal-hero__label { font-size: 12px; opacity: 0.85; }
.bal-hero__num { font-size: 32px; font-weight: 700; margin-top: 4px; }
.bal-list { padding: 0 12px 20px; }
.bal-item { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 11px; padding: 11px 13px; margin-bottom: 8px; box-shadow: var(--shadow); }
.bal-item__info { display: flex; flex-direction: column; gap: 2px; }
.bal-item__info b { font-size: 13px; font-weight: 500; color: #44534c; }
.bal-item__info span { font-size: 10px; color: var(--muted); }
.bal-item__amt { font-size: 15px; font-weight: 700; }
.bal-item__amt.plus { color: var(--green); }
.bal-item__amt.minus { color: var(--muted); }

/* ---------------- 地址 ---------------- */
.addr-list { padding: 12px; }
.addr-card { background: #fff; border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.addr-card__hd { display: flex; align-items: center; gap: 8px; }
.addr-card__hd b { font-size: 14px; }
.addr-card__hd span { font-size: 12px; color: #66736d; }
.addr-card__detail { font-size: 13px; color: #44534c; margin-top: 6px; line-height: 1.5; }
.addr-card__ops { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.addr-form { background: #fff; margin: 12px; border-radius: 13px; padding: 6px 14px; box-shadow: var(--shadow); }
.addr-form__row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f2f5f3; }
.addr-form__row:last-child { border-bottom: 0; }
.addr-form__row label { width: 62px; font-size: 13px; color: #44534c; flex-shrink: 0; }
.addr-form__row input, .addr-form__row textarea { flex: 1; border: 0; background: #fafcfb; border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.addr-form__row textarea { resize: none; }
.addr-form__row--check input { flex: 0 0 auto; width: 18px; height: 18px; }

/* ---------------- 登录 ---------------- */
.login { padding: 48px 30px 30px; text-align: center; }
.login__logo { width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 20px; background: linear-gradient(150deg, #0d6b45, #1aa56b); color: #fff; font-size: 34px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(13, 107, 69, 0.35); }
.login h1 { margin: 0; font-size: 21px; }
.login__sub { color: var(--muted); font-size: 12px; margin: 6px 0 26px; }
.login__divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 14px; }
.login__divider::before, .login__divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login__form { display: flex; flex-direction: column; gap: 12px; }
.login__input { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.login__input span { font-size: 15px; }
.login__input input { flex: 1; border: 0; background: none; padding: 12px 4px; font-size: 14px; }
.login__input--code input { flex: 0 1 auto; }
.login__code-btn { border: 0; background: none; color: var(--green); font-size: 12px; font-weight: 600; white-space: nowrap; padding: 0 2px; }
.login__code-btn:disabled { color: var(--muted); }
.login .btn { margin-top: 22px; }
.login__agree { font-size: 11px; color: var(--muted); margin-top: 18px; }
.login__agree a { color: var(--green); }
.login__tip { font-size: 11px; color: #b3bcb7; margin-top: 14px; line-height: 1.7; }

/* ---------------- 底部弹层 ---------------- */
.sheet-mask { position: fixed; inset: 0; background: rgba(10, 20, 15, 0.55); z-index: 200; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 640px; background: #fff; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: slideUp 0.25s; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }
.sheet__hd { display: flex; justify-content: center; align-items: center; padding: 14px 40px; font-size: 15px; font-weight: 600; position: relative; border-bottom: 1px solid var(--line); }
.sheet__close { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 20px; color: var(--muted); width: 32px; height: 32px; }
.sheet__bd { max-height: 60vh; overflow-y: auto; }
