/* ── CHECKOUT PAGE ─────────────────────────────────────────────── */

.checkout-page {
  background: #F7F6FB;
  min-height: 100vh;
}

/* Breadcrumb */
.ck-breadcrumb {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 0;
  font-size: 0.85rem;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ck-breadcrumb a {
  color: #9CA3AF;
  text-decoration: none;
}

.ck-breadcrumb a:hover { color: #6B7280; }

.ck-breadcrumb-sep { opacity: 0.5; }

.ck-breadcrumb-current {
  color: #1A1A1A;
  font-weight: 600;
}

/* Page title */
.ck-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px 32px;
}

.ck-page-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1A1A1A;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.ck-page-sub {
  font-size: 0.88rem;
  color: #6B7280;
  margin: 0;
}

/* Main layout */
.ck-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

/* Form sections */
.ck-section {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #E9E7F0;
  padding: 28px;
  margin-bottom: 20px;
}

.ck-section:last-child { margin-bottom: 0; }

.ck-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 24px;
}

.ck-section-heading svg {
  width: 18px;
  height: 18px;
  color: #7C2D12;
  flex-shrink: 0;
}

/* Form fields */
.ck-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.ck-row:last-child { margin-bottom: 0; }

.ck-field {
  margin-bottom: 16px;
}

.ck-field:last-child { margin-bottom: 0; }

.ck-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}

.ck-label-opt {
  font-weight: 400;
  color: #9CA3AF;
  font-size: 0.78rem;
  margin-left: 4px;
}

.ck-input,
.ck-select {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.93rem;
  color: #1A1A1A;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.ck-input:focus,
.ck-select:focus {
  border-color: #7C2D12;
}

.ck-input::placeholder { color: #9CA3AF; }

.ck-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  color: #1A1A1A;
}

/* Card input with lock icon */
.ck-card-wrap {
  position: relative;
}

.ck-card-wrap .ck-input {
  padding-right: 42px;
  letter-spacing: 0.06em;
  font-family: 'Courier New', monospace;
}

.ck-card-lock {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
}

.ck-card-lock svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ── Summary sidebar ── */
.ck-summary {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #E9E7F0;
  padding: 28px;
  position: sticky;
  top: 100px;
}

.ck-summary-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1A1A1A;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.ck-summary-plan-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 2px;
}

.ck-summary-billing {
  font-size: 0.82rem;
  color: #9CA3AF;
  margin: 0 0 16px;
}

.ck-summary-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1A1A1A;
  white-space: nowrap;
}

.ck-summary-plan-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* Summary features */
.ck-summary-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ck-summary-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #374151;
}

.ck-summary-feature svg {
  width: 15px;
  height: 15px;
  color: #B45309;
  flex-shrink: 0;
}

/* Totals */
.ck-totals {
  border-top: 1px solid #F3F4F6;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.ck-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #6B7280;
}

.ck-total-row.ck-grand {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1A1A1A;
  padding-top: 10px;
  border-top: 1px solid #F3F4F6;
}

/* Pay button */
.ck-pay-btn {
  width: 100%;
  background: #7C2D12;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.18s;
  margin-bottom: 12px;
}

.ck-pay-btn:hover { opacity: 0.88; }
.ck-pay-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.ck-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #9CA3AF;
}

.ck-secure-note svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ── Payment success modal ── */
.ck-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ck-success-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ck-success-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 44px 40px 40px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ck-success-overlay.open .ck-success-card {
  transform: translateY(0) scale(1);
}

.ck-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #D1FAE5;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}

.ck-success-icon svg {
  width: 28px;
  height: 28px;
  color: #10B981;
}

.ck-success-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1A1A1A;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

.ck-success-body {
  font-size: 0.93rem;
  color: #6B7280;
  line-height: 1.65;
  margin: 0 0 28px;
}

.ck-success-plan-box {
  background: #F9F8FF;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.ck-success-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #374151;
  padding: 6px 0;
  border-bottom: 1px solid #EEE;
}

.ck-success-plan-row:last-child { border-bottom: none; }

.ck-success-plan-key { color: #6B7280; }

.ck-success-plan-val { font-weight: 700; color: #1A1A1A; }

.ck-success-plan-val.active { color: #10B981; }

.ck-success-plan-val.active::before {
  content: '● ';
  font-size: 0.65em;
}

.ck-success-note {
  font-size: 0.85rem;
  color: #9CA3AF;
  line-height: 1.6;
  margin: 0;
}

/* Responsive */
@media (max-width: 820px) {
  .ck-main {
    grid-template-columns: 1fr;
  }

  .ck-summary {
    position: static;
    order: -1;
  }
}

@media (max-width: 540px) {
  .ck-row { grid-template-columns: 1fr; }
  .ck-section { padding: 20px; }
  .ck-summary { padding: 20px; }
  .ck-success-card { padding: 32px 24px 28px; }
}
