/* ══════════════════════════════════════════════════════════════
   ALLSTORE — CHECKOUT STYLES
══════════════════════════════════════════════════════════════ */

.checkout {
  padding: 120px var(--marge) 80px;
  max-width: 720px;
  margin: 0 auto;
}

/* ── Progress steps ── */
.ck-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}
.ck-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gris);
  padding: 8px 14px;
  letter-spacing: .02em;
  transition: color .3s;
}
.ck-step.active { color: var(--noir); }
.ck-step.done { color: var(--gold2); }
.ck-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg2);
  color: var(--gris);
  flex-shrink: 0;
  transition: all .3s;
}
.ck-step.active .ck-step-num { background: var(--noir); color: #fff; }
.ck-step.done .ck-step-num { background: var(--gold); color: var(--noir); }
.ck-step-line {
  width: 28px;
  height: 1.5px;
  background: rgba(10,25,35,.1);
  flex-shrink: 0;
}
.ck-step.done + .ck-step-line { background: var(--gold); }

/* ── Sections ── */
.ck-section { display: none; }
.ck-section.active { display: block; }

.ck-title {
  font-family: 'Cormorant', serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 300;
  margin: 0 0 8px;
}
.ck-subtitle {
  font-size: 14px;
  color: var(--gris);
  margin: 0 0 28px;
}

/* ── Order summary ── */
.ck-items { margin-bottom: 24px; }
.ck-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(10,25,35,.06);
}
.ck-item:last-child { border-bottom: none; }
.ck-item-img {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--bg2);
  overflow: hidden;
  flex-shrink: 0;
}
.ck-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ck-item-info { flex: 1; }
.ck-item-brand {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gris);
}
.ck-item-name {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
}
.ck-item-price {
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.ck-totals {
  background: var(--bg2);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.ck-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--gris);
}
.ck-total-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--noir);
  border-top: 1.5px solid rgba(10,25,35,.08);
  padding-top: 14px;
  margin-top: 8px;
}

/* ── Form ── */
.ck-form { display: flex; flex-direction: column; gap: 16px; }
.ck-row { display: flex; gap: 12px; }
.ck-row > * { flex: 1; }
.ck-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ck-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gris);
}
.ck-input {
  background: #fff;
  border: 1.5px solid rgba(10,25,35,.1);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: var(--noir);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.ck-input:focus {
  border-color: var(--noir);
  box-shadow: 0 0 0 3px rgba(10,25,35,.06);
}
.ck-input.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231,76,60,.08);
}
.ck-input-error {
  font-size: 11px;
  color: #e74c3c;
  display: none;
}
.ck-input.error + .ck-input-error { display: block; }
select.ck-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%235a6670' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

/* ── Payment method selection ── */
.ck-payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.ck-pay-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 2px solid rgba(10,25,35,.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
}
.ck-pay-option:hover { border-color: rgba(10,25,35,.2); }
.ck-pay-option.selected { border-color: var(--noir); background: rgba(10,25,35,.02); }
.ck-pay-option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(10,25,35,.15);
  flex-shrink: 0;
  position: relative;
  transition: border-color .2s;
}
.ck-pay-option.selected .ck-pay-option-radio {
  border-color: var(--noir);
}
.ck-pay-option.selected .ck-pay-option-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--noir);
}
.ck-pay-option-info { flex: 1; }
.ck-pay-option-title {
  font-size: 15px;
  font-weight: 600;
}
.ck-pay-option-desc {
  font-size: 12px;
  color: var(--gris);
  margin-top: 2px;
}
.ck-pay-option-icons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ck-pay-icon {
  font-size: 10px;
  font-weight: 600;
  color: var(--gris);
  background: var(--bg2);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Stripe card element */
.ck-stripe-container {
  display: none;
  margin-bottom: 24px;
}
.ck-stripe-container.active { display: block; }
#stripe-card-element {
  background: #fff;
  border: 1.5px solid rgba(10,25,35,.1);
  border-radius: 12px;
  padding: 16px;
  transition: border-color .2s;
}
#stripe-card-element.StripeElement--focus {
  border-color: var(--noir);
  box-shadow: 0 0 0 3px rgba(10,25,35,.06);
}
#stripe-card-element.StripeElement--invalid { border-color: #e74c3c; }
.ck-stripe-error {
  font-size: 12px;
  color: #e74c3c;
  margin-top: 8px;
  min-height: 18px;
}

