/* ==========================================================
   MAROMBELLA — movimento e microinterações
   Tudo fica sob .fx-on (desligado se o sistema pede "reduzir movimento")
   ========================================================== */
:root {
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* Transição suave entre páginas (loja → checkout → conta) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease); }
::view-transition-group(foto-produto) { animation-duration: .6s; }
::view-transition-image-pair(foto-produto) { isolation: isolate; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

html.lenis { scroll-behavior: auto; }

/* ---------- Barra de progresso de leitura ---------- */
.fx-progress {
  position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 60;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}
.fx-off .fx-progress { display: none; }

/* ---------- Abertura da marca ---------- */
.fx-intro-on body { overflow: hidden; }
.fx-intro {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--grad); color: #fff;
  transition: clip-path .75s var(--ease-io);
  clip-path: inset(0 0 0 0);
}
.fx-intro.is-out { clip-path: inset(0 0 100% 0); }
.fx-intro__mb {
  display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.7); font: 600 34px var(--serif);
  animation: fxPop .9s var(--ease) both;
}
.fx-intro__nome { display: flex; gap: .12em; font: 600 clamp(22px, 4vw, 34px) var(--serif); letter-spacing: .18em; overflow: hidden; }
.fx-intro__nome span { display: inline-block; animation: fxSobe .8s var(--ease) both; animation-delay: calc(.25s + var(--i) * 45ms); }
@keyframes fxPop { from { transform: scale(.6); opacity: 0; } }
@keyframes fxSobe { from { transform: translateY(110%); opacity: 0; } }

