/* ============================================================
   COMPONENTES — botões, comparador antes/depois, modal, lightbox,
   WhatsApp flutuante.
   ============================================================ */

/* --- BOTÕES -------------------------------------------------------- */

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:14px 26px;
  font-family:var(--ff-body);
  font-size:.98rem;font-weight:600;
  letter-spacing:.01em;
  border-radius:999px;
  transition:transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s;
  min-height:48px; /* alvo toque mobile */
  text-align:center;
  line-height:1.2;
}
.btn:active{transform:translateY(1px)}
.btn-primary{
  background:var(--dourado);
  color:#fff;
}
.btn-primary:hover{background:var(--dourado-escuro)}
.btn-gold{
  background:transparent;
  color:#fff;
  border:1.5px solid var(--dourado);
}
.btn-gold:hover{background:var(--dourado);color:#fff}
.btn-ghost{
  background:transparent;
  color:inherit;
  border:1.5px solid currentColor;
}
.btn-ghost:hover{background:currentColor;color:var(--branco)}
.section-dark .btn-ghost{border-color:rgba(255,255,255,.4)}
.section-dark .btn-ghost:hover{background:#fff;color:var(--preto)}
.btn-lg{padding:18px 32px;font-size:1.02rem;min-height:56px}

/* --- COMPARADOR ANTES/DEPOIS (a estrela) --------------------------- */

.ba-stage{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.ba-stage > .ba-item{
  width:100%;
}

.ba-item{
  position:relative;
  border-radius:var(--radius-md);
  overflow:hidden;
  background:var(--preto-suave);
  aspect-ratio:3/4;
  user-select:none;
  -webkit-user-select:none;
  box-shadow:var(--sombra-card);
}
.ba-item img{
  position:absolute;inset:0;
  width:100%;height:100%;object-fit:cover;
  pointer-events:none;
  -webkit-user-drag:none;
}
.ba-depois{z-index:1}
.ba-antes{
  z-index:2;
  clip-path:inset(0 50% 0 0);
  transition:clip-path .08s linear;
}
.ba-item.is-ready .ba-antes{transition:none}

.ba-divider{
  position:absolute;top:0;bottom:0;
  left:50%;
  width:2px;background:#fff;
  z-index:3;pointer-events:none;
  box-shadow:0 0 12px rgba(0,0,0,.5);
  transition:left .08s linear;
}
.ba-item.is-ready .ba-divider{transition:none}

.ba-handle{
  position:absolute;top:50%;left:50%;
  width:64px;height:64px;border-radius:50%;
  background:#fff;color:var(--preto);
  z-index:5;
  display:flex;align-items:center;justify-content:center;
  transform:translate(-50%,-50%);
  box-shadow:0 4px 20px rgba(0,0,0,.5), 0 0 0 3px rgba(183,155,101,.45);
  cursor:ew-resize;
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
  padding:0;
  border:0;
  transition:left .08s linear;
}
.ba-handle:active{
  box-shadow:0 4px 20px rgba(0,0,0,.6), 0 0 0 5px rgba(183,155,101,.6);
}
.ba-handle::before,.ba-handle::after{
  content:"";
  width:8px;height:8px;
  border-top:2px solid var(--preto);
  border-right:2px solid var(--preto);
}
.ba-handle::before{transform:rotate(-135deg);margin-right:3px}
.ba-handle::after{transform:rotate(45deg);margin-left:3px}
.ba-item.is-ready .ba-handle{transition:none}

.ba-label{
  position:absolute;top:14px;
  padding:6px 12px;
  font-size:.72rem;letter-spacing:.08em;font-weight:600;
  text-transform:uppercase;
  background:rgba(15,15,15,.7);
  color:#fff;border-radius:999px;
  backdrop-filter:blur(4px);
  z-index:3;pointer-events:none;
}
.ba-label-antes{left:14px}
.ba-label-depois{right:14px}

.ba-caption{
  position:absolute;left:14px;right:14px;bottom:14px;
  color:#fff;z-index:3;pointer-events:none;
  font-family:var(--ff-display);font-style:italic;font-size:1rem;
  text-shadow:0 2px 6px rgba(0,0,0,.6);
}

.ba-pager{
  display:flex;justify-content:center;gap:8px;margin-top:20px;
}
.ba-pager button{
  width:8px;height:8px;border-radius:50%;
  background:rgba(255,255,255,.3);
  transition:background .2s, transform .2s;
}
.ba-pager button[aria-current="true"]{
  background:var(--dourado);
  transform:scale(1.4);
}

.ba-cta{text-align:center;margin-top:36px}

/* --- MODAL ESCOLHA DE UNIDADE -------------------------------------- */

.unit-modal{
  position:fixed;inset:0;z-index:200;
  display:flex;align-items:flex-end;justify-content:center;
  animation:modalFade .25s ease;
}
.unit-modal[hidden]{display:none}
.unit-modal-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(3px);
}
.unit-modal-panel{
  position:relative;
  width:100%;max-width:460px;
  background:#fff;
  border-radius:20px 20px 0 0;
  padding:28px 24px 32px;
  animation:modalSlide .3s cubic-bezier(.2,.9,.3,1);
  box-shadow:0 -10px 40px rgba(0,0,0,.3);
}
.unit-modal-close{
  position:absolute;top:10px;right:14px;
  width:40px;height:40px;
  font-size:1.6rem;color:var(--cinza-texto);
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;
}
.unit-modal-close:hover{background:var(--cinza-claro)}
.unit-modal-title{
  font-family:var(--ff-display);font-size:1.6rem;font-weight:500;
  margin:0 0 6px;padding-right:40px;color:var(--preto);
}
.unit-modal-sub{
  margin:0 0 20px;font-size:.92rem;color:var(--cinza-texto);
}
.unit-modal-options{display:grid;gap:12px}
.unit-option{
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  column-gap:16px;row-gap:2px;
  align-items:center;
  padding:18px 20px;
  background:#fafaf7;
  border:1.5px solid var(--cinza-sutil);
  border-radius:14px;
  text-align:left;
  transition:border-color .2s, background .2s, transform .1s;
  min-height:76px;
}
.unit-option:hover{
  border-color:var(--dourado);
  background:#fff;
}
.unit-option:active{transform:scale(.98)}
.unit-option svg{
  grid-row:1 / span 2;
  width:28px;height:28px;color:var(--dourado-escuro);
}
.unit-option-main{
  font-family:var(--ff-display);font-size:1.35rem;font-weight:500;
  color:var(--preto);line-height:1.2;
}
.unit-option-sub{
  font-size:.85rem;color:var(--cinza-texto);
}

@keyframes modalFade{from{opacity:0}to{opacity:1}}
@keyframes modalSlide{from{transform:translateY(100%)}to{transform:translateY(0)}}

/* --- WHATSAPP FLUTUANTE -------------------------------------------- */

.wa-float{
  position:fixed;
  bottom:20px;right:20px;
  width:58px;height:58px;
  border-radius:50%;
  background:#25d366;
  color:#fff;
  z-index:100;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 28px rgba(37,211,102,.45), 0 4px 12px rgba(0,0,0,.2);
  transition:transform .2s, box-shadow .2s;
}
.wa-float:hover{transform:scale(1.06);box-shadow:0 12px 32px rgba(37,211,102,.55)}
.wa-float:active{transform:scale(.95)}
.wa-float svg{width:30px;height:30px}

/* Pulse sutil pra chamar atenção */
.wa-float::before{
  content:"";
  position:absolute;inset:0;border-radius:50%;
  box-shadow:0 0 0 0 rgba(37,211,102,.6);
  animation:waPulse 2.6s ease-out infinite;
}
@keyframes waPulse{
  0%{box-shadow:0 0 0 0 rgba(37,211,102,.5)}
  70%{box-shadow:0 0 0 18px rgba(37,211,102,0)}
  100%{box-shadow:0 0 0 0 rgba(37,211,102,0)}
}

/* --- LIGHTBOX GALERIA ---------------------------------------------- */

.lightbox{
  position:fixed;inset:0;z-index:300;
  background:rgba(0,0,0,.92);
  display:flex;align-items:center;justify-content:center;
  padding:60px 20px;
  animation:modalFade .2s ease;
}
.lightbox[hidden]{display:none}
.lightbox-img{
  max-width:100%;max-height:100%;
  width:auto;height:auto;
  border-radius:4px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close{
  position:absolute;top:14px;right:14px;
  width:44px;height:44px;
  font-size:1.6rem;color:#fff;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.1);
  border-radius:50%;
}
.lightbox-nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:48px;height:48px;
  font-size:2.2rem;color:#fff;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.1);
  border-radius:50%;
}
.lightbox-prev{left:12px}
.lightbox-next{right:12px}
.lightbox-nav:hover,.lightbox-close:hover{background:rgba(255,255,255,.2)}
