/* ============================================
   LIKEFOOD Sale Effects - Eye-catching Animations
   ============================================ */

/* ===== SALE BADGE - GLOW & PULSE ===== */
@keyframes saleGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255,68,68,0.4), 0 0 10px rgba(255,68,68,0.2); }
    50% { box-shadow: 0 0 15px rgba(255,68,68,0.6), 0 0 30px rgba(255,68,68,0.3), 0 0 45px rgba(255,68,68,0.1); }
}
@keyframes salePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.wf-product-badge, [class*="discount-badge"], [class*="sale-badge"],
[style*="background"][style*="border-radius"][style*="font-size:0.7"] {
    animation: saleGlow 2s ease-in-out infinite, salePulse 2s ease-in-out infinite !important;
    position: relative;
}

/* ===== SALE PRICE - SPARKLE TEXT ===== */
@keyframes priceShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.wf-product-price .current,
[style*="color:#43A047"][style*="font-weight:800"],
[style*="color: #43A047"][style*="font-weight: 800"] {
    background: linear-gradient(90deg, #43A047 20%, #66BB6A 40%, #A5D6A7 50%, #66BB6A 60%, #43A047 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: priceShimmer 3s linear infinite;
}

/* ===== FLASH SALE BAR - MORE DRAMATIC ===== */
@keyframes flashPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}
.flash-sale-bar {
    animation: flashPulse 1.5s ease-in-out infinite;
}
.flash-sale-bar::after {
    content: '🔥';
    position: absolute;
    right: 20px;
    animation: salePulse 1s ease-in-out infinite;
    font-size: 1.2rem;
}

/* ===== SALE CARD - ANIMATED GRADIENT BORDER ===== */
@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.wf-product-card.on-sale,
.wf-product-card:has([class*="discount"]),
.wf-product-card:has([class*="sale"]) {
    position: relative;
    border: 2px solid transparent !important;
    background-clip: padding-box !important;
}
.wf-product-card.on-sale::before,
.wf-product-card:has([class*="discount"])::before,
.wf-product-card:has([class*="sale"])::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #FF4444, #FF6B35, #FFD54F, #FF4444, #FF6B35);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    animation: borderRotate 3s ease infinite;
}

/* ===== ADD TO CART BUTTON - ATTENTION GRABBER ===== */
@keyframes btnShine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}
.wf-product-add, [class*="add-cart"], [onclick*="addToCart"] {
    position: relative !important;
    overflow: hidden !important;
}
.wf-product-add::after, [class*="add-cart"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: btnShine 4s ease-in-out infinite;
}

/* ===== DISCOUNT TAG - SHAKE ===== */
@keyframes tagShake {
    0%, 80%, 100% { transform: rotate(0); }
    85% { transform: rotate(-3deg); }
    90% { transform: rotate(3deg); }
    95% { transform: rotate(-2deg); }
}
.sale-countdown-badge {
    animation: tagShake 3s ease-in-out infinite, saleGlow 2s ease-in-out infinite !important;
}

/* ===== COUNTDOWN UNITS - FLIP EFFECT ===== */
@keyframes flipIn {
    0% { transform: rotateX(90deg); opacity: 0; }
    100% { transform: rotateX(0); opacity: 1; }
}
.countdown-unit {
    animation: flipIn 0.3s ease;
    perspective: 100px;
}

/* ===== SOCIAL PROOF - ATTENTION DOT ===== */
@keyframes liveDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.social-proof-popup::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF4444;
    animation: liveDot 1.5s ease-in-out infinite;
}

/* ===== FIRE EMOJI ANIMATION ON HOT BADGES ===== */
@keyframes fireWiggle {
    0%, 100% { transform: rotate(0) scale(1); }
    25% { transform: rotate(-5deg) scale(1.1); }
    75% { transform: rotate(5deg) scale(1.1); }
}
.product-hot-badge {
    animation: saleGlow 2s ease-in-out infinite !important;
}

/* ===== "MUA NGAY" / CTA BUTTON GLOW ===== */
@keyframes ctaGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(67,160,71,0.3); }
    50% { box-shadow: 0 4px 25px rgba(67,160,71,0.6), 0 0 40px rgba(67,160,71,0.2); }
}
.quickview-addcart, .checkout-btn,
[style*="background"][style*="#43A047"][style*="padding:14px"],
[style*="background"][style*="#2b9a3f"][style*="border-radius"] {
    animation: ctaGlow 2s ease-in-out infinite;
    transition: all 0.3s ease !important;
}
.quickview-addcart:hover, .checkout-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
}

/* ===== SPARKLE PARTICLES ON SALE ITEMS ===== */
@keyframes sparkle1 {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(0); }
    50% { opacity: 1; transform: translate(-10px, -15px) scale(1); }
}
@keyframes sparkle2 {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(0); }
    50% { opacity: 1; transform: translate(12px, -20px) scale(1); }
}
@keyframes sparkle3 {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(0); }
    50% { opacity: 1; transform: translate(5px, -25px) scale(1); }
}

/* ===== ORIGINAL PRICE STRIKETHROUGH ANIMATION ===== */
@keyframes strikeThrough {
    0% { width: 0; }
    100% { width: 100%; }
}
.wf-product-price .original,
[style*="text-decoration:line-through"] {
    position: relative;
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .flash-sale-bar::after { right: 8px; font-size: 1rem; }
    .wf-product-badge { animation-duration: 2.5s !important; }
}
