/* ==========================================================================
   checkout.css — 结算页专用样式
   顶部用户状态条(已登录/未登录两态) + 步骤条 + 商品行 + 费用明细 + 底部固定提交条
   ========================================================================== */

.checkout-main { padding-bottom: 90px; }

/* ---------- 顶部用户状态条 ---------- */
.ck-userbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}
.ck-userbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light, #FF8A65));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ck-userbar-info {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}
.ck-userbar-info b {
  font-size: 14px;
  color: var(--text);
  display: block;
  font-weight: 700;
}
.ck-userbar-info span {
  font-size: 11px;
  color: var(--text-light);
}
.ck-userbar-action {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  flex-shrink: 0;
  padding: 6px 10px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
}
.ck-userbar-action:active { transform: scale(.94); }

/* 未登录态 - 友好提示 */
.ck-userbar.is-guest .ck-userbar-icon {
  background: var(--bg-soft);
  color: var(--primary);
}
.ck-userbar.is-guest .ck-userbar-info span {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 步骤条 ---------- */
.ck-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}
.ck-step {
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}
.ck-step.done { color: var(--primary-light, #FF8A65); }
.ck-step.active { color: var(--primary); font-weight: 700; }
.ck-step-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- 商品列表 ---------- */
.ck-items { font-size: 13px; }
.ck-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.ck-item:last-child { border-bottom: none; }
.ck-item img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm, 8px);
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f5f5;
}
.ck-item-info { flex: 1; min-width: 0; }
.ck-item-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ck-item-spec {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 3px;
}
.ck-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.ck-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.ck-item-qty {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 400;
}
.ck-count {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 400;
}
.ck-count b { color: var(--primary); font-size: 14px; font-weight: 700; }

.ck-empty {
  text-align: center;
  padding: 30px 20px;
}
.ck-empty-ico {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .6;
}
.ck-empty p {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 16px;
}
.ck-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 支付方式 ---------- */
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: all var(--tx-fast);
  position: relative;
}
.pay-option.selected {
  border-color: var(--primary);
  background: rgba(255, 87, 34, .04);
}
.pay-option input { display: none; }
.pay-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  position: relative;
  transition: all var(--tx-fast);
}
.pay-option.selected .pay-radio {
  border-color: var(--primary);
}
.pay-option.selected .pay-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--primary);
  border-radius: 50%;
}
.pay-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
}
.pay-info { flex: 1; min-width: 0; }
.pay-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.pay-sub {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
  line-height: 1.5;
}
.pay-tag {
  font-size: 10px;
  background: var(--bg-soft);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  flex-shrink: 0;
}
.pay-hint {
  margin-top: 10px;
  padding: 10px 12px;
  background: #FFF8E1;
  color: #B07000;
  font-size: 11px;
  line-height: 1.7;
  border-radius: var(--radius-sm, 8px);
}

/* ---------- 费用明细 ---------- */
.ck-summary {
  font-size: 13px;
}
.ck-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  color: var(--text-light);
}
.ck-row b { color: var(--text); font-weight: 600; }
.ck-row.ck-row-cut b { color: #FF9800; }
.ck-row.ck-row-total {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 6px;
}
.ck-row.ck-row-total span {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.ck-row.ck-row-total b {
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

/* ---------- 协议同意 ---------- */
.ck-consent-card { padding: 12px 14px; }
.ck-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
}
.ck-consent input {
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.ck-consent a {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- 底部固定提交条 ---------- */
.ck-submit-bar {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 50;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .05);
}
.ck-submit-total {
  flex: 1;
  font-size: 12px;
  color: var(--text-light);
}
.ck-submit-total b {
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
  margin-left: 4px;
}
.ck-submit-btn {
  height: 44px;
  padding: 0 24px;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 87, 34, .3);
  transition: all var(--tx-fast);
}
.ck-submit-btn:active { transform: scale(.97); }
.ck-submit-btn:disabled {
  background: var(--text-muted);
  box-shadow: none;
  opacity: .6;
}

/* ---------- 成功弹层 ---------- */
.ck-success-sheet {
  text-align: center;
  padding: 28px 20px 24px;
}
.ck-success-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 87, 34, .3);
}
.ck-success-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.ck-success-no {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.ck-success-no span {
  color: var(--text);
  font-weight: 600;
  font-family: monospace;
}
.ck-success-info {
  background: var(--bg-soft);
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: left;
}
.ck-success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.ck-success-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- 表单行调整 (收货信息) ---------- */
.req { color: var(--primary); margin-left: 2px; }
/* ============================================================
 * Checkout 页 fab-support 偏移(避开 submit-bar 65px)
 * ============================================================ */
.page-checkout .fab-support {
  bottom: calc(56px + 65px + 18px);
}
