/* =============================================
   SprintCrate — Subscribe / Checkout Styles
   ============================================= */

.checkout-body {
  background: var(--bg-tint);
  min-height: 100vh;
}

/* =============================================
   TOP BAR
   ============================================= */
.co-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.co-topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.co-topbar__back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}
.co-topbar__back svg { width: 18px; height: 18px; }
.co-topbar__back:hover { color: var(--orange); }

.co-topbar__logo img {
  height: 44px;
  width: auto;
}
.co-topbar__secure {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.co-topbar__secure svg { width: 16px; height: 16px; }

/* =============================================
   PROGRESS BAR
   ============================================= */
.co-progress {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px 20px;
}
.co-progress__bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
  max-width: 1200px;
  overflow: hidden;
}
.co-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-dark), var(--orange));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.co-progress__steps {
  display: flex;
  justify-content: center;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.co-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--transition);
}
.co-step--active { color: var(--orange); }
.co-step--done { color: var(--navy); }
.co-step__dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-tint);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all var(--transition);
  flex-shrink: 0;
}
.co-step--active .co-step__dot {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.co-step--done .co-step__dot {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
.co-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.co-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

/* =============================================
   FORM SECTIONS
   ============================================= */
.co-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: opacity .3s, transform .3s;
}
.co-section--hidden {
  display: none;
}
.co-section__header {
  margin-bottom: 32px;
}
.co-section__header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}
.co-section__header p {
  font-size: 15px;
  color: var(--muted);
}

/* =============================================
   BILLING TOGGLE
   ============================================= */
.billing-toggle {
  display: inline-flex;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}
.billing-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.billing-btn--active {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.billing-save {
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

/* =============================================
   PLAN CARDS
   ============================================= */
.plan-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.plan-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
}
.plan-card input[type="radio"] { display: none; }
.plan-card:hover { border-color: var(--orange-light); background: var(--cream); }
.plan-card.selected,
.plan-card:has(input:checked) {
  border-color: var(--orange);
  background: var(--cream);
  box-shadow: 0 0 0 4px rgba(255,92,26,.08);
}
.plan-card--popular { border-color: var(--orange); }
.plan-card__badge {
  position: absolute;
  top: -11px; left: 20px;
  background: var(--orange);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.plan-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.plan-card__left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.plan-card__radio-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all var(--transition);
  position: relative;
  background: var(--white);
}
.plan-card__radio-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0;
  transition: opacity var(--transition);
}
.plan-card:has(input:checked) .plan-card__radio-dot {
  border-color: var(--orange);
}
.plan-card:has(input:checked) .plan-card__radio-dot::after { opacity: 1; }
.plan-card__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
}
.plan-card__desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.plan-card__right { text-align: right; flex-shrink: 0; }
.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  justify-content: flex-end;
}
.plan-price-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  transition: all .15s;
}
.plan-price-per {
  font-size: 13px;
  color: var(--muted);
}
.plan-card__value {
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
  margin-top: 2px;
}
.plan-card__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s, margin .3s;
}
.plan-card:has(input:checked) .plan-card__perks {
  max-height: 100px;
}
.plan-card__perks span {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
  background: var(--bg-tint);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-block {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 20px;
}
.form-block__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 22px;
}
.form-block__title svg { width: 20px; height: 20px; color: var(--orange); }
.form-block__sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: -14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.form-row { display: flex; gap: 16px; }
.form-row--2 > .form-group { flex: 1; }
.form-row--3 > .form-group { flex: 1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  position: relative;
}
.form-group--terms { gap: 8px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
}
.req { color: var(--orange); }
.form-hint { font-weight: 400; color: var(--muted); }

.form-input {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,92,26,.12);
}
.form-input.input-error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
.form-input.input-valid {
  border-color: #22C55E;
}
.form-input::placeholder { color: var(--muted); font-size: 14px; }

.form-select { appearance: none; cursor: pointer; padding-right: 36px; }
.form-select-wrap { position: relative; }
.select-arrow {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-body);
  line-height: 1.5;
}

.form-error {
  font-size: 12px;
  color: #EF4444;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 4px;
}
.form-error.visible { display: flex; }

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =============================================
   CHIP GROUPS
   ============================================= */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip { cursor: pointer; }
.chip input { display: none; }
.chip span {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  transition: all var(--transition);
  user-select: none;
}
.chip:hover span { border-color: var(--orange-light); color: var(--orange); }
.chip:has(input:checked) span {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* =============================================
   CARD INPUT
   ============================================= */
.card-brand-icons {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.card-brand-icons img {
  height: 24px;
  width: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  padding: 2px 6px;
  background: var(--white);
  object-fit: contain;
  opacity: .7;
  filter: grayscale(30%);
  transition: opacity var(--transition), filter var(--transition);
}
.card-brand-icons img:hover { opacity: 1; filter: none; }

.card-input-wrap { position: relative; }
.card-input { padding-right: 48px; letter-spacing: .06em; }
.card-type-icon {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
}
.card-type-icon svg { width: 22px; height: 22px; }

.cvv-help {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.cvv-help:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.cvv-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 260px;
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.cvv-tooltip.visible { display: block; }
.cvv-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 16px;
  border: 6px solid transparent;
  border-top-color: var(--navy);
}

/* =============================================
   PASSWORD
   ============================================= */
.password-wrap { position: relative; }
.password-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  padding: 4px;
  transition: color var(--transition);
}
.password-toggle:hover { color: var(--navy); }
.eye-icon { width: 18px; height: 18px; }

.password-strength { display: none; align-items: center; gap: 10px; margin-top: 8px; }
.password-strength.visible { display: flex; }
.pw-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.pw-bar__fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .3s, background .3s;
}
.pw-label { font-size: 12px; font-weight: 600; }

