/**
 * Wizard de Orçamento — seção na landing page
 */

.tf-wizard-section {
  background-color: var(--tf-color-black);
  padding: var(--tf-space-8) var(--tf-space-3);
  position: relative;
}

.tf-wizard-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tf-gradient-hero-overlay);
  opacity: 0.08;
  pointer-events: none;
}

.tf-wizard-section__inner {
  position: relative;
  max-width: var(--tf-container-content);
  margin-inline: auto;
}

.tf-wizard-section__header {
  text-align: center;
  margin-bottom: var(--tf-space-5);
}

.tf-wizard-section__title {
  font-family: var(--tf-font-heading);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: var(--tf-weight-semibold);
  font-style: italic;
  color: var(--tf-color-white);
  margin: 0 0 var(--tf-space-2);
}

.tf-wizard-section__subtitle {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-light);
  color: var(--tf-color-text-muted);
  margin: 0;
  max-width: 520px;
  margin-inline: auto;
}

/* Formulários — reforço sobre o tema Elementor (carrega antes do DS) */
.tf-wizard-section input.tf-input,
.tf-wizard-section select.tf-select,
.tf-wizard-section textarea.tf-textarea {
  color: var(--tf-color-white);
  background-color: var(--tf-color-surface);
  border: var(--tf-border-brand);
  border-radius: var(--tf-radius-sm);
}

.tf-wizard-section input.tf-input:focus,
.tf-wizard-section select.tf-select:focus,
.tf-wizard-section textarea.tf-textarea:focus {
  border-color: var(--tf-color-primary);
  box-shadow: 0 0 0 3px rgba(231, 33, 150, 0.2);
}

/* Step indicator */
.tf-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--tf-space-5);
  list-style: none;
  padding: 0;
}

.tf-wizard-steps__item {
  display: flex;
  align-items: center;
  gap: var(--tf-space-2);
  font-family: var(--tf-font-body);
  font-size: 13px;
  font-weight: var(--tf-weight-medium);
  color: rgba(255, 255, 255, 0.4);
}

.tf-wizard-steps__item.is-active {
  color: var(--tf-color-white);
}

.tf-wizard-steps__item.is-active .tf-wizard-steps__number {
  background: var(--tf-gradient-brand);
  border-color: transparent;
  color: var(--tf-color-white);
}

.tf-wizard-steps__item.is-done {
  color: var(--tf-color-pink);
}

.tf-wizard-steps__item.is-done .tf-wizard-steps__number {
  background: var(--tf-color-primary);
  border-color: var(--tf-color-primary);
  color: var(--tf-color-white);
}

.tf-wizard-steps__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  font-weight: var(--tf-weight-bold);
  flex-shrink: 0;
  transition: background var(--tf-transition), border-color var(--tf-transition);
}

.tf-wizard-steps__label {
  display: none;
}

.tf-wizard-steps__connector {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 8px;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .tf-wizard-steps__label {
    display: block;
  }

  .tf-wizard-steps__connector {
    width: 60px;
  }
}

/* Form card override for landing */
.tf-wizard-section .tf-form-card {
  background: var(--tf-color-surface);
  border: var(--tf-border-brand);
  box-shadow: 0 0 80px -20px rgba(144, 15, 153, 0.35);
}

.tf-wizard-section .tf-form-card__title {
  display: none;
}

.tf-field__required {
  color: var(--tf-color-pink);
  margin-left: 2px;
}

.tf-btn--continue {
  width: 100%;
  margin-top: var(--tf-space-2);
}

.tf-btn--continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.tf-btn--continue:not(:disabled):hover {
  transform: translateY(-1px);
}

.tf-wizard-hint {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-xs);
  font-weight: var(--tf-weight-light);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin: var(--tf-space-3) 0 0;
}

/* Mock feedback (apresentação) */
.tf-wizard-toast {
  display: none;
  margin-top: var(--tf-space-3);
  padding: var(--tf-space-2) var(--tf-space-3);
  background: rgba(231, 33, 150, 0.12);
  border: 1px solid var(--tf-color-primary);
  border-radius: var(--tf-radius-sm);
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-medium);
  color: var(--tf-color-white);
  text-align: center;
}

.tf-wizard-toast.is-visible {
  display: block;
}

@media (max-width: 767px) {
  .tf-wizard-section {
    padding: var(--tf-space-5) var(--tf-space-3);
  }
}

/* ── Panels ── */
.tf-wizard-panel {
  display: none;
}

.tf-wizard-panel.is-active {
  display: block;
}

.tf-wizard-nav {
  --tf-wizard-nav-btn-height: 52px;
  display: flex;
  align-items: center;
  gap: var(--tf-space-2);
  margin-top: var(--tf-space-4);
}

.tf-wizard-nav .tf-btn {
  min-height: var(--tf-wizard-nav-btn-height);
  margin-top: 0;
}

.tf-wizard-nav .tf-btn--continue {
  flex: 1;
  padding-block: 0;
}

