/* Layout específico de comprar.html */

/* ---------------------------------------------------------------- */
/* Hero */
/* ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(60% 60% at 50% 0%, var(--color-navy-700) 0%, var(--color-navy-900) 55%, var(--color-navy-950) 100%);
  color: var(--color-white);
  padding-block: 56px 64px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.4;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  padding-inline: 20px;
}

.hero__logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
}

/*
 * O headline muda se houver promoção, e isso só se sabe quando /appProducts responde. Até lá o
 * texto fica invisível (ocupando espaço) e um skeleton aparece por cima; sem resposta em 2,5 s,
 * o skeleton some e o texto padrão aparece.
 */
.hero__headline {
  position: relative;
}

.hero-skeleton {
  display: none;
}

.hero__headline[data-pending] .hero__title,
.hero__headline[data-pending] .hero__copy {
  visibility: hidden;
  animation: hero-fallback-show 0s 2.5s forwards;
}

.hero__headline[data-pending] .hero-skeleton {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: hero-fallback-hide 0s 2.5s forwards;
}

.hero-skeleton__bar {
  width: 70%;
  max-width: 520px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgb(255 255 255 / 0.1) 25%, rgb(255 255 255 / 0.2) 37%, rgb(255 255 255 / 0.1) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.hero-skeleton__bar--title {
  margin-bottom: 6px;
}

.hero-skeleton__bar--copy {
  width: 90%;
  max-width: 640px;
  height: 14px;
}

.hero-skeleton__bar--short {
  width: 55%;
}

@keyframes hero-fallback-show {
  to {
    visibility: visible;
  }
}

@keyframes hero-fallback-hide {
  to {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-skeleton__bar {
    animation: none;
  }
}

.hero__title {
  font-size: 28px;
  line-height: 1.2;
  color: var(--color-white);
  margin-bottom: 10px;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: 34px;
  }
}

.hero__copy {
  font-size: 17px;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.9);
}

.hero__copy strong {
  color: var(--color-white);
}

.hero .plan-grid {
  margin-top: 40px;
  text-align: left;
}

.hero .alert {
  text-align: left;
  margin-top: 16px;
}

/* Botões alinhados na base, mesmo com o "De: R$" a mais nos planos com desconto */
.plan-card .btn {
  margin-top: auto;
}

/* Falha ao carregar os planos */
.products-error {
  margin-top: 40px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background-color: rgb(255 255 255 / 0.08);
  color: rgb(255 255 255 / 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}

/* Plano escolhido no checkout */
.plan-card--selected {
  outline: 3px solid var(--color-mint-500);
  outline-offset: -3px;
}

/* ---------------------------------------------------------------- */
/* Checkout (formulário de cadastro/pagamento) */
/* ---------------------------------------------------------------- */
.checkout__card {
  max-width: 560px;
  margin-inline: auto;
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 24px;
}

@media (min-width: 640px) {
  .checkout__card {
    padding: 40px;
  }
}

.checkout__group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy-800);
  margin-block: 24px 12px;
}

.checkout__group-title:first-child {
  margin-top: 0;
}

.checkout__link {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-sky-600);
  text-decoration: underline;
  cursor: pointer;
}

/* Forma de pagamento: cards de rádio */
.payment-options {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  gap: 10px;
}

.payment-options.form-field--error .payment-option {
  border-color: var(--color-action-red-600);
}

.payment-options legend {
  padding: 0;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-cloud-200);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.payment-option:hover {
  border-color: var(--color-sky-500);
}

.payment-option:has(.payment-option__input:checked) {
  border-color: var(--color-sky-500);
  background-color: rgb(28 127 189 / 0.06);
}

.payment-option:has(.payment-option__input:focus-visible) {
  box-shadow: 0 0 0 3px rgb(28 127 189 / 0.25);
}

.payment-option__input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-sky-600);
}

.payment-option__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-option__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy-900);
}

.payment-option__hint {
  font-size: 13px;
  color: rgb(17 37 70 / 0.65);
}

.checkout__card-fields {
  margin-top: 16px;
}

.form-field__hint,
.form-field__error {
  font-size: 13px;
  line-height: 1.4;
}

.form-field__hint {
  color: rgb(17 37 70 / 0.65);
}

.form-field__optional {
  font-weight: 400;
  color: rgb(17 37 70 / 0.6);
}

.form-field__error {
  color: var(--color-action-red-700);
  font-weight: 600;
}

.password-field {
  position: relative;
}

.password-field .form-field__control {
  padding-right: 56px;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-sky-600);
  font-size: 20px;
  cursor: pointer;
}

.password-field__toggle:hover {
  background-color: var(--color-cloud-50);
}

.password-field__toggle .icon[hidden] {
  display: none;
}

.password-field__toggle:focus-visible {
  outline: 2px solid var(--color-sky-500);
  outline-offset: 1px;
}

.checkout__coupon-input {
  text-transform: uppercase;
}

/* Spinner dentro do botão de pagar (fundo vermelho) */
.btn .spinner {
  border-color: rgb(255 255 255 / 0.35);
  border-top-color: var(--color-white);
}

.checkout__coupon-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.checkout__coupon-row .form-field {
  flex: 1;
  margin-bottom: 0;
}

.checkout__coupon-btn {
  flex-shrink: 0;
}

.checkout__coupon-status {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-lime-600);
}

.checkout__submit {
  margin-top: 28px;
}

