/* ========== 购物车侧边栏 ========== */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  height: -webkit-fill-available;
  background: var(--bg-card);
  -webkit-box-shadow: -10px 0 40px rgba(0,0,0,0.1);
  box-shadow: -10px 0 40px rgba(0,0,0,0.1);
  z-index: 2000;
  -webkit-transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.cart-sidebar.open { right: 0; }

.cart-header {
  padding: 18px 20px;
  border-bottom: 0.5px solid var(--separator);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}

.cart-title { font-size: 17px; font-weight: 600; }

.cart-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(142, 142, 147, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}
.cart-close:hover { background: rgba(255, 59, 48, 0.12); color: var(--danger); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
}

.cart-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.cart-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cart-item-image {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F5F5F7 0%, #E8E8ED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; overflow: hidden; }

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}
.qty-btn:hover { background: var(--primary); color: white; }

.qty-value { font-size: 14px; font-weight: 600; min-width: 24px; text-align: center; }

.cart-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 59, 48, 0.12);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}
.cart-item-remove:hover { background: var(--danger); color: white; }

.cart-footer {
  padding: 16px 20px;
  border-top: 0.5px solid var(--separator);
  background: var(--bg-card);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cart-total-label { font-size: 14px; color: var(--text-secondary); }
.cart-total-amount { font-size: 22px; font-weight: 700; color: var(--primary); }

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}
.checkout-btn:hover { background: var(--primary-dark); transform: scale(1.01); }

/* ========== 支付弹窗 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-overlay.show { display: flex; opacity: 1; }

.payment-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 50px rgba(0,0,0,0.2);
  transform: scale(0.95);
  transition: transform 0.3s;
}

.modal-overlay.show .payment-modal { transform: scale(1); }

.payment-header {
  padding: 20px;
  border-bottom: 0.5px solid var(--separator);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-title { font-size: 17px; font-weight: 600; }

.payment-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.payment-close:hover { background: var(--danger); color: white; }

.payment-body { padding: 20px; overflow-y: auto; flex: 1; }

.payment-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.payment-order-info {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.payment-order-items {
  max-height: 140px;
  overflow-y: auto;
}

.payment-order-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 0.5px dashed var(--separator);
}
.payment-order-item:last-child { border-bottom: none; }

.payment-order-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--separator);
  font-weight: 600;
  font-size: 15px;
}

/* ========== 自定义输入框 ========== */
.input-group { margin-bottom: 16px; }

.custom-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.custom-input-wrapper:focus-within {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.currency-symbol {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 12px;
}

.custom-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  background: transparent;
  color: var(--text);
  padding: 10px 0;
  width: 100%;
}

.custom-input::placeholder { color: var(--text-tertiary); }

.custom-input[type="number"]::-webkit-inner-spin-button,
.custom-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-diff-input {
  background: rgba(255, 149, 0, 0.08);
  border: 1px solid rgba(255, 149, 0, 0.2);
}

.price-diff-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 149, 0, 0.1);
}

.price-diff-input .currency-symbol { color: var(--accent); }

.input-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ========== 支付金额显示 ========== */
.payment-amount-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.payment-amount-display span:first-child {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.payment-methods { margin-bottom: 20px; }

.payment-method-item {
  display: flex;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
  background: var(--bg-card);
}

.payment-method-item:hover {
  border-color: var(--primary);
  background: rgba(0, 122, 255, 0.04);
}

.payment-method-item.selected {
  border-color: var(--primary);
  background: rgba(0, 122, 255, 0.08);
}

.payment-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 12px;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.payment-method-info { flex: 1; }
.payment-method-name { font-size: 15px; font-weight: 600; }
.payment-method-desc { font-size: 12px; color: var(--text-secondary); }

.payment-method-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--separator);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 12px;
}

.payment-method-item.selected .payment-method-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ========== 订单明细 ========== */
.payment-order-detail-section {
  margin-bottom: 16px;
}