/* ---------- Topo inteligente (some ao descer, volta ao subir) ---------- */
.fx-on .header { transition: transform .5s var(--ease), box-shadow .3s, background-color .3s; }
.fx-on.fx-scrolled .header, .fx-on .fx-scrolled .header { background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.fx-on .fx-head-hidden .header { transform: translateY(-100%); }
.fx-on .toolbar { transition: top .5s var(--ease); }
.fx-on .fx-head-hidden .toolbar { top: 0; }

/* sublinhado animado no menu */
.fx-on .nav a { position: relative; border-bottom-color: transparent !important; }
.fx-on .nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.fx-on .nav a:hover::after, .fx-on .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Banner ---------- */
.fx-on .fx-banner { background-size: 200% 200%; animation: fxGradiente 14s ease-in-out infinite; }
@keyframes fxGradiente { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.fx-on .banner__imgs { overflow: hidden; }
.fx-on .banner__imgs img {
  animation: fxRevelaFoto 1.3s var(--ease) both, fxKenBurns 16s ease-in-out 1.3s infinite alternate;
  will-change: transform;
}
.fx-on .banner__imgs img:nth-child(2) { animation-delay: .12s, 1.4s; }
.fx-on .banner__imgs img:nth-child(3) { animation-delay: .24s, 1.5s; }
@keyframes fxRevelaFoto { from { clip-path: inset(100% 0 0 0); transform: scale(1.25); } to { clip-path: inset(0 0 0 0); transform: scale(1); } }
@keyframes fxKenBurns { from { transform: scale(1); } to { transform: scale(1.1); } }
.fx-on.fx-intro-on .banner__imgs img { animation-delay: 1.5s, 2.8s; }

.fx-on .banner__title { white-space: nowrap; }
.fx-letra { display: inline-block; animation: fxLetra 1s var(--ease) both; animation-delay: calc(.15s + var(--i) * 40ms); }
.fx-intro-on .fx-letra { animation-delay: calc(1.55s + var(--i) * 40ms); }
@keyframes fxLetra { from { transform: translateY(60%); opacity: 0; filter: blur(6px); } }
.fx-on .banner__kicker, .fx-on .banner__sub { animation: fxSobeSuave 1s var(--ease) both .5s; }
.fx-on.fx-intro-on .banner__kicker, .fx-on.fx-intro-on .banner__sub { animation-delay: 1.9s; }
@keyframes fxSobeSuave { from { transform: translateY(18px); opacity: 0; } }

/* ---------- Faixa de frases ---------- */
.fx-marquee { overflow: hidden; margin: -8px 0 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fx-marquee__track { display: flex; width: max-content; gap: 28px; align-items: center; animation: fxMarquee 38s linear infinite; }
.fx-marquee:hover .fx-marquee__track { animation-play-state: paused; }
.fx-marquee span { font: 500 13px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.fx-marquee i { font-style: normal; font-size: 12px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes fxMarquee { to { transform: translateX(-50%); } }
.fx-off .fx-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }

/* ---------- Cards de produto ---------- */
.fx-on .card { animation: none; opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.fx-on .card.is-in { opacity: 1; transform: none; }
.fx-on .card__media img { transition: opacity .7s ease, transform 1.3s var(--ease); }
.fx-on .card:hover .card__media img { transform: scale(1.06); }
.fx-on .card__media img[data-fx-img]:not(.is-loaded) { opacity: 0 !important; }
.fx-on .card__media::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%) var(--soft);
  background-size: 250% 100%; animation: fxBrilho 1.4s linear infinite;
}
@keyframes fxBrilho { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* favoritos: coração com "batida" */
.fx-on .card__fav { transition: transform .35s var(--ease), background .2s; }
.fx-on .card__fav:hover { transform: scale(1.12); }
.fx-on .card__fav.is-on svg { animation: fxBatida .5s var(--ease); }
@keyframes fxBatida { 30% { transform: scale(1.35); } 60% { transform: scale(.9); } }

/* compra rápida no card */
.card__quick {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 10px; min-height: 0;
}
.card__quick span { font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card__quick div { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.card__quick button {
  min-width: 38px; height: 34px; padding: 0 8px; border: 1px solid #ddd; background: #fff;
  font: 600 12px var(--ui); color: var(--ink); transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.card__quick button:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); }
.card__quick:hover { background: rgba(255,255,255,.97); color: var(--ink); }
.fx-on .card__quick { transition: opacity .35s var(--ease), transform .45s var(--ease); }

/* ---------- Botões ---------- */
.fx-on .btn--dark {
  background: linear-gradient(110deg, var(--ink) 0 48%, var(--coral) 70%, var(--pink) 100%);
  background-size: 230% 100%; background-position: 0 0;
  transition: background-position .7s var(--ease), transform .3s var(--ease), box-shadow .3s;
}
.fx-on .btn--dark:hover { background-position: 100% 0; box-shadow: 0 10px 24px rgba(236,44,108,.25); }
.fx-on .btn:active { transform: scale(.98); }
.fx-on .whats-float, .fx-on .custom .btn { transition: translate .35s var(--ease), transform .2s; }

/* ---------- Gavetas e janela do produto ---------- */
.fx-on .overlay { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .35s ease; }
.fx-on .drawer { transition: transform .55s var(--ease), visibility .55s; box-shadow: -20px 0 60px rgba(0,0,0,.12); }
.fx-on .drawer--left { box-shadow: 20px 0 60px rgba(0,0,0,.12); }
.fx-on .drawer.is-open .item { animation: fxSobeSuave .6s var(--ease) both; }
.fx-on .drawer.is-open .item:nth-child(2) { animation-delay: .05s; }
.fx-on .drawer.is-open .item:nth-child(3) { animation-delay: .1s; }
.fx-on .drawer.is-open .drawer__nav a { animation: fxSobeSuave .6s var(--ease) both; }
.fx-on .drawer.is-open .drawer__nav a:nth-child(n+2) { animation-delay: .03s; }
.fx-on .drawer.is-open .drawer__nav a:nth-child(n+4) { animation-delay: .07s; }
.fx-on .drawer.is-open .drawer__nav a:nth-child(n+6) { animation-delay: .11s; }
.fx-on .modal__box { animation: fxModal .6s var(--ease); }
@keyframes fxModal { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.fx-on .modal__info > * { animation: fxSobeSuave .7s var(--ease) both; }
.fx-on .modal__info > *:nth-child(n+3) { animation-delay: .06s; }
.fx-on .modal__info > *:nth-child(n+6) { animation-delay: .12s; }
.fx-on .size { transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease); }
.fx-on .size:hover { transform: translateY(-2px); }
.fx-on .badge { transition: transform .3s var(--ease); }

/* celular: janela do produto sobe de baixo, estilo app */
@media (max-width: 640px) {
  .modal { align-items: end; }
  .modal__box { height: auto !important; max-height: 92vh !important; border-radius: 18px 18px 0 0; }
  .modal__box::before { content: ""; position: sticky; top: 0; z-index: 3; display: block; width: 44px; height: 5px; margin: 8px auto -13px; border-radius: 3px; background: rgba(0,0,0,.2); grid-column: 1 / -1; }
  .fx-on .modal__box { animation: fxSheet .55s var(--ease); }
  @keyframes fxSheet { from { transform: translateY(100%); } }
}

/* ---------- Seções que aparecem ao rolar ---------- */
.fx-on .fx-reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.fx-on .fx-reveal.is-in { opacity: 1; transform: none; }
.fx-on .perk svg { transition: transform .6s var(--ease); }
.fx-on .perk:hover svg { transform: rotate(-8deg) scale(1.12); }
.fx-on .custom img { transition: transform 1.4s var(--ease); }
.fx-on .custom:hover img { transform: scale(1.04); }
.fx-on .custom { overflow: hidden; }

/* ---------- "Elas usam": carrossel infinito ---------- */
.fx-insta { display: block !important; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.fx-insta__track { display: flex; gap: 8px; width: max-content; animation: fxMarquee 45s linear infinite; }
.fx-insta:hover .fx-insta__track { animation-play-state: paused; }
.fx-insta__track a { flex: 0 0 auto; width: clamp(160px, 18vw, 240px); aspect-ratio: 3 / 4 !important; overflow: hidden; }

/* ---------- Cursor "Ver" sobre as fotos (mouse) ---------- */
.fx-cursor {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  width: 0; height: 0;
}
.fx-cursor span {
  position: absolute; left: -38px; top: -38px; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(17,17,17,.82); color: #fff;
  font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase;
  backdrop-filter: blur(4px); transform: scale(0); transition: transform .45s var(--ease);
}
.fx-cursor.is-on span { transform: scale(1); }
.fx-on .card__media { cursor: none; }
.fx-on .card__media .card__quick, .fx-on .card__media .card__quick * { cursor: pointer; }
@media (hover: none), (pointer: coarse) { .fx-on .card__media { cursor: pointer; } .fx-cursor { display: none; } }

/* ---------- Imagens em geral ---------- */
.fx-on img[data-fx-img]:not(.is-loaded) { opacity: 0; }
.fx-on img[data-fx-img].is-loaded { transition: opacity .7s ease, transform 1.3s var(--ease), filter .5s; }

/* ---------- Páginas internas (checkout, conta, pedido) ---------- */
.fx-on .co-card, .fx-on .co-title, .fx-on .co-msg { animation: fxSobeSuave .8s var(--ease) both; }
.fx-on .co-main .co-card:nth-child(2) { animation-delay: .08s; }
.fx-on .co-main .co-card:nth-child(3) { animation-delay: .16s; }
.fx-on .co-side .co-card { animation-delay: .12s; }
.fx-on .co-field input { transition: border-color .2s, box-shadow .3s var(--ease); }
.fx-on .ped__icon { animation: fxPop .8s var(--ease) both .15s; }
.fx-on .acc-steps li.is-done::before { animation: fxPop .6s var(--ease) both; }
