/* =====================================================
   积分商城 · 前台样式 v2（现代电商风格，移动端优先）
   ===================================================== */
:root {
  --primary: #ff6b1a;
  --primary-dark: #f2530b;
  --grad-main: linear-gradient(135deg, #ff9d3c 0%, #ff5722 100%);
  --grad-soft: linear-gradient(135deg, #fff3e8 0%, #ffe8d6 100%);
  --gold: #ffb800;
  --success: #00b578;
  --success-bg: #e6f9f2;
  --danger: #fa5151;
  --danger-bg: #ffe9e9;
  --info: #3a7afe;
  --info-bg: #e8f0ff;
  --warn: #ff8f1f;
  --warn-bg: #fff3e0;
  --text: #1f2329;
  --text-2: #5b6472;
  --text-3: #98a1b0;
  --border: #eceef1;
  --bg: #f4f5f7;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(17, 24, 39, .05);
  --shadow-md: 0 6px 20px rgba(17, 24, 39, .08);
  --shadow-lg: 0 12px 32px rgba(255, 87, 34, .18);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
::selection { background: rgba(255, 107, 26, .2); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 16px; padding-bottom: 56px; }
.page-title { font-size: 20px; font-weight: 700; margin: 6px 0 16px; display: flex; align-items: center; gap: 8px; }
.page-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--grad-main); }

/* 图标 */
.ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 15px; height: 15px; }

