/* ==========================================================================
   LYRIS COSMÉTICOS — CHECKOUT ULTRA LEVE & MODERNO (v2.0)
   Design minimalista, inputs elegantes e responsivos (Mobile-First)
   ========================================================================== */

/* Reset & Backdrop */
#directCheckoutModal {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: 540px;
  width: 92%;
  box-shadow: 0 25px 60px -15px rgba(26, 28, 25, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06);
  background: #ffffff;
  color: #1a1c19;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

#directCheckoutModal::backdrop {
  background: rgba(18, 20, 18, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.checkout-modal-wrapper {
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 22px 28px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  box-sizing: border-box;
}

/* Botão Fechar */
.checkout-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.checkout-close-btn:hover {
  background: #f3f4f6;
  color: #111827;
  transform: scale(1.05);
}

/* Header do Checkout */
.checkout-header {
  border-bottom: 1px solid #f1f3f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
  padding-right: 36px;
}
.checkout-badge-top {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  color: #8d584b;
  margin-bottom: 4px;
}
.checkout-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: #1a1c19;
  margin: 0 0 10px 0;
  line-height: 1.2;
}
.checkout-pricing-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf8f5;
  border: 1px solid #ede8e1;
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 6px;
}
.checkout-pricing-pill .total-label {
  font-size: 12px;
  color: #6b7280;
}
.checkout-pricing-pill .total-value {
  font-size: 20px;
  font-weight: 700;
  color: #1a1c19;
  display: block;
}
.checkout-shipping-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
}

/* Seções do Formulário */
.checkout-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b5563;
  margin: 20px 0 12px;
}
.checkout-section-heading .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1a1c19;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Grid & Grupos de Inputs */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.checkout-col-full {
  grid-column: 1 / -1;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}
.checkout-field label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.checkout-field label small {
  font-weight: 400;
  color: #8d584b;
}

.checkout-field input,
.checkout-field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
}
.checkout-field input:focus,
.checkout-field select:focus {
  border-color: #8d584b;
  box-shadow: 0 0 0 3px rgba(141, 88, 75, 0.15);
}
.checkout-field input::placeholder {
  color: #9ca3af;
  font-size: 13.5px;
}

/* Card Inteligente de Endereço Automático (ViaCEP) */
.address-auto-card {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 6px 0 10px;
  font-size: 12.5px;
  color: #334155;
  transition: all 0.2s ease;
}
.address-auto-card.found {
  display: flex;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
}
.address-auto-card .addr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.address-auto-card .addr-logr {
  font-weight: 700;
  font-size: 13px;
}
.address-auto-card .addr-bairro {
  font-size: 11.5px;
  opacity: 0.85;
}
.btn-toggle-manual-addr {
  background: transparent;
  border: none;
  color: #8d584b;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

/* Seletor de Métodos de Pagamento em Cards */
.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
@media (max-width: 480px) {
  .payment-methods-grid {
    grid-template-columns: 1fr;
  }
}

.pay-card-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 8px;
  background: #fafaf9;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.pay-card-choice:hover {
  border-color: #d1d5db;
  background: #f5f5f4;
}
.pay-card-choice.active {
  background: #fdfaf8;
  border-color: #8d584b;
  box-shadow: 0 0 0 2px rgba(141, 88, 75, 0.2);
}
.pay-card-choice .icon-wrap {
  font-size: 20px;
  margin-bottom: 4px;
}
.pay-card-choice .title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1f2937;
  display: block;
}
.pay-card-choice .sub {
  font-size: 10.5px;
  color: #6b7280;
  margin-top: 2px;
  display: block;
  line-height: 1.2;
}

/* Box de Cartão de Crédito */
.card-box-inner {
  background: #fafaf9;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
}

/* Aviso de Boleto */
.boleto-notice-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
  margin-top: 10px;
}

/* Botão de Finalização Principal */
.btn-finish-order {
  width: 100%;
  background: #1a1c19;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-top: 20px;
  box-shadow: 0 4px 14px rgba(26, 28, 25, 0.2);
}
.btn-finish-order:hover {
  background: #2d312c;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 28, 25, 0.3);
}
.btn-finish-order:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.checkout-security-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 12px;
}
