/* ============================================================
   CHECKOUT + ORDER CONFIRMATION — Styles
   ============================================================ */

.checkout-page { padding-top: var(--nav-height); background: var(--cream); min-height: 100vh; }

/* ── Progress Steps ── */
.checkout-progress {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-md) 0;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-light);
  font-weight: 500;
}

.progress-step.active { color: var(--brown); font-weight: 600; }
.progress-step.done   { color: var(--success); }

.progress-step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}

.progress-step.active .progress-step-num {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--white);
}

.progress-step.done .progress-step-num {
  border-color: var(--success);
  background: var(--success);
  color: var(--white);
}

.progress-step-label { display: none; }

.progress-line {
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 var(--space-sm);
}

.progress-line.done { background: var(--success); }

/* ── Checkout Layout ── */
.checkout-body { padding: var(--space-xl) 0 var(--space-3xl); }

.checkout-layout {
  display: grid;
  gap: var(--space-xl);
}

/* ── Section Card ── */
.checkout-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.checkout-card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.checkout-step-badge {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--gold);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-card-header h2 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--brown);
  font-weight: 600;
}

.checkout-card-body { padding: var(--space-lg); }

/* ── Form Fields ── */
.form-row {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brown);
}

.form-label .required { color: var(--gold); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-sans);
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,135,15,0.12);
}

.form-input.error { border-color: var(--error); }
.form-input.valid { border-color: var(--success); }

.form-input::placeholder { color: var(--text-light); }

.form-error {
  font-size: 0.8125rem;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235C4433' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Delivery Methods ── */
.delivery-methods { display: flex; flex-direction: column; gap: var(--space-sm); }

.delivery-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
  position: relative;
}

.delivery-option:hover { border-color: var(--gold-light); }

.delivery-option.selected {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.delivery-option input[type="radio"] { display: none; }

.delivery-option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all var(--transition);
}

.delivery-option.selected .delivery-option-radio {
  border-color: var(--gold);
  background: var(--gold);
}

.delivery-option.selected .delivery-option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: var(--radius-full);
}

.delivery-option-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.delivery-option-body { flex: 1; }

.delivery-option-title {
  font-weight: 600;
  color: var(--brown);
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.delivery-option-desc {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.delivery-option-price {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--brown);
  font-size: 1rem;
  white-space: nowrap;
  align-self: center;
}

.delivery-option-price.free { color: var(--success); }

/* Econt details sub-form */
.econt-details {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  display: none;
}
.econt-details.visible { display: block; }

.econt-calc-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: var(--space-sm);
}

.econt-calc-btn:hover { background: var(--gold); color: var(--white); }

.econt-price-result {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--cream);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-mid);
}

.econt-price-result.visible { display: flex; }
.econt-price-val { font-weight: 700; color: var(--brown); font-family: var(--font-serif); }

/* ── Payment Methods ── */
.payment-methods { display: flex; flex-direction: column; gap: var(--space-sm); }

.payment-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
}

.payment-option:hover { border-color: var(--gold-light); }
.payment-option.selected { border-color: var(--gold); background: var(--gold-bg); }
.payment-option input[type="radio"] { display: none; }

.payment-option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.payment-option.selected .payment-option-radio {
  border-color: var(--gold);
  background: var(--gold);
}

.payment-option.selected .payment-option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: var(--radius-full);
}

.payment-option-icon { font-size: 1.5rem; flex-shrink: 0; }

.payment-option-body { flex: 1; }

.payment-option-title {
  font-weight: 600;
  color: var(--brown);
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.payment-option-desc { font-size: 0.8125rem; color: var(--text-light); }

.payment-option-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.payment-card-badge {
  background: var(--cream-mid);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-mid);
}

/* Stripe card element container */
.stripe-card-wrap {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  display: none;
}

.stripe-card-wrap.visible { display: block; }

#stripeCardElement {
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color var(--transition);
}

#stripeCardElement.StripeElement--focus { border-color: var(--gold); }
#stripeCardElement.StripeElement--invalid { border-color: var(--error); }

.stripe-secure-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: var(--space-sm);
}

.stripe-secure-note svg { width: 14px; height: 14px; color: var(--success); }

