/* ========== 基础样式与变量 ========== */
:root {
  --primary: #2d8a4e;
  --primary-light: #43a863;
  --primary-dark: #1a6b3a;
  --accent: #1a1a1a;
  --bg: #f0faf0;
  --card-bg: #ffffff;
  --white: #ffffff;
  --text: #222222;
  --text-light: #666666;
  --text-lighter: #999999;
  --border: #e0e0e0;
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #27ae60;
  --radius: 12px;
  --radius-sm: 8px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 60px;
  --bottom-nav-height: 60px;
  --top-bar-height: 48px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* ========== 顶部导航栏 ========== */
.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--top-bar-height);
  background: var(--primary);
  color: var(--white);
  z-index: 100;
}

.top-bar-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: 100%;
  padding: 0 16px;
}

.top-bar-content h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  padding: 4px;
  color: var(--white);
  display: flex;
  align-items: center;
}

.top-bar-back {
  margin-right: 6px;
  flex-shrink: 0;
}

.badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent);
  color: var(--white);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: bold;
  min-width: 16px;
  text-align: center;
}

/* ========== 底部导航栏 ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--white);
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-lighter);
  transition: all 0.2s;
  position: relative;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

.nav-icon { width:24px; height:24px; margin-bottom:2px; display:flex; align-items:center; justify-content:center; }
.nav-icon svg { width:22px; height:22px; display:block; }
.nav-icon img { width:22px; height:22px; display:block; }
.nav-item .nav-icon svg { stroke: var(--text-lighter); transition: stroke 0.25s; }
.nav-item.active .nav-icon svg { stroke: var(--primary); }
.nav-label { font-size: 11px; font-weight: 500; }

/* ---- 购物车导航项 ---- */
.nav-cart { position: relative; }
.nav-cart-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(22px);
  background: var(--accent);
  color: var(--white);
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  padding: 0 4px;
  font-weight: 600;
  z-index: 2;
}
.top-icon { width:22px; height:22px; display:flex; align-items:center; justify-content:center; }
.top-icon svg { width:20px; height:20px; display:block; stroke: white; }
.top-icon img { width:20px; height:20px; display:block; }

/* ===== 通用 SVG 图标元素 ===== */
.ico-elem { display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; line-height:1; }
.ico-elem svg { display:block; }
.ico-elem img { display:block; object-fit:contain; }

/* 区域图标 / 学校层级图标 / 产品图占位 / 空状态大图标 */
.district-icon svg,
.school-level-icon svg,
.product-image svg,
.renew-hero-icon svg,
.renew-entry-icon svg,
.cart-empty-icon svg,
.empty-icon svg,
.cart-item-image svg,
.order-item-image svg,
.detail-images svg,
.order-status-icon svg,
.menu-item-icon svg,
.address-icon svg { display:block; }

/* 行内小图标：收藏、加减按钮等 */
.btn-favorite svg,
.qty-btn svg,
.cart-del-btn svg,
.back-btn svg,
.search-clear svg,
.search-icon svg,
.checkout-delivery svg,
.order-status-item svg,
.menu-item-arrow svg { display:block; }

/* 图标大小统一 */
.district-icon svg { width:32px; height:32px; }
.school-level-icon svg { width:32px; height:32px; }
.renew-hero-icon svg { width:48px; height:48px; stroke:white; }
.renew-entry-icon svg { width:32px; height:32px; stroke:white; }
.cart-empty-icon svg,
.empty-icon svg { width:64px; height:64px; stroke: var(--text-lighter); }
.cart-item-image svg { width:32px; height:32px; stroke: var(--primary); }
.order-item-image svg { width:28px; height:28px; stroke: var(--primary); }
.detail-images svg { width:80px; height:80px; stroke: var(--text-lighter); }
.product-image svg { width:48px; height:48px; stroke: var(--text-lighter); }
.order-status-icon svg { width:24px; height:24px; stroke: var(--text-light); }
.menu-item-icon svg { width:20px; height:20px; }
.address-icon svg { width:24px; height:24px; stroke: var(--primary); }
.btn-favorite svg { width:20px; height:20px; }
.qty-btn svg { width:16px; height:16px;stroke:var(--text);user-select:none; }
.cart-del-btn svg { width:18px; height:18px; stroke:var(--text-lighter); }
.search-clear svg { width:14px; height:14px; stroke:var(--text-lighter); }
.search-icon svg { width:18px; height:18px; stroke:var(--text-lighter); }
.menu-item-arrow svg { width:16px; height:16px; stroke:var(--text-lighter); }
.renew-section-title svg { width:18px; height:18px; stroke:var(--primary);margin-right:6px; }
.checkout-delivery svg { width:18px; height:18px; stroke:var(--primary); }

