/* ============================================
   旺质康官网 - 全局弹窗系统样式 v3
   加入购物车弹窗 / 去结算弹窗 / 支付成功弹窗
   统一中型居中窗口风格 + 移动端底部弹出
   ============================================ */

/* ===== 基础遮罩层 ===== */
.wzk-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100010;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wzk-modal-backdrop.active { opacity: 1; }

/* ===== 弹窗容器（居中） ===== */
.wzk-modal-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100011;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 20px;
}
.wzk-modal-container.active { pointer-events: auto; }

/* ===== 统一中型弹窗盒子 ===== */
.wzk-modal-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 6px 24px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(30px) scale(0.96);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}
.wzk-modal-box.active {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ===== 关闭按钮 ===== */
.wzk-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: #f5f5f5;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  line-height: 1;
}
.wzk-modal-close:hover {
  background: #eee;
  color: #333;
  transform: rotate(90deg);
}

/* ===== 弹窗头部 ===== */
.wzk-modal-header {
  padding: 22px 22px 14px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.wzk-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wzk-modal-header .wzk-modal-subtitle {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

/* ===== 弹窗内容区 ===== */
.wzk-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.wzk-modal-body::-webkit-scrollbar { width: 4px; }
.wzk-modal-body::-webkit-scrollbar-track { background: transparent; }
.wzk-modal-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* ===== 弹窗底部 ===== */
.wzk-modal-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: #fff;
}

/* ===== 加入购物车弹窗（中型居中） ===== */
.wzk-cart-added-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b853, #00d26a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 16px;
  animation: wzkCartPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wzk-cart-added-icon span { font-size: 32px; color: #fff; }
@keyframes wzkCartPop {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.wzk-cart-added-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.wzk-cart-added-subtitle {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-bottom: 18px;
}

/* 商品预览卡片 */
.wzk-cart-added-preview {
  background: #f8f9fa;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.wzk-cart-added-preview-img {
  width: 52px; height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.wzk-cart-added-preview-info { flex: 1; min-width: 0; }
.wzk-cart-added-preview-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wzk-cart-added-preview-price {
  font-size: 16px;
  font-weight: 700;
  color: #ff6700;
  margin-top: 4px;
}
.wzk-cart-added-preview-badge {
  background: linear-gradient(135deg, #ff6700, #ff8533);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* 购物车统计 */
.wzk-cart-added-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.wzk-cart-added-stat {
  text-align: center;
}
.wzk-cart-added-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #ff6700;
}
.wzk-cart-added-stat-label {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* ===== 结算弹窗 - 商品列表 ===== */
.wzk-checkout-items { margin-bottom: 14px; }
.wzk-checkout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}
.wzk-checkout-item:last-child { border-bottom: none; }
.wzk-checkout-item-img {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f8f8f8;
}
.wzk-checkout-item-info { flex: 1; min-width: 0; }
.wzk-checkout-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wzk-checkout-item-qty {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}
.wzk-checkout-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #ff6700;
  flex-shrink: 0;
}

/* ===== 结算弹窗 - 金额汇总 ===== */
.wzk-checkout-summary {
  background: linear-gradient(135deg, #fff9f5, #fff4eb);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #ffe8d5;
}
.wzk-checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
  color: #666;
}
.wzk-checkout-summary-row.total {
  border-top: 2px solid #ffe0c0;
  margin-top: 6px;
  padding-top: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #ff4d00;
}
.wzk-checkout-summary-row.total .label {
  font-size: 14px;
  color: #333;
}

/* ===== 结算弹窗 - 支付方式选择 ===== */
.wzk-payment-methods {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.wzk-payment-method-tab {
  flex: 1;
  padding: 10px 6px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 500;
  color: #666;
}
.wzk-payment-method-tab:hover {
  border-color: #ff8533;
  color: #ff6700;
}
.wzk-payment-method-tab.active {
  border-color: #ff6700;
  background: linear-gradient(135deg, #fff5ef, #ffe8d5);
  color: #ff6700;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 103, 0, 0.15);
}
.wzk-payment-method-tab .tab-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 2px;
}

/* ===== 支付内容区 ===== */
.wzk-payment-content {
  background: #fafafa;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.wzk-qr-code-img {
  width: 160px; height: 160px;
  border-radius: 10px;
  border: 2px solid #eee;
  margin-bottom: 10px;
  background: #fff;
  object-fit: contain;
}
.wzk-qr-tip {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  line-height: 1.6;
}
.wzk-qr-tip strong { color: #ff6700; }
.wzk-bank-info {
  text-align: left;
  width: 100%;
}
.wzk-bank-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 8px;
}
.wzk-bank-card.company {
  background: linear-gradient(135deg, #0f3460, #1a1a5e);
}
.wzk-bank-card .bank-name {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 6px;
}
.wzk-bank-card .bank-account {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}
.wzk-bank-card .bank-holder {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
}

/* ===== 按钮 ===== */
.wzk-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.wzk-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #ff6700, #ff8533);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 103, 0, 0.3);
}
.wzk-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 103, 0, 0.4);
}
.wzk-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 103, 0, 0.3);
}
.wzk-btn-secondary {
  padding: 12px 20px;
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e8e8e8;
}
.wzk-btn-secondary:hover {
  background: #eee;
  color: #333;
}
.wzk-btn-success {
  flex: 1;
  background: linear-gradient(135deg, #00b853, #00d26a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 184, 83, 0.3);
}
.wzk-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 83, 0.4);
}
.wzk-btn-success:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 184, 83, 0.3);
}

