/* ============================================================
   ClickVerge — Checkout & Confirmation Styles
   ============================================================ */

.checkout-page { padding: 40px 0 72px; }
.checkout-layout {
  display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: flex-start;
}

/* ── Steps Bar ──────────────────────────────────────────────── */
.checkout-steps {
  display: flex; align-items: center; gap: 0;
  background: var(--card); border-radius: var(--radius-lg);
  padding: 16px 24px; box-shadow: var(--shadow-sm);
  margin-bottom: 24px; overflow-x: auto;
}
.step {
  display: flex; align-items: center; gap: 10px; flex: 1;
  font-size: 0.82rem; font-weight: 600; color: var(--muted-light); white-space: nowrap;
}
.step.active { color: var(--primary); }
.step.done   { color: var(--success); }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  border: 2px solid var(--border); background: transparent; color: var(--muted-light);
}
.step.active .step-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.step.done   .step-num { border-color: var(--success); background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 10px; }
.step-line.done { background: var(--success); }

/* ── Form Panel ─────────────────────────────────────────────── */
.checkout-form-panel {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.form-section {
  padding: 28px 28px 24px; border-bottom: 1px solid var(--border-light);
}
.form-section:last-child { border-bottom: none; }
.form-section-title {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.form-section-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(26,110,216,0.12), rgba(0,200,224,0.12));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.form-section-icon svg { width: 16px; height: 16px; color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }

/* ── Card Visual ────────────────────────────────────────────── */
.card-visual {
  background: linear-gradient(135deg, #1a2a4a 0%, #0f172a 60%, #1a3a5a 100%);
  border-radius: var(--radius-lg); padding: 22px 26px; color: #fff;
  aspect-ratio: 16/9; max-width: 320px; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25); margin-bottom: 20px;
}
.card-visual::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,224,0.18), transparent);
}
.card-visual::after {
  content: ''; position: absolute; bottom: -30px; left: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,110,216,0.18), transparent);
}
.card-chip {
  width: 40px; height: 30px; border-radius: 6px;
  background: linear-gradient(135deg, #d4a843, #f0c060); margin-bottom: 20px;
}
.card-network {
  position: absolute; top: 20px; right: 22px;
  font-size: 1.4rem; font-weight: 900; opacity: 0.9;
  background: linear-gradient(135deg, #ff6b35, #f7c948);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card-number {
  font-size: 1.05rem; letter-spacing: 3px; font-weight: 600;
  margin-bottom: 18px; font-family: 'Courier New', monospace;
}
.card-info { display: flex; justify-content: space-between; font-size: 0.78rem; }
.card-info-label { opacity: 0.6; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }

/* Saved card options */
.saved-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border: 2px solid var(--border);
  border-radius: var(--radius); cursor: pointer; margin-bottom: 10px;
  transition: var(--transition-fast);
}
.saved-card.active { border-color: var(--primary); background: rgba(26,110,216,0.04); }
.saved-card-logo { font-weight: 900; font-size: 1rem; color: var(--primary); }
.saved-card-num { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.saved-card-exp { font-size: 0.75rem; color: var(--muted); }
.saved-card input[type="radio"] { accent-color: var(--primary); }
.new-card-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border: 2px dashed var(--border);
  border-radius: var(--radius); cursor: pointer; margin-bottom: 16px;
  font-size: 0.88rem; color: var(--primary); font-weight: 600;
  transition: var(--transition-fast);
}
.new-card-toggle:hover { border-color: var(--primary); background: rgba(26,110,216,0.04); }

/* ── Order Summary Sidebar ──────────────────────────────────── */
.order-summary-panel {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 24px;
  position: sticky; top: calc(var(--header-h) + 16px);
}
.order-summary-panel h3 {
  font-size: 1rem; font-weight: 700; margin-bottom: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.order-item { display: flex; gap: 12px; margin-bottom: 14px; align-items: center; }
.order-item-img {
  width: 54px; height: 54px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: var(--bg-alt); position: relative;
}
.order-item-img img { width: 100%; height: 100%; object-fit: cover; }
.order-item-qty {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.order-item-name { font-size: 0.82rem; font-weight: 600; color: var(--text); flex: 1; line-height: 1.35; }
.order-item-variant { font-size: 0.72rem; color: var(--muted); }
.order-item-price { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.order-divider { height: 1px; background: var(--border-light); margin: 14px 0; }
.order-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; margin-bottom: 10px; color: var(--text-2);
}
.order-row .label { color: var(--muted); }
.order-row.total { font-size: 1rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.order-row.total .label { color: var(--text); }
.order-row .free { color: var(--success); font-weight: 600; }
.place-order-btn {
  width: 100%; padding: 15px; margin-top: 18px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--primary) 100%);
  color: #fff; font-size: 1rem; font-weight: 700;
  border-radius: var(--radius-full); border: none; cursor: pointer;
  transition: var(--transition); box-shadow: 0 4px 18px rgba(0,200,224,0.25);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.place-order-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.order-secure { text-align: center; margin-top: 12px; font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 5px; }
.order-secure svg { width: 13px; height: 13px; color: var(--success); }

/* ── Confirmation Page ──────────────────────────────────────── */
.confirmation-page { padding: 64px 0 80px; }
.confirmation-card {
  max-width: 620px; margin: 0 auto;
  background: var(--card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.confirmation-header {
  background: linear-gradient(135deg, #0f172a 0%, #1a2a4a 100%);
  padding: 48px 40px 40px; text-align: center; position: relative; overflow: hidden;
}
.confirmation-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 100%, rgba(0,200,224,0.15), transparent);
}
.check-circle {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #16a34a);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; position: relative; z-index: 1;
  box-shadow: 0 0 0 14px rgba(34,197,94,0.15);
  animation: popIn 0.5s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.check-circle svg { width: 40px; height: 40px; color: #fff; }
.confirmation-header h1 {
  color: #fff; font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; position: relative; z-index: 1;
}
.confirmation-header p {
  color: rgba(255,255,255,0.75); font-size: 0.9rem; position: relative; z-index: 1;
}
.order-num-badge {
  display: inline-block; margin-top: 16px; position: relative; z-index: 1;
  background: rgba(0,200,224,0.15); border: 1px solid rgba(0,200,224,0.3);
  color: var(--teal); font-size: 0.82rem; font-weight: 700;
  padding: 6px 18px; border-radius: var(--radius-full); letter-spacing: 0.5px;
}
.confirmation-body { padding: 32px 40px 40px; }
.conf-section-title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 14px; }
.conf-order-items { margin-bottom: 24px; }
.conf-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.conf-item:last-child { border-bottom: none; }
.conf-item-img { width: 48px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-alt); }
.conf-item-img img { width: 100%; height: 100%; object-fit: cover; }
.conf-item-name { flex: 1; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.conf-item-qty  { font-size: 0.8rem; color: var(--muted); }
.conf-item-price { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.conf-totals { background: var(--bg); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; }
.conf-total-row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-2); margin-bottom: 8px; }
.conf-total-row:last-child { margin-bottom: 0; font-weight: 700; color: var(--text); font-size: 0.95rem; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
.conf-actions { display: flex; gap: 12px; }
.conf-actions a { flex: 1; }

/* ── Responsive Checkout ────────────────────────────────────── */
@media (max-width: 1024px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary-panel { position: static; order: -1; }
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-section { padding: 20px 18px; }
  .confirmation-header { padding: 36px 24px 30px; }
  .confirmation-body { padding: 24px 20px 28px; }
  .conf-actions { flex-direction: column; }
  .checkout-steps { gap: 4px; }
}