/* ── Promo Code ── */
.promo-code-form {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.promo-input {
  flex: 1;
  min-width: 140px;
  padding: 0.65rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: border-color var(--transition);
  font-family: var(--font-sans);
}

.promo-input:focus { border-color: var(--gold); }
.promo-input::placeholder { text-transform: none; letter-spacing: 0; }

.promo-result {
  font-size: 0.875rem;
  margin-top: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  display: none;
}

.promo-result.success { background: #D1FAE5; color: var(--success); display: block; }
.promo-result.error   { background: #FEE2E2; color: var(--error);   display: block; }

/* ── Order Summary (sidebar) ── */
.order-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
  overflow: hidden;
}

.order-summary-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-summary-header h3 {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  color: var(--brown);
}

.order-toggle-items {
  font-size: 0.8125rem;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.order-items { padding: var(--space-md) var(--space-lg); }

.order-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.order-item:last-child { border-bottom: none; }

.order-item-img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
}

.order-item-qty {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: var(--brown);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-item-info { flex: 1; min-width: 0; }

.order-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-item-variant { font-size: 0.8125rem; color: var(--text-light); }

.order-item-price {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
  align-self: center;
}

/* Summary totals */
.order-totals { padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--border-light); }

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  font-size: 0.9375rem;
  color: var(--text-mid);
}

.order-total-row.discount { color: var(--success); }

.order-total-row.shipping { }

.order-total-divider { height: 1px; background: var(--border-light); margin: var(--space-sm) 0; }

.order-total-final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.order-total-final span:first-child {
  font-weight: 700;
  color: var(--brown);
  font-size: 1rem;
}

.order-total-final .total-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown);
}

.order-vat-note {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 2px;
}

/* Submit button */
.order-submit-wrap {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.order-submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.order-submit-btn:hover {
  background: var(--amber-dark);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.order-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.order-submit-btn svg { width: 20px; height: 20px; }

.order-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: var(--space-sm);
  text-align: center;
}

.order-secure-note svg { width: 14px; height: 14px; color: var(--success); }

/* ── Empty Cart State ── */
.checkout-empty {
  text-align: center;
  padding: var(--space-4xl) 0;
}

.checkout-empty-icon { font-size: 4rem; margin-bottom: var(--space-lg); }

.checkout-empty h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--brown);
  margin-bottom: var(--space-sm);
}

.checkout-empty p { color: var(--text-light); margin-bottom: var(--space-xl); }

/* ── Responsive ── */
@media (min-width: 480px) {
  .progress-step-label { display: inline; }
}

@media (min-width: 768px) {
  .checkout-layout {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
}

/* ════════════════════════════════════════════════
   ORDER CONFIRMATION
   ════════════════════════════════════════════════ */

.confirmation-page {
  padding-top: var(--nav-height);
  background: var(--cream);
  min-height: 100vh;
}

.confirmation-hero {
  background: linear-gradient(135deg, var(--olive) 0%, var(--olive-light) 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.confirmation-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50V18L28 2l28 16v32L28 66zm0-6l22-12.7V18.7L28 6 6 18.7v28.6L28 60z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 40px 71px;
  opacity: 0.05;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: 2.5rem;
  position: relative;
}

.confirmation-icon::after {
  content: '✓';
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  background: var(--success);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid var(--cream);
}

.confirmation-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.confirmation-hero p {
  color: rgba(255,255,255,0.80);
  font-size: 1rem;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.7;
}

.confirmation-body { padding: var(--space-2xl) 0 var(--space-3xl); }

.confirmation-layout {
  display: grid;
  gap: var(--space-xl);
  max-width: 780px;
  margin: 0 auto;
}

.confirmation-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.confirmation-card-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  background: var(--cream);
}

.confirmation-card-header h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--brown);
}

.confirmation-card-body { padding: var(--space-lg); }

.order-number-box {
  background: var(--gold-pale);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.order-number-label { font-size: 0.875rem; color: var(--text-mid); }

.order-number-value {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--amber-dark);
  letter-spacing: 0.05em;
}

.confirmation-details-grid {
  display: grid;
  gap: var(--space-md);
}

.confirmation-detail {
  display: flex;
  gap: var(--space-sm);
}

.confirmation-detail-icon {
  width: 36px;
  height: 36px;
  background: var(--gold-pale);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

.confirmation-detail-icon svg { width: 16px; height: 16px; }

.confirmation-detail-label { font-size: 0.8125rem; color: var(--text-light); }

.confirmation-detail-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brown);
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-xl);
}

@media (min-width: 640px) {
  .confirmation-details-grid { grid-template-columns: repeat(2, 1fr); }
}
