/* ============================================================
   VARIÁVEIS & RESET
   ============================================================ */
:root {
  --pink:        #E91E8C;  /* rosa primário (CTA, destaques)   */
  --pink-dark:   #C4157A;  /* hover / gradiente                */
  --pink-soft:   #FCE4EF;  /* fundo suave / cards selecionados */
  --pink-line:   #F4A8D0;  /* bordas rosadas                   */
  --whats:       #25D366;  /* verde WhatsApp                   */
  --whats-dark:  #1EBE5A;
  --ink:         #2A2233;  /* texto principal                  */
  --muted:       #8A8593;  /* texto secundário                 */
  --white:       #FFFFFF;
  --line:        #ECE8EF;  /* bordas neutras                   */
  --radius:      16px;
  --shadow:      0 8px 24px rgba(233, 30, 140, .12);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, .06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  /* área segura para notches */
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; display: block; }

/* ============================================================
   BARRA DE PROGRESSO (topo)
   ============================================================ */
.progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--pink-soft);
  z-index: 100;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--pink-dark));
  border-radius: 0 4px 4px 0;
  transition: width .4s ease;
}

/* ============================================================
   CONTAINER / ETAPAS
   ============================================================ */
.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  min-height: 100vh;
}

/* Cada etapa fica escondida; a ativa aparece com fade-in */
.step { display: none; animation: fadeIn .4s ease; }
.step--active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cabeçalho das etapas */
.step__head { margin-bottom: 22px; }
.step__head--center { text-align: center; }
.step__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pink);
  background: var(--pink-soft);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.step__title { font-size: 24px; font-weight: 700; line-height: 1.25; }
.step__hint  { font-size: 15px; color: var(--muted); margin-top: 6px; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;              /* > 48px de área de toque */
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: var(--white);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  animation: none !important;
  box-shadow: none;
}
.btn--sm { width: auto; min-height: 48px; padding: 12px 26px; font-size: 15px; }

.btn--whatsapp { background: linear-gradient(135deg, var(--whats), var(--whats-dark)); }

/* Animação de pulsação contínua (scale + box-shadow) */
.btn--pulse:not(:disabled) { animation: pulse 1.8s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(233, 30, 140, .45); transform: scale(1); }
  50%  { box-shadow: 0 0 0 14px rgba(233, 30, 140, 0); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 0 rgba(233, 30, 140, 0); transform: scale(1); }
}
/* pulsação verde para o botão WhatsApp */
.btn--whatsapp.btn--pulse:not(:disabled) { animation: pulseGreen 1.8s infinite; }
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); transform: scale(1); }
  50%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .btn--pulse:not(:disabled),
  .btn--whatsapp.btn--pulse:not(:disabled) { animation: none; }
}

/* ============================================================
   ETAPA 0 — CAPA / CARROSSEL
   ============================================================ */
.cover { text-align: center; padding-top: 8px; }

