/* ===================================
   MEGA COOL EXTRAS - Maximum Coolness
   Trendy Features Pack
   =================================== */

/* ========================================
   1. CONFETTI CELEBRATION
   ======================================== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #7BC043;
    top: -10px;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   2. SPINNING DISCOUNT WHEEL
   ======================================== */
.spin-wheel-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 500px;
}

.spin-wheel-popup.active {
    transform: translate(-50%, -50%) scale(1);
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #FF6B35 0deg 60deg,
        #3B9DD5 60deg 120deg,
        #7BC043 120deg 180deg,
        #FFD700 180deg 240deg,
        #FF1493 240deg 300deg,
        #00CED1 300deg 360deg
    );
    transition: transform 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 30px rgba(59, 157, 213, 0.5);
}

.wheel.spinning {
    transform: rotate(1800deg);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #ef4444;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    z-index: 10;
}

.spin-btn {
    background: linear-gradient(135deg, #FF6B35, #f59e0b);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.spin-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.6);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   3. VIDEO BACKGROUND HERO
   ======================================== */
.video-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.video-hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.video-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59,157,213,0.8), rgba(123,192,67,0.8));
    z-index: 1;
}

.video-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* ========================================
   4. PRODUCT BADGES (New, Hot, Sale, Out of Stock)
   ======================================== */
.badge-out-of-stock {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    animation: outOfStockPulse 2s ease-in-out infinite;
}

@keyframes outOfStockPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.badge-new {
    background: linear-gradient(135deg, #00C9FF, #92FE9D);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px 20px 20px 0;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    animation: badgeFloat 2s ease-in-out infinite;
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.badge-hot {
    background: linear-gradient(135deg, #FF0844, #FF6B35);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    animation: hotPulse 1s ease-in-out infinite;
}

@keyframes hotPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 8, 68, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 8, 68, 0.8);
        transform: scale(1.05);
    }
}

.badge-trending {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    animation: trendingShake 0.5s ease-in-out infinite;
}

@keyframes trendingShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* ========================================
   5. FLOATING CHAT WIDGET
   ======================================== */
.chat-widget {
    position: fixed;
    bottom: 120px;
    right: 30px;
    z-index: 1000;
}

.chat-bubble {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: chatBounce 2s ease-in-out infinite;
    position: relative;
}

@keyframes chatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.chat-bubble:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.6);
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    animation: notificationPop 0.5s ease infinite;
}

@keyframes notificationPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.chat-window.active {
    transform: scale(1);
}

/* ========================================
   6. PRICE DROP ALERT
   ======================================== */
.price-drop-alert {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FF0844, #FFB199);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(255, 8, 68, 0.4);
    animation: priceDropBounce 1s ease-in-out infinite;
    z-index: 20;
    white-space: nowrap;
}

@keyframes priceDropBounce {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ========================================
   7. STOCK ALERT (Low Stock Warning)
   ======================================== */
.stock-alert {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: stockWarning 1s ease-in-out infinite;
}

@keyframes stockWarning {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.stock-alert i {
    font-size: 1.2rem;
    animation: warningBlink 1s ease-in-out infinite;
}

@keyframes warningBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========================================
   8. SCRATCH CARD EFFECT
   ======================================== */
.scratch-card {
    position: relative;
    width: 300px;
    height: 200px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
}

.scratch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c0c0c0, #808080);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   9. ANIMATED CHECKMARK (Success)
   ======================================== */
.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkmarkPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.checkmark-icon {
    font-size: 3rem;
    color: white;
    animation: checkmarkDraw 0.5s ease 0.3s both;
}

@keyframes checkmarkDraw {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   10. SKELETON LOADER (Modern)
   ======================================== */
.skeleton-product {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skeleton-box {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #f8f8f8 50%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

/* ========================================
   11. SNOW/CONFETTI FALLING EFFECT
   ======================================== */
.snow-flake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1.5rem;
    opacity: 0.8;
    animation: snowFall linear infinite;
    pointer-events: none;
}

@keyframes snowFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ========================================
   12. CUSTOM CURSOR
   ======================================== */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #3B9DD5;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, background-color 0.15s ease;
    mix-blend-mode: difference;
}

.custom-cursor.clicking {
    transform: scale(0.5);
    background-color: #3B9DD5;
}

.custom-cursor-trail {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #3B9DD5, #7BC043);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.6;
}

/* ========================================
   13. PRODUCT COMPARISON SLIDER
   ======================================== */
.comparison-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 16px;
}

.comparison-image {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-image.after {
    clip-path: inset(0 50% 0 0);
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #3B9DD5;
}

.comparison-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
}

/* ========================================
   14. TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes toastSlideIn {
    0% {
        transform: translateX(400px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    background: #10b981;
    color: white;
}

.toast.error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast.info .toast-icon {
    background: #3B9DD5;
    color: white;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.toast-message {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ========================================
   15. SCROLL ANIMATIONS (Stagger)
   ======================================== */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .spin-wheel-popup {
        max-width: 90%;
        padding: 2rem 1rem;
    }
    
    .wheel-container {
        width: 250px;
        height: 250px;
    }
    
    .chat-window {
        width: 90%;
        height: 400px;
    }
    
    .toast {
        min-width: 280px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .confetti-container,
    .spin-wheel-popup,
    .chat-widget,
    .toast-container,
    .custom-cursor,
    .custom-cursor-trail {
        display: none !important;
    }
}