/* Resumo do pedido, logo acima do botão de pagar */
.order-summary {
  margin-top: 24px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background-color: var(--color-cloud-50);
  border: 1.5px solid var(--color-cloud-200);
}

.order-summary__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.order-summary__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-navy-800);
}

.order-summary__list {
  margin: 0;
}

.order-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 4px;
  font-size: 14px;
  color: var(--color-navy-700);
}

.order-summary__row dd {
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* lime-600 não tem contraste suficiente sobre cloud-50 em 14px; destaque só pelo peso */
.order-summary__row--discount {
  color: var(--color-navy-800);
  font-weight: 700;
}

.order-summary__row--total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--color-cloud-200);
  font-size: 17px;
  font-weight: 700;
  color: var(--color-navy-900);
}

.order-summary__note {
  margin-top: 6px;
  font-size: 13px;
  color: rgb(17 37 70 / 0.65);
}

/* ---------------------------------------------------------------- */
/* Contato */
/* ---------------------------------------------------------------- */
/* Vantagens do Premium: fundo branco, para se separar do formulário (cloud-50) quando ele está aberto */
.benefits {
  background-color: var(--color-white);
}

.benefits__list {
  list-style: none;
  margin: 32px auto 0;
  padding: 0;
  max-width: 820px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 40px;
}

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

.benefits__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-navy-800);
}

.benefits__check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgb(148 183 57 / 0.2);
  color: var(--color-lime-600);
}

.benefits__check .icon {
  width: 14px;
  height: 14px;
}

/* Rodapé discreto: fundo branco para se separar do formulário (cloud-50) sem competir com ele */
.contact {
  padding-block: 40px;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-cloud-200);
}

.contact .section-heading {
  gap: 6px;
}

.contact .section-heading__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-navy-800);
}

.contact .section-heading__subtitle {
  font-size: 15px;
}

.contact__card {
  max-width: 520px;
  margin-inline: auto;
  text-align: center;
}

.contact__cta {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.contact__hours {
  margin-top: 16px;
  font-size: 13px;
  color: rgb(17 37 70 / 0.6);
}

.contact__footer-links {
  margin-top: 28px;
  font-size: 13px;
  color: rgb(17 37 70 / 0.6);
}

.contact__footer-links a {
  color: var(--color-sky-600);
  text-decoration: underline;
  font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Barra fixa de pagamento (só no celular) */
/* ---------------------------------------------------------------- */
.sticky-pay {
  position: fixed;
  inset: auto 0 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background-color: var(--color-white);
  box-shadow: 0 -4px 16px rgb(17 37 70 / 0.12);
}

.sticky-pay[hidden] {
  display: none;
}

.sticky-pay__total {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 17px;
  color: var(--color-navy-900);
  font-variant-numeric: tabular-nums;
}

.sticky-pay__plan {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgb(17 37 70 / 0.65);
}

.sticky-pay__plan-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-pay__plan .badge {
  flex-shrink: 0;
}

.sticky-pay .btn {
  flex-shrink: 0;
  padding-inline: 20px;
}

/* Espaço para a barra não cobrir o fim da página */
body.has-sticky-pay {
  padding-bottom: 80px;
}

@media (min-width: 640px) {
  .sticky-pay {
    display: none !important;
  }

  body.has-sticky-pay {
    padding-bottom: 0;
  }
}

/* Modal de e-mail (comprar-modal.html) */
.modal {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
  box-shadow: var(--shadow-card);
  color: var(--color-navy-900);
}

.modal::backdrop {
  background-color: rgb(11 29 56 / 0.6);
}

.modal__card {
  position: relative;
  padding: 32px 24px 24px;
}

@media (min-width: 640px) {
  .modal__card {
    padding: 40px 36px 32px;
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--color-navy-700);
  cursor: pointer;
}

.modal__close:hover {
  background-color: var(--color-cloud-50);
}

.modal__title {
  margin: 0 32px 8px 0;
  font-size: 22px;
  color: var(--color-navy-800);
}

.modal__copy {
  margin: 0 0 16px;
  font-size: 14px;
  color: rgb(17 37 70 / 0.75);
}

.modal__plan {
  margin: 0 0 20px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--color-cloud-50);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy-800);
}

.modal__plan[hidden] {
  display: none;
}

/* Preço cheio riscado e selo de desconto, no resumo do pedido e no modal de e-mail */
.price-old {
  margin-right: 6px;
  font-weight: 400;
  color: rgb(17 37 70 / 0.55);
}

.order-summary dt .badge,
.modal__plan .badge {
  margin-left: 6px;
}

/* "Não sei meu CEP": busca pelo endereço */
.cep-search {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 20px 16px;
  border: 1.5px solid var(--color-sky-300);
  border-left: 5px solid var(--color-sky-500);
  border-radius: var(--radius-md);
  background-color: var(--color-cloud-100);
  box-shadow: var(--shadow-card);
}

.cep-search__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--color-navy-900);
}

.cep-search__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
}

.cep-search__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.cep-search__results {
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  border: 1.5px solid var(--color-cloud-200);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
}

.cep-search__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
}

.cep-search__option:hover,
.cep-search__option--active {
  background-color: rgb(0 100 159 / 0.08);
}

.cep-search__street {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy-800);
}

.cep-search__meta {
  font-size: 13px;
  color: rgb(17 37 70 / 0.65);
}
