// Smooth scroll para botões
document.querySelectorAll('button').forEach(button => {
button.addEventListener('click', function(e) {
e.preventDefault();
// Aqui você pode adicionar a lógica de compra ou redirecionamento
this.innerHTML = '✅ Adicionado ao Carrinho!';
this.classList.remove('pulse-animation');
this.classList.add('bg-green-800');
setTimeout(() => {
this.innerHTML = '🛒 Comprar Agora';
this.classList.add('pulse-animation');
this.classList.remove('bg-green-800');
}, 2000);
});
});
// Animação de entrada para cards
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('fade-in');
}
});
}, observerOptions);
document.querySelectorAll('.card-shadow').forEach(card => {
observer.observe(card);
});