.checkout-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 6vw;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  flex: 1;
}

.checkout-forms {
  padding: 60px 8vw 80px;
}

/* ── Progress Bar ────────────────────────────────────────────────────────── */
.progress-bar {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.progress-bar .step {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
}

.progress-bar .step.active {
  color: var(--accent);
  opacity: 1;
}

/* ── Step Visibility ─────────────────────────────────────────────────────── */
.checkout-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.checkout-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.checkout-step h2 {
  font-size: 32px;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

/* ── Form Inputs ─────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.form-group label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  transition: border 0.2s, background 0.2s;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

#shippingPincode,
#shippingPhone {
  letter-spacing: 0.05em;
}

.full-width {
  width: 100%;
  margin-top: 16px;
  border: none;
}

/* ── Three-col City/State/PIN ────────────────────────────────────────────── */
@media (min-width: 601px) {
  .address-three-col {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.9fr;
    gap: 16px;
    width: 100%;
  }
  .address-three-col .form-group {
    margin-bottom: 0;
  }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
}

.form-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 36px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.form-actions .btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.form-actions .btn.secondary {
  background: #eeeeee;
  color: #111111;
}

.form-actions .btn.primary,
#goToPaymentBtn {
  background: var(--accent);
  color: var(--black);
}

/* ── Payment Options ─────────────────────────────────────────────────────── */
.payment-note {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.payment-option {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: var(--bg-soft);
  overflow: hidden;
  transition: border 0.2s;
}

.payment-option.active {
  border-color: var(--accent);
}

.payment-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}

.payment-header input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.payment-body {
  padding: 0 20px 20px;
  display: none;
}

.payment-option.active .payment-body {
  display: block;
}

/* ── Coming-soon (disabled) payment option ───────────────────────────────── */
.payment-option.coming-soon {
  opacity: 0.55;
}

.payment-option.coming-soon .payment-header,
.payment-option.coming-soon .payment-header input[type="radio"] {
  cursor: not-allowed;
}

.coming-soon-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* ── Shipping Rate Options ───────────────────────────────────────────────── */
.shipping-rate-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  background: var(--bg-soft);
  transition: border 0.2s, background 0.2s;
}

.shipping-rate-option:hover,
.shipping-rate-option.selected {
  border-color: var(--accent);
  background: rgba(204, 255, 0, 0.04);
}

/* Custom radio circle */
.rate-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.shipping-rate-option.selected .rate-radio {
  border-color: var(--accent);
}

.rate-radio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Order Summary Sidebar ───────────────────────────────────────────────── */
.checkout-summary {
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  padding: 60px 6vw;
}

.checkout-summary h3 {
  font-size: 22px;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.item-img {
  width: 70px;
  height: 90px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 24px;
  font-weight: 900;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
}

.item-name {
  font-weight: 700;
  font-size: 15px;
  margin: 0;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.item-price {
  font-weight: 700;
}

.summary-totals {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 32px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 16px;
}

.totals-row.grand-total {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}

/* First-order discount line — accent colour so the saving stands out */
.totals-row.discount-row {
  color: var(--accent);
  font-weight: 600;
}

/* First-order saving note on the success screen */
.success-box .success-saving {
  color: var(--accent);
  font-weight: 700;
  margin-top: 4px;
}

/* ── Success Screen ──────────────────────────────────────────────────────── */
.success-box {
  text-align: center;
  padding: 60px 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  color: var(--black);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 32px;
}

.success-icon svg {
  width: 40px;
  height: 40px;
}

.success-box h2 {
  font-size: 32px;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.success-box p {
  color: var(--muted);
  margin: 0 auto 40px;
  line-height: 1.6;
  max-width: 400px;
}

.success-box strong {
  color: var(--text);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-summary {
    order: -1;
    border-left: none;
    border-bottom: 1px solid var(--line);
    padding: 40px 6vw;
  }
  .checkout-forms {
    padding: 40px 6vw 80px;
  }
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .form-row .form-group {
    margin-bottom: 16px;
  }
  .form-actions {
    flex-direction: column-reverse;
    gap: 16px;
  }
  .form-actions .btn {
    width: 100%;
  }
}