/* ========== 主内容区域 ========== */
.main-content {
  margin-top: var(--top-bar-height);
  margin-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  padding: 0;
  min-height: calc(100vh - var(--top-bar-height) - var(--nav-height) - var(--safe-bottom));
}

/* ========== 首页Banner ========== */
.banner-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
}

.banner-swiper {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  position: relative;
}

.banner-slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: var(--white);
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide:nth-child(3n+1) { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.banner-slide:nth-child(3n+2) { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.banner-slide:nth-child(3n+3) { background: linear-gradient(135deg, var(--primary-light), var(--accent)); }

.banner-content {
  text-align: center;
  padding: 20px;
}

.banner-content h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-content p {
  font-size: 14px;
  opacity: 0.9;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
  cursor: pointer;
}

.banner-dot.active {
  width: 20px;
  background: var(--white);
}

/* ========== 区块标题 ========== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  padding-left: 12px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.section-more {
  font-size: 13px;
  color: var(--text-lighter);
  cursor: pointer;
}

/* ========== 市区分类入口 ========== */
.district-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.district-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.district-card:hover, .district-card:active {
  transform: translateY(-2px);
}

.district-card:nth-child(1) { border-top: 3px solid var(--primary); }
.district-card:nth-child(2) { border-top: 3px solid var(--primary-light); }
.district-card:nth-child(3) { border-top: 3px solid var(--accent); }

.district-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.district-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.district-desc {
  font-size: 11px;
  color: var(--text-lighter);
  margin-top: 4px;
}

/* ========== 商品列表 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.product-card:active {
  transform: scale(0.98);
}

.product-image {
  width: 100%;
  height: 160px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}

.product-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.product-tag.package { background: var(--primary); }
.product-tag.renew { background: var(--warning); }
.product-tag.presale { background: var(--primary); }

.product-info {
  padding: 12px;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 8px;
}

.product-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.product-original-price {
  font-size: 12px;
  color: var(--text-lighter);
  text-decoration: line-through;
}

.product-sales {
  font-size: 11px;
  color: var(--text-lighter);
  margin-top: 4px;
}

.product-district {
  display: inline-block;
  font-size: 10px;
  background: var(--bg);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 6px;
}

/* ========== 换新服务入口卡片 ========== */
.renew-entry-card {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.renew-entry-card.has-image {
  background-size: cover;
  background-position: center;
  min-height: 72px;
}
.renew-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius);
  z-index: 1;
}
.renew-entry-card.has-image .renew-entry-icon,
.renew-entry-card.has-image .renew-entry-text,
.renew-entry-card.has-image .renew-entry-arrow {
  position: relative;
  z-index: 2;
}
.renew-entry-card.has-image .renew-entry-text h3,
.renew-entry-card.has-image .renew-entry-text p {
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.renew-entry-icon {
  font-size: 32px;
}

.renew-entry-text h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.renew-entry-text p {
  font-size: 12px;
  opacity: 0.85;
}

.renew-entry-arrow {
  font-size: 20px;
}

/* ========== 分类页 ========== */
.category-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--top-bar-height);
  z-index: 10;
}

.district-tab {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

.district-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.district-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

.school-level-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.school-level-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-top: 3px solid transparent;
}

.school-level-card:nth-child(1) { border-top: 3px solid var(--primary); }
.school-level-card:nth-child(2) { border-top: 3px solid var(--primary-light); }
.school-level-card:nth-child(3) { border-top: 3px solid var(--accent); }

