/* ===== 千晅商城 — Design Tokens ===== */
:root {
  /* Brand */
  --green: #07C160;
  --green-light: #F0FBF5;

  /* Accent */
  --red: #FF4D4F;
  --red-light: #FFF0F0;
  --orange: #FF8C00;
  --orange-light: #FFF8F0;

  /* Neutral */
  --white: #FFFFFF;
  --bg: #F5F5F5;
  --text: #1A1A1A;
  --text-secondary: #888888;
  --text-light: #AAAAAA;
  --text-placeholder: #BBBBBB;
  --border: #EEEEEE;
  --border-light: #DDDDDD;

  /* Canvas */
  --page-width: 390px;
  --page-height: 844px;

  /* Typography */
  --font-heading: 'Rubik', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: #000;
}

/* ===== App Shell ===== */
.app {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.phone-frame {
  width: var(--page-width);
  height: var(--page-height);
  position: absolute;
  overflow: hidden;
  border-radius: 24px;
  background: var(--bg);
  transform-origin: top left;
}

/* ===== Page Screens ===== */
.page {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--page-width);
  height: var(--page-height);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.page.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

/* ===== Page 1: 登录页 ===== */
.page-login {
  background: var(--white);
  align-items: center;
  justify-content: center;
  gap: 0;
}

.login-spacer { height: 24px; flex-shrink: 0; }

.login-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 40px;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  overflow: hidden;
}
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-app-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.login-app-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 0 24px;
}

.login-input-row {
  display: flex;
  align-items: center;
  height: 52px;
  background: var(--bg);
  border-radius: 8px;
  padding: 0 16px;
  gap: 12px;
}

.login-prefix {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.login-input-divider {
  width: 1px;
  height: 20px;
  background: var(--border-light);
  flex-shrink: 0;
}

.login-input-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.login-input-icon img {
  width: 100%;
  height: 100%;
}

.login-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.login-input::placeholder {
  color: var(--text-placeholder);
}

.login-forgot {
  text-align: right;
  width: 100%;
}
.login-forgot a {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  background: var(--green);
  border: none;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s;
}
.login-btn:active {
  opacity: 0.85;
}

.login-register {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
}
.login-register a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.login-agreement {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
  padding: 20px 24px;
}

/* ===== Page 2: 商品列表页 ===== */
.page-list {
  background: var(--bg);
}

.list-nav {
  background: var(--white);
  padding-top: 12px;
}

.list-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 12px;
}

.list-search-input {
  display: flex;
  align-items: center;
  flex: 1;
  height: 40px;
  background: var(--bg);
  border-radius: 20px;
  padding: 0 16px;
  gap: 8px;
}
.list-search-input img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.list-search-input input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.list-search-input input::placeholder {
  color: var(--text-light);
}

.list-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--green);
  border-radius: 20px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.list-cart-btn img {
  width: 22px;
  height: 22px;
}

.list-categories {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 44px;
  padding: 0 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.list-cat-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  gap: 0;
}
.list-cat-item.active {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--green);
}
.list-cat-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 2px;
  background: var(--green);
}

/* Banner */
.list-banner {
  padding: 0 16px;
  margin-top: 0;
}
.list-banner-card {
  position: relative;
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  gap: 8px;
}
.list-banner-card img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.list-banner-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}
.list-banner-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  background: var(--red);
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 500;
  color: var(--white);
  width: fit-content;
}
.list-banner-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}
.list-banner-sub {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

/* Product Grid */
.list-product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.product-card {
  width: calc((100% - 10px) / 2);
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}
.product-card:active {
  transform: scale(0.97);
}
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-card-name {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-card-price {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--red);
}
.product-card-price-old {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-card-sales {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-light);
}

/* Tab Bar */
.tab-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-evenly;
  height: 80px;
  background: var(--white);
  border-top: 1px solid var(--border);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

.page-has-tabbar {
  padding-bottom: 80px;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-top: 10px;
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-light);
}
.tab-item.active {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--green);
}
.tab-item img {
  width: 24px;
  height: 24px;
}

/* ===== Page 3: 商品详情页 ===== */
.page-detail {
  background: var(--white);
}

.detail-nav {
  position: absolute;
  top: 0; left: 0;
  right: 0; z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 44px 16px 12px;
}

.detail-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 18px;
  border: none;
  cursor: pointer;
}
.detail-back-btn img {
  width: 20px;
  height: 20px;
}

.detail-hero {
  width: 100%;
  height: 360px;
  overflow: hidden;
  flex-shrink: 0;
}
.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  flex-shrink: 0;
}
.detail-dot {
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
}
.detail-dot.active {
  width: 16px;
  background: var(--green);
}
.detail-dot:not(.active) {
  width: 4px;
}

.detail-info {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  gap: 8px;
}

