/* ==========================================================================
   CASTORINNI — CHECKOUT MULTI-STEP STYLES
   Layout de alta conversão, etapas numeradas, resumo fixo e métodos de pagamento.
   ========================================================================== */

.checkout-page-container {
  min-height: 100vh;
  background-color: var(--bg-main, #08080c);
  color: var(--text-main, #e4e4eb);
  padding: 2.5rem 0 5rem 0;
}

.checkout-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.checkout-logo-img {
  width: clamp(140px, 20vw, 210px);
  height: auto;
  max-height: 76px;
  object-fit: contain;
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 3px 16px rgba(212, 175, 55, 0.55)) drop-shadow(0 0 25px rgba(212, 175, 55, 0.25)) brightness(1.16);
  transition: transform 0.3s ease;
}

.checkout-logo-img:hover {
  transform: scale(1.03);
}

/* Indicador de Etapas / Step Indicator */
.checkout-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 620px;
  margin: 0 auto 2.5rem auto;
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
  position: relative;
}

.step-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #14141e;
  border: 1px solid var(--gold-border, rgba(212, 175, 55, 0.25));
  color: #8e95a5;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step-label {
  font-family: var(--font-cinzel, 'Cinzel', serif);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8e95a5;
  font-weight: 600;
}

.step-item.active .step-bubble {
  background: var(--gold-gradient, linear-gradient(135deg, #fced9e 0%, #d4af37 100%));
  color: #08080c;
  border-color: #fced9e;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.step-item.active .step-label {
  color: var(--gold-light, #f5de8c);
}

.step-item.completed .step-bubble {
  background: #34c759;
  border-color: #34c759;
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 -10px 1.4rem -10px;
  z-index: 1;
  transition: background 0.3s ease;
}

.step-line.filled {
  background: var(--gold-primary, #d4af37);
}

/* Layout do Checkout (Formulário + Resumo Fixo) */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: flex-start;
}

.checkout-card {
  background: #11121a;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.5rem;
}

.checkout-card-title {
  font-family: var(--font-serif-title, 'Playfair Display', serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Métodos de Pagamento */
.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-method-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1.2rem 1rem;
  background: #161822;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  user-select: none;
}

.payment-method-card:hover {
  border-color: var(--gold-border, rgba(212, 175, 55, 0.4));
  background: #1c1e2c;
}

.payment-method-card.active {
  border-color: var(--gold-primary, #d4af37);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(13, 23, 15, 0.6) 100%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

.payment-method-icon {
  font-size: 1.75rem;
  color: var(--gold-primary, #d4af37);
}

.payment-method-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.payment-method-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #34c759;
  background: rgba(52, 199, 89, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

/* Resumo do Pedido Fixo */
.order-summary-sticky {
  position: sticky;
  top: 2rem;
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.order-summary-item-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .checkout-card {
    padding: 1.5rem 1.15rem;
  }
}

@media (max-width: 600px) {
  .checkout-page-container {
    padding: 1.5rem 0 3.5rem 0;
  }

  .checkout-stepper {
    max-width: 100%;
    margin-bottom: 1.75rem;
  }

  .step-bubble {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
  }

  .step-label {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }

  .step-line {
    margin: 0 -4px 1.2rem -4px;
  }

  .payment-methods-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .checkout-card {
    padding: 1.25rem 0.95rem;
    border-radius: 10px;
  }

  .checkout-card-title {
    font-size: 1.15rem;
  }
}

/* --- VALIDAÇÃO DE FORMULÁRIOS & CRIAÇÃO DE CONTA DO LEAD --- */
.checkout-input-group {
  margin-bottom: 1.25rem;
  position: relative;
}

.checkout-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.checkout-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--gold-light, #f5de8c);
  font-size: 1.05rem;
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 2;
}

.checkout-luxury-input {
  width: 100%;
  background: #161822;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.8rem 1rem 0.8rem 2.85rem;
  color: #fff;
  font-size: 0.92rem;
  transition: all 0.25s ease;
}

.checkout-luxury-input:focus {
  outline: none;
  border-color: var(--gold-primary, #d4af37);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.3);
  background: #1a1c29;
}

.checkout-luxury-input.is-valid {
  border-color: #34c759 !important;
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.25);
}

.checkout-luxury-input.is-invalid {
  border-color: #ff453a !important;
  box-shadow: 0 0 8px rgba(255, 69, 58, 0.25);
  background: rgba(255, 69, 58, 0.04);
}

.field-error-msg {
  font-size: 0.76rem;
  color: #ff6961;
  margin-top: 0.35rem;
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.field-error-msg.visible {
  display: flex;
}

.field-helper-msg {
  font-size: 0.74rem;
  color: #8e95a5;
  margin-top: 0.3rem;
}

/* Card de Criação de Conta Segura */
.account-creation-box {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.account-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-light, #f5de8c);
}

.account-toggle-label input[type="checkbox"] {
  accent-color: var(--gold-primary, #d4af37);
  width: 18px;
  height: 18px;
  cursor: pointer;
}
