/* Fluidez: animações leves da loja (ver fluidez.js). */

/* Transição suave entre páginas (Chrome, Edge e Safari recentes; nos outros
   navegadores a troca continua normal). */
@view-transition { navigation: auto; }
::view-transition-old(root){ animation: fx-sai .22s ease both; }
::view-transition-new(root){ animation: fx-entra .32s ease both; }
@keyframes fx-sai{ to{ opacity:0; } }
@keyframes fx-entra{ from{ opacity:0; } }

/* Entrada ao rolar */
.fx-revelar{ opacity:0; transform:translateY(16px); transition:opacity .7s cubic-bezier(.2,.7,.2,1) var(--fx-atraso, 0ms), transform .7s cubic-bezier(.2,.7,.2,1) var(--fx-atraso, 0ms); }
.fx-revelar.fx-visivel{ opacity:1; transform:none; }

/* "Pulinho" da sacola ao adicionar (o número é o contador original) */
.topo-carrinho.fx-pulo{ animation:fx-pulo .7s cubic-bezier(.3,1.5,.5,1); }
.topo-carrinho.fx-pulo::after{ animation:fx-bolha .7s ease; }
@keyframes fx-pulo{ 0%{ transform:scale(1); } 30%{ transform:scale(1.22) rotate(-7deg); } 60%{ transform:scale(.95) rotate(4deg); } 100%{ transform:none; } }
@keyframes fx-bolha{ 0%{ transform:scale(.5); } 55%{ transform:scale(1.3); } 100%{ transform:none; } }

/* Brilho de carregamento no lugar do preço */
.fx-carregando{ color:transparent !important; border-radius:6px; min-width:140px; display:inline-block; background:linear-gradient(90deg, rgba(74,18,17,.06) 25%, rgba(74,18,17,.13) 50%, rgba(74,18,17,.06) 75%); background-size:200% 100%; animation:fx-brilho 1.3s linear infinite; }
#monte-kit-produtos > p:only-child{ color:transparent; height:220px; border-radius:14px; background:linear-gradient(90deg, rgba(74,18,17,.05) 25%, rgba(74,18,17,.11) 50%, rgba(74,18,17,.05) 75%); background-size:200% 100%; animation:fx-brilho 1.3s linear infinite; }
@keyframes fx-brilho{ from{ background-position:200% 0; } to{ background-position:-200% 0; } }

/* Botões e cards respondem ao toque */
.card-produto-comprar, .comprar-produto, .btn{ transition:transform .15s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.card-produto-comprar:active, .comprar-produto:not(:disabled):active, .btn:active{ transform:scale(.97); }

/* Construção olfativa abre com suavidade ao trocar de fragrância */
.construcao-olfativa:not([hidden]){ animation:fx-abre .38s cubic-bezier(.2,.7,.2,1); }
@keyframes fx-abre{ from{ opacity:0; transform:translateY(-6px); } }

/* Aviso de cookies mais compacto no celular */
@media (max-width:700px){
  .analytics-consent{ left:10px; right:10px; bottom:max(10px, env(safe-area-inset-bottom)); padding:12px 14px; font-size:12.5px; line-height:1.45; display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  .analytics-consent p{ margin:0; flex:1 1 100%; }
  .analytics-consent button{ margin:0; padding:8px 12px; flex:1 1 0; }
}

@media (prefers-reduced-motion:reduce){
  @view-transition { navigation: none; }
  .fx-revelar{ opacity:1; transform:none; transition:none; }
  .topo-carrinho.fx-pulo, .topo-carrinho.fx-pulo::after, .construcao-olfativa:not([hidden]){ animation:none; }
  .fx-carregando, #monte-kit-produtos > p:only-child{ animation:none; }
}
