/**
 * 靖归速鲜 - CSS设计系统
 * 叮咚买菜风格：绿色主题、卡片式布局、大字号、高信息密度
 */

/* ===== 设计变量 ===== */
:root {
  /* 品牌色 */
  --green: #07c160;
  --green-dark: #06ad56;
  --green-light: #e8f8ee;
  --green-bg: #f0faf4;

  /* 功能色 */
  --red: #ff4d4f;
  --red-light: #fff2f0;
  --orange: #ff8c00;
  --orange-light: #fff7e6;
  --gold: #d4a017;
  --gold-light: #fff8e1;
  --blue: #1890ff;

  /* 文字 */
  --text: #1a1a1a;
  --text-2: #666;
  --text-3: #999;
  --text-4: #ccc;

  /* 背景 */
  --bg: #f5f5f5;
  --white: #fff;

  /* 边框/阴影 */
  --border: #eee;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 999px;

  /* 安全区 */
  --header-h: 48px;
  --tabbar-h: 50px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== Reset ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { font-size:16px; scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body { font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif; color:var(--text); background:var(--bg); line-height:1.5; min-height:100vh; overflow-x:hidden; -webkit-font-smoothing:antialiased; }
a { text-decoration:none; color:inherit; }
img { display:block; max-width:100%; }
input,textarea,button { font-family:inherit; outline:none; border:none; background:none; }
button { cursor:pointer; }

/* ===== 顶部导航 ===== */
.header {
  position:fixed; top:0; left:0; right:0; height:var(--header-h); z-index:100;
  background:var(--green); color:#fff; display:flex; align-items:center; justify-content:space-between;
  padding:0 16px;
}
.header-title { font-size:17px; font-weight:600; }
.header-right { display:flex; align-items:center; gap:16px; }

/* ===== 底部TabBar ===== */
.tabbar {
  position:fixed; bottom:0; left:0; right:0; height:calc(var(--tabbar-h) + var(--safe-bottom));
  background:var(--white); border-top:1px solid var(--border); z-index:100;
  display:flex; padding-bottom:var(--safe-bottom);
}
.tabbar-item {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  color:var(--text-3); font-size:10px; transition:color .2s;
}
.tabbar-item.active { color:var(--green); }
.tabbar-item svg { width:22px; height:22px; }
.tabbar-badge {
  position:absolute; top:-2px; right:-8px; min-width:16px; height:16px; padding:0 4px;
  background:var(--red); color:#fff; font-size:10px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
}

/* ===== 页面容器 ===== */
.page { display:none; padding-top:var(--header-h); padding-bottom:calc(var(--tabbar-h) + var(--safe-bottom)); min-height:100vh; }
.page.active { display:block; }
#page-cart { padding-bottom:calc(var(--tabbar-h) + 72px + var(--safe-bottom)); }

/* ===== 截单倒计时条 ===== */
.countdown-bar {
  background:linear-gradient(135deg, var(--green) 0%, #2d8cf0 100%);
  color:#fff; padding:10px 16px; display:flex; align-items:center; justify-content:space-between;
}
.countdown-bar .time { font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; }
.countdown-bar .label { font-size:12px; opacity:.9; }
.countdown-ended { background:var(--text-3); }

/* ===== 会员卡横幅 ===== */
.vip-banner {
  margin:12px; padding:16px; border-radius:var(--r-lg);
  background:linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color:#fff; position:relative; overflow:hidden;
}
.vip-banner::after {
  content:'👑'; position:absolute; right:16px; top:50%; transform:translateY(-50%); font-size:48px; opacity:.2;
}
.vip-banner .vip-label { font-size:12px; color:var(--gold); margin-bottom:4px; }
.vip-banner .vip-title { font-size:18px; font-weight:700; margin-bottom:4px; }
.vip-banner .vip-price { font-size:28px; font-weight:800; color:var(--gold); }
.vip-banner .vip-price small { font-size:14px; font-weight:400; }
.vip-banner .vip-desc { font-size:12px; opacity:.8; margin-top:4px; }
.vip-banner .vip-btn {
  margin-top:10px; padding:6px 20px; background:linear-gradient(90deg, #d4a017, #f0c040);
  color:#1a1a2e; font-size:14px; font-weight:600; border-radius:var(--r-full); display:inline-block;
}
.vip-owned { background:linear-gradient(135deg, #2d8cf0 0%, #07c160 100%); }

/* ===== 商品网格 ===== */
.product-grid {
  display:grid; grid-template-columns:repeat(2,1fr); gap:8px; padding:0 12px;
}
.product-card {
  background:var(--white); border-radius:var(--r-md); overflow:hidden; box-shadow:var(--shadow);
  position:relative; transition:transform .15s;
}
.product-card:active { transform:scale(.97); }
.product-card .img-wrap {
  width:100%; height:140px; background:#f0f0f0; overflow:hidden; position:relative;
}
.product-card .img-wrap img { width:100%; height:100%; object-fit:cover; }
.product-card .img-wrap .emoji { font-size:48px; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
.product-card .tag {
  position:absolute; top:6px; left:6px; background:var(--green); color:#fff;
  font-size:10px; padding:2px 6px; border-radius:4px;
}
.product-card .info { padding:8px 10px 10px; }
.product-card .name { font-size:14px; font-weight:600; line-height:1.3; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.product-card .origin { font-size:11px; color:var(--text-3); margin-bottom:4px; }
.product-card .price-row { display:flex; align-items:baseline; gap:4px; }
.product-card .price { font-size:18px; font-weight:700; color:var(--red); }
.product-card .price .symbol { font-size:12px; }
.product-card .vip-label { font-size:10px; color:var(--gold); background:var(--gold-light); padding:1px 4px; border-radius:3px; }
.product-card .old-price { font-size:11px; color:var(--text-3); text-decoration:line-through; }
.product-card .unit { font-size:11px; color:var(--text-3); }
.product-card .add-btn {
  position:absolute; bottom:10px; right:10px; width:26px; height:26px;
  background:var(--green); color:#fff; border-radius:50%; font-size:18px;
  display:flex; align-items:center; justify-content:center; font-weight:300;
  box-shadow:0 2px 6px rgba(7,193,96,.3);
}

/* ===== 凑单提示条 ===== */
.free-ship-bar {
  margin:8px 12px; padding:8px 12px; background:var(--orange-light); border-radius:var(--r-sm);
  font-size:12px; color:var(--orange); display:flex; align-items:center; gap:6px;
}
.free-ship-bar.achieved { background:var(--green-light); color:var(--green); }
.free-ship-bar .fs-icon { font-size:16px; flex-shrink:0; }
.free-ship-bar .fs-text { flex:1; }
.free-ship-bar .fs-hint { font-size:11px; opacity:.7; flex-shrink:0; }

/* ===== 购物车列表 ===== */
.cart-list { padding:0 12px; background:var(--white); }
.cart-item {
  display:flex; align-items:center; gap:10px; padding:12px 0;
  border-bottom:1px solid var(--border); background:var(--white);
}
/* 复选框 */
.cart-check {
  width:20px; height:20px; border-radius:50%; border:2px solid var(--text-4); flex-shrink:0;
  cursor:pointer; transition:all .15s;
}
.cart-check:active { transform:scale(.9); }
.cart-check.checked { border-color:var(--green); background:var(--green); position:relative; }
.cart-check.checked::after { content:'✓'; color:#fff; font-size:12px; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
/* 图片区 */
.cart-img-wrap { width:72px; height:72px; border-radius:var(--r-sm); overflow:hidden; flex-shrink:0; position:relative; background:#f5f5f5; }
.cart-img { width:100%; height:100%; object-fit:cover; display:block; }
.cart-img-placeholder {
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  font-size:36px; background:#f5f5f5;
}
/* 商品信息 */
.cart-info { flex:1; min-width:0; }
.cart-name { font-size:14px; font-weight:500; line-height:1.3; display:flex; align-items:center; gap:4px; }
.cart-name .cart-tag {
  display:inline-block; font-size:10px; background:var(--green-light);
  color:var(--green); padding:1px 5px; border-radius:3px; flex-shrink:0;
}
.cart-spec { font-size:11px; color:var(--text-3); margin-top:3px; }
.cart-price { display:flex; align-items:baseline; gap:2px; margin-top:5px; }
.cart-price .cp-symbol { font-size:11px; color:var(--red); font-weight:600; }
.cart-price .cp-value { font-size:16px; font-weight:700; color:var(--red); }
.cart-price .cp-unit { font-size:11px; color:var(--text-3); }
.cart-price .cp-vip {
  font-size:10px; color:var(--gold); background:var(--gold-light);
  padding:1px 5px; border-radius:3px; margin-left:2px; font-weight:500;
}
/* 数量控制 */
.cart-qty { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.qty-minus, .qty-plus {
  width:26px; height:26px; border-radius:50%; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; font-size:16px;
  color:var(--text-2); cursor:pointer; user-select:none; transition:all .1s;
  line-height:1; background:var(--white);
}
.qty-minus:active, .qty-plus:active { transform:scale(.9); }
.qty-minus { color:var(--text-3); }
.qty-plus { border-color:var(--green); color:var(--green); }
.qty-val { font-size:15px; font-weight:500; min-width:22px; text-align:center; }

/* ===== 购物车底部占位 ===== */
.cart-bottom-spacer { height:72px; }

/* ===== 购物车固定结算栏 ===== */
.cart-bar {
  position:fixed; bottom:calc(var(--tabbar-h) + var(--safe-bottom)); left:0; right:0;
  background:var(--white); border-top:1px solid var(--border); padding:8px 12px;
  display:flex; align-items:center; gap:12px; z-index:90; box-shadow:0 -2px 8px rgba(0,0,0,.04);
}
.cart-bar-icon {
  position:relative; width:44px; height:44px; background:var(--text-4); border-radius:50%;
  display:flex; align-items:center; justify-content:center; margin-top:-16px;
  box-shadow:0 -2px 8px rgba(0,0,0,.1); transition:background .2s;
}
.cart-bar-icon.has-items { background:var(--text); }
.cart-bar-icon svg { width:22px; height:22px; stroke:#fff; }
.cart-bar-badge {
  position:absolute; top:-4px; right:-4px; min-width:16px; height:16px; padding:0 4px;
  background:var(--red); color:#fff; font-size:10px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
}
.cart-bar-info { flex:1; min-width:0; }
.cart-bar-total { font-size:16px; font-weight:700; color:var(--red); }
.cart-bar-total .symbol { font-size:12px; }
.cart-bar-fee { font-size:11px; color:var(--text-3); }
.cart-bar-btn {
  padding:10px 24px; background:var(--green); color:#fff; font-size:15px; font-weight:600;
  border-radius:var(--r-full); white-space:nowrap; border:none; cursor:pointer;
  transition:opacity .15s;
}
.cart-bar-btn:active { opacity:.85; }
.cart-bar-btn:disabled { background:var(--text-4); opacity:1; }

/* ===== 订单卡片 ===== */
.order-card {
  margin:8px 12px; background:var(--white); border-radius:var(--r-md); padding:12px; box-shadow:var(--shadow);
}
.order-card .order-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.order-card .order-no { font-size:12px; color:var(--text-3); }
.order-card .order-status { font-size:12px; color:var(--green); font-weight:600; }
.order-card .order-item { display:flex; gap:8px; margin-bottom:6px; }
.order-card .order-item img { width:56px; height:56px; border-radius:var(--r-sm); object-fit:cover; }
.order-card .order-item .info { flex:1; }
.order-card .order-item .name { font-size:13px; }
.order-card .order-item .spec { font-size:11px; color:var(--text-3); }
.order-card .order-item .row { display:flex; justify-content:space-between; }
.order-card .order-item .price { font-size:13px; color:var(--red); }
.order-card .order-footer { display:flex; justify-content:space-between; align-items:center; margin-top:8px; padding-top:8px; border-top:1px solid var(--border); }
.order-card .order-total { font-size:14px; }
.order-card .order-total b { color:var(--red); }
.order-card .order-btn { padding:5px 14px; border-radius:var(--r-full); font-size:12px; border:1px solid var(--green); color:var(--green); }
.order-card .order-btn.primary { background:var(--green); color:#fff; border:none; }

/* ===== 登录弹窗 ===== */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:200;
  display:none; align-items:flex-end; justify-content:center;
}
.modal-overlay.show { display:flex; }
.modal-content {
  background:var(--white); border-radius:var(--r-lg) var(--r-lg) 0 0;
  width:100%; max-width:420px; padding:24px 20px; padding-bottom:calc(20px + var(--safe-bottom));
}
.modal-content h3 { font-size:18px; text-align:center; margin-bottom:20px; }
.modal-content .input-group { margin-bottom:14px; }
.modal-content .input-group label { font-size:13px; color:var(--text-2); display:block; margin-bottom:6px; }
.modal-content .input-row { display:flex; gap:8px; }
.modal-content input {
  flex:1; height:44px; padding:0 12px; border:1px solid var(--border);
  border-radius:var(--r-sm); font-size:15px; background:var(--bg);
}
.modal-content input:focus { border-color:var(--green); }
.modal-content .sms-btn {
  padding:0 14px; height:44px; background:var(--green-light); color:var(--green);
  border-radius:var(--r-sm); font-size:13px; white-space:nowrap;
}
.modal-content .submit-btn {
  width:100%; height:48px; background:var(--green); color:#fff; font-size:16px;
  font-weight:600; border-radius:var(--r-full); margin-top:8px;
}
.modal-content .close-btn { display:block; text-align:center; margin-top:12px; color:var(--text-3); font-size:14px; }

/* ===== 支付选择弹窗 ===== */
#payModal { align-items:flex-end; }
.pay-modal-content {
  background:var(--white); border-radius:var(--r-lg) var(--r-lg) 0 0;
  width:100%; max-width:420px; padding-bottom:calc(20px + var(--safe-bottom));
  animation: paySlideUp .25s ease-out;
}
@keyframes paySlideUp { from{ transform:translateY(100%); } to{ transform:translateY(0); } }
.pay-modal-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; border-bottom:1px solid var(--border);
}
.pay-modal-close { font-size:18px; color:var(--text-3); cursor:pointer; width:24px; height:24px; display:flex; align-items:center; justify-content:center; }
.pay-modal-title { font-size:16px; font-weight:600; }

/* 订单摘要 */
.pay-summary {
  margin:12px 16px; padding:16px;
  background:var(--bg); border-radius:var(--r-md);
}
.pay-summary-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:6px 0; font-size:14px;
}
.pay-summary-label { color:var(--text-2); }
.pay-summary-value { color:var(--text); max-width:65%; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pay-summary-divider { height:1px; background:var(--border); margin:8px 0; }
.pay-summary-total .pay-summary-label { font-weight:600; color:var(--text); }
.pay-summary-price { font-size:20px; font-weight:700; color:var(--red); }
.pay-summary-price::before { content:'¥'; font-size:14px; }

/* 支付方式 */
.pay-methods { padding:0 16px; }
.pay-method-label { font-size:12px; color:var(--text-3); margin-bottom:12px; margin-top:8px; }
.pay-method {
  display:flex; align-items:center; gap:12px;
  padding:14px 16px; margin-bottom:10px;
  border:2px solid var(--border); border-radius:var(--r-md);
  cursor:pointer; transition:all .15s; position:relative;
}
.pay-method:active { transform:scale(.98); }
.pay-method.selected { border-color:var(--green); background:var(--green-bg); }
.pay-method.selected::after {
  content:'✓'; position:absolute; top:8px; right:12px;
  width:20px; height:20px; background:var(--green); color:#fff;
  border-radius:50%; font-size:12px; display:flex; align-items:center; justify-content:center;
}
.pay-method.disabled { opacity:.5; cursor:not-allowed; border-style:dashed; }
.pay-method.disabled:active { transform:none; }
.pay-method-icon {
  width:40px; height:40px; border-radius:var(--r-sm);
  display:flex; align-items:center; justify-content:center;
  font-size:24px; flex-shrink:0;
}
.pay-method-icon svg { width:24px; height:24px; }
.wechat-icon { background:#e8f8ea; color:#07c160; }
.alipay-icon { background:#e8f0ff; color:#1677ff; }
.pay-method-info { flex:1; min-width:0; }
.pay-method-name { font-size:15px; font-weight:600; color:var(--text); }
.pay-method-desc { font-size:12px; color:var(--text-3); margin-top:2px; }
.pay-method-status {
  font-size:11px; color:var(--text-4); white-space:nowrap;
  padding:3px 8px; background:var(--bg); border-radius:var(--r-full);
}
.pay-method-arrow { font-size:20px; color:var(--text-4); }

/* 支付底部按钮 */
.pay-confirm-btn {
  display:block; width:calc(100% - 32px); height:48px; margin:16px;
  background:var(--green); color:#fff; font-size:16px; font-weight:600;
  border-radius:var(--r-full); border:none; cursor:pointer;
  transition:all .15s;
}
.pay-confirm-btn:active { transform:scale(.97); opacity:.9; }
.pay-confirm-btn:disabled { background:var(--text-4); cursor:not-allowed; }
.pay-safe-tip {
  text-align:center; font-size:11px; color:var(--text-4);
  padding:8px 0 16px; display:flex; align-items:center; justify-content:center; gap:4px;
}
.pay-safe-icon { font-size:12px; }

/* ===== 我的页面 ===== */
.user-header {
  background:linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding:20px 16px 30px; color:#fff;
}
.user-header .avatar { width:56px; height:56px; border-radius:50%; background:rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; font-size:28px; }
.user-header .nickname { font-size:18px; font-weight:600; margin-top:8px; }
.user-header .phone { font-size:13px; opacity:.8; }
.user-header .vip-badge {
  display:inline-flex; align-items:center; gap:4px; margin-top:6px;
  background:linear-gradient(90deg, #d4a017, #f0c040); color:#1a1a2e;
  font-size:11px; font-weight:600; padding:3px 10px; border-radius:var(--r-full);
}
.menu-list { margin:12px; background:var(--white); border-radius:var(--r-md); overflow:hidden; }
.menu-item { display:flex; align-items:center; padding:14px 16px; border-bottom:1px solid var(--border); }
.menu-item:last-child { border:none; }
.menu-item .icon { width:20px; text-align:center; margin-right:12px; }
.menu-item .label { flex:1; font-size:14px; }
.menu-item .arrow { color:var(--text-4); font-size:12px; }

/* ===== 空状态 ===== */
.empty-state { text-align:center; padding:60px 20px; }
.empty-state .icon, .empty-icon { font-size:48px; margin-bottom:12px; }
.empty-state .text, .empty-text { font-size:14px; color:var(--text-3); margin-bottom:16px; }
.empty-btn {
  display:inline-block; padding:8px 24px; background:var(--green); color:#fff;
  border-radius:var(--r-full); font-size:14px; font-weight:500;
  border:none; cursor:pointer; transition:opacity .15s;
}
.empty-btn:active { opacity:.85; }

/* ===== Toast ===== */
.toast {
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
  background:rgba(0,0,0,.75); color:#fff; padding:10px 24px; border-radius:var(--r-sm);
  font-size:14px; z-index:999; pointer-events:none; opacity:0; transition:opacity .2s;
}
.toast.show { opacity:1; }

/* ===== 加载 ===== */
.loading { text-align:center; padding:20px; color:var(--text-3); font-size:13px; }

/* ===== 支付结果页 ===== */
.pay-result { text-align:center; padding:60px 20px; }
.pay-result .icon { font-size:64px; margin-bottom:16px; }
.pay-result .title { font-size:20px; font-weight:600; margin-bottom:8px; }
.pay-result .desc { font-size:14px; color:var(--text-2); margin-bottom:24px; }
.pay-result .btn { display:inline-block; padding:10px 32px; background:var(--green); color:#fff; border-radius:var(--r-full); font-size:15px; }

/* ===== 地址管理页 ===== */
#page-address.active { background: var(--bg); }

.address-page { min-height: 100vh; }

/* 顶部导航栏 */
.address-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--white); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; border-bottom: 1px solid var(--border);
}
.address-nav-back {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 50%;
}
.address-nav-back svg { width: 22px; height: 22px; color: var(--text); }
.address-nav-back:active { background: var(--bg); }
.address-nav-title { font-size: 17px; font-weight: 600; color: var(--text); }

/* 地址列表 */
.address-list { padding: calc(var(--header-h) + 8px) 0 80px; }

.address-card {
  margin: 8px 12px; background: var(--white); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow);
}
.address-card.is-default { border: 1.5px solid var(--green); }
.address-card-body { padding: 14px 14px 2px; }
.address-card-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.address-card-name { font-size: 15px; font-weight: 600; color: var(--text); }
.address-card-phone { font-size: 13px; color: var(--text-2); }
.address-tag-default {
  font-size: 10px; background: var(--green-light); color: var(--green);
  padding: 1px 7px; border-radius: var(--r-sm); font-weight: 500;
}
.address-card-detail { font-size: 13px; color: var(--text-2); line-height: 1.6; padding-bottom: 10px; }

/* 地址操作栏 */
.address-card-actions {
  display: flex; gap: 0; border-top: 1px solid var(--border);
  background: var(--bg);
}
.addr-action-link {
  flex: 1; text-align: center; padding: 10px 0; font-size: 12px; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; transition: background .15s;
}
.addr-action-link:active { background: #e8e8e8; }
.addr-action-link + .addr-action-link { border-left: 1px solid var(--border); }
.addr-action-edit { color: var(--blue); }
.addr-action-delete { color: var(--red); }

/* 底部添加按钮 */
.address-bottom-btn {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--white); border-top: 1px solid var(--border);
  z-index: 90;
}
.address-add-btn {
  width: 100%; height: 46px; background: var(--green); color: #fff;
  font-size: 15px; font-weight: 600; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(7,193,96,.25);
}
.address-add-btn:active { background: var(--green-dark); }

/* ===== 地址表单弹窗 ===== */
.address-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .3s;
}
.address-modal-overlay.show { opacity: 1; }
.address-modal-content {
  background: var(--white); border-radius: var(--r-lg) var(--r-lg) 0 0;
  width: 100%; max-width: 420px; max-height: 85vh; overflow-y: auto;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.address-modal-overlay.show .address-modal-content { transform: translateY(0); }

.address-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.address-modal-close { font-size: 14px; color: var(--text-3); cursor: pointer; }
.address-modal-title { font-size: 16px; font-weight: 600; }
.address-modal-save { font-size: 14px; color: var(--green); font-weight: 600; cursor: pointer; }

.address-form { padding: 16px; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 15px; color: var(--text);
  background: var(--bg); transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus { border-color: var(--green); background: var(--white); }
.form-select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 18px;
}
.form-group-row { margin-top: 20px; }
.form-checkbox-label {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 14px; color: var(--text-2);
}
.form-checkbox {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text-4);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff;
  flex-shrink: 0; transition: all .2s;
}
.form-checkbox.checked { border-color: var(--green); background: var(--green); }

/* ===== 订单Tab切换 ===== */
.order-tabs {
  display:flex; align-items:center; background:var(--white);
  border-bottom:1px solid var(--border); position:sticky; top:var(--header-h);
  z-index:50; padding-right:4px;
}
.order-tabs-scroll {
  flex:1; display:flex; overflow-x:auto; -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.order-tabs-scroll::-webkit-scrollbar { display:none; }
.order-tab {
  flex-shrink:0; padding:12px 16px; font-size:14px; color:var(--text-2);
  border-bottom:2px solid transparent; cursor:pointer; transition:all .2s;
  display:flex; align-items:center; gap:4px;
}
.order-tab.active { color:var(--green); border-bottom-color:var(--green); font-weight:600; }
.order-tab-badge {
  min-width:16px; height:16px; padding:0 4px; font-size:10px;
  background:var(--red); color:#fff; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
}
.order-tab-refresh {
  padding:8px 12px; font-size:20px; color:var(--text-3); cursor:pointer;
  border-left:1px solid var(--border); flex-shrink:0;
}
.order-tab-refresh:active { color:var(--green); }

/* ===== 订单卡片增强 ===== */
.order-card .order-actions { display:flex; gap:6px; }
.order-card .order-btn { padding:6px 16px; border-radius:var(--r-full); font-size:13px; cursor:pointer; transition:all .15s; }
.order-card .order-btn.primary { background:var(--green); color:#fff; border:none; font-weight:500; }
.order-card .order-btn:active { opacity:.8; }

.order-delivery-info {
  margin-top:6px; padding-top:6px; font-size:11px; color:var(--text-3);
  display:flex; gap:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.order-item-emoji {
  width:56px; height:56px; background:var(--bg); border-radius:var(--r-sm);
  display:flex; align-items:center; justify-content:center; font-size:24px; flex-shrink:0;
}

/* ===== 通用标签样式 ===== */
.product-tag {
  display:inline-block; font-size:10px; background:var(--green-light);
  color:var(--green); padding:1px 6px; border-radius:3px; margin-left:4px;
}