.payment-order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 0.5px solid var(--separator);
  padding-bottom: 10px;
}

.payment-order-detail-header:hover {
  color: var(--primary);
}

.order-detail-arrow {
  font-size: 12px;
  transition: transform 0.3s;
}

.order-detail-arrow.collapsed {
  transform: rotate(-90deg);
}

.payment-order-detail-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 500px;
}

.payment-order-detail-content.collapsed {
  max-height: 0;
}

.payment-order-detail-list {
  margin-top: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px;
}

.payment-order-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 0.5px dashed var(--separator);
}

.payment-order-detail-item:last-child {
  border-bottom: none;
}

.payment-order-detail-name {
  color: var(--text-secondary);
}

.payment-order-detail-quantity {
  color: var(--text);
  font-weight: 500;
}

.payment-order-detail-price {
  color: var(--primary);
  font-weight: 600;
}

.payment-order-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--separator);
}

.payment-order-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.payment-order-summary-row.total-row {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--separator);
}

/* ========== 扫码区域 ========== */
.scan-section {
  text-align: center;
  padding: 18px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.scan-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.scan-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--separator);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scan-btn:hover {
  border-color: var(--primary);
  background: rgba(0, 122, 255, 0.04);
}

.scan-btn .icon { font-size: 32px; }
.scan-btn .text { font-size: 14px; font-weight: 600; color: var(--text); }

.pay-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}
.pay-submit-btn:hover { background: var(--primary-dark); }
.pay-submit-btn:disabled { background: var(--text-tertiary); cursor: not-allowed; box-shadow: none; }

/* ========== 扫码选择弹窗 ========== */
.scan-type-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 20px;
  z-index: 3500;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.2);
  display: none;
}

.scan-type-modal.show { display: block; }

.scan-type-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.scan-type-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scan-type-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
}

.scan-type-option:hover { background: rgba(0, 122, 255, 0.08); }

.scan-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.scan-type-info { flex: 1; }
.scan-type-name { font-size: 15px; font-weight: 600; }
.scan-type-desc { font-size: 12px; color: var(--text-secondary); }

/* ========== Toast 提示 ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 9999;
  display: none;
  text-align: center;
  min-width: 140px;
}

.toast.error { background: rgba(255, 59, 48, 0.95); color: white; }
.toast.success { background: rgba(52, 199, 89, 0.95); color: white; }
.toast.loading { background: rgba(28, 28, 30, 0.95); color: white; }

/* ========== 扫码弹窗 ========== */
.scanner-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 4000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.scanner-modal.show { display: flex; }

.scanner-container {
  width: 100%;
  max-width: 400px;
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

#interactive { 
  width: 100%; 
  height: 400px; 
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
}

/* 覆盖 html5-qrcode 库的默认样式 */
#interactive > div {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}

#interactive video,
#interactive img { 
  width: 100% !important; 
  height: 400px !important; 
  max-width: 400px !important;
  border-radius: var(--radius-xl); 
  object-fit: cover;
  display: block !important;
  margin: 0 auto !important;
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
}

#interactive canvas {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 5;
  pointer-events: none !important;
}

/* 覆盖 html5-qrcode 扫描区域样式 */
#interactive div[data-qrcode-wrapper],
#interactive div[data-qr-scan-region],
#interactive .scan-region {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}

/* 扫描框居中辅助线 */
.scanner-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 2px solid rgba(52, 199, 89, 0.6);
  border-radius: 12px;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
}

/* 确保 scanner-container 内的所有元素都居中 */
.scanner-container,
.scanner-container *,
.scanner-container > *,
#interactive,
#interactive > *,
#interactive > div,
#interactive video,
#interactive canvas {
  margin-left: auto !important;
  margin-right: auto !important;
}