/* ==================== 顶栏 ==================== */
.topbar { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 19px; white-space: nowrap; }
.logo-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-main); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 10px rgba(255, 107, 26, .35); }
.logo-ico .ico { width: 20px; height: 20px; stroke-width: 2.2; }
.logo-text { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.search { flex: 1; min-width: 200px; display: flex; align-items: center; background: var(--bg); border: 1px solid transparent; border-radius: 22px; padding: 0 6px 0 14px; transition: border-color .2s, box-shadow .2s, background .2s; }
.search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(255, 107, 26, .12); }
.search .ico { color: var(--text-3); }
.search input { flex: 1; border: none; background: transparent; padding: 9px 8px; font-size: 14px; outline: none; min-width: 0; }
.search button { border: none; background: var(--grad-main); color: #fff; padding: 7px 18px; border-radius: 18px; cursor: pointer; font-size: 13px; font-weight: 600; transition: opacity .2s; }
.search button:hover { opacity: .9; }

.topnav { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.topnav a { display: flex; align-items: center; gap: 5px; color: var(--text-2); padding: 7px 10px; border-radius: 9px; transition: background .2s, color .2s; }
.topnav a:hover { background: var(--grad-soft); color: var(--primary-dark); }
.nav-points { color: #e68a00 !important; font-weight: 700; }
.nav-points .ico { stroke: var(--gold); }
.nav-cart { position: relative; }
.cart-count { position: absolute; top: 1px; right: 1px; background: var(--danger); color: #fff; border-radius: 12px; font-size: 11px; min-width: 17px; height: 17px; line-height: 17px; text-align: center; padding: 0 4px; box-shadow: 0 0 0 2px #fff; font-weight: 700; }
.topnav .link-btn { color: var(--text-2); padding: 7px 10px; border-radius: 9px; }
.topnav .link-btn:hover { background: var(--grad-soft); color: var(--primary-dark); }

/* ==================== 首页 Hero ==================== */
.hero { position: relative; overflow: hidden; border-radius: 18px; background: var(--grad-main); color: #fff; padding: 34px 28px; margin-bottom: 16px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.hero::before { width: 190px; height: 190px; top: -80px; right: -40px; }
.hero::after { width: 130px; height: 130px; bottom: -60px; right: 120px; background: rgba(255, 255, 255, .1); }
.hero-inner { position: relative; z-index: 1; }
.hero h2 { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.hero p { margin-top: 6px; font-size: 14px; opacity: .95; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn-ghost { background: rgba(255, 255, 255, .2); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .32); }

.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); border: 1px solid #ffd9a8; color: #8a4b00; border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 14px; font-size: 13px; }
.notice .ico { color: var(--warn); margin-top: 2px; }

/* 分类导航 */
.cat-nav { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.cat-nav a { border: 1px solid var(--border); background: #fff; border-radius: 20px; padding: 6px 16px; font-size: 13px; color: var(--text-2); transition: all .2s; }
.cat-nav a:hover { border-color: var(--primary); color: var(--primary); }
.cat-nav a.active { background: var(--grad-main); border-color: transparent; color: #fff; font-weight: 600; box-shadow: var(--shadow-lg); }

/* ==================== 商品网格 ==================== */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.section-title h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-title h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--grad-main); }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.product-card { position: relative; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-img { position: relative; aspect-ratio: 1; background: #f6f7f9; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-tag { position: absolute; top: 10px; left: 10px; background: rgba(255, 107, 26, .92); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; backdrop-filter: blur(4px); }
.product-off { position: absolute; inset: 0; background: rgba(31, 35, 41, .45); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.product-name { font-size: 14px; font-weight: 600; padding: 10px 12px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-sub { font-size: 12px; color: var(--text-3); padding: 2px 12px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-meta { display: flex; justify-content: space-between; align-items: flex-end; padding: 8px 12px 12px; margin-top: auto; }
.price { color: var(--danger); font-weight: 800; font-size: 16px; line-height: 1; }
.price em { font-style: normal; font-size: 11px; font-weight: 400; margin-left: 1px; }
.stock { color: var(--text-3); font-size: 12px; }

/* ==================== 按钮 ==================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 10px; padding: 9px 20px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; transition: all .2s; white-space: nowrap; }
.btn:hover { opacity: .92; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad-main); color: #fff; box-shadow: 0 4px 12px rgba(255, 107, 26, .28); }
.btn-outline { background: #fff; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--grad-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 26px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.link-btn { border: none; background: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn.danger { color: var(--danger); }
.link-btn:hover { text-decoration: underline; }

/* ==================== 表单 ==================== */
input[type="text"], input[type="password"], input[type="number"], input[type="tel"], select, textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; font-size: 14px; width: 100%; outline: none; background: #fff; transition: border-color .2s, box-shadow .2s; color: var(--text); font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 26, .12); }
input::placeholder, textarea::placeholder { color: #b6becb; }
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
label b { color: var(--danger); }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid label { margin-bottom: 0; }
.form-grid input, .form-grid select, .form-grid textarea { margin-top: 6px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-row input, .form-row select { width: auto; flex: 1; min-width: 130px; }
.form-row .btn { flex-shrink: 0; }

/* ==================== 卡片/表格/徽标 ==================== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--grad-main); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { background: #fafbfc; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafbfc; }
.remark { color: var(--text-3); font-size: 12px; max-width: 240px; }
.empty { text-align: center; color: var(--text-3); padding: 36px 10px; font-size: 14px; }
.empty .ico { width: 44px; height: 44px; stroke-width: 1.5; margin: 0 auto 10px; color: #d3d9e2; }
.empty-lg { padding: 70px 10px; }
.empty-lg h2 { font-size: 44px; color: #d3d9e2; margin-bottom: 6px; }
.empty-lg .btn { margin-top: 16px; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.badge-success { background: var(--success-bg); color: #00936a; }
.badge-danger { background: var(--danger-bg); color: #e03131; }
.badge-warn { background: var(--warn-bg); color: #e07b00; }
.badge-info { background: var(--info-bg); color: #2f6bff; }
.badge-muted { background: #f0f1f3; color: var(--text-3); }
.badge-gold { background: linear-gradient(135deg, #fff3d6, #ffe7b3); color: #b36b00; }
.plus { color: var(--success); font-weight: 700; }
.minus { color: var(--danger); font-weight: 700; }
.muted { color: var(--text-3); }

/* ==================== 页签/分页/提示 ==================== */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tabs a { background: transparent; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 9px 14px; font-size: 14px; color: var(--text-2); font-weight: 500; transition: color .2s; }
.tabs a:hover { color: var(--primary); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; flex-wrap: wrap; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 13px; font-size: 13px; color: var(--text-2); transition: all .2s; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .cur { background: var(--grad-main); border-color: transparent; color: #fff; font-weight: 700; }

.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(23, 27, 33, .94); color: #fff; border-radius: 12px; padding: 12px 22px; font-size: 14px; z-index: 999; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .4s, transform .3s; max-width: 90%; animation: toastIn .3s; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.alert { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; margin-bottom: 14px; }
.alert-danger { background: var(--danger-bg); color: #c92a2a; }
.alert-info { background: var(--info-bg); color: #1c4ed8; }

/* ==================== 登录/注册 ==================== */
.auth-wrap { display: flex; justify-content: center; padding: 40px 16px; }
.auth-card { background: #fff; border-radius: 20px; overflow: hidden; width: 100%; max-width: 860px; display: grid; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
@media (min-width: 720px) { .auth-card { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; background: var(--grad-main); color: #fff; padding: 44px 36px; position: relative; overflow: hidden; flex-direction: column; justify-content: space-between; }
@media (min-width: 720px) { .auth-side { display: flex; } }
.auth-side::before, .auth-side::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.14); }
.auth-side::before { width: 180px; height: 180px; top: -60px; right: -50px; }
.auth-side::after { width: 120px; height: 120px; bottom: -40px; left: -30px; }
.auth-side h2 { font-size: 26px; font-weight: 800; position: relative; z-index: 1; }
.auth-side p { font-size: 14px; opacity: .95; margin-top: 10px; line-height: 1.8; position: relative; z-index: 1; }
.auth-side .auth-points { display: flex; gap: 26px; position: relative; z-index: 1; }
.auth-side .auth-points div b { font-size: 24px; display: block; }
.auth-side .auth-points div span { font-size: 12px; opacity: .9; }
.auth-form { padding: 34px 32px; }
.auth-form h3 { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.auth-form .sub { color: var(--text-3); font-size: 13px; margin-bottom: 20px; }
.auth-form label { margin-top: 4px; }
.auth-form .btn-block { margin-top: 18px; }
.auth-tip { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-3); }

/* ==================== 个人中心 ==================== */
.profile-cover { position: relative; border-radius: 18px; overflow: hidden; background: var(--grad-main); color: #fff; padding: 26px 22px; display: flex; align-items: center; gap: 16px; margin-bottom: 16px; box-shadow: var(--shadow-lg); }
.profile-cover::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); top: -70px; right: -40px; }
.profile-avatar { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.6); color: #fff; font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-name { font-size: 18px; font-weight: 800; }
.profile-phone { font-size: 13px; opacity: .92; margin-top: 2px; }
.profile-points { margin-left: auto; text-align: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 14px; padding: 8px 18px; position: relative; z-index: 1; }
.points-num { font-size: 24px; font-weight: 800; }
.points-label { font-size: 11px; opacity: .9; }
.quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.quick-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 4px; text-align: center; color: var(--text); font-size: 12px; transition: all .2s; }
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.quick-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--grad-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.quick-ico .ico { width: 20px; height: 20px; }
.quick-card:nth-child(2) .quick-ico { background: #fff3d6; color: #b36b00; }
.quick-card:nth-child(3) .quick-ico { background: var(--info-bg); color: var(--info); }
.quick-card:nth-child(4) .quick-ico { background: var(--success-bg); color: var(--success); }
.quick-card:nth-child(5) .quick-ico { background: #f0ecff; color: #7048e8; }

/* ==================== 充值页 ==================== */
.recharge-page .page-title { margin-bottom: 4px; }
.recharge-main { display: grid; gap: 16px; }
@media (min-width: 820px) { .recharge-main { grid-template-columns: 330px 1fr; } }
.qr-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px; text-align: center; box-shadow: var(--shadow-sm); align-self: start; }
.qr-box h4 { font-size: 15px; margin-bottom: 14px; color: var(--text-2); }
.qr-box img { width: 230px; height: 230px; object-fit: contain; border-radius: 12px; margin: 0 auto; box-shadow: var(--shadow-md); }
.qr-tip { color: var(--text-3); font-size: 13px; margin-top: 12px; }
.qr-empty { border: 2px dashed #d3d9e2; border-radius: 12px; padding: 64px 20px; color: var(--text-3); font-size: 14px; background: #fafbfc; }
.qr-empty .ico { width: 36px; height: 36px; margin: 0 auto 8px; stroke-width: 1.5; }
.recharge-steps { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .recharge-steps { grid-template-columns: repeat(3, 1fr); } }
.step-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--grad-main); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-item b { display: block; font-size: 14px; }
.step-item span { font-size: 12px; color: var(--text-3); }
.recharge-info .desc-box { background: var(--warn-bg); border: 1px solid #ffd9a8; color: #8a4b00; border-radius: var(--radius-sm); padding: 13px 15px; font-size: 13px; margin-bottom: 14px; }
.tiers-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.tiers-table td { text-align: center; }
.tiers-table th { text-align: center; }
.recharge-note { color: var(--text-3); font-size: 12px; margin-top: 8px; }
.recharge-tip { color: var(--text-3); font-size: 12px; margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.recharge-tip .ico { color: var(--warn); }

/* ==================== 积分中心 ==================== */
.balance-card { position: relative; overflow: hidden; background: linear-gradient(135deg, #ffb03a 0%, #ff6b1a 55%, #ff4d2e 100%); border-radius: 18px; color: #fff; text-align: center; padding: 28px 20px; margin-bottom: 16px; box-shadow: var(--shadow-lg); }
.balance-card::before, .balance-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.13); }
.balance-card::before { width: 150px; height: 150px; top: -60px; left: -40px; }
.balance-card::after { width: 100px; height: 100px; bottom: -40px; right: -20px; }
.balance-card > * { position: relative; z-index: 1; }
.balance-num { font-size: 38px; font-weight: 900; line-height: 1.1; text-shadow: 0 2px 8px rgba(0,0,0,.15); }
.balance-label { font-size: 13px; opacity: .95; margin: 4px 0 16px; }
.balance-card .btn { background: #fff; color: var(--primary-dark); box-shadow: 0 4px 14px rgba(0,0,0,.15); }

/* ==================== 购物车 ==================== */
.cart-list { display: grid; gap: 12px; }
.cart-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); display: flex; gap: 14px; padding: 14px; align-items: center; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.cart-item:hover { box-shadow: var(--shadow-md); }
.cart-item.off { opacity: .65; }
.cart-img { width: 88px; height: 88px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: #f6f7f9; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-size: 14px; font-weight: 600; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-price { color: var(--danger); font-weight: 700; font-size: 14px; margin-top: 4px; }
.cart-ops { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.cart-subtotal { font-weight: 800; color: var(--danger); white-space: nowrap; font-size: 15px; }
.cart-foot { position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-md); }
.total-points { color: var(--danger); font-size: 18px; font-weight: 800; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.stepper button { border: none; background: #f7f8fa; width: 32px; height: 32px; font-size: 16px; cursor: pointer; color: var(--text-2); transition: background .2s; }
.stepper button:hover { background: var(--grad-soft); color: var(--primary); }
.stepper input { width: 46px; height: 32px; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; border-radius: 0; padding: 0; }

/* ==================== 结算 ==================== */
.addr-item { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; cursor: pointer; align-items: flex-start; transition: all .2s; background: #fff; }
.addr-item:hover { border-color: #ffb47f; }
.addr-item.selected { border-color: var(--primary); background: #fffaf5; box-shadow: 0 0 0 3px rgba(255,107,26,.1); }
.addr-item input { margin-top: 4px; accent-color: var(--primary); }
.addr-body b { font-size: 14px; }
.addr-text { display: block; color: var(--text-2); font-size: 13px; margin-top: 3px; }
.addr-more { margin-top: 6px; font-size: 13px; }
.checkout-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.checkout-item img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.co-name { flex: 1; font-weight: 500; }
.co-price { color: var(--text-3); }
.co-sub { font-weight: 700; color: var(--danger); }
.checkout-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; flex-wrap: wrap; }

/* ==================== 地址 ==================== */
.addr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addr-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.addr-edit { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 14px; }

/* ==================== 订单 ==================== */
.order-card { position: relative; }
.order-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.order-head b { color: var(--text); font-weight: 700; font-size: 14px; }
.order-items { border-top: 1px dashed var(--border); }
.order-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.order-item:last-child { border-bottom: none; }
.order-item img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.oi-name { flex: 1; font-weight: 500; }
.oi-qty { color: var(--text-3); }
.order-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; }
.order-time { color: var(--text-3); }
.order-total { font-weight: 600; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-actions-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.kv-table td:first-child { width: 100px; color: var(--text-3); white-space: nowrap; }
.kv-table td { border-bottom: none; padding: 7px 8px; }
.tx-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.order-status-bar { display: flex; align-items: center; gap: 10px; background: var(--grad-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 6px; }

/* ==================== 商品详情 ==================== */
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--primary); }
.product-main { display: grid; gap: 16px; }
@media (min-width: 820px) { .product-main { grid-template-columns: 400px 1fr; } }
.product-gallery { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); align-self: start; }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.gallery-thumbs img { width: 66px; height: 66px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: border-color .2s; }
.gallery-thumbs img.active { border-color: var(--primary); }
.product-info { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.product-info h1 { font-size: 22px; font-weight: 800; }
.product-subtitle { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.price-box { margin: 18px 0 10px; display: flex; align-items: baseline; gap: 12px; }
.price-big { font-size: 34px; font-weight: 900; color: var(--danger); line-height: 1; }
.price-unit { color: var(--danger); font-size: 15px; font-weight: 600; }
.sales { color: var(--text-3); font-size: 13px; margin-left: auto; }
.stock-line { color: var(--text-2); font-size: 13px; margin-bottom: 18px; display: flex; align-items: center; gap: 6px; }
.stock-line .ico { color: var(--success); }
.buy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.product-detail { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 16px; box-shadow: var(--shadow-sm); }
.product-detail h3 { margin-bottom: 12px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.product-detail h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--grad-main); }
.detail-body { font-size: 14px; color: var(--text-2); white-space: pre-wrap; line-height: 1.8; }

/* ==================== 页脚 ==================== */
.footer { background: #23262d; color: #9aa3b2; padding: 26px 0 30px; text-align: center; font-size: 12px; margin-top: 24px; }
.footer-links { margin-top: 10px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: #9aa3b2; transition: color .2s; }
.footer-links a:hover { color: #fff; }

/* ==================== 手机端适配（≤640px） ==================== */
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .topbar-inner { padding: 8px 12px; gap: 8px; }
  .search { order: 3; flex-basis: 100%; min-width: 0; }
  .topnav { margin-left: auto; }
  .topnav a { padding: 6px 8px; font-size: 13px; }
  .hero { padding: 26px 20px; }
  .hero h2 { font-size: 20px; }
  .hero p { font-size: 13px; }
  .page-title { font-size: 18px; }
  .card { padding: 14px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .auth-wrap { padding: 24px 12px; }
  .auth-form { padding: 26px 20px; }
  .auth-side { padding: 34px 26px; }
  .profile-cover { padding: 20px 16px; gap: 12px; }
  .profile-avatar { width: 52px; height: 52px; font-size: 22px; }
  .profile-points { padding: 6px 12px; }
  .quick-grid { gap: 8px; }
  .quick-card { padding: 12px 2px; font-size: 11px; }
  .quick-ico { width: 34px; height: 34px; }
  .qr-box img { width: 200px; height: 200px; }
  .product-info { padding: 16px; }
  .product-info h1 { font-size: 19px; }
  .price-big { font-size: 28px; }
  .gallery-thumbs img { width: 56px; height: 56px; }
  .cart-img { width: 72px; height: 72px; }
  .cart-item { gap: 10px; padding: 12px; }
  .cart-foot { padding: 12px 14px; }
  .balance-num { font-size: 32px; }
  .footer-links { gap: 14px; }
}

