/* Course checkout page (checkouts/course.php). Mobile-first; two columns from 900px.
   Tokens match assets/css/course-styles.css: Segoe UI, #f8fafc page, white 16px cards,
   #2563eb action blue, 12px buttons. */
.ck-body { margin: 0; background: #f8fafc; color: #0f172a; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; line-height: 1.5; }
.ck-body *, .ck-body *::before, .ck-body *::after { box-sizing: border-box; }
.ck-body [hidden] { display: none !important; }
.ck-body a { color: #2563eb; text-decoration: none; }
.ck-body a:hover { color: #1d4ed8; }

/* Header */
.ck-top { height: 56px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; position: sticky; top: 0; z-index: 5; }
.ck-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .5px; color: #0f172a; font-size: 15px; }
.ck-brand img { width: 24px; height: 24px; border-radius: 6px; }
.ck-top-right { display: flex; align-items: center; gap: 14px; }
.ck-back { display: none; align-items: center; gap: 6px; font-size: 14px; color: #64748b; }
.ck-back:hover { color: #0f172a; }
.ck-secure { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }

/* Layout */
.ck-wrap { max-width: 1120px; margin: 0 auto; padding: 16px 16px 40px; }
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ck-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.ck-paycol { display: flex; flex-direction: column; gap: 14px; }

/* Summary */
.ck-summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ck-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #2563eb; margin-bottom: 4px; }
.ck-title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; color: #0f172a; text-wrap: balance; }
.ck-price { font-size: 22px; font-weight: 800; white-space: nowrap; color: #0f172a; }
.ck-subtitle { margin: 8px 0 0; font-size: 14px; color: #64748b; line-height: 1.45; }
.ck-desc { margin: 8px 0 0; font-size: 14px; color: #475569; line-height: 1.55; }
.ck-includes-heading { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.ck-includes-heading + .ck-outline { margin-top: 8px; padding-top: 0; border-top: 0; }
.ck-learn-top { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.ck-learn-top .ck-h2 { margin-bottom: 2px; }
.ck-outline { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 6px; }
.ck-outline li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: #334155; line-height: 1.4; }
.ck-outline li svg { flex-shrink: 0; margin-top: 2px; color: #2563eb; stroke-width: 2.4; }
.ck-outline strong { color: #0f172a; }
.ck-dates { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.ck-date { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: #334155; }
.ck-date svg { color: #2563eb; flex-shrink: 0; }
.ck-date strong { color: #0f172a; }
.ck-date-when { font-weight: 600; color: #0f172a; }
.ck-stock { align-self: flex-start; border-radius: 999px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; font-size: 12px; font-weight: 700; padding: 3px 10px; margin-top: 4px; }

/* Payment */
.ck-pay { padding: 12px 12px 14px; }
.ck-stripe { min-height: 0; }
.ck-stripe.is-mounted { min-height: 420px; }
.ck-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 260px; color: #64748b; font-size: 14px; }
.ck-loading p { margin: 0; }
.ck-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #e2e8f0; border-top-color: #2563eb; animation: ck-spin .8s linear infinite; }
@keyframes ck-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ck-spinner { animation: none; } }
.ck-fallback { text-align: center; padding: 20px 8px; color: #475569; font-size: 14px; }
.ck-fallback p { margin: 0 0 12px; }
.ck-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; border-radius: 12px; background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%); color: #fff !important; font-weight: 700; font-size: 16px; box-shadow: 0 4px 20px rgba(37,99,235,.25); width: 100%; }
.ck-btn:hover { background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%); }
.ck-powered { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 10px 0 0; font-size: 11px; color: #64748b; }

/* Guarantee */
.ck-guarantee { background: #fefce8; border-color: #fde68a; padding: 16px 18px; }
.ck-guarantee-head { display: flex; align-items: center; gap: 12px; }
.ck-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid #fde68a; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ck-guarantee-title { font-size: 15px; font-weight: 800; line-height: 1.3; }
.ck-guarantee-quote { margin: 8px 0; font-size: 13.5px; font-style: italic; color: #475569; line-height: 1.6; }
.ck-guarantee-sig { font-size: 12px; font-weight: 700; color: #2563eb; }

/* Info */
.ck-info { display: flex; flex-direction: column; gap: 14px; }
.ck-h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.ck-h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.ck-learn { display: flex; flex-direction: column; gap: 12px; }
.ck-learn-row { display: flex; gap: 12px; align-items: flex-start; }
.ck-learn-icon { width: 38px; height: 38px; border-radius: 10px; background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ck-learn-title { font-weight: 700; font-size: 15px; }
.ck-learn-body { font-size: 14px; color: #475569; line-height: 1.5; margin-top: 2px; }
.ck-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ck-panel { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: #475569; }
.ck-panel p { margin: 0; line-height: 1.55; }
.ck-row { display: flex; gap: 10px; align-items: center; color: #334155; padding: 3px 0; }
.ck-row-icon { display: flex; color: #2563eb; flex-shrink: 0; }
.ck-contact { margin-top: 8px; font-size: 13px; color: #64748b; }

/* Error */
.ck-error { max-width: 560px; margin: 24px auto; text-align: center; padding: 28px 20px; }
.ck-error h1 { margin: 0 0 8px; font-size: 22px; }
.ck-error p { color: #475569; }
.ck-error .ck-btn { width: auto; margin-top: 8px; }
.ck-muted { font-size: 13px; color: #64748b; margin-top: 16px; }

/* Two columns from 900px: summary + info on the left, payment + guarantee sticky on the right */
@media (min-width: 900px) {
  .ck-top { height: 64px; padding: 0 32px; }
  .ck-brand { font-size: 16px; }
  .ck-brand img { width: 28px; height: 28px; }
  .ck-back { display: inline-flex; }
  .ck-wrap { padding: 32px 32px 56px; }
  .ck-grid { grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: auto 1fr; gap: 24px 32px; align-items: start; }
  .ck-summary { grid-column: 1; grid-row: 1; }
  .ck-info { grid-column: 1; grid-row: 2; }
  .ck-paycol { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 88px; }
  .ck-card { padding: 24px; }
  .ck-title { font-size: 28px; }
  .ck-price { font-size: 26px; }
  .ck-subtitle { font-size: 16px; }
  .ck-desc { font-size: 15px; }
  .ck-outline li, .ck-date { font-size: 14.5px; }
  .ck-pay { padding: 16px; }
  .ck-guarantee { padding: 20px 22px; }
  .ck-guarantee-title { font-size: 16px; }
  .ck-avatar { width: 64px; height: 64px; }
  .ck-guarantee-quote { font-size: 14px; }
  .ck-h2 { font-size: 18px; }
  .ck-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
