/* ===== CHECKOUT PAGE ===== */
.checkout-page {
  padding: 100px 5% 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.checkout-header {
  margin-bottom: 48px;
}
.checkout-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  margin-bottom: 24px;
  letter-spacing: 1px;
}
.checkout-header h1 span { color: var(--gold); font-style: italic; }

/* Steps */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  white-space: nowrap;
}
.step.active { opacity: 1; }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.step.active .step-num { background: var(--gold); color: #08080f; border-color: var(--gold); }
.step.done .step-num { background: var(--success); color: white; border-color: var(--success); }
.step span { font-size: 0.75rem; color: var(--text-muted); }
.step.active span { color: var(--gold); }
.step-line {
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 22px;
}

/* Layout */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* Form area */
.checkout-form-area { display: flex; flex-direction: column; gap: 24px; }
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px;
}
.form-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

/* Delivery options */
.delivery-options { display: flex; flex-direction: column; gap: 10px; }
.delivery-option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.delivery-option:has(input:checked) { border-color: var(--gold); background: rgba(197,160,80,0.04); }
.delivery-option input { accent-color: var(--gold); flex-shrink: 0; }
.delivery-content { flex: 1; }
.delivery-name { font-weight: 600; font-size: 0.9rem; }
.delivery-time { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.delivery-price { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: var(--gold); white-space: nowrap; }

/* Promo */
.promo-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.promo-field {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.promo-field:focus { border-color: var(--gold); }

/* Order summary */
.order-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  position: sticky;
  top: 90px;
}
.summary-divider { height: 1px; background: var(--border); margin: 16px 0; }
.summary-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.summary-row.total {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.summary-row.total span:last-child { color: var(--gold); }

/* Trust badges */
.trust-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.trust-item {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 10px;
}

/* Success modal */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.success-modal {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 48px 40px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  animation: fadeUp 0.4s ease;
}
.success-icon { font-size: 4rem; margin-bottom: 16px; display: block; }
.success-modal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 12px;
  color: var(--gold);
}
.success-modal p { color: var(--text-muted); line-height: 1.6; }
.order-ref {
  background: var(--bg);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 12px;
  margin: 16px 0;
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* Summary items */
.summary-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.summary-item:last-child { border-bottom: none; }
.summary-item-emoji {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.summary-item-details { flex: 1; min-width: 0; }
.summary-item-name { font-size: 0.82rem; font-weight: 500; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-item-qty { font-size: 0.75rem; color: var(--text-muted); }
.summary-item-price { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: var(--gold); white-space: nowrap; }

/* ── Checkout Responsive ── */
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  /* Move summary above form on mobile for UX */
}

@media (max-width: 768px) {
  .checkout-page { padding: 80px 4% 60px; }
  .form-section { padding: 20px; }
  .checkout-header { margin-bottom: 32px; }
}

@media (max-width: 600px) {
  .checkout-page { padding: 72px 4% 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .checkout-steps { gap: 0; }
  .step span { font-size: 0.65rem; }
  .step-num { width: 28px; height: 28px; font-size: 0.78rem; }
  .step-line { min-width: 12px; }
  .promo-row { flex-direction: column; align-items: stretch; }
  .promo-row .btn-primary { justify-content: center; }
  .delivery-option { flex-wrap: wrap; gap: 8px; }
  .delivery-price { width: 100%; text-align: right; }
  .success-modal { padding: 32px 20px; }
  .success-modal h2 { font-size: 1.6rem; }
  .trust-badges { justify-content: center; }
}
