/* ========================================
   Checkout View
   ======================================== */

.checkout-view {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.checkout-view h1 {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 1.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 28px;
}

/* Steps indicator */
.checkout-steps {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
}

.checkout-step {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #bbb;
  border-bottom: 3px solid #e0e0e0;
  transition: color 0.3s, border-color 0.3s;
}

.checkout-step.active {
  color: #212121;
  border-bottom-color: #212121;
}

.checkout-step.done {
  color: #2E7D32;
  border-bottom-color: #2E7D32;
}

.checkout-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #999;
  font-size: 11px;
  margin-right: 6px;
  vertical-align: middle;
}

.checkout-step.active .checkout-step__num {
  background: #212121;
  color: #fff;
}

.checkout-step.done .checkout-step__num {
  background: #2E7D32;
  color: #fff;
}

/* Content area */
.checkout-content {
  min-height: 300px;
}

/* Shipping step */
.checkout-addresses {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.checkout-address-card {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-address-card:hover { border-color: #999; }
.checkout-address-card.selected { border-color: #212121; }

.checkout-address-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.checkout-address-card.selected .checkout-address-radio {
  border-color: #212121;
}

.checkout-address-card.selected .checkout-address-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #212121;
}

.checkout-address-info {
  flex: 1;
}

.checkout-address-label {
  font-weight: 700;
  font-size: 13px;
}

.checkout-address-detail {
  font-size: 12px;
  color: #757575;
  margin-top: 2px;
}

.checkout-new-address {
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  transition: border-color 0.2s, color 0.2s;
}

.checkout-new-address:hover {
  border-color: #212121;
  color: #212121;
}

/* Address form inline */
.checkout-address-form {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  margin-top: 12px;
}

.checkout-address-form .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.checkout-address-form .form-group {
  flex: 1;
}

.checkout-address-form label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #757575;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.checkout-address-form input,
.checkout-address-form select,
.checkout-address-form textarea {
  width: 100%;
  height: 40px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.checkout-address-form textarea {
  height: 60px;
  padding: 8px 10px;
  resize: vertical;
}

.checkout-address-form input:focus,
.checkout-address-form select:focus {
  border-color: #212121;
}

/* Order summary (payment step) */
.checkout-summary {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.checkout-summary h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkout-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

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

.checkout-summary-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f5f5;
}

.checkout-summary-item-info {
  flex: 1;
}

.checkout-summary-item-name {
  font-size: 13px;
  font-weight: 600;
}

.checkout-summary-item-meta {
  font-size: 11px;
  color: #999;
}

.checkout-summary-item-price {
  font-weight: 700;
  font-size: 14px;
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 2px solid #212121;
  font-size: 16px;
  font-weight: 700;
}

/* Payment method */
.checkout-payment-methods {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}

.checkout-pay-method {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  font-size: 13px;
  font-weight: 600;
}

.checkout-pay-method:hover { border-color: #999; }
.checkout-pay-method.selected { border-color: #212121; }

.checkout-pay-method svg {
  display: block;
  margin: 0 auto 8px;
}

/* Buttons */
.checkout-btn {
  height: 48px;
  padding: 0 32px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.2s;
}

.checkout-btn--primary {
  background: #212121;
  color: #fff;
  width: 100%;
}
.checkout-btn--primary:hover { background: #000; }
.checkout-btn--primary:disabled { background: #ccc; cursor: not-allowed; }

.checkout-btn--back {
  background: none;
  border: 1px solid #e0e0e0;
  color: #757575;
  margin-right: 10px;
}
.checkout-btn--back:hover { background: #f5f5f5; }

.checkout-actions {
  display: flex;
  margin-top: 24px;
}

/* Confirmation */
.checkout-confirmation {
  text-align: center;
  padding: 40px 20px;
}

.checkout-confirmation svg {
  margin-bottom: 16px;
}

.checkout-confirmation h2 {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 1.6rem;
  letter-spacing: 1px;
  margin: 0 0 8px;
  color: #2E7D32;
}

.checkout-confirmation p {
  color: #757575;
  font-size: 14px;
  margin: 4px 0;
}

.checkout-confirmation-order {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 12px 20px;
  display: inline-block;
  margin: 16px 0;
  font-size: 14px;
}

.checkout-confirmation-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.checkout-confirmation-links a {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.checkout-confirmation-links .btn-primary {
  background: #212121;
  color: #fff;
}

.checkout-confirmation-links .btn-outline {
  border: 1px solid #e0e0e0;
  color: #757575;
}

/* Payment Modal (iframe) */
.payment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.payment-modal-overlay.visible { opacity: 1; }

.payment-modal {
  background: #fff;
  border-radius: 14px;
  width: 95%;
  max-width: 520px;
  height: 85vh;
  max-height: 750px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.payment-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 600;
}

.payment-modal__close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #999;
  padding: 0 4px;
  line-height: 1;
}
.payment-modal__close:hover { color: #333; }

.payment-modal__iframe {
  flex: 1;
  border: none;
  width: 100%;
}

.payment-modal__footer {
  padding: 12px 18px;
  border-top: 1px solid #eee;
  text-align: center;
}

.payment-modal__done {
  background: #2E7D32;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.payment-modal__done:hover { background: #1B5E20; }

/* Mobile */
@media (max-width: 600px) {
  .checkout-address-form .form-row { flex-direction: column; gap: 8px; }
  .checkout-payment-methods { flex-direction: column; }
  .checkout-actions { flex-direction: column-reverse; gap: 8px; }
  .checkout-btn--back { margin-right: 0; }
  .checkout-confirmation-links { flex-direction: column; }
  .payment-modal { width: 100%; height: 100vh; max-height: none; border-radius: 0; }
}
