/* ============================================================
   CARROSSEL DOS 12 MODELOS · inspirado no "angled carousel" da home
   do pt.squarespace.com (medido 2026-11-22): cartão do centro reto
   e cheio; vizinhos a 88% da escala, girados ~2° para o centro e
   ~26px abaixo; os de fora a 83%. Troca com transform em 0,9s
   (0.23,1,0.32,1), avança sozinho e tem pausa. Cores claras.
   Sem JS: vira uma faixa com rolagem lateral e encaixe.
   ============================================================ */
.ac {
  --ac-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ac-move: 0.9s;
  --ac-w: min(860px, 62vw);
  position: relative;
  margin: 56px calc(50% - 50vw) 0;
  width: 100vw;
  overflow: clip;
  padding: 8px 0 0;
}
.ac-list {
  list-style: none; margin: 0; padding: 0 24px 24px;
  display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
}
.ac-card { flex: 0 0 min(560px, 80vw); scroll-snap-align: center; }
.ac-card a { display: block; color: inherit; text-decoration: none; }
.ac-frame {
  display: block;
  background: #fff;
  border: 1px solid #E4E7EC;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 24px 60px rgba(15,23,42,0.10);
}
.ac-bar {
  display: flex; gap: 6px; align-items: center;
  height: 26px; padding: 0 12px;
  background: #F6F7F9; border-bottom: 1px solid #ECEEF2;
}
.ac-bar i { width: 8px; height: 8px; border-radius: 50%; background: #D5D9E0; }
.ac-frame img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; background: #F3F4F6; }
.ac-name { display: block; margin-top: 14px; font: 500 20px/1.25 var(--serif); color: var(--paper, #0F172A); }
.ac-spec { display: block; margin-top: 2px; font: 400 15px/1.4 var(--sans); color: var(--muted, #64748B); }

/* ---------- com JS: palco com cartões sobrepostos ---------- */
.ac.is-ready .ac-list {
  /* o gesto horizontal é do carrossel; o vertical continua rolando a página */
  touch-action: pan-y;
  display: block; overflow: visible; padding: 0;
  position: relative;
  height: calc(var(--ac-w) * 0.75 + 26px + 70px);
}
.ac.is-ready .ac-card {
  position: absolute; top: 0; left: 50%;
  width: var(--ac-w);
  transform-origin: 50% 50%;
  transition: transform var(--ac-move) var(--ac-ease), opacity 0.5s var(--ac-ease);
  will-change: transform;
}
.ac.is-ready .ac-card.no-anim { transition: none; }
.ac.is-ready .ac-card .ac-name,
.ac.is-ready .ac-card .ac-spec { display: none; }
.ac.is-ready .ac-card:not(.is-center) .ac-frame { cursor: pointer; }
.ac.is-ready .ac-card:not(.is-center) img { filter: saturate(0.85); }
.ac.is-ready .ac-card.is-center .ac-frame { transition: box-shadow 0.4s var(--ac-ease); }
.ac.is-ready .ac-card.is-center a:hover .ac-frame { box-shadow: 0 1px 2px rgba(15,23,42,0.05), 0 34px 80px rgba(15,23,42,0.16); }
.ac.is-ready .ac-card.is-center img { transition: transform 1.2s var(--ac-ease); }
.ac.is-ready .ac-card.is-center a:hover img { transform: scale(1.02); }

/* legenda do cartão do centro: troca só por opacidade */
.ac-caption {
  display: none;
  text-align: center;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 92px;
}
.ac.is-ready .ac-caption { display: block; }
.ac-caption .ac-name, .ac-caption .ac-spec { transition: opacity 0.35s var(--ac-ease); }
.ac-caption.is-swapping .ac-name, .ac-caption.is-swapping .ac-spec { opacity: 0; }
.ac-links { display: flex; justify-content: center; gap: 22px; margin-top: 12px; flex-wrap: wrap; }
.ac-links a {
  position: relative;
  font: 500 15px/1.4 var(--sans);
  color: var(--gold, #5D7860);
  text-decoration: none;
}
.ac-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right center;
  transition: transform 0.32s var(--ac-ease);
}
.ac-links a:hover::after, .ac-links a:focus-visible::after { transform: scaleX(1); transform-origin: left center; }

/* controles */
.ac-ctrl {
  display: none;
  position: absolute; left: 0; right: 0;
  top: calc(var(--ac-w) * 0.375 + 13px);
  pointer-events: none;
}
.ac.is-ready .ac-ctrl { display: block; z-index: 25; }
.ac-btn {
  pointer-events: auto;
  position: absolute; top: 0; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #0F172A; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.3s var(--ac-ease), background-color 0.25s, border-color 0.25s;
}
.ac-btn svg { width: 16px; height: 16px; }
.ac-prev { left: calc(50% - var(--ac-w) / 2 - 24px); }
.ac-next { right: calc(50% - var(--ac-w) / 2 - 24px); }
.ac-btn { opacity: 1; z-index: 30; } /* setas sempre à vista (2026-11-25) */
.ac-btn:hover { background: #fff; border-color: rgba(15,23,42,0.3); }
.ac-pause {
  position: absolute; left: 24px; bottom: 0;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(15,23,42,0.14); background: #fff; color: #0F172A;
  display: none; place-items: center; cursor: pointer;
}
.ac.is-ready .ac-pause { display: grid; }
.ac-pause svg { width: 12px; height: 12px; }
.ac-pause .ic-play { display: none; }
.ac.is-paused .ac-pause .ic-play { display: block; }
.ac.is-paused .ac-pause .ic-pause { display: none; }
.ac-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 720px) {
  .ac { --ac-w: 84vw; margin-top: 40px; }
  .ac-btn { opacity: 1; width: 40px; height: 40px; }
  .ac-prev { left: 4px; }
  .ac-next { right: 4px; }
  .ac-pause { left: 16px; }
  .ac-name { font-size: 18px; }
}
/* movimento reduzido: só a troca fica mais curta. O avanço sozinho
   continua ligado de propósito (como no Squarespace; ver pdp-carousel.js),
   e o botão de pausa fica à mão para quem quiser parar */
@media (prefers-reduced-motion: reduce) {
  .ac { --ac-move: 0.45s; }
}

/* Cartão clicável de novo (2026-11-25): abre o editor no modelo.
   Sem nome nem botões por cima; só a mão e a sombra crescendo. */
.ac-card .ac-link { display: block; color: inherit; text-decoration: none; }
.ac.is-ready .ac-card .ac-frame { cursor: pointer; }
.ac-card .ac-link:focus-visible .ac-frame { outline: 2px solid #0F172A; outline-offset: 3px; }
.ac.is-ready .ac-list { user-select: none; -webkit-user-select: none; }

/* arrastar com o mouse (2026-11-25): mão aberta por cima, fechada ao arrastar */
.ac.is-ready .ac-list { cursor: grab; touch-action: pan-y; }
.ac.is-dragging .ac-list, .ac.is-dragging .ac-card .ac-frame { cursor: grabbing; }
.ac.is-dragging .ac-card { transition: none; }