/* Apple Pay / Google Pay container */
.ck-applepay-container {
  display: none;
  margin-bottom: 24px;
}
.ck-applepay-container.active { display: block; }
#payment-request-button {
  height: 50px;
}
.ck-pay-icon-apple {
  display: flex;
  align-items: center;
}

/* ── Promo code ── */
.ck-promo { margin-bottom: 20px; }
.ck-promo-row {
  display: flex;
  gap: 8px;
}
.ck-promo-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 14px;
}
.ck-promo-btn {
  background: var(--bg2);
  border: 1.5px solid rgba(10,25,35,.1);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  color: var(--noir);
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.ck-promo-btn:hover { border-color: var(--noir); background: rgba(10,25,35,.04); }
.ck-promo-msg {
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
}
.ck-promo-msg.success { color: #27ae60; font-weight: 600; }
.ck-promo-msg.error { color: #e74c3c; }
.ck-promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(39,174,96,.06);
  border: 1px solid rgba(39,174,96,.15);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #27ae60;
}
.ck-promo-remove {
  background: none;
  border: none;
  color: var(--gris);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
}
.ck-promo-remove:hover { color: #e74c3c; }

/* ── Buttons ── */
.ck-btn {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ck-btn-primary {
  background: var(--noir);
  color: #fff;
}
.ck-btn-primary:hover { background: #1a3040; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(10,25,35,.12); }
.ck-btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.ck-btn-back {
  background: transparent;
  color: var(--gris);
  border: 1.5px solid rgba(10,25,35,.1);
  margin-top: 10px;
}
.ck-btn-back:hover { border-color: var(--noir); color: var(--noir); }

.ck-btn-pay {
  background: var(--gold);
  color: var(--noir);
  font-size: 16px;
  padding: 20px;
}
.ck-btn-pay:hover { background: #d4af37; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(233,194,67,.25); }
.ck-btn-pay:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Spinner ── */
.ck-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ckSpin .6s linear infinite;
  display: none;
}
.ck-btn.loading .ck-spinner { display: block; }
.ck-btn.loading .ck-btn-text { display: none; }
@keyframes ckSpin { to { transform: rotate(360deg); } }

/* ── Empty cart ── */
.ck-empty {
  text-align: center;
  padding: 80px 20px;
}
.ck-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: .3;
}
.ck-empty p {
  font-size: 16px;
  color: var(--gris);
  margin: 0 0 24px;
}
.ck-empty a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--noir);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}
.ck-empty a:hover { background: #1a3040; }

/* ── Error banner ── */
.ck-error-banner {
  background: rgba(231,76,60,.08);
  border: 1px solid rgba(231,76,60,.2);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 20px;
  display: none;
}
.ck-error-banner.show { display: block; }

/* ── Secure badge ── */
.ck-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--gris);
  margin-top: 16px;
}
.ck-secure svg { width: 14px; height: 14px; stroke: var(--gris); fill: none; stroke-width: 2; }

/* ── Responsive ── */
@media(max-width:768px) {
  .checkout { padding: 80px 18px 120px; }
  .ck-steps { gap: 0; flex-wrap: nowrap; justify-content: center; }
  .ck-step { padding: 6px 8px; font-size: 12px; }
  .ck-step-num { width: 28px; height: 28px; font-size: 12px; }
  .ck-step-line { width: 20px; }
  .ck-title { font-size: 24px; }
  .ck-subtitle { font-size: 14px; }
  .ck-row { flex-direction: column; gap: 14px; }
  .ck-label { font-size: 12px; }
  .ck-input { padding: 16px; font-size: 15px; min-height: 48px; }
  .ck-item-img { width: 64px; height: 64px; border-radius: 12px; }
  .ck-item-name { font-size: 15px; }
  .ck-item-price { font-size: 16px; }
  .ck-pay-option { padding: 18px 20px; }
  .ck-pay-option-title { font-size: 15px; }
  .ck-btn { min-height: 52px; font-size: 15px; }
  .ck-btn-pay { min-height: 56px; font-size: 16px; }
  .ck-secure { font-size: 12px; }
  .ck-step span:not(.ck-step-num) { display: none; }
}
