/* ============================================
   LIKEFOOD Animations & Micro-interactions
   ============================================ */

/* ===== FLY TO CART ANIMATION ===== */
.fly-item {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
}
.fly-item.flying {
    transform: scale(0.15) !important;
    opacity: 0.3;
}

/* ===== CART ICON BOUNCE ===== */
@keyframes cartBounce {
    0% { transform: scale(1); }
    20% { transform: scale(1.4) rotate(-8deg); }
    40% { transform: scale(0.9) rotate(4deg); }
    60% { transform: scale(1.15) rotate(-2deg); }
    80% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.cart-bounce { animation: cartBounce 0.6s ease; }

/* ===== BADGE POP ===== */
@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}
.badge-pop { animation: badgePop 0.4s ease; }

/* ===== TOAST NOTIFICATION ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast-msg {
    pointer-events: auto;
    background: #fff;
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 320px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 4px solid #43A047;
}
.toast-msg.show { transform: translateX(0); }
.toast-msg.hiding { transform: translateX(120%); }
.toast-msg .toast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.toast-msg .toast-text { flex: 1; line-height: 1.3; }
.toast-msg .toast-close {
    cursor: pointer;
    opacity: 0.4;
    font-size: 1rem;
    padding: 4px;
}
.toast-msg .toast-close:hover { opacity: 1; }

@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 80px;
        right: 12px;
        left: 12px;
    }
    .toast-msg {
        max-width: 100%;
        transform: translateY(120%);
    }
    .toast-msg.show { transform: translateY(0); }
    .toast-msg.hiding { transform: translateY(120%); }
}

/* ===== SCROLL REVEAL ===== */
.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}
/* Stagger children */
.reveal-item:nth-child(2) { transition-delay: 0.1s; }
.reveal-item:nth-child(3) { transition-delay: 0.2s; }
.reveal-item:nth-child(4) { transition-delay: 0.3s; }
.reveal-item:nth-child(5) { transition-delay: 0.4s; }

/* ===== PRODUCT CARD HOVER ===== */
.wf-product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.wf-product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12) !important;
}
.wf-product-card:active {
    transform: scale(0.97) !important;
}

/* ===== ADD TO CART BUTTON PULSE ===== */
@keyframes btnPulse {
    0% { box-shadow: 0 0 0 0 rgba(67,160,71,0.5); }
    70% { box-shadow: 0 0 0 12px rgba(67,160,71,0); }
    100% { box-shadow: 0 0 0 0 rgba(67,160,71,0); }
}
.btn-pulse { animation: btnPulse 0.6s ease; }

/* ===== HEART/WISHLIST ANIMATION ===== */
@keyframes heartPop {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.heart-pop { animation: heartPop 0.4s ease; }

/* ===== PAGE TRANSITION ===== */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
main, .main-content, .admin-content {
    animation: fadeSlideIn 0.35s ease;
}

/* ===== SKELETON LOADING ===== */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ===== RIPPLE EFFECT ON BUTTONS ===== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ===== FLOATING ELEMENTS ===== */
@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.float-soft { animation: floatSoft 3s ease-in-out infinite; }

/* ===== COUNTER ANIMATION ===== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.count-up { animation: countUp 0.5s ease forwards; }