.scanner-hint {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.scanner-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.scanner-btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.scanner-btn.cancel { background: rgba(255,255,255,0.2); color: white; }
.scanner-btn.cancel:hover { background: rgba(255,255,255,0.3); }

.scanner-btn.capture { background: white; color: #000; }
.scanner-btn.capture:hover { background: rgba(255,255,255,0.9); }

/* ========== 叠加层遮罩 ========== */
.overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3400;
  display: none;
}

.overlay-backdrop.show { display: block; }

/* ========== 隐藏文件上传输入框 ========== */
#photoInput {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== 扫描结果显示弹窗 ========== */
.scan-result-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.scan-result-overlay.show {
  display: flex;
}

.scan-result-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 380px;
  width: 100%;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.scan-result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.4);
  animation: checkmarkPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.scan-result-icon.error {
  background: linear-gradient(135deg, #FF3B30 0%, #FF453A 100%);
  box-shadow: 0 8px 24px rgba(255, 59, 48, 0.4);
}

.scan-result-icon.warning {
  background: linear-gradient(135deg, #FF9500 0%, #FFA000 100%);
  box-shadow: 0 8px 24px rgba(255, 149, 0, 0.4);
}

.scan-result-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.scan-result-content {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.scan-result-content strong {
  color: var(--primary);
  font-weight: 600;
}

.scan-result-content .auth-code {
  font-family: monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  background: rgba(0, 122, 255, 0.08);
  padding: 8px 16px;
  border-radius: var(--radius);
  display: inline-block;
  margin-top: 8px;
  letter-spacing: 2px;
}

.scan-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.scan-result-btn {
  flex: 1;
  max-width: 140px;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.scan-result-btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.scan-result-btn.primary:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}

.scan-result-btn.secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--separator);
}

.scan-result-btn.secondary:hover {
  background: var(--bg-hover);
}

/* ========== 支付模式切换 ========== */
.payment-mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--bg);
  border-radius: var(--radius);
}

.toggle-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.toggle-option:hover {
  background: rgba(0, 122, 255, 0.04);
  color: var(--text);
}

.toggle-option.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.toggle-icon {
  font-size: 18px;
}

/* ========== 订单码支付区域 ========== */
.qrcode-section {
  text-align: center;
  padding: 18px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.qrcode-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.qrcode-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--separator);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qrcode-btn:hover {
  border-color: var(--secondary);
  background: rgba(52, 199, 89, 0.04);
}

.qrcode-btn .icon { font-size: 32px; }
.qrcode-btn .text { font-size: 14px; font-weight: 600; color: var(--text); }

.qrcode-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== 二维码显示区域 ========== */
.qrcode-display {
  padding: 20px;
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.08) 0%, rgba(48, 209, 88, 0.08) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(52, 199, 89, 0.2);
  margin-bottom: 16px;
}

.qrcode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.qrcode-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.qrcode-image {
  width: 200px;
  height: 200px;
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrCodeContainer {
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 24px;
  background: rgba(52, 199, 89, 0.1);
  border-radius: var(--radius-full);
}

.qrcode-amount span:first-child {
  font-size: 12px;
  color: var(--text-secondary);
}

.qrcode-amount span:last-child {
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
}

.qrcode-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qrcode-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF9500;
  animation: pulse 1.5s ease-in-out infinite;
}

.qrcode-status.success .status-dot {
  background: #34C759;
  animation: none;
}

.qrcode-status.success {
  color: var(--secondary);
  background: rgba(52, 199, 89, 0.1);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  .top-bar-content { flex-direction: column; gap: 6px; }
  .header-content { flex-wrap: wrap; gap: 10px; }
  .logo span { display: none; }
  .nav { display: none; }
  
  .hero-slider { height: 220px; }
  .hero-title { font-size: 24px; }
  .hero-subtitle { font-size: 14px; }
  
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  
  .features-content { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: 1fr; gap: 24px; }
  
  .cart-sidebar { width: 100%; max-width: 100%; right: -100%; }
  
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}