/* ===========================================
   ANIMAÇÕES E MICROINTERAÇÕES
   Catálogo Digital - Notas Fácil
   =========================================== */

/* ========== KEYFRAMES ========== */

/* Pop In - entrada de elementos */
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* Pop Out - feedback de clique */
@keyframes popOut {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Shake - campos obrigatórios */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Cart Bounce - ícone do carrinho */
@keyframes cartBounce {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Badge Pop - número do carrinho */
@keyframes badgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Confetti - confirmação de pedido */
@keyframes confettiBurst {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(-100px) rotate(360deg); }
}

/* Pulse Glow - destaque de elementos */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); }
}

/* Heart Beat - favoritar */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Status Pulse - pedido ativo */
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Shimmer - skeleton loading */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Success Check - confirmação */
@keyframes successCheck {
    0% { stroke-dashoffset: 50; }
    100% { stroke-dashoffset: 0; }
}

/* Slide In Right - entrada lateral */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Bounce In - entrada com bounce */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* ========== CLASSES DE ANIMAÇÃO ========== */

.animate-pop-in {
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-pop {
    animation: popOut 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-cart-bounce {
    animation: cartBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-badge-pop {
    animation: badgePop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-pulse-glow {
    animation: pulseGlow 2s infinite;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.status-active {
    animation: statusPulse 2s infinite;
}

/* Confetti particle */
.confetti-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiBurst 1s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

/* Botão com feedback de sucesso */
.btn-add-success {
    transition: all 0.3s ease;
}

.btn-add-success.added {
    background-color: #16a34a !important;
    transform: scale(0.95);
}

/* Image zoom on hover */
.img-zoom-container {
    overflow: hidden;
}

.img-zoom-container img {
    transition: transform 0.3s ease;
}

.img-zoom-container:hover img {
    transform: scale(1.05);
}

/* ========== ACESSIBILIDADE ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}