/* ===== 支付成功弹窗 ===== */
.wzk-success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b853, #00d26a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  animation: wzkSuccessPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wzk-success-icon span { font-size: 38px; color: #fff; }
@keyframes wzkSuccessPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.wzk-success-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.wzk-success-subtitle {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 18px;
}
.wzk-success-order-info {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.wzk-success-order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}
.wzk-success-order-row .label { color: #999; }
.wzk-success-order-row .value { color: #333; font-weight: 600; word-break: break-all; text-align: right; max-width: 65%; }
.wzk-success-order-row .value.amount {
  color: #ff4d00;
  font-size: 18px;
  font-weight: 700;
}
.wzk-success-reward {
  background: linear-gradient(135deg, #fff9e6, #fff3cd);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #ffc107;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.wzk-success-reward .reward-icon { font-size: 24px; flex-shrink: 0; }
.wzk-success-reward .reward-text {
  font-size: 12px;
  color: #856404;
  line-height: 1.5;
}
.wzk-success-reward .reward-text strong { color: #ff6700; }

/* ===== 加载状态 ===== */
.wzk-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px;
}
.wzk-loading-spinner {
  width: 36px; height: 36px;
  border: 4px solid #f0f0f0;
  border-top-color: #ff6700;
  border-radius: 50%;
  animation: wzkSpin 0.8s linear infinite;
}
@keyframes wzkSpin {
  to { transform: rotate(360deg); }
}

/* =============================================
   移动端响应式 — 底部弹出式 (Bottom Sheet)
   ============================================= */
@media (max-width: 520px) {
  /* 容器改为底部对齐 */
  .wzk-modal-container {
    align-items: flex-end;
    padding: 0;
  }

  /* 弹窗改为底部弹出 */
  .wzk-modal-box {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    transform: translateY(100%);
  }
  .wzk-modal-box.active {
    transform: translateY(0);
  }

  /* 添加拖拽指示条 */
  .wzk-modal-box::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  /* 头部适配 */
  .wzk-modal-header {
    padding: 16px 18px 12px;
  }
  .wzk-modal-header h3 {
    font-size: 17px;
  }

  /* 内容区适配 */
  .wzk-modal-body {
    padding: 14px 18px;
  }

  /* 底部按钮适配 - 竖排、大按钮 */
  .wzk-modal-footer {
    padding: 14px 18px 24px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  /* 加入购物车弹窗 */
  .wzk-cart-added-icon {
    width: 52px; height: 52px;
    margin: 4px auto 12px;
  }
  .wzk-cart-added-icon span { font-size: 26px; }
  .wzk-cart-added-title { font-size: 18px; }
  .wzk-cart-added-subtitle { font-size: 13px; margin-bottom: 14px; }
  .wzk-cart-added-preview { padding: 12px; gap: 10px; margin-bottom: 14px; }
  .wzk-cart-added-preview-img { width: 44px; height: 44px; }
  .wzk-cart-added-preview-name { font-size: 13px; }
  .wzk-cart-added-preview-price { font-size: 15px; }
  .wzk-cart-added-preview-badge { font-size: 10px; padding: 2px 8px; }
  .wzk-cart-added-stats { gap: 20px; margin-bottom: 14px; }
  .wzk-cart-added-stat-value { font-size: 20px; }

  /* 结算弹窗商品列表 */
  .wzk-checkout-item-img { width: 40px; height: 40px; }
  .wzk-checkout-item-name { font-size: 12px; }
  .wzk-checkout-item-price { font-size: 13px; }

  /* 金额汇总 */
  .wzk-checkout-summary { padding: 12px; }
  .wzk-checkout-summary-row { font-size: 12px; }
  .wzk-checkout-summary-row.total { font-size: 15px; }
  .wzk-checkout-summary-row.total .label { font-size: 13px; }

  /* 支付方式 - 保持横排但更紧凑 */
  .wzk-payment-methods { gap: 4px; margin-bottom: 12px; }
  .wzk-payment-method-tab { padding: 8px 4px; font-size: 11px; border-radius: 8px; }
  .wzk-payment-method-tab .tab-icon { font-size: 18px; }

  /* 支付内容区 */
  .wzk-payment-content { padding: 14px; min-height: 140px; }
  .wzk-qr-code-img { width: 150px; height: 150px; }
  .wzk-qr-tip { font-size: 12px; }

  /* 银行卡 */
  .wzk-bank-card { padding: 12px; }
  .wzk-bank-card .bank-account { font-size: 13px; letter-spacing: 0; }

  /* 支付成功弹窗 */
  .wzk-success-icon { width: 60px; height: 60px; }
  .wzk-success-icon span { font-size: 32px; }
  .wzk-success-title { font-size: 18px; }
  .wzk-success-order-row .value.amount { font-size: 16px; }

  /* 按钮适配 */
  .wzk-btn { padding: 14px 20px; font-size: 15px; border-radius: 12px; width: 100%; }
}

/* 超小屏幕 (≤375px) 进一步优化 */
@media (max-width: 375px) {
  .wzk-modal-body { padding: 12px 14px; }
  .wzk-modal-header { padding: 14px 14px 10px; }
  .wzk-modal-footer { padding: 12px 14px 20px; }
  .wzk-payment-method-tab { padding: 7px 3px; font-size: 10px; }
  .wzk-payment-method-tab .tab-icon { font-size: 16px; }
  .wzk-qr-code-img { width: 130px; height: 130px; }
  .wzk-cart-added-stat-value { font-size: 18px; }
  .wzk-bank-card .bank-account { font-size: 12px; }
}

/* ===== 安全区域适配 (iPhone刘海屏) ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 520px) {
    .wzk-modal-footer {
      padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
    .wzk-modal-box {
      max-height: calc(90vh - env(safe-area-inset-top));
    }
  }
}

/* ===== 遮罩动画 ===== */
@keyframes wzkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes wzkSlideUp {
  from { transform: translateY(30px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ===== 弹窗可见性增强补丁 ===== */
/* 确保弹窗盒子始终有最小宽度和高度 */
.wzk-modal-box {
  min-width: 300px;
  min-height: 200px;
  will-change: transform, opacity;
}

/* 确保弹窗内容区域有滚动支持 */
.wzk-modal-body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* 确保二维码图片有可见性 */
.wzk-qr-code-img {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  background: #fafafa;
  object-fit: contain;
  padding: 8px;
}

/* 确保银行信息卡片有可见性 */
.wzk-bank-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #e8e8e8;
}
.wzk-bank-card.company {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-color: #a5d6a7;
}
.wzk-bank-card .bank-name {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}
.wzk-bank-card .bank-account {
  font-size: 15px;
  color: #1a1a1a;
  letter-spacing: 1px;
  margin-bottom: 4px;
  word-break: break-all;
}
.wzk-bank-card .bank-holder {
  font-size: 13px;
  color: #666;
}

/* 确保商品图片在弹窗中正确显示 */
.wzk-checkout-item-img,
.wzk-checkout-item img[src*="/api/media"],
.wzk-checkout-item img[src*="/images"] {
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f0faf5;
  border-radius: 8px;
  min-width: 40px;
  min-height: 40px;
}

/* 确保购物车弹窗中的商品图片显示 */
.wzk-cart-added-preview-img[src*="/api/media"],
.wzk-cart-added-preview-img[src*="/images"] {
  display: block;
  object-fit: cover;
  border-radius: 10px;
  background: #f0faf5;
}

/* 确保支付内容区有最小高度和背景 */
.wzk-payment-content {
  min-height: 220px;
  background: #f8f9fa;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 确保结算弹窗商品列表有可见样式 */
.wzk-checkout-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.wzk-checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.wzk-checkout-item-info {
  flex: 1;
  min-width: 0;
}
.wzk-checkout-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wzk-checkout-item-qty {
  font-size: 12px;
  color: #999;
}
.wzk-checkout-item-price {
  font-size: 15px;
  font-weight: 700;
  color: #ff6700;
  flex-shrink: 0;
}

/* ===== 修复支付方式标签样式 ===== */
.wzk-payment-methods {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: #f5f5f5;
  border-radius: 12px;
}
.wzk-payment-method-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.wzk-payment-method-tab.active {
  background: #fff;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.wzk-payment-method-tab .tab-icon {
  font-size: 20px;
}

/* ===== 修复 QR码提示样式 ===== */
.wzk-qr-tip {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 14px;
  line-height: 1.6;
}
.wzk-qr-tip strong {
  color: #ff6700;
  font-size: 16px;
}

/* ===== 修复按钮样式 ===== */
.wzk-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.wzk-btn-primary {
  background: linear-gradient(135deg, #ff6700, #ff8533);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 103, 0, 0.25);
}
.wzk-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 103, 0, 0.35);
}
.wzk-btn-secondary {
  background: #fff;
  color: #ff6700;
  border: 2px solid #ff6700;
}
.wzk-btn-secondary:hover {
  background: #fff4e8;
  transform: translateY(-2px);
}
.wzk-btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

/* === v20260728 payment flow + receipt patches === */
/* 支付二维码 / 购物小票补丁样式 */
.wzk-qr-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 180px; flex-direction: column;
  background: #fafafa; border-radius: 12px; padding: 20px;
}
.wzk-qr-loading .spinner {
  width: 36px; height: 36px; border: 3px solid #e0e0e0;
  border-top-color: #009933; border-radius: 50%;
  animation: wzk-spin 0.8s linear infinite; margin-bottom: 12px;
}
.wzk-qr-loading .tip { color: #666; font-size: 13px; }
.wzk-qr-loading .err { color: #f44336; font-size: 13px; margin-top: 8px; }
@keyframes wzk-spin { to { transform: rotate(360deg); } }

.wzk-qr-success-card {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid #a5d6a7; border-radius: 12px; padding: 16px;
  margin: 12px 0; text-align: center;
}
.wzk-qr-success-card .check { font-size: 36px; color: #2e7d32; margin-bottom: 6px; }
.wzk-qr-success-card .title { color: #2e7d32; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.wzk-qr-success-card .sub { color: #388e3c; font-size: 12px; }

/* ===== 购物小票 ===== */
.wzk-receipt {
  background: #fffef7; border: 1px dashed #d4a574;
  border-radius: 6px; padding: 16px 18px; margin: 14px 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  position: relative;
}
.wzk-receipt::before, .wzk-receipt::after {
  content: ""; position: absolute; left: -1px; right: -1px; height: 6px;
  background:
    radial-gradient(circle at 3px 3px, #fff 3px, transparent 3.5px) repeat-x;
  background-size: 12px 6px;
}
.wzk-receipt::before { top: -3px; }
.wzk-receipt::after { bottom: -3px; }

.wzk-receipt-header {
  text-align: center; border-bottom: 1px dashed #d4a574;
  padding-bottom: 10px; margin-bottom: 12px;
}
.wzk-receipt-header .brand { font-size: 16px; font-weight: 700; color: #8b5a2b; }
.wzk-receipt-header .sub { font-size: 11px; color: #a0825c; margin-top: 2px; }

.wzk-receipt-items { margin-bottom: 10px; }
.wzk-receipt-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 4px 0; font-size: 13px; color: #333;
}
.wzk-receipt-row .name {
  flex: 1; padding-right: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wzk-receipt-row .qty {
  color: #888; font-size: 12px; margin: 0 6px;
}
.wzk-receipt-row .subtotal {
  font-weight: 600; color: #5d3a1a; min-width: 60px; text-align: right;
}

.wzk-receipt-summary {
  border-top: 1px dashed #d4a574; padding-top: 10px;
  font-size: 13px; color: #555;
}
.wzk-receipt-summary .row {
  display: flex; justify-content: space-between; padding: 3px 0;
}
.wzk-receipt-summary .row.total {
  font-weight: 700; color: #c62828; font-size: 16px;
  border-top: 1px solid #d4a574; margin-top: 8px; padding-top: 8px;
}

.wzk-receipt-footer {
  text-align: center; color: #a0825c; font-size: 11px;
  border-top: 1px dashed #d4a574; margin-top: 12px; padding-top: 8px;
  letter-spacing: 1px;
}

/* 支付方式切换卡 */
.wzk-payment-methods {
  display: flex; gap: 8px; margin: 12px 0;
  border-bottom: 1px solid #eee; padding-bottom: 0;
}
.wzk-payment-method-tab {
  flex: 1; padding: 10px 8px; text-align: center;
  border: 1px solid #e0e0e0; border-radius: 8px 8px 0 0;
  background: #fafafa; cursor: pointer; font-size: 13px;
  color: #666; transition: all 0.2s;
}
.wzk-payment-method-tab .tab-icon { display: block; font-size: 20px; margin-bottom: 4px; }
.wzk-payment-method-tab.active {
  background: #fff; color: #009933; border-color: #009933;
  border-bottom-color: #fff; font-weight: 600;
}

/* 银行卡片 */
.wzk-bank-info { padding: 8px 0; }
.wzk-bank-card {
  background: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
  border: 1px solid #a5d6a7; border-radius: 10px; padding: 12px;
  margin-bottom: 10px;
}
.wzk-bank-card.company { border-color: #4caf50; }
.wzk-bank-card .bank-name {
  font-size: 12px; color: #2e7d32; margin-bottom: 4px;
  font-weight: 600; text-transform: uppercase;
}
.wzk-bank-card .bank-account {
  font-family: "Courier New", monospace; font-size: 18px;
  color: #1b5e20; font-weight: 700; letter-spacing: 1px;
  margin-bottom: 4px; word-break: break-all;
}
.wzk-bank-card .bank-holder { font-size: 12px; color: #555; }

/* 二维码区 */
.wzk-qr-code-img {
  display: block; width: 200px; height: 200px;
  margin: 0 auto; padding: 8px; background: #fff;
  border: 1px solid #e0e0e0; border-radius: 12px;
}
.wzk-qr-tip {
  text-align: center; color: #666; font-size: 13px; margin-top: 10px;
}
.wzk-qr-tip strong { color: #c62828; font-weight: 700; }

/* 主按钮 */
.wzk-btn {
  padding: 12px 24px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease;
}
.wzk-btn-primary {
  background: linear-gradient(135deg, #009933 0%, #00b33c 100%);
  color: #fff;
}
.wzk-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 153, 51, 0.3);
}
.wzk-btn-primary:disabled {
  background: #ccc; cursor: not-allowed;
}
.wzk-btn-secondary {
  background: #f5f5f5; color: #666;
}
.wzk-btn-secondary:hover { background: #e8e8e8; }
.wzk-btn-success {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: #fff;
}
.wzk-btn-success:hover { transform: translateY(-1px); }

/* 模态框基础 */
.wzk-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 99998; opacity: 0; transition: opacity 0.3s;
}
.wzk-modal-backdrop.active { opacity: 1; }
.wzk-modal-container {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; pointer-events: none;
}
.wzk-modal-box {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.9); opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}
.wzk-modal-box.active { transform: scale(1); opacity: 1; }

.wzk-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid #f0f0f0;
}
.wzk-modal-header h3 { margin: 0; font-size: 17px; color: #333; font-weight: 600; }
.wzk-modal-close {
  background: none; border: none; font-size: 24px;
  color: #999; cursor: pointer; line-height: 1;
  width: 28px; height: 28px; display: flex;
  align-items: center; justify-content: center;
  border-radius: 50%; transition: all 0.2s;
}
.wzk-modal-close:hover { background: #f5f5f5; color: #333; }

.wzk-modal-body { padding: 16px 22px; }
.wzk-modal-footer {
  display: flex; gap: 10px; padding: 14px 22px 20px;
  border-top: 1px solid #f0f0f0;
}
.wzk-modal-footer .wzk-btn { flex: 1; }

/* 通用 */
.wzk-checkout-items { max-height: 240px; overflow-y: auto; margin-bottom: 12px; }
.wzk-checkout-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #f5f5f5;
}
.wzk-checkout-item:last-child { border-bottom: none; }
.wzk-checkout-item-img {
  width: 48px; height: 48px; border-radius: 6px;
  object-fit: cover; background: #f5f5f5; flex-shrink: 0;
}
.wzk-checkout-item-info { flex: 1; min-width: 0; }
.wzk-checkout-item-name {
  font-size: 13px; color: #333; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wzk-checkout-item-qty { font-size: 11px; color: #999; margin-top: 2px; }
.wzk-checkout-item-price { color: #c62828; font-weight: 600; font-size: 13px; }

.wzk-checkout-summary { padding-top: 10px; border-top: 1px solid #f0f0f0; }
.wzk-checkout-summary-row {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 13px; color: #666;
}
.wzk-checkout-summary-row.total {
  font-size: 16px; color: #c62828; font-weight: 700;
  border-top: 1px solid #f0f0f0; margin-top: 8px; padding-top: 8px;
}

.wzk-success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #e8f5e9; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.wzk-success-icon span { font-size: 36px; color: #2e7d32; font-weight: 700; }
.wzk-success-title { text-align: center; font-size: 22px; font-weight: 700; color: #2e7d32; margin-bottom: 4px; }
.wzk-success-subtitle { text-align: center; color: #666; font-size: 13px; margin-bottom: 16px; }

.wzk-success-order-info {
  background: #f8f9fa; border-radius: 10px; padding: 14px; margin-bottom: 12px;
}
.wzk-success-order-row {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 13px;
}
.wzk-success-order-row .label { color: #666; }
.wzk-success-order-row .value { color: #333; font-weight: 500; }
.wzk-success-order-row .value.amount { color: #c62828; font-weight: 700; }

.wzk-success-reward {
  background: #fff9e6; border-radius: 8px; padding: 12px;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; color: #856404;
}
.wzk-success-reward .reward-icon { font-size: 24px; flex-shrink: 0; }
.wzk-success-reward .reward-text { line-height: 1.5; }