.school-level-card:hover, .school-level-card:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.school-level-card.anim-in {
  animation: slideUpFade 0.4s ease-out both;
}
.school-level-card:nth-child(1).anim-in { animation-delay: 0s; }
.school-level-card:nth-child(2).anim-in { animation-delay: 0.1s; }
.school-level-card:nth-child(3).anim-in { animation-delay: 0.2s; }

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.school-level-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.school-level-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.school-level-count {
  font-size: 11px;
  color: var(--text-lighter);
  margin-top: 4px;
}

/* ===== 分类页：左右布局 ===== */
.category-container {
  display: flex;
  height: calc(100vh - var(--top-bar-height) - var(--bottom-nav-height));
  overflow: hidden;
}
.district-sidebar {
  width: 110px;
  flex-shrink: 0;
  background: var(--bg);
  overflow-y: auto;
  padding: 8px 0;
  border-right: 1px solid var(--border);
}
.district-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.district-item.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--white);
  border-left-color: var(--primary);
}
.district-item:active {
  background: var(--white);
}
.category-right {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--white);
}
.category-district-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.category-district-title.title-pop {
  animation: titleFlash 0.35s ease-out;
}
@keyframes titleFlash {
  0%   { color: var(--primary); transform: scale(1.04); }
  100% { color: var(--text); transform: scale(1); }
}

/* ========== 商品详情页 ========== */
.product-detail {
  background: var(--white);
  min-height: 100vh;
}

.detail-images {
  width: 100%;
  height: 320px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  position: relative;
  overflow: hidden;
}

/* 首图轮播 */
.detail-images-cover {
  background: var(--bg);
  padding: 0;
  display: block;
  cursor: grab;
  user-select: none;
}
.detail-images-cover:active {
  cursor: grabbing;
}
.cover-slides {
  display: flex;
  height: 100%;
  width: 100%;
}
.cover-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}
.cover-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.cover-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
}
.cover-dot.active {
  background: var(--white);
  width: 16px;
  border-radius: 3px;
}

.detail-info {
  padding: 16px;
  border-bottom: 8px solid var(--bg);
}

.detail-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0;
}

.detail-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.detail-original {
  font-size: 14px;
  color: var(--text-lighter);
  text-decoration: line-through;
}

.detail-name-row {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.detail-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.detail-tag-inline {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  flex-shrink: 0;
}
.detail-tag-inline.tag-pkg {
  background: var(--bg);
  color: var(--accent);
  border: 1px solid #e0e0e0;
}
.detail-tag-inline.tag-renew {
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--primary-light);
}
.detail-tag-inline.tag-presale {
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
}

.presale-banner {
  background: var(--bg);
  border: 1px solid #c8e6c9;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.presale-badge {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}
.presale-price {
  font-size: 18px;
  color: var(--primary);
}
.presale-period {
  font-size: 12px;
  color: var(--text-lighter);
  width: 100%;
  margin-top: 2px;
}

/* 预售确认弹窗 */
.presale-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.presale-modal {
  background: var(--white);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 500px;
  padding: 0;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.presale-modal-header {
  text-align: center;
  padding: 24px 20px 12px;
}
.presale-modal-icon {
  font-size: 40px;
  margin-bottom: 8px;
}
.presale-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.presale-modal-body {
  padding: 12px 20px 20px;
}
.presale-modal-product {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-align: center;
}
.presale-modal-desc {
  font-size: 14px;
  color: var(--text-lighter);
  line-height: 1.6;
  text-align: center;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}
.presale-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
}
.presale-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.presale-modal-btn.cancel {
  background: var(--bg);
  color: var(--text-lighter);
}
.presale-modal-btn.confirm {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
}

/* 预售标签 */
.order-presale-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 预售进度 */
.presale-progress {}
.presale-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.presale-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  font-size: 11px;
  color: var(--text-lighter);
}
.presale-step .step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  margin-bottom: 6px;
  z-index: 1;
}
.presale-step.done .step-dot { background: var(--primary); }
.presale-step.active .step-dot {
  background: var(--white); border: 3px solid var(--primary);
  animation: pulse 2s infinite;
}
.presale-step.done { color: var(--primary); }
.presale-step.active { color: var(--primary); font-weight: 600; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(67,160,71,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(67,168,99,0); }
}
.presale-countdown {
  text-align: center;
  font-size: 14px;
  padding: 10px;
  background: var(--bg);
  border-radius: 8px;
  color: var(--primary);
  margin-top: 8px;
}
.presale-countdown.expired {
  color: var(--danger);
  background: rgba(231,76,60,0.08);
}