.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.detail-price-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-price-curr {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--red);
}
.detail-price-orig {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
}
.detail-discount-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  background: var(--red-light);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 500;
  color: var(--red);
}

.detail-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 11px;
}
.detail-tag.green { background: var(--green-light); color: var(--green); }
.detail-tag.orange { background: var(--orange-light); color: var(--orange); }
.detail-tag.gray { background: var(--bg); color: var(--text-secondary); }

.detail-divider {
  width: 100%;
  height: 8px;
  background: var(--bg);
  flex-shrink: 0;
}

.detail-sku {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  gap: 12px;
}
.detail-sku-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.detail-sku-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-sku-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
}
.detail-sku-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sku-option {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.sku-option.active {
  border: 2px solid var(--green);
  background: var(--white);
  color: var(--green);
  font-weight: 600;
}

/* Detail Bottom Bar */
.detail-bottom-bar {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 12px 16px 20px;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: var(--white);
  flex-shrink: 0;
}

.detail-bottom-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.detail-bottom-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-secondary);
}
.detail-bottom-icon-btn img {
  width: 24px;
  height: 24px;
}

.detail-bottom-right {
  display: flex;
  flex: 1;
  height: 48px;
  gap: 0;
}
.detail-btn-cart {
  flex: 1;
  background: var(--orange);
  border: none;
  border-radius: 24px 0 0 24px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
}
.detail-btn-buy {
  flex: 1;
  background: var(--green);
  border: none;
  border-radius: 0 24px 24px 0;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
}
.detail-btn-cart:active, .detail-btn-buy:active {
  opacity: 0.85;
}

/* ===== Page 4: 订单结算页 ===== */
.page-checkout {
  background: var(--bg);
}

.checkout-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 12px 16px 12px;
  background: var(--white);
  flex-shrink: 0;
}
.checkout-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg);
  border-radius: 18px;
  border: none;
  cursor: pointer;
}
.checkout-back-btn img {
  width: 20px;
  height: 20px;
}
.checkout-nav-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}
.checkout-nav-right {
  width: 36px;
  height: 36px;
}

/* Address Card */
.address-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--green);
  flex-shrink: 0;
}
.address-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.address-icon img {
  width: 100%;
  height: 100%;
}
.address-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.address-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.address-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.address-phone {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
}
.address-street {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.address-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.address-arrow img {
  width: 100%;
  height: 100%;
}

.checkout-spacer {
  width: 100%;
  height: 8px;
  flex-shrink: 0;
}

/* Order Product Card */
.order-prod-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--white);
  flex-shrink: 0;
}
.order-prod-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.order-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.order-prod-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.order-prod-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.order-prod-sku {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-light);
}
.order-prod-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.order-prod-price {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--red);
}
.order-prod-qty {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
}

/* Payment Card */
.pay-card {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  background: var(--white);
  flex-shrink: 0;
}
.pay-card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 14px 0 8px;
}

.pay-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  border-bottom: 1px solid #F0F0F0;
  cursor: pointer;
}
.pay-option-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.pay-icon img {
  width: 20px;
  height: 20px;
}
.pay-icon.wx { background: var(--green); }
.pay-icon.alipay { background: #1677FF; }
.pay-icon.alipay span {
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
}
.pay-name {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
}
.pay-name.active { font-weight: 600; }

.pay-radio {
  width: 20px;
  height: 20px;
  border-radius: 10px;
  border: 2px solid var(--border-light);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.pay-radio.checked {
  border-color: var(--green);
}
.pay-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--green);
}

/* Price Summary */
.price-summary {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  gap: 10px;
  background: var(--white);
  flex-shrink: 0;
}
.price-summary-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price-row-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
}
.price-row-val {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}
.price-row-val.red {
  color: var(--red);
}
.price-row-val.green {
  color: var(--green);
}
.price-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}
.price-total-label {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.price-total-val {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
}

/* Coupon Card */
.coupon-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background: var(--white);
  flex-shrink: 0;
}
.coupon-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}
.coupon-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.coupon-val {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-light);
}
.coupon-arrow img {
  width: 16px;
  height: 16px;
}

/* Submit Bar */
.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 12px 16px 20px;
  gap: 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.submit-left {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.submit-total-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
}
.submit-total-amount {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
}
.submit-btn {
  width: 160px;
  height: 48px;
  background: var(--green);
  border: none;
  border-radius: 24px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s;
}
.submit-btn:active {
  opacity: 0.85;
}

/* ===== Page 5: 分类页 ===== */
.page-category {
  background: var(--bg-gray);
  gap: 0;
}

.cat-nav {
  width: 100%;
  height: 88px;
  padding: 44px 16px 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
}

.cat-back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-gray);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cat-nav-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.cat-grid {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 16px 16px;
  overflow-y: auto;
}