.tf-btn--back {
  flex-shrink: 0;
  padding: 0 20px;
  font-size: var(--tf-text-sm);
  font-weight: var(--tf-weight-medium);
  background: transparent;
  border: 1px solid rgba(224, 61, 132, 0.45);
  border-radius: var(--tf-radius-pill);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  transition: background var(--tf-transition), color var(--tf-transition), border-color var(--tf-transition);
}

.tf-btn--back:hover,
.tf-btn--back:focus {
  background: rgba(224, 61, 132, 0.1);
  border-color: rgba(224, 61, 132, 0.65);
  color: var(--tf-color-white);
}

/* ── Total inline (Etapa 3) ── */
.tf-wizard-total {
  margin-top: var(--tf-space-4);
  padding-top: var(--tf-space-4);
  border-top: 1px solid rgba(224, 61, 132, 0.2);
}

.tf-wizard-total__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--tf-space-3);
  margin-bottom: var(--tf-space-2);
}

.tf-wizard-total__label {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-light);
  color: rgba(255, 255, 255, 0.75);
}

.tf-wizard-total__valor {
  font-family: var(--tf-font-heading);
  font-size: 24px;
  font-weight: var(--tf-weight-bold);
  color: var(--tf-color-white);
  white-space: nowrap;
}

.tf-wizard-total__aviso {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-xs);
  font-weight: var(--tf-weight-light);
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.5;
}

.tf-wizard-total + .tf-wizard-nav {
  margin-top: var(--tf-space-3);
}

.tf-btn--outline {
  background: transparent;
  border: var(--tf-border-brand);
  color: var(--tf-color-white);
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-semibold);
  padding: 14px 28px;
  border-radius: var(--tf-radius-pill);
  cursor: pointer;
  transition: background var(--tf-transition), color var(--tf-transition);
}

.tf-btn--outline:hover {
  background: rgba(224, 61, 132, 0.15);
  color: var(--tf-color-white);
}

/* ── Etapa 2: Grid de checkboxes ──
   Flexbox em vez de CSS Grid de propósito: com grid, uma última linha
   incompleta (ex.: 5 ou 7 categorias) fica com os itens grudados à
   esquerda e colunas vazias sobrando. Com flex-wrap + justify-content:
   center e um flex-basis fixo por card, a última linha sempre fica
   centralizada, e como flex-grow/flex-shrink ficam em 0 nenhum card
   estica pra "tampar buraco" — todos os cards mantêm sempre o mesmo
   tamanho, cheguem 1 ou 8 categorias. */
.tf-cat-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--tf-space-2);
}

/* Mobile-first: 1 card por linha, foto à esquerda + texto à direita
   (mais legível que empilhado). No desktop (>=600px) vira 4 por linha,
   foto em cima e texto embaixo. Não tem mais quadradinho de checkbox —
   o card inteiro é clicável, e o estado marcado aparece só pela borda
   /fundo (.is-checked), sem indicador separado. */
.tf-cat-option {
  flex: 0 0 100%;
  min-width: 0; /* sem isso, rótulo de uma palavra só (ex. "Guardanapos") força o card a crescer além do flex-basis */
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--tf-space-3);
  padding: var(--tf-space-2) var(--tf-space-3);
  background: var(--tf-color-black);
  border: 1px solid rgba(224, 61, 132, 0.3);
  border-radius: var(--tf-radius-sm);
  cursor: pointer;
  transition: border-color var(--tf-transition), background var(--tf-transition);
}

@media (min-width: 600px) {
  .tf-cat-option {
    flex-basis: calc((100% - var(--tf-space-2) * 3) / 4);
    flex-direction: column;
    align-items: stretch;
    gap: var(--tf-space-2);
  }
}

/* Wrapper com proporção 1:1 via padding-top — não depende de
   `aspect-ratio` do CSS nem das dimensões reais da imagem enviada,
   então todo card fica com o mesmo tamanho de foto sempre, mesmo que
   as imagens originais não sejam perfeitamente quadradas. No mobile é
   um quadrado pequeno de tamanho fixo (foto à esquerda); no desktop
   vira 100% da largura do card (foto em cima), com o padding-top
   controlando a altura proporcional. */
.tf-cat-option__thumb-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--tf-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .tf-cat-option__thumb-wrap {
    width: 100%;
    height: auto;
    padding-top: 100%;
  }
}

.tf-cat-option__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tf-cat-option__body {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.tf-cat-option:hover {
  border-color: var(--tf-color-pink);
}

.tf-cat-option.is-checked {
  border-color: var(--tf-color-pink);
  background: rgba(231, 33, 150, 0.1);
}

.tf-cat-option__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tf-cat-option__label {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-semibold);
  color: var(--tf-color-white);
  overflow-wrap: break-word;
  min-width: 0;
}