.detail-sales {
  font-size: 13px;
  color: var(--text-lighter);
  margin-top: 4px;
}

/* 规格选择 */
.spec-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.spec-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spec-option {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
  min-width: 56px;
  text-align: center;
}

.spec-option.active {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.spec-option.disabled {
  background: var(--bg);
  color: var(--text-lighter);
  cursor: not-allowed;
}

/* 数量选择 */
.quantity-section {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.qty-btn:active { background: var(--bg); }

.qty-value {
  width: 40px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

/* 详情页文字描述 */
.detail-desc-text {
  padding: 16px;
  border-top: 6px solid var(--bg);
}
.detail-desc-text h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.detail-desc-text p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

/* 详情图库 */
/* 详情图竖排无缝展示（淘宝风格） */
.detail-images-stack {
  width: 100%;
  padding: 0;
  margin: 0;
  background: var(--white);
}
.detail-stack-item {
  width: 100%;
  font-size: 0; /* 消除图片间隙 */
  line-height: 0;
}
.detail-stack-item img {
  width: 100%;
  display: block;
  object-fit: contain;
}

/* 底部操作栏 */
.detail-actions {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 101;
}
.detail-actions-bottom {
  bottom: var(--safe-bottom);
}

.btn-favorite {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-favorite.favorited {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-add-cart {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-buy-now {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* 预售购买按钮 —— 放在 btn-buy-now 之后利用源顺序覆盖，使用 CSS 变量跟随主题 */
.btn-presale {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* ========== 购物车 ========== */
.cart-page {
  padding: 16px;
}

.cart-empty {
  text-align: center;
  padding: 80px 20px;
}

.cart-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.cart-empty-text {
  font-size: 15px;
  color: var(--text-lighter);
  margin-bottom: 16px;
}

.cart-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  
}

.cart-item-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.cart-item-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.cart-item-spec {
  font-size: 12px;
  color: var(--text-lighter);
  margin-bottom: 8px;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-del-btn {
  font-size: 18px;
  cursor: pointer;
  color: var(--text-lighter);
  padding: 4px;
}

.cart-footer {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 50;
}

.cart-total-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.btn-checkout {
  padding: 10px 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ========== 订单确认页 ========== */
.order-confirm {
  padding: 0 0 80px;
}

.address-card {
  background: var(--white);
  padding: 16px;
  margin: 8px 16px;
  border-radius: var(--radius);
  
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.address-card .address-icon {
  font-size: 24px;
}

.address-info {
  flex: 1;
}

.address-user {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.address-detail-text {
  font-size: 13px;
  color: var(--text-light);
}

.order-items-section {
  background: var(--white);
  margin: 8px 16px;
  border-radius: var(--radius);
  
  overflow: hidden;
}

.order-item {
  display: flex;
  align-items: center;
  padding: 14px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.order-item:last-child { border-bottom: none; }

.order-item-image {
  width: 72px;
  height: 72px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  justify-content: center;
  font-size: 28px;
}

.order-item-info {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-spec {
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 4px;
}

.order-item-price-qty {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.order-summary {
  background: var(--white);
  margin: 8px 16px;
  border-radius: var(--radius);
  
  padding: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.summary-row.total {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
}

.order-submit-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 101;
}

/* ========== 订单列表页 ========== */
.order-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--top-bar-height);
  z-index: 10;
}

.order-tab {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-light);
  position: relative;
}

.order-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.order-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--primary);
}

.order-card {
  background: var(--white);
  margin: 10px 16px;
  border-radius: var(--radius);
  
  overflow: hidden;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-light);
}

.order-status {
  font-weight: 600;
}

.order-status.pending_payment { color: var(--accent); }
.order-status.pending_ship { color: var(--warning); }
.order-status.pending_receive { color: var(--primary); }
.order-status.completed { color: var(--success); }

.order-card-body {
  padding: 12px 14px;
}

.order-product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.order-product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.order-product-info {
  flex: 1;
  min-width: 0;
}

.order-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.btn-sm {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}

.btn-sm.primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-sm.danger {
  background: var(--white);
  color: var(--danger);
  border-color: var(--danger);
}

/* ========== 换新服务页 ========== */
.renew-page {
  padding: 16px;
}

.renew-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius);
  padding: 24px;
  color: var(--white);
  text-align: center;
  margin-bottom: 20px;
}
.renew-hero-img {
  background-size: cover;
  background-position: center;
}
.renew-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius);
  pointer-events: none;
}

.renew-hero-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.renew-hero h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.renew-hero p {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.6;
}

.renew-section-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.renew-section-card .product-grid {
  padding: 0;
}

.renew-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.renew-section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.code-input-group {
  display: flex;
  gap: 8px;
}

.code-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.code-input:focus {
  border-color: var(--primary);
}

.btn-code-verify {
  padding: 10px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.renew-rules {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
  padding: 8px 0;
}

.renew-rules li {
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

.renew-rules li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ========== 我的页面 ========== */
.mine-page {
  padding: 0;
}

.user-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 30px 20px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-nickname {
  font-size: 18px;
  font-weight: 600;
}

.user-phone {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
}

.order-status-bar {
  display: flex;
  background: var(--white);
  margin: -8px 16px 0;
  border-radius: var(--radius);
  padding: 16px;
  
  position: relative;
  z-index: 1;
}

.order-status-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.order-status-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.order-status-label {
  font-size: 12px;
  color: var(--text-light);
}

.menu-list {
  background: var(--white);
  margin: 12px 16px;
  border-radius: var(--radius);
  
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 15px;
}

.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg); }

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.menu-item-arrow {
  color: var(--text-lighter);
}

.aftersale-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  
}

.aftersale-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.aftersale-status.pending { background: rgba(243,156,18,0.1); color: var(--warning); }
.aftersale-status.approved { background: rgba(39,174,96,0.1); color: var(--success); }
.aftersale-status.rejected { background: rgba(231,76,60,0.1); color: var(--danger); }
.aftersale-status.completed { background: rgba(67,168,99,0.1); color: var(--primary); }

/* ========== 地址管理 ========== */
.addresses-page {
  padding: 16px;
}

.address-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  
  position: relative;
}

.address-default-tag {
  display: inline-block;
  padding: 1px 8px;
  background: var(--bg);
  color: var(--primary);
  font-size: 11px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.address-item-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.address-action {
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
}

.address-action.set-default { color: var(--primary); }
.address-action.delete { color: var(--danger); }

.btn-add-address {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 15px;
  color: var(--primary);
  cursor: pointer;
  text-align: center;
}

/* ========== 表单 ========== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.form-input:focus { border-color: var(--primary); }

.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 80px;
}

.form-textarea:focus { border-color: var(--primary); }

.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:active { opacity: 0.9; }

/* ========== 模态弹窗 ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px 16px calc(16px + var(--safe-bottom));
  animation: slideUp 0.3s ease;
}

.modal-content.center {
  border-radius: var(--radius);
  margin: 20px;
  max-height: 80vh;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ========== 分享浮窗 ========== */
.share-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 250;
  align-items: flex-end;
  justify-content: center;
}
.share-overlay.show {
  display: flex;
}
.share-sheet {
  background: var(--white);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 16px 32px;
  animation: shareSlideUp 0.25s ease;
}
@keyframes shareSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.share-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.share-sheet-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.share-sheet-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text-lighter);
  cursor: pointer;
  border-radius: 50%;
  background: var(--bg);
}
.share-grid {
  display: flex;
  gap: 16px;
  padding: 0 8px;
  margin-bottom: 24px;
}
.share-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
}
.share-item:active { opacity: 0.7; }
.share-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  position: relative;
}
.share-icon-default,
.share-icon-custom {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}
.share-icon-custom {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.share-label {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
}
.share-cancel-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.share-cancel-btn:active { background: var(--bg); }

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.toast.show {
  opacity: 1;
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 12px;
}

.empty-text {
  font-size: 15px;
  color: var(--text-lighter);
}

/* ========== 搜索覆盖层 ========== */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 300;
  max-width: 480px;
  margin: 0 auto;
}