.cat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
  font-family: var(--font-body);
}

.cat-card:active {
  transform: scale(0.96);
}

.cat-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-card-icon.design  { background: #E8F8EE; }
.cat-card-icon.dev     { background: #E6F0FF; }
.cat-card-icon.layout  { background: #FFF4E5; }
.cat-card-icon.retouch { background: #FFEEEE; }
.cat-card-icon.video   { background: #F3EAFF; }
.cat-card-icon.write   { background: #E6FFFA; }

.cat-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.cat-card-count {
  font-size: 11px;
  color: #AAA;
  margin: 0;
}

/* ===== Page 6: 购物车页 ===== */
.page-cart {
  background: var(--bg-gray);
  gap: 0;
}

.cart-list {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  padding: 0;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--white);
  margin-bottom: 1px;
}

.cart-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #DDD;
  flex-shrink: 0;
  margin-top: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cart-check.checked {
  border-color: var(--green);
  background: var(--green);
}

.cart-check-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--white);
  display: none;
}

.cart-check.checked .cart-check-dot {
  display: block;
}

.cart-item-thumb {
  width: 80px; height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-sku {
  font-size: 12px;
  color: #AAA;
  margin: 0;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.cart-item-price {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: #FF4D4F;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #EEE;
}

.cart-qty button {
  width: 28px; height: 26px;
  border: none;
  background: #F5F5F5;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty span {
  width: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
}

.cart-total-bar {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #EEE;
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  z-index: 49;
}

.cart-total-left {
  font-size: 14px;
  color: var(--text);
}

.cart-total-price {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #FF4D4F;
}

.cart-checkout-btn {
  padding: 0 28px;
  height: 40px;
  background: var(--green);
  border: none;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
}

.cart-checkout-btn:active {
  opacity: 0.85;
}

/* ===== Page 7: 我的页 ===== */
.page-profile {
  background: var(--bg);
  gap: 0;
  overflow-y: auto;
}

.profile-header {
  position: relative;
  width: 100%;
  padding: 24px 16px 24px;
  background: var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-settings-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.profile-settings-btn:active {
  background: rgba(255,255,255,0.3);
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer;
  transition: transform 0.15s;
}
.profile-avatar:active {
  transform: scale(0.95);
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin: 0;
  cursor: pointer;
}

.profile-id {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.profile-section {
  width: 100%;
  background: var(--white);
  margin-top: 10px;
  padding: 14px 16px;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  cursor: pointer;
}

.profile-menu-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0;
}

.profile-section-all {
  font-size: 12px;
  color: #AAA;
}

/* 订单标签 */
.profile-order-tabs {
  display: flex;
  justify-content: space-around;
  gap: 0;
}

.profile-order-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  font-family: var(--font-body);
  transition: opacity 0.2s;
  position: relative;
}
.profile-order-tab:active {
  opacity: 0.7;
}

.order-tab-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.profile-order-tab.active .order-tab-icon-wrap {
  background: #E8F8EE;
}
.profile-order-tab.active .order-tab-icon-wrap svg * {
  stroke: #07C160;
}

.profile-order-tab span {
  font-size: 12px;
  color: #888;
  transition: color 0.2s;
}
.profile-order-tab.active span {
  color: var(--green);
  font-weight: 600;
}

/* 订单预览区 */
.profile-order-preview {
  background: var(--white);
  padding: 0 16px 20px;
}

.order-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0;
}

.order-empty-text {
  font-size: 13px;
  color: #CCC;
  margin: 0;
}

/* 菜单列表 */
.profile-menu-list {
  display: flex;
  flex-direction: column;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  background: none;
  border: none;
  border-bottom: 1px solid #F5F5F5;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.profile-menu-item:active {
  background: #F9F9F9;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item span:first-of-type {
  flex: 1;
}

.profile-menu-badge {
  font-size: 12px;
  color: #FF8C00;
  background: #FFF8F0;
  padding: 2px 8px;
  border-radius: 10px;
}

.profile-menu-arrow {
  font-size: 18px;
  color: #CCC;
}

.profile-logout-btn {
  margin: 24px 16px;
  width: calc(100% - 32px);
  height: 48px;
  background: var(--white);
  border: 1px solid #DDD;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  color: #888;
  cursor: pointer;
  transition: background 0.15s;
}
.profile-logout-btn:active {
  background: #F5F5F5;
}

/* ===== 遮罩层 ===== */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Action Sheet ===== */
.action-sheet {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  background: #F5F5F7;
  border-radius: 16px 16px 0 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom, 20px);
}
.action-sheet.show {
  transform: translateY(0);
}

.action-sheet-header {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: #888;
  border-bottom: 1px solid #EEE;
}

.action-sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  background: var(--white);
  border: none;
  border-bottom: 1px solid #F0F0F0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
}
.action-sheet-btn:active {
  background: #F5F5F5;
}

.action-sheet-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  background: var(--white);
  border: none;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
}
.action-sheet-cancel:active {
  background: #F5F5F5;
}

/* ===== 确认弹窗 ===== */
.confirm-dialog {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.confirm-dialog.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.confirm-dialog-content {
  width: 300px;
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
}

.confirm-dialog-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  padding: 24px 24px 0;
  margin: 0;
}

.confirm-dialog-desc {
  font-size: 14px;
  color: #888;
  padding: 10px 24px 20px;
  margin: 0;
  line-height: 1.5;
}

.confirm-dialog-btns {
  display: flex;
  border-top: 1px solid #EEE;
}

.confirm-dialog-btn {
  flex: 1;
  height: 48px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.confirm-dialog-btn:active {
  background: #F5F5F5;
}
.confirm-dialog-btn.cancel {
  color: #888;
  border-right: 1px solid #EEE;
}
.confirm-dialog-btn.confirm {
  color: #FF4D4F;
  font-weight: 600;
}

/* ===== 子页面（地址/优惠券/客服/设置） ===== */
.profile-subpage {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.profile-subpage.show {
  transform: translateX(0);
}

.subpage-nav {
  width: 100%;
  height: 88px;
  padding: 44px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  flex-shrink: 0;
}

.subpage-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #F5F5F5;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.subpage-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.subpage-body {
  flex: 1;
  padding: 0;
}

.subpage-add-btn {
  margin: 16px;
  height: 48px;
  background: var(--green);
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  flex-shrink: 0;
}
.subpage-add-btn:active {
  opacity: 0.85;
}

/* 地址卡片 */
.address-item {
  background: var(--white);
  padding: 16px;
  margin-top: 0;
  border-bottom: 1px solid #F0F0F0;
}

.address-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.address-item-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.address-item-phone {
  font-size: 14px;
  color: #666;
}

.address-item-tag {
  font-size: 11px;
  color: var(--green);
  background: #E8F8EE;
  padding: 2px 6px;
  border-radius: 4px;
}

.address-item-street {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  margin: 0 0 10px;
}

.address-item-actions {
  display: flex;
  gap: 16px;
  border-top: 1px solid #F5F5F5;
  padding-top: 10px;
}

.address-item-action {
  font-size: 13px;
  color: var(--green);
  cursor: pointer;
}

/* 优惠券卡片 */
.coupon-card-item {
  display: flex;
  background: var(--white);
  margin: 12px 16px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.coupon-card-left {
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, #FF6B35, #FF8C00);
  color: var(--white);
  padding: 16px 8px;
  flex-shrink: 0;
}

.coupon-card-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.coupon-card-condition {
  font-size: 11px;
  opacity: 0.85;
}

.coupon-card-right {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coupon-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.coupon-card-expire {
  font-size: 11px;
  color: #AAA;
  margin: 0;
}

.coupon-card-use-btn {
  align-self: flex-start;
  height: 26px;
  padding: 0 12px;
  background: #FFF8F0;
  border: 1px solid #FF8C00;
  border-radius: 13px;
  font-size: 11px;
  color: #FF8C00;
  cursor: pointer;
}
.coupon-card-use-btn:active {
  background: #FFEEDD;
}

/* 客服/设置列表 */
.service-list {
  background: var(--white);
  margin-top: 10px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #F5F5F5;
  cursor: pointer;
  transition: background 0.15s;
}
.service-item:active {
  background: #F9F9F9;
}

.service-item-info {
  flex: 1;
}

.service-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.service-item-desc {
  font-size: 12px;
  color: #AAA;
  margin: 2px 0 0;
}

.service-item-arrow {
  font-size: 18px;
  color: #CCC;
}

.service-faq {
  background: var(--white);
  margin-top: 10px;
  padding: 14px 16px;
}

.service-faq-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 12px;
}

.service-faq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F5F5F5;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}
.service-faq-item:last-child {
  border-bottom: none;
}
.service-faq-item:active {
  color: var(--text);
}

/* 设置页面 */
.settings-group {
  background: var(--white);
  margin-top: 10px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #F5F5F5;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.settings-item:active {
  background: #F9F9F9;
}
.settings-item:last-child {
  border-bottom: none;
}

.settings-item-extra {
  font-size: 13px;
  color: #AAA;
  margin-right: 8px;
}

.subpage-logout {
  margin: 24px 16px;
  width: calc(100% - 32px);
  height: 48px;
  background: var(--white);
  border: 1px solid #DDD;
  border-radius: 8px;
  font-size: 15px;
  color: #FF4D4F;
  cursor: pointer;
}
.subpage-logout:active {
  background: #FFF0F0;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0,0,0,0.75);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: all 0.3s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