/* ── Etapa 3: Accordion por categoria ── */
.tf-orc-accordion {
  border: 1px solid rgba(224, 61, 132, 0.3);
  border-radius: var(--tf-radius-sm);
  margin-bottom: var(--tf-space-2);
  overflow: hidden;
}

.tf-orc-accordion.is-open {
  border-color: var(--tf-color-pink);
}

.tf-orc-accordion__header {
  display: flex;
  align-items: center;
  gap: var(--tf-space-2);
  width: 100%;
  padding: var(--tf-space-2) var(--tf-space-3);
  background: var(--tf-color-black);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--tf-transition);
}

.tf-orc-accordion.is-open .tf-orc-accordion__header {
  background: rgba(231, 33, 150, 0.1);
}

.tf-orc-accordion__title {
  font-family: var(--tf-font-heading);
  font-size: var(--tf-text-md);
  font-weight: var(--tf-weight-semibold);
  font-style: italic;
  color: var(--tf-color-white);
  flex: 1;
}

.tf-orc-accordion__badge {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-xs);
  font-weight: var(--tf-weight-medium);
  color: var(--tf-color-pink);
  background: rgba(231, 33, 150, 0.15);
  padding: 4px 10px;
  border-radius: var(--tf-radius-pill);
}

.tf-orc-accordion__icon {
  color: var(--tf-color-pink);
  flex-shrink: 0;
  transition: transform var(--tf-transition);
}

.tf-orc-accordion.is-open .tf-orc-accordion__icon {
  transform: rotate(180deg);
}

.tf-orc-accordion__body {
  display: none;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(224, 61, 132, 0.15);
  padding: var(--tf-space-2) var(--tf-space-3);
}

.tf-orc-accordion.is-open .tf-orc-accordion__body {
  display: block;
}

.tf-wizard-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--tf-space-2) var(--tf-space-3);
  margin-bottom: var(--tf-space-4);
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.4);
  border-radius: var(--tf-radius-sm);
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-medium);
  color: #25d366;
  text-align: center;
  transition: background var(--tf-transition);
}

.tf-wizard-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
}

.tf-form-card--orcamento {
  padding-bottom: var(--tf-space-5);
}

.tf-orc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tf-space-3);
  padding: var(--tf-space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tf-orc-item:last-child {
  border-bottom: none;
}

.tf-orc-item__thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--tf-radius-sm);
  flex-shrink: 0;
}

.tf-orc-item__info {
  flex: 1;
  min-width: 0;
}

.tf-orc-item__nome {
  display: block;
  font-family: var(--tf-font-body);
  font-size: 14px;
  font-weight: var(--tf-weight-regular);
  color: var(--tf-color-white);
  margin-bottom: 4px;
}

.tf-orc-item__preco {
  font-size: var(--tf-text-xs);
  color: rgba(255, 255, 255, 0.5);
}

.tf-orc-item__actions {
  display: flex;
  align-items: center;
  gap: var(--tf-space-3);
  flex-shrink: 0;
}

.tf-orc-item__subtotal {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-semibold);
  color: var(--tf-color-pink);
  min-width: 80px;
  text-align: right;
}

.tf-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: var(--tf-border-brand);
  border-radius: var(--tf-radius-sm);
  overflow: hidden;
}

.tf-stepper__btn {
  width: 36px;
  height: 36px;
  background: var(--tf-color-black);
  border: none;
  color: var(--tf-color-white);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--tf-transition);
}

.tf-stepper__btn:hover {
  background: var(--tf-color-primary);
}

.tf-stepper__value {
  width: 40px;
  height: 36px;
  text-align: center;
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-semibold);
  color: var(--tf-color-white);
  background: var(--tf-color-surface);
  border: none;
  padding: 0;
  -moz-appearance: textfield;
}

.tf-stepper__value:focus {
  outline: none;
  background: var(--tf-color-black);
}

/* ── Sucesso ── */
.tf-wizard-success {
  text-align: center;
  padding: var(--tf-space-8) var(--tf-space-4);
}

.tf-wizard-success__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--tf-space-4);
  background: var(--tf-gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  font-weight: bold;
}

.tf-wizard-success__title {
  font-family: var(--tf-font-heading);
  font-size: 28px;
  font-weight: var(--tf-weight-semibold);
  color: var(--tf-color-white);
  margin: 0 0 var(--tf-space-2);
}

.tf-wizard-success__text {
  font-family: var(--tf-font-body);
  font-size: var(--tf-text-base);
  font-weight: var(--tf-weight-light);
  color: var(--tf-color-text-muted);
  margin: 0 0 var(--tf-space-5);
  max-width: 400px;
  margin-inline: auto;
}

@media (max-width: 767px) {
  .tf-orc-item {
    flex-wrap: wrap;
  }

  .tf-orc-item__info {
    order: 1;
    flex-basis: calc(100% - 52px - var(--tf-space-3));
  }

  .tf-orc-item__actions {
    order: 2;
    width: 100%;
    justify-content: space-between;
  }

  .tf-wizard-total__valor {
    font-size: 20px;
  }
}