.search-overlay.show {
  display: flex;
  flex-direction: column;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 20px;
  padding: 8px 14px;
  gap: 8px;
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: none;
  font-size: 15px;
  outline: none;
}

.search-clear {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-lighter);
}

.search-cancel {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* ========== 响应式 ========== */
@media (min-width: 481px) {
  body { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ========== 学校名称弹窗 ========== */
.school-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.school-modal-box {
  background: var(--white);
  border-radius: 12px;
  padding: 24px 20px 20px;
  width: calc(100% - 48px);
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.school-modal-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  margin-bottom: 4px;
}
.school-modal-sub {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 16px;
}
.school-modal-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 16px;
}
.school-modal-input:focus {
  border-color: var(--primary);
}
.school-modal-btns {
  display: flex;
  gap: 10px;
}
.school-modal-btn {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}
.school-modal-btn.cancel {
  background: var(--bg);
  color: var(--text-light);
}
.school-modal-btn.confirm {
  background: var(--primary);
  color: var(--white);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== 登录弹窗 ========== */
.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s;
}
.login-overlay.show { display: flex; }
.login-box {
  width: 90%;
  max-width: 380px;
  background: var(--white);
  border-radius: 16px;
  padding: 28px 24px 24px;
  position: relative;
}
.login-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-lighter);
  border-radius: 50%;
}
.login-close:hover { background: var(--bg); }
.login-tabs {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.login-tab {
  font-size: 16px;
  color: var(--text-light);
  cursor: pointer;
  padding-bottom: 12px;
  margin-bottom: -14px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.login-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.login-form { animation: fadeIn 0.3s; }
.login-input-group {
  margin-bottom: 14px;
}
.login-input-group input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.login-input-group input:focus { border-color: var(--primary); }
.login-pwd-group { position: relative; }
.login-pwd-group input { padding-right: 46px; }
.login-pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  user-select: none;
}
.login-sms-row { display: flex; gap: 10px; }
.login-sms-row input { flex: 1; }
.login-sms-btn {
  width: 110px;
  height: 46px;
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--primary-light);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.login-sms-btn:disabled { background: var(--bg); color: var(--text-lighter); border-color: var(--border); cursor: not-allowed; }
.login-submit-btn {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}
.login-submit-btn:active { opacity: 0.85; }
.login-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-light);
}
.login-switch span { color: var(--primary); cursor: pointer; font-weight: 500; }

