/* Paupelus - Modal de Checkout / Despacho en 2 Pasos */

.checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 13, 0.92);
  backdrop-filter: blur(12px);
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.checkout-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.checkout-modal-content {
  position: relative;
  max-width: 580px;
  width: 100%;
  max-height: 92vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow-y: auto;
  padding: 2.2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  animation: checkoutFadeIn 0.3s ease forwards;
}

@keyframes checkoutFadeIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.checkout-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}

.checkout-close-btn:hover {
  background: var(--gold-primary);
  color: #0c0b0f;
  transform: rotate(90deg);
}

.checkout-header {
  margin-bottom: 1.8rem;
}

.checkout-steps-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.step-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.step-badge.active {
  color: #0c0b0f;
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(230, 200, 135, 0.35);
}

.step-separator {
  color: var(--gold-dark);
  font-size: 1rem;
}

.checkout-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: #ffffff;
  margin-bottom: 0.3rem;
  font-weight: 400;
}

.checkout-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.checkout-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-bottom: 1.4rem;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.checkout-field.full-width {
  grid-column: 1 / -1;
}

.checkout-field label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 500;
}

.checkout-input {
  width: 100%;
  background: #100f16;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.checkout-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(230, 200, 135, 0.12);
}

.checkout-input::placeholder {
  color: rgba(166, 163, 178, 0.5);
  font-size: 0.85rem;
}

.checkout-error-msg {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  background: rgba(235, 87, 87, 0.15);
  border: 1px solid rgba(235, 87, 87, 0.4);
  color: #ff8585;
  margin-bottom: 1.2rem;
}

.checkout-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .checkout-modal-content {
    padding: 1.6rem 1.2rem;
    border-radius: 16px;
  }

  .checkout-form-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .checkout-field.full-width {
    grid-column: 1;
  }

  .checkout-actions {
    flex-direction: column-reverse;
    gap: 0.8rem;
  }

  .checkout-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* PASO 2 - Resumen, Checkbox, Select y Métodos de Pago */

.checkout-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #14121b;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  margin-bottom: 1.2rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: center;
}

.summary-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.summary-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-sans);
}

.summary-value.highlight-gold {
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(230, 200, 135, 0.25);
}

.summary-divider {
  width: 1px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
}

.checkout-pay-all-wrap {
  background: rgba(230, 200, 135, 0.04);
  border: 1px dashed rgba(230, 200, 135, 0.25);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
}

.checkout-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-main);
}

.checkout-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gold-primary);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: grid;
  place-content: center;
  transition: all 0.2s ease;
}

.checkout-checkbox:checked {
  background: var(--gold-primary);
}

.checkout-checkbox:checked::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #0c0b0f;
  border-bottom: 2px solid #0c0b0f;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkout-select {
  width: 100%;
  background: #100f16;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.78rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.checkout-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(230, 200, 135, 0.12);
}

.checkout-select option {
  background: #15131e;
  color: #ffffff;
}

.payment-method-box {
  margin-top: 1.4rem;
  padding: 1.3rem;
  background: #121018;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  animation: checkoutFadeIn 0.3s ease forwards;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.checkout-qr-img {
  max-width: 210px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 2px solid rgba(230, 200, 135, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  background: #ffffff;
  padding: 6px;
}

.checkout-transfer-text {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.checkout-transfer-text strong {
  color: var(--gold-light);
  font-weight: 600;
}

.checkout-credit-card-notice {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(230, 200, 135, 0.06);
  border: 1px solid rgba(230, 200, 135, 0.2);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 0.5rem;
}

.checkout-credit-card-notice .notice-icon {
  color: var(--gold-primary);
  flex-shrink: 0;
}

.credit-card-text {
  font-size: 0.93rem;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

