/* ============ 设计变量 ============ */
:root {
  --primary: #FFD100;          /* 美团黄：品牌主色 / 按钮与色块背景 */
  --primary-dark: #F2C300;
  --primary-light: #FFF8D6;    /* 浅黄：标签底色 */
  --primary-ink: #1A1A1A;      /* 黄底之上的深色文字 */
  --accent: #FF4B10;           /* 美团橙红：白底上的强调文字/图标 */
  --price: #FF4B10;            /* 价格橙红 */
  --bg: #F5F5F5;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #666666;
  --text-3: #999999;
  --border: #EEEEEE;
  --line: #F0F0F0;
  --wechat: #07C160;
  --alipay: #1677FF;
  --success: #07C160;
  --warning: #FF9F1C;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 50px;
  --tabbar-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #E9E9E9;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { display: flex; justify-content: center; }

button, input, textarea, select { font-family: inherit; font-size: inherit; outline: none; border: none; }
button { cursor: pointer; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, li { list-style: none; }

/* ============ 手机外壳 ============ */
.phone-frame {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,.12);
}
@media (min-width: 520px) {
  .phone-frame { height: min(900px, 96dvh); margin: auto; border-radius: 28px; }
}

.app { display: flex; flex-direction: column; height: 100%; position: relative; }

/* ============ 顶部栏 ============ */
.header {
  height: var(--header-h);
  min-height: var(--header-h);
  background: var(--card);
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
}
.header.primary { background: var(--primary); color: var(--primary-ink); border-bottom: none; }
.header.transparent { background: transparent; border-bottom: none; position: absolute; top: 0; left: 0; right: 0; }
.header .hd-back {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-left: -6px; flex-shrink: 0;
}
.header .hd-title {
  flex: 1; text-align: center; font-size: 16px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header .hd-right { min-width: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 13px; }

/* ============ 主内容 ============ */
.page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.page.no-tab { padding-bottom: 24px; }
.page::-webkit-scrollbar { width: 0; }

/* ============ 底部标签栏 ============ */
.tabbar {
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  min-height: calc(var(--tabbar-h) + var(--safe-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: var(--safe-bottom);
  position: relative;
  z-index: 20;
}
.tabbar.hidden { display: none; }
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-3); font-size: 11px; position: relative;
}
.tabbar .tab.active { color: #1A1A1A; font-weight: 600; }
.tabbar .tab .tab-ico { font-size: 22px; line-height: 1; filter: grayscale(1) opacity(.55); }
.tabbar .tab.active .tab-ico { filter: none; }
.tabbar .tab .badge {
  position: absolute; top: 2px; left: 55%; background: var(--accent); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ============ 通用组件 ============ */
.card { background: var(--card); border-radius: var(--radius); margin: 10px; overflow: hidden; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px; }
.section-title h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.section-title h3::before { content: ''; width: 4px; height: 16px; background: var(--accent); border-radius: 2px; }
.section-title .more { color: var(--text-3); font-size: 12px; display: flex; align-items: center; gap: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 22px; font-size: 14px; font-weight: 700;
  background: var(--primary); color: var(--primary-ink); transition: opacity .15s;
}
.btn:active { opacity: .85; }
.btn.block { width: 100%; }
.btn.outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn.gray { background: #E5E5E5; color: #999; }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 16px; }
.btn.lg { padding: 13px 20px; font-size: 16px; border-radius: 26px; }

.tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--primary-light); color: #B57A00; }
.price { color: var(--price); font-weight: 700; }
.price .yuan { font-size: .7em; }
.price-original { color: var(--text-3); font-size: 12px; text-decoration: line-through; font-weight: 400; margin-left: 4px; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 20px; color: var(--text-3); }
.empty .empty-ico { font-size: 64px; margin-bottom: 12px; opacity: .6; }
.empty p { font-size: 14px; margin-bottom: 16px; }

/* ============ 首页 ============ */
.home-search {
  background: linear-gradient(180deg, var(--primary), #FFDE33); padding: 10px 12px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
.search-box {
  height: 38px; background: #fff; border-radius: 19px; display: flex; align-items: center;
  padding: 0 14px; gap: 8px; color: var(--text-3);
}
.search-box .ico { font-size: 16px; }
.search-box input { flex: 1; background: transparent; font-size: 13px; color: var(--text); }
.search-box input::placeholder { color: #bbb; }

.banner { margin: 10px; height: 140px; border-radius: var(--radius); overflow: hidden; position: relative; }
.banner .slide {
  position: absolute; inset: 0; display: flex; align-items: center; padding: 0 24px;
  background: linear-gradient(120deg, #FFE566, #FFC933); color: #7A4A00;
  transition: opacity .4s;
}
.banner .slide.s2 { background: linear-gradient(120deg, #FFD86E, #FF9E33); color: #6B3A00; }
.banner .slide.s3 { background: linear-gradient(120deg, #FFE98A, #FFC107); color: #7A5200; }
.banner .slide.active { opacity: 1; z-index: 2; }
.banner .slide:not(.active) { opacity: 0; z-index: 1; }
.banner .slide-txt h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.banner .slide-txt p { font-size: 12px; opacity: .9; margin-bottom: 10px; }
.banner .slide-txt .btn { background: #fff; color: var(--accent); padding: 5px 14px; font-size: 12px; }
.banner .deco { position: absolute; right: 16px; font-size: 76px; opacity: .85; }
.banner .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; z-index: 5; }
.banner .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: .3s; }
.banner .dots i.active { width: 16px; background: #fff; }

.quick-entry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 16px 6px; }
.quick-entry .qe { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.quick-entry .qe .qe-ico {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--primary-light);
}

.notice-bar { margin: 0 10px 10px; background: #FFF8E6; border-radius: 8px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #A8730B; overflow: hidden; }
.notice-bar .horn { font-size: 15px; }
.notice-bar .scroll-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }

/* 商品瀑布流 */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 10px; }
.goods-card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.goods-card .gc-img {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 64px; position: relative;
}
.goods-card .gc-tag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.goods-card .gc-info { padding: 8px 10px 10px; }
.goods-card .gc-name { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-card .gc-meta { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6px; }
.goods-card .gc-price { font-size: 17px; color: var(--price); font-weight: 700; }
.goods-card .gc-sales { font-size: 11px; color: var(--text-3); }
.goods-card .gc-cart { font-size: 18px; color: var(--accent); }

/* ============ 分类页 ============ */
.category-layout { display: flex; height: 100%; }
.cat-sidebar { width: 88px; background: #F7F7F7; overflow-y: auto; flex-shrink: 0; }
.cat-sidebar .cat-item { padding: 16px 6px; text-align: center; font-size: 13px; color: var(--text-2); position: relative; }
.cat-sidebar .cat-item.active { background: var(--bg); color: #1A1A1A; font-weight: 700; }
.cat-sidebar .cat-item.active::before { content: ''; position: absolute; left: 0; top: 30%; height: 40%; width: 3px; background: var(--accent); border-radius: 0 2px 2px 0; }
.cat-content { flex: 1; overflow-y: auto; padding: 10px; }
.cat-banner { height: 90px; border-radius: 10px; background: linear-gradient(120deg, #FFE566, #FFC933); color: #7A4A00; display: flex; align-items: center; padding: 0 18px; margin-bottom: 12px; }
.cat-banner h3 { font-size: 18px; }
.cat-banner p { font-size: 12px; opacity: .9; }
.cat-subtitle { font-size: 13px; font-weight: 600; margin: 4px 0 10px; }
.cat-goods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* ============ 搜索页 ============ */
.search-page .search-head { padding: 10px 12px; background: #fff; display: flex; gap: 8px; align-items: center; }
.search-page .search-head .search-box { flex: 1; background: var(--bg); }
.search-page .search-head .cancel { color: var(--text-2); font-size: 14px; }
.hot-words { padding: 14px; }
.hot-words h4 { font-size: 13px; margin-bottom: 10px; }
.hot-words .words { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-words .words span { background: #fff; padding: 5px 12px; border-radius: 14px; font-size: 12px; color: var(--text-2); }

/* ============ 商品详情 ============ */
.detail-page { padding-bottom: 70px !important; }
.detail-img {
  width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 140px; position: relative;
}
.detail-img .badge-obj { position: absolute; bottom: 14px; right: 14px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.detail-price-box { background: linear-gradient(90deg, #FFD100, #FFE566); color: #7A4A00; padding: 14px 16px; }
.detail-price-box .dp-price { font-size: 30px; font-weight: 800; }
.detail-price-box .dp-price .yuan { font-size: 16px; }
.detail-price-box .dp-old { font-size: 12px; opacity: .8; text-decoration: line-through; margin-left: 8px; }
.detail-price-box .dp-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 4px; font-size: 12px; opacity: .9; }
.detail-name { background: #fff; padding: 14px 16px; }
.detail-name h2 { font-size: 17px; font-weight: 600; line-height: 1.4; }
.detail-name .desc { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.detail-name .tags { display: flex; gap: 6px; margin-top: 10px; }
.detail-spec { background: #fff; margin-top: 10px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.detail-spec .label { color: var(--text-3); margin-right: 12px; }
.detail-spec .val { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.detail-spec .val .spec-pill { padding: 4px 12px; border-radius: 6px; background: var(--bg); font-size: 12px; }
.detail-spec .val .spec-pill.active { background: var(--primary-light); color: #B57A00; font-weight: 700; border: 1px solid var(--primary); }
.detail-desc-img { background: #fff; margin-top: 10px; padding: 14px 16px; }
.detail-desc-img h3 { font-size: 15px; margin-bottom: 10px; }
.detail-desc-img p { color: var(--text-2); font-size: 13px; line-height: 1.8; }
.detail-features { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 12px; }
.detail-features .f { background: var(--bg); border-radius: 8px; padding: 12px; font-size: 12px; color: var(--text-2); }
.detail-features .f b { color: var(--text); display: block; margin-bottom: 2px; }

.detail-action-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom); background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: center; padding-left: 12px; gap: 10px; z-index: 15;
}
.detail-action-bar .act-ico { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--text-2); width: 44px; }
.detail-action-bar .act-ico .i { font-size: 20px; }
.detail-action-bar .act-btns { flex: 1; display: flex; height: 44px; border-radius: 22px; overflow: hidden; }
.detail-action-bar .act-btns button { flex: 1; font-size: 14px; font-weight: 600; border: none; }
.detail-action-bar .add-cart { background: #FF9F1C; color: #fff; }
.detail-action-bar .buy-now { background: var(--accent); color: #fff; }

/* ============ 购物车 ============ */
.cart-page { padding-bottom: calc(130px + var(--safe-bottom)) !important; }
.cart-list { padding: 10px; }
.cart-item { background: #fff; border-radius: var(--radius); padding: 12px; margin-bottom: 10px; display: flex; gap: 10px; }
.cart-check { width: 22px; flex-shrink: 0; display: flex; align-items: center; }
.checkbox { width: 20px; height: 20px; border: 1.5px solid #ccc; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.checkbox.checked { background: var(--primary); border-color: var(--primary); color: #1A1A1A; }
.cart-item .ci-img { width: 78px; height: 78px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 40px; flex-shrink: 0; }
.cart-item .ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item .ci-name { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .ci-spec { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.cart-item .ci-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.cart-item .ci-price { font-size: 16px; color: var(--price); font-weight: 700; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.qty-stepper button { width: 26px; height: 24px; font-size: 16px; color: var(--text-2); background: #F7F7F7; }
.qty-stepper span { width: 30px; text-align: center; font-size: 13px; }
.cart-item .ci-del { color: var(--text-3); font-size: 16px; align-self: flex-start; }

.cart-settle {
  position: absolute; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); left: 0; right: 0; height: calc(60px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom); background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 12px; gap: 10px; z-index: 15;
}
.cart-settle .all-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cart-settle .total { flex: 1; text-align: right; font-size: 13px; }
.cart-settle .total .t-price { font-size: 20px; color: var(--price); font-weight: 700; }

/* ============ 表单/结算 ============ */
.form-page { padding-bottom: 80px !important; }
.address-card { background: #fff; padding: 16px; margin: 10px; border-radius: var(--radius); position: relative; }
.address-card .addr-empty { text-align: center; color: var(--text-3); padding: 12px; font-size: 14px; }
.address-card .addr-name { font-size: 16px; font-weight: 600; }
.address-card .addr-phone { color: var(--text-2); margin-left: 10px; font-size: 13px; }
.address-card .addr-detail { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.address-card .addr-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }

.order-goods { background: #fff; margin: 10px; border-radius: var(--radius); padding: 4px 14px; }
.order-goods .og-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.order-goods .og-item:last-child { border-bottom: none; }
.order-goods .og-img { width: 60px; height: 60px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.order-goods .og-body { flex: 1; }
.order-goods .og-name { font-size: 13px; line-height: 1.4; }
.order-goods .og-spec { font-size: 11px; color: var(--text-3); }
.order-goods .og-right { text-align: right; }
.order-goods .og-price { font-size: 14px; color: var(--price); font-weight: 600; }
.order-goods .og-qty { font-size: 12px; color: var(--text-3); }

.info-rows { background: #fff; margin: 10px; border-radius: var(--radius); padding: 4px 14px; }
.info-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 14px; }
.info-row:last-child { border-bottom: none; }
.info-row .row-label { color: var(--text-2); }
.info-row .row-value { flex: 1; text-align: right; margin-left: 12px; }
.info-row .row-value input { width: 100%; text-align: right; background: transparent; }
.info-row .row-arrow { color: var(--text-3); margin-left: 4px; }

.pay-method { background: #fff; margin: 10px; border-radius: var(--radius); padding: 4px 14px; }
.pm-item { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.pm-item:last-child { border-bottom: none; }
.pm-item .pm-ico { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.pm-item .pm-ico.wx { background: var(--wechat); }
.pm-item .pm-ico.ali { background: var(--alipay); }
.pm-item .pm-name { flex: 1; font-size: 14px; }
.pm-item .pm-desc { font-size: 11px; color: var(--text-3); }
.radio { width: 20px; height: 20px; border: 1.5px solid #ccc; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.radio.checked { border-color: var(--accent); }
.radio.checked::after { content: ''; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; }

.settle-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: calc(64px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom); background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 12px; gap: 12px; z-index: 15;
}
.settle-bar .sb-total { flex: 1; text-align: right; font-size: 13px; }
.settle-bar .sb-total .p { font-size: 20px; color: var(--price); font-weight: 700; }

/* ============ 支付页 ============ */
.pay-page { text-align: center; }
.pay-amount-box { background: linear-gradient(160deg, #FFE566, #FFC933); color: #7A4A00; padding: 20px 20px 30px; border-radius: 0 0 30px 30px; }
.pay-amount-box .label { font-size: 13px; opacity: .9; }
.pay-amount-box .amount { font-size: 38px; font-weight: 800; margin: 6px 0; }
.pay-amount-box .amount .yuan { font-size: 20px; }
.pay-amount-box .order-no { font-size: 12px; opacity: .8; }
.qr-card { background: #fff; margin: -20px 10px 10px; border-radius: var(--radius); padding: 20px; position: relative; z-index: 2; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.qr-card .qr-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.qr-card .qr-sub { font-size: 12px; color: var(--text-3); margin-bottom: 16px; }
.qr-card .qr-img-box {
  width: 200px; height: 200px; margin: 0 auto; border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff;
}
.qr-card .qr-img-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-card .qr-placeholder { text-align: center; color: var(--text-3); padding: 20px; font-size: 13px; }
.qr-card .qr-placeholder .ico { font-size: 54px; margin-bottom: 8px; }
.qr-card .qr-tip { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-top: 16px; padding: 10px; background: var(--bg); border-radius: 8px; }
.pay-steps { text-align: left; margin: 10px; background: #fff; border-radius: var(--radius); padding: 14px 16px; }
.pay-steps h4 { font-size: 14px; margin-bottom: 12px; }
.pay-steps .step { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--text-2); }
.pay-steps .step:last-child { margin-bottom: 0; }
.pay-steps .step .n { width: 20px; height: 20px; border-radius: 50%; background: var(--primary-light); color: #B57A00; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.pay-confirm { padding: 14px 10px 4px; }

/* ============ 订单列表/详情 ============ */
.order-tabs { display: flex; background: #fff; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.order-tabs .ot { flex: 1; text-align: center; padding: 12px 0; font-size: 13px; color: var(--text-2); position: relative; }
.order-tabs .ot.active { color: #1A1A1A; font-weight: 700; }
.order-tabs .ot.active::after { content: ''; position: absolute; bottom: 0; left: 30%; right: 30%; height: 3px; background: var(--primary); border-radius: 2px; }

.order-card { background: #fff; border-radius: var(--radius); margin: 10px; padding: 12px 14px; }
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.order-card .oc-head .status { font-size: 13px; font-weight: 600; }
.order-card .oc-head .status.pending { color: var(--warning); }
.order-card .oc-head .status.verify { color: var(--accent); }
.order-card .oc-head .status.paid { color: var(--accent); }
.order-card .oc-head .status.shipped { color: #B57A00; }
.order-card .oc-head .status.done { color: var(--text-3); }
.order-card .oc-goods { display: flex; gap: 10px; padding: 12px 0; align-items: center; }
.order-card .oc-img { width: 64px; height: 64px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 34px; flex-shrink: 0; }
.order-card .oc-info { flex: 1; }
.order-card .oc-name { font-size: 13px; }
.order-card .oc-spec { font-size: 11px; color: var(--text-3); }
.order-card .oc-total { text-align: right; font-size: 12px; color: var(--text-2); }
.order-card .oc-total .p { color: var(--text); font-size: 14px; font-weight: 600; }
.order-card .oc-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }

.order-detail-status { background: linear-gradient(120deg, #FFE566, #FFC933); color: #7A4A00; padding: 24px 20px; }
.order-detail-status h2 { font-size: 20px; }
.order-detail-status p { font-size: 13px; opacity: .9; margin-top: 4px; }

/* ============ 个人中心 ============ */
.profile-header { background: linear-gradient(135deg, #FFE07A, #FFC933); padding: 30px 20px 50px; color: #6B4200; position: relative; }
.profile-header .ph-user { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.profile-header .ph-user:active { opacity: .8; }
.profile-header .avatar { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.45); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.profile-header .ph-edit { margin-left: auto; font-size: 12px; font-weight: 700; color: #6B4200; background: rgba(255,255,255,.55); padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
.profile-header .u-name { font-size: 18px; font-weight: 600; }
.profile-header .u-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.profile-header .setting-ico { position: absolute; right: 18px; top: 34px; font-size: 20px; }
.profile-orders { background: #fff; margin: -30px 10px 10px; border-radius: var(--radius); padding: 16px 0; position: relative; z-index: 2; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.profile-orders .po-title { display: flex; justify-content: space-between; align-items: center; padding: 0 16px 14px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.profile-orders .po-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 14px; }
.profile-orders .po-item { text-align: center; font-size: 12px; color: var(--text-2); position: relative; }
.profile-orders .po-item .ico { font-size: 24px; display: block; margin-bottom: 4px; }
.profile-orders .po-item .badge { position: absolute; top: -4px; right: 22%; background: var(--price); color: #fff; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; padding: 0 4px; }
.menu-list { background: #fff; margin: 10px; border-radius: var(--radius); overflow: hidden; }
.menu-list .menu-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.menu-list .menu-item:last-child { border-bottom: none; }
.menu-list .menu-item .mi-ico { font-size: 20px; width: 26px; text-align: center; }
.menu-list .menu-item .mi-name { flex: 1; }
.menu-list .menu-item .mi-arrow { color: var(--text-3); }
.menu-list .menu-item .mi-value { color: var(--text-3); font-size: 13px; }

/* ============ 会员中心 ============ */
.member-page { padding-bottom: 24px; }
.member-hero {
  background: linear-gradient(135deg, #FFE07A, #FFC933); color: #6B4200;
  padding: 28px 20px 30px; display: flex; flex-direction: column; align-items: center; position: relative;
}
.member-hero .mh-avatar {
  width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center; font-size: 42px;
  border: 3px solid rgba(255,255,255,.75); cursor: pointer;
}
.member-hero .mh-avatar:active { opacity: .8; }
.member-hero .mh-name { font-size: 19px; font-weight: 700; margin-top: 10px; }
.member-hero .mh-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.member-hero .mh-edit {
  margin-top: 14px; font-size: 12px; font-weight: 700; color: #6B4200;
  background: rgba(255,255,255,.65); border: 1px solid rgba(107,66,0,.25);
  padding: 6px 18px; border-radius: 16px;
}
.member-hero .mh-edit:active { opacity: .8; }
.member-card { background: #fff; margin: -14px 10px 10px; border-radius: var(--radius); padding: 4px 14px; position: relative; z-index: 2; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.member-card .mc-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 14px; }
.member-card .mc-row:last-child { border-bottom: none; }
.member-card .mc-label { color: var(--text-2); }
.member-card .mc-value { color: var(--text); font-weight: 500; }

/* 编辑资料 */
.me-avatar-wrap { display: flex; flex-direction: column; align-items: center; padding: 6px 0 14px; }
.me-avatar-preview {
  width: 80px; height: 80px; border-radius: 50%; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 44px; border: 2px solid var(--primary);
}
.me-avatar-hint { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.me-avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.me-avatar-opt {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--bg); border-radius: 10px; border: 2px solid transparent;
}
.me-avatar-opt.active { border-color: var(--primary); background: var(--primary-light); }
.me-avatar-opt:active { opacity: .7; }

/* ============ 管理后台 ============ */
.admin-hero { background: linear-gradient(120deg, #FFD100, #FFC107); color: #6B4200; padding: 24px 20px; }
.admin-hero h2 { font-size: 20px; }
.admin-hero p { font-size: 12px; opacity: .8; margin-top: 4px; }
.admin-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 10px; }
.admin-stats .st { background: #fff; border-radius: var(--radius); padding: 16px 8px; text-align: center; }
.admin-stats .st .num { font-size: 24px; font-weight: 800; color: var(--accent); }
.admin-stats .st .lbl { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.qr-setting-card { background: #fff; margin: 10px; border-radius: var(--radius); padding: 16px; }
.qr-setting-card h3 { font-size: 15px; margin-bottom: 12px; }
.qr-upload-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qr-upload-row:last-child { border-bottom: none; }
.qr-upload-row .qu-preview { width: 56px; height: 56px; border: 1px dashed #ccc; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #ccc; overflow: hidden; flex-shrink: 0; }
.qr-upload-row .qu-preview img { width: 100%; height: 100%; object-fit: cover; }
.qr-upload-row .qu-info { flex: 1; }
.qr-upload-row .qu-info .n { font-size: 14px; font-weight: 600; }
.qr-upload-row .qu-info .s { font-size: 11px; color: var(--text-3); }
.qr-upload-row .upload-btn { font-size: 12px; color: var(--accent); border: 1px solid var(--accent); padding: 5px 12px; border-radius: 14px; }
.input-field { width: 100%; height: 42px; background: var(--bg); border-radius: 8px; padding: 0 12px; font-size: 14px; margin-top: 8px; }
.input-field.textarea { height: 80px; padding: 10px 12px; resize: none; }

.admin-order-item { background: #fff; border-radius: var(--radius); margin: 10px; padding: 12px 14px; }
.admin-order-item .ao-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.admin-order-item .ao-goods { font-size: 13px; }
.admin-order-item .ao-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.admin-order-item .ao-foot .p { font-size: 16px; color: var(--price); font-weight: 700; }

/* ============ 弹层/提示 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-box { width: 100%; max-width: 480px; background: #fff; border-radius: 16px 16px 0 0; padding: 18px 16px calc(20px + var(--safe-bottom)); animation: slideUp .25s ease; max-height: 85dvh; overflow-y: auto; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-box .mb-title { font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 16px; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }

#toast-root { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 200; pointer-events: none; }
.toast { background: rgba(0,0,0,.8); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; white-space: nowrap; animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }

/* ============ 商家登录 ============ */
.login-page { background: linear-gradient(160deg, #FFE07A, #FFC107); min-height: 100%; }
.login-hero { text-align: center; color: #6B4200; padding: 70px 20px 40px; }
.login-hero .login-logo { font-size: 68px; margin-bottom: 12px; }
.login-hero h2 { font-size: 22px; font-weight: 700; }
.login-hero p { font-size: 13px; opacity: .85; margin-top: 4px; }
.login-form { background: #fff; margin: 0 24px; border-radius: 16px; padding: 26px 20px 24px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.login-field { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 10px; padding: 0 14px; height: 48px; margin-bottom: 20px; }
.login-field .lf-ico { font-size: 18px; }
.login-field input { flex: 1; background: transparent; font-size: 15px; }
.login-hint { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 14px; }
.login-hint b { color: var(--accent); }

/* ============ 分享代付 ============ */
.shared-banner {
  margin: 12px 10px 8px; padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(120deg, #E8F4FF, #D6EBFF); color: #1668C7;
  font-size: 13px; text-align: center; font-weight: 600;
}
/* 好友代付视角下，收款卡片不使用负边距，避免遮挡提示条 */
.qr-card.with-banner { margin-top: 10px; }
/* 本人视角分享按钮也不被收款卡片负边距遮挡 */
.share-pay-btn + .qr-card { margin-top: 20px; }
.share-pay-btn {
  display: block; width: calc(100% - 20px); margin: 12px 10px -4px;
  padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 700;
  color: #B57A00; background: var(--primary-light);
  border: 1px dashed var(--primary);
}
.share-pay-btn:active { opacity: .8; }
.share-link {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; font-size: 12px; color: var(--text-2); line-height: 1.6;
  word-break: break-all; user-select: all;
}