.login-wechat-tip {
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
}
.login-wechat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  letter-spacing: 1px;
}
.login-wechat-btn:active { opacity: 0.9; }
.login-wechat-divider {
  display: flex;
  align-items: center;
  margin: 18px 0 12px;
  color: var(--text-lighter);
  font-size: 12px;
}
.login-wechat-divider::before,
.login-wechat-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-wechat-divider span { margin: 0 12px; }

/* ========== 账户信息页 ========== */
.account-page { padding: 0 0 100px; }
.account-section {
  background: var(--white);
  border-radius: 12px;
  margin: 12px 16px;
  overflow: hidden;
}
.account-section-title {
  font-size: 13px;
  color: var(--text-light);
  padding: 14px 16px 6px;
}
.account-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  cursor: pointer;
}
.account-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.account-avatar-camera {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  border: 2px solid var(--white);
}
.account-avatar-camera .ico-elem svg { stroke: var(--white); }
.account-avatar-text { font-size: 13px; color: var(--text-light); }
.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.account-item:last-child { border-bottom: none; }
.account-item-label { font-size: 15px; color: var(--text); }
.account-item-value { font-size: 14px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }
.account-item-arrow { font-size: 20px; color: var(--text-lighter); }
.account-logout-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 24px 16px;
  height: 48px;
  background: var(--card-bg);
  border: 1px solid var(--danger);
  border-radius: 10px;
  color: var(--danger);
  font-size: 16px;
  cursor: pointer;
}
.account-logout-btn:active { background: rgba(231,76,60,0.1); }

/* 弹窗内SMS按钮 */
.sms-get-btn {
  height: 44px;
  padding: 0 14px;
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--primary-light);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.sms-get-btn:disabled { background: var(--bg); color: var(--text-lighter); border-color: var(--border); }
.sms-row { display: flex; gap: 10px; }
.sms-row .form-input { flex: 1; }

