/* Efeitos do js/animacoes.js. Fica separado do estilo.css para não misturar */

/* 1. Mascote acena e o balão troca de frase.
   Mexe o .mascote inteiro (imagem + gorro/chapéu do tema, que é desenhado por cima): o aceno usa rotate/scale
   separados, então soma com o "flutuar" (transform) que já roda nele sem um apagar o outro */
.mascote { cursor: pointer; }
.mascote.aceno { animation: flutuar 3.6s ease-in-out infinite, aceno .8s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 50% 90%; }
@keyframes aceno {
  20% { rotate: -8deg; scale: 1.04; }
  45% { rotate: 7deg; }
  70% { rotate: -4deg; }
}
.balao { transition: opacity .25s, transform .25s; }
.balao.troca { opacity: 0; transform: rotate(-6deg) scale(.85); }

/* 2. Foto voando até o carrinho */
.voando {
  position: fixed; z-index: 90; pointer-events: none; object-fit: cover;
  border-radius: 16px; border: 3px solid #fff; box-shadow: 0 10px 24px rgba(0,0,0,.3); background: #fff;
}

/* 5. Contagem para a data, no topo da categoria */
.chip-hero.contagem { background: #ffd23f; animation: piscar-leve 2.4s ease-in-out infinite; }
@keyframes piscar-leve { 50% { transform: scale(1.05); } }

/* 6. Arrastar a foto com o mouse para "girar" a peça */
.palco.giravel { cursor: grab; }
.palco.girando { cursor: grabbing; user-select: none; }
.palco.giravel::after {
  content: "↔ arraste para girar"; position: absolute; left: 50%; bottom: 10px; translate: -50% 0;
  background: rgba(19,32,74,.75); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
@media (hover: hover) { .palco.giravel:hover::after { opacity: 1; } }
.palco.girando::after { opacity: 0 !important; }

/* 7. Confete */
.confete { position: fixed; inset: 0; z-index: 95; pointer-events: none; overflow: hidden; }
.confete i { position: absolute; top: 0; width: 9px; height: 14px; border-radius: 2px; }

/* 9. Carrinho: sugestões + como funciona + aviso de revisão */
.sugestoes, .como-funciona { margin: 16px 0 6px; }
.sugestoes h4, .como-funciona h4 { margin: 0 0 8px; font-family: "Baloo 2", sans-serif; font-size: 18px; color: var(--azul-escuro, #0b2a6f); }
.sug-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sug { position: relative; }
.sug-abrir {
  width: 100%; display: grid; gap: 1px; padding: 0 0 6px; text-align: left; cursor: pointer; overflow: hidden;
  background: #fff; border: 2px solid var(--contorno, #13204a); border-radius: 12px; font: inherit; color: var(--contorno, #13204a);
  transition: transform .15s, box-shadow .15s;
}
.sug-abrir img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-bottom: 2px solid var(--contorno, #13204a); margin-bottom: 4px; }
.sug-abrir small, .sug-abrir strong, .sug-abrir b { padding: 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-abrir small { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--azul, #0a52e0); }
.sug-abrir strong { font-size: 12.5px; line-height: 1.2; }
.sug-abrir b { font-family: "Baloo 2", sans-serif; font-size: 14px; color: var(--verde-escuro, #3d7d0a); }
@media (hover: hover) { .sug-abrir:hover { transform: translateY(-2px); box-shadow: 2px 2px 0 var(--verde, #7cd521); } }
.sug-add {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: var(--verde, #7cd521); border: 2px solid var(--contorno, #13204a); box-shadow: 2px 2px 0 var(--contorno, #13204a);
  font: 800 18px/1 "Nunito", sans-serif; color: var(--contorno, #13204a); display: grid; place-items: center; padding: 0;
}
.sug-add:active { transform: translate(2px, 2px); box-shadow: none; }
.como-funciona { background: #f4f9f0; border: 2px dashed #b9e19a; border-radius: 14px; padding: 12px 14px; }
.como-funciona ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.35; }
.nota-revisao { margin: -2px 0 -4px; font-size: 12.5px; font-weight: 700; color: var(--texto-suave, #6b7391); text-align: center; }

/* 10. Aviso de cookies (js/medicao.js) — só aparece quando o Clarity/Analytics está ligado no config.js.
   O Evinho de chapéu de cozinheiro segura uma bandeja de cookies e fala num balão */
.aviso-cookies {
  position: fixed; z-index: 70; left: 50%; bottom: 14px; translate: -50% 0; width: min(440px, calc(100% - 20px));
  display: flex; align-items: flex-end; gap: 4px; pointer-events: none;
  animation: ck-chegar .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
.aviso-cookies > * { pointer-events: auto; }
/* bloqueio: a página fica escurecida e borrada atrás, sem tocar nem rolar, até aceitar */
.cookies-muro {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: rgba(7, 26, 79, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  overscroll-behavior: contain; touch-action: none;
}
.cookies-muro .aviso-cookies { position: relative; left: auto; bottom: auto !important; translate: none; padding-top: 34px; }
@keyframes ck-chegar { from { transform: translateY(60px) scale(.9); opacity: 0; } }
.ck-evinho { position: relative; flex: 0 0 118px; margin-bottom: -6px; animation: ck-balanca 2.6s ease-in-out .6s infinite; transform-origin: 50% 100%; }
.ck-evinho img { display: block; width: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.ck-chef { position: absolute; left: 6%; top: -31%; width: 88%; }   /* na largura da cabeça, encostado nela */
.ck-bandeja { position: absolute; left: 4%; bottom: 18%; width: 92%; }   /* na altura das mãos, sem tapar o rosto */
.ck-cookie { animation: ck-pula 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.ck-cookie:nth-of-type(2) { animation-delay: .2s; }
.ck-cookie:nth-of-type(3) { animation-delay: .4s; }
@keyframes ck-pula { 50% { transform: translateY(-4px) rotate(-6deg); } }
@keyframes ck-balanca { 50% { rotate: -4deg; } }
.ck-balao {
  position: relative; flex: 1; margin-bottom: 48px; padding: 12px 14px 10px;
  display: grid; justify-items: center; gap: 6px; text-align: center;
  background: #fff; border: 2.5px solid var(--contorno, #13204a); border-radius: 18px; box-shadow: 4px 4px 0 var(--verde, #7cd521);
}
/* bico do balão apontando para o Evinho */
.ck-balao::before { content: ""; position: absolute; left: -13px; bottom: 18px; border: 11px solid transparent; border-right: 14px solid var(--contorno, #13204a); border-left: 0; }
.ck-balao::after { content: ""; position: absolute; left: -9px; bottom: 21px; border: 8px solid transparent; border-right: 11px solid #fff; border-left: 0; }
.ck-balao p { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--texto-suave, #4a5578); }
.ck-balao p b { display: block; margin-bottom: 2px; font-family: "Baloo 2", sans-serif; font-size: 18px; font-weight: 800; color: var(--contorno, #13204a); }
.ck-aceitar { width: 100%; justify-content: center; padding: 9px 18px; font-size: 16px; margin-bottom: 4px; }

/* 8. Selo "Novidade" */
.selo.novidade { background: #ffd23f; color: var(--contorno, #13204a); }

@media print { .confete, .voando { display: none; } }
