/* CHECKOUT — v3 Stripe DNA */
.co-body { background: var(--bg-soft); min-height: 100vh; }

.co-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.co-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.co-secure {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}
.co-secure svg { color: var(--green); }

.co-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.co-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

/* Left: order summary */
.co-summary {
  position: sticky;
  top: 2rem;
}
.co-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  color: var(--purple);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.co-eyebrow .eyebrow-line { width: 24px; height: 1px; background: currentColor; opacity: 0.5; }

.co-title {
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.5rem;
}

.co-product {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.co-product-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1rem;
}
.co-product-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-3);
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.co-product-meta { flex: 1; }
.co-product-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.15rem;
}
.co-product-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.co-product-price {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.co-product-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.co-product-features li {
  display: flex;
  gap: 0.5rem;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.co-product-features li::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='%23009f6b' d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm5.3 7.7-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L9 11.6l5.3-5.3a1 1 0 1 1 1.4 1.4z'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}

.co-totals {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}
.co-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14.5px;
  padding: 0.5rem 0;
  color: var(--ink-soft);
}
.co-row strong { color: var(--ink); font-weight: 600; }
.co-row-total {
  border-top: 1px solid var(--border-soft);
  margin-top: 0.5rem;
  padding-top: 0.875rem;
  font-size: 1rem;
}
.co-row-total span:last-child {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.co-trust {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 13px;
  color: var(--ink-muted);
}
.co-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.co-trust svg { color: var(--green); flex-shrink: 0; }

/* Right: payment form */
.co-form-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.co-form-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1.25rem;
}

.co-form { display: flex; flex-direction: column; gap: 1rem; }
.co-field { display: flex; flex-direction: column; gap: 0.4rem; }
.co-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.co-field input,
.co-field select {
  padding: 0.7rem 0.875rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  color: var(--ink);
  font-size: 14.5px;
  font-family: inherit;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}
.co-field input:focus,
.co-field select:focus {
  outline: 0;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
}
.co-row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.co-row-fields-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.75rem; }

.co-card-wrap {
  position: relative;
}
.co-card-icons {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  pointer-events: none;
}
.co-card-icon {
  width: 28px;
  height: 18px;
  border-radius: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-muted);
}

.co-pay-btn {
  margin-top: 0.5rem;
  font-size: 16px;
  padding: 0.875rem 1.25rem;
}

.co-fine {
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
  margin: 0.75rem 0 0;
  line-height: 1.5;
}
.co-fine a { color: var(--purple); }

/* Success overlay */
.co-success {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: bdFade 0.4s ease;
}
.co-success-inner {
  text-align: center;
  max-width: 500px;
}
.co-success-check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #10b981);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 12px 32px -8px rgba(0, 159, 107, 0.4);
}
.co-success h2 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1rem;
}
.co-success p {
  color: var(--ink-soft);
  margin: 0 0 2rem;
}
.co-success-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .co-grid { grid-template-columns: 1fr; gap: 2rem; }
  .co-summary { position: static; }
  .co-form-wrap { padding: 1.5rem; }
  .co-row-fields-3 { grid-template-columns: 1fr; }
}

/* ─── V4.1 ADDITIONS — references plan, auto-account ─── */
.co-breakdown {
  margin: 1rem 0;
  padding: 0.875rem 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.co-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  gap: 1rem;
}
.co-breakdown-row span:first-child { color: var(--ink-soft); flex: 1; }
.co-breakdown-row span:last-child { color: var(--ink); font-weight: 600; font-family: var(--font-mono); white-space: nowrap; }

.co-product-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.co-product-top .co-product-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--r-3);
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.co-product-top .co-product-meta { flex: 1; min-width: 0; }
.co-product-top .co-product-name { font-size: 1rem; font-weight: 600; color: var(--ink); margin: 0 0 0.25rem; line-height: 1.3; }
.co-product-top .co-product-tagline { font-size: 13px; color: var(--ink-muted); line-height: 1.4; }
.co-product-top .co-product-price { font-size: 1.5rem; font-weight: 600; color: var(--ink); white-space: nowrap; flex-shrink: 0; }
.co-best-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.5rem;
  background: var(--purple);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.co-product-features {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.co-product-features li {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  position: relative;
  padding-left: 1.4rem;
}
.co-product-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='%23009f6b' d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm5.3 7.7-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L9 11.6l5.3-5.3a1 1 0 1 1 1.4 1.4z'/></svg>");
  background-repeat: no-repeat;
}

.co-auto-badge {
  display: block;
  margin-top: 0.4rem;
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}
.co-auto-badge a { color: var(--purple); margin-left: 0.25rem; }

/* ============================================================
   CHECKOUT — MOBILE OPTIMIZATION (v7.2)
   ============================================================ */
@media (max-width: 900px) {
  .co-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .co-summary { order: -1; }
}
@media (max-width: 640px) {
  .co-card { padding: 1.25rem; }
  .co-pay-method { padding: 0.875rem; }
  .co-total-row { font-size: 0.95rem; }
  .co-total { font-size: 1.5rem; }
}