.carousel { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.carousel__track {
  display: flex;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
  touch-action: pan-y; /* permite scroll vertical; capturamos swipe horizontal via JS */
}
.slide { position: relative; min-width: 100%; }
.slide img {
  width: 100%;
  aspect-ratio: 2160 / 1350;   /* proporção das imagens antes/depois (2160x1350) */
  object-fit: cover;
  background: var(--pink-soft);
}
.slide__tag {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(42, 34, 51, .72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* Dots */
.carousel__dots {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.carousel__dots button {
  width: 8px; height: 8px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: all .3s ease;
  padding: 0;
}
.carousel__dots button.is-active { background: #fff; width: 22px; border-radius: 4px; }

.cover__text { margin: 22px 0 20px; }
.cover__title { font-size: 28px; font-weight: 800; line-height: 1.2; }
.cover__subtitle { font-size: 16px; color: var(--muted); margin-top: 8px; }
.cover__subtitle strong { color: var(--pink); font-weight: 700; }
.cover__trust { font-size: 12.5px; color: var(--muted); margin-top: 16px; line-height: 1.6; }

/* ============================================================
   ETAPA 1 — CARDS DE REGIÃO
   ============================================================ */
.regions { display: flex; flex-direction: column; gap: 12px; }

.region-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.region-card__input { position: absolute; opacity: 0; pointer-events: none; }

/* Checkbox estilizado */
.region-card__check {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: 2px solid var(--pink-line);
  border-radius: 8px;
  position: relative;
  transition: all .2s;
}
.region-card__check::after {
  content: '';
  position: absolute;
  left: 7px; top: 3px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .2s;
}

.region-card__info { flex: 1; display: flex; flex-direction: column; }
.region-card__name { font-size: 16px; font-weight: 600; }
.region-card__desc { font-size: 12.5px; color: var(--muted); }
.region-card__price { font-size: 16px; font-weight: 700; color: var(--pink); white-space: nowrap; }
.region-card__price--combo { text-align: right; line-height: 1.15; font-size: 17px; }
.region-card__installment { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

/* Estado selecionado */
.region-card.is-selected {
  border-color: var(--pink);
  background: var(--pink-soft);
  box-shadow: var(--shadow);
}
.region-card.is-selected .region-card__check {
  background: var(--pink);
  border-color: var(--pink);
}
.region-card.is-selected .region-card__check::after { transform: rotate(45deg) scale(1); }

/* Estado desabilitado (quando o combo está ativo) */
.region-card.is-disabled { opacity: .45; pointer-events: none; filter: grayscale(.3); }

/* Card em destaque (combo) */
.region-card--featured {
  border-color: var(--pink);
  background: linear-gradient(135deg, #fff, var(--pink-soft));
  padding-top: 22px;
}
.region-card__badge {
  position: absolute;
  top: -11px; left: 18px;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

/* ============================================================
   RODAPÉ FIXO (Etapa 1)
   ============================================================ */
.footer-spacer { height: 88px; }  /* reserva espaço p/ não cobrir os cards */

.footer-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .05);
  transition: transform .3s ease;
}
/* recolhe o rodapé quando um input está em foco (evita cobrir campos) */
.footer-bar.is-hidden { transform: translateY(120%); }

.footer-bar__total { display: flex; flex-direction: column; }
.footer-bar__label { font-size: 12px; color: var(--muted); }
.footer-bar__value { font-size: 22px; font-weight: 800; color: var(--pink); }
/* combo: fatura + à vista em duas linhas, com fonte reduzida */
.footer-bar__value--combo { font-size: 17px; line-height: 1.15; }
.footer-bar__value--combo small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ============================================================
   ETAPA 2 — ESCOLHA SIM/NÃO + CAMPOS
   ============================================================ */
.choice { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.choice__btn {
  width: 100%;
  min-height: 56px;
  border: 2px solid var(--pink);
  border-radius: var(--radius);
  background: var(--pink);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, background .2s;
}
.choice__btn:active { transform: scale(.97); }
.choice__btn--ghost { background: #fff; color: var(--pink); }
.choice__btn.is-active { box-shadow: var(--shadow); }
.choice__btn--ghost.is-active { background: var(--pink-soft); }

.schedule-fields { animation: fadeIn .35s ease; padding-bottom: 90px; } /* espaço p/ o CTA flutuante */

/* CTA flutuante do agendamento — fixo por cima de tudo, aparece só quando dia+horário estão escolhidos */
.schedule-cta {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 120;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
  animation: ctaUp .3s ease;
}
.schedule-cta[hidden] { display: none; }
.schedule-cta .btn { box-shadow: 0 12px 34px rgba(233, 30, 140, .45); }
@keyframes ctaUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SELETOR DE DIA (chips com scroll horizontal)
   ============================================================ */
.day-picker {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* Firefox */
}
.day-picker::-webkit-scrollbar { display: none; }  /* Chrome/Safari */

.day-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 66px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s ease;
}
.day-chip__weekday { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.day-chip__day     { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1; }
.day-chip__month   { font-size: 10.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.day-chip__today   { font-size: 9px; font-weight: 700; color: var(--pink); text-transform: uppercase; }

.day-chip.is-active {
  border-color: var(--pink);
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  box-shadow: var(--shadow);
}
.day-chip.is-active .day-chip__weekday,
.day-chip.is-active .day-chip__day,
.day-chip.is-active .day-chip__month,
.day-chip.is-active .day-chip__today { color: #fff; }

/* ============================================================
   SELETOR DE HORÁRIO (grade de chips)
   ============================================================ */
.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.time-chip {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .18s ease;
}
.time-chip:active { transform: scale(.95); }
.time-chip.is-active {
  border-color: var(--pink);
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: #fff;
  box-shadow: var(--shadow);
}

/* ============================================================
   CAMPOS DE FORMULÁRIO
   ============================================================ */
.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field__label { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field__input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: 16px;         /* >=16px evita zoom automático no iOS */
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.field__input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(233, 30, 140, .12);
}
select.field__input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23E91E8C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.field__hint-inline { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field__error { font-size: 13px; color: #E23; margin-top: 6px; }

/* ============================================================
   ETAPA 4 — RESUMO
   ============================================================ */
.success-emoji { font-size: 48px; margin-bottom: 4px; animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

.summary {
  border: 2px solid var(--pink-line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, var(--pink-soft));
  padding: 18px 20px;
  margin-bottom: 22px;
}
.summary__list { list-style: none; }
.summary__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--pink-line);
  font-size: 15px;
}
.summary__list li span:last-child { font-weight: 700; color: var(--pink); white-space: nowrap; }
.summary__schedule {
  padding: 12px 0;
  border-bottom: 1px dashed var(--pink-line);
  font-size: 14px;
  color: var(--ink);
}
.summary__schedule strong { color: var(--pink); }
.summary__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  font-size: 18px;
  font-weight: 800;
}
.summary__total span:last-child { color: var(--pink); font-size: 22px; text-align: right; }
.summary__total span:last-child small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ============================================================
   BOTÃO VOLTAR FLUTUANTE
   ============================================================ */
.back-btn {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 95;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--pink);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s;
}
.back-btn:active { transform: scale(.9); }