/* =============================================
   PROMO CODE
   ============================================= */
.promo-block { margin-bottom: 24px; }
.promo-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  padding: 0;
  transition: opacity var(--transition);
}
.promo-toggle svg { width: 16px; height: 16px; }
.promo-toggle:hover { opacity: .75; }
.promo-input-wrap {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.promo-input { flex: 1; text-transform: uppercase; letter-spacing: .06em; }
.promo-result {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}
.promo-result.success { color: #22C55E; }
.promo-result.error { color: #EF4444; }

/* =============================================
   CHECKBOX
   ============================================= */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--slate);
  line-height: 1.5;
}
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-custom {
  width: 20px; height: 20px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--white);
  margin-top: 1px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkbox-custom::after {
  content: '✓';
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  opacity: 0;
  transition: opacity var(--transition);
}
.checkbox-label:has(input:checked) .checkbox-custom {
  background: var(--orange);
  border-color: var(--orange);
}
.checkbox-label:has(input:checked) .checkbox-custom::after { opacity: 1; }
.text-link { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }

/* =============================================
   TRUST ROW
   ============================================= */
.trust-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.trust-item svg { width: 15px; height: 15px; color: var(--navy); }

/* =============================================
   CO ACTIONS
   ============================================= */
.co-actions { margin-top: 8px; }
.co-actions--split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.co-next-btn, .co-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}
.co-next-btn svg, .co-back-btn svg { width: 18px; height: 18px; }

/* =============================================
   ORDER SUMMARY (sticky sidebar)
   ============================================= */
.co-summary { position: sticky; top: 24px; }

.summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.summary-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
}

.summary-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
}
.summary-plan__icon { font-size: 1.8rem; }
.summary-plan__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.summary-plan__info strong { font-size: 15px; color: var(--navy); }
.summary-plan__info span { font-size: 12px; color: var(--muted); }
.summary-plan__price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--slate);
}
.text-green { color: #22C55E; font-weight: 600; }

.summary-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}
.summary-total__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.summary-total__row span { font-size: 15px; font-weight: 600; color: var(--navy); }
.summary-total__row strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
}
.summary-total__sub { font-size: 12px; color: var(--muted); }

.summary-ships {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(255,92,26,.06);
  border: 1px solid rgba(255,92,26,.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--slate);
}
.summary-ships svg { width: 18px; height: 18px; color: var(--orange); flex-shrink: 0; }
.summary-ships strong { color: var(--navy); }

.summary-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.summary-guarantee svg { width: 16px; height: 16px; color: #F59E0B; flex-shrink: 0; margin-top: 1px; }

/* Social proof toast in summary */
.summary-social-proof {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp .5s .8s both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.summary-social-proof img {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.summary-social-proof p { font-size: 13px; color: var(--slate); flex: 1; line-height: 1.4; }
.summary-social-proof strong { color: var(--navy); }
.proof-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* =============================================
   CONFIRMATION PAGE
   ============================================= */
.co-section--confirm {
  text-align: center;
  padding: 60px 40px;
}
.confirm-icon {
  margin: 0 auto 24px;
  width: 80px; height: 80px;
  animation: popIn .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.5); }
  to   { opacity: 1; transform: scale(1); }
}
.confirm-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
}
.confirm-sub {
  font-size: 16px;
  color: var(--slate);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.confirm-next-steps {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}
.confirm-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.confirm-step__num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.confirm-step strong { display: block; font-size: 15px; color: var(--navy); margin-bottom: 4px; }
.confirm-step p { font-size: 14px; color: var(--muted); margin: 0; }
.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Loading state for place order button */
.btn--loading {
  pointer-events: none;
  opacity: .8;
}
.btn--loading .btn-text { display: none; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn--loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
  .co-layout {
    grid-template-columns: 1fr;
  }
  .co-summary {
    position: static;
    order: -1;
  }
  .summary-card { padding: 20px; }
}

@media (max-width: 640px) {
  .co-section { padding: 24px 20px; }
  .form-block { padding: 20px 16px; }
  .form-row { flex-direction: column; gap: 0; }
  .form-row--3 { flex-direction: column; gap: 0; }
  .co-progress__steps { gap: 20px; }
  .co-step span { display: none; }
  .co-actions--split { flex-direction: column-reverse; }
  .co-actions--split .btn { width: 100%; justify-content: center; }
  .co-main { padding: 20px 16px 60px; }
  .trust-row { gap: 16px; flex-wrap: wrap; justify-content: center; }
}
