/* Mobile Enhancement Styles for Deals Page */

/* Mobile-specific animations */
@media (max-width: 768px) {
    .animate-fade-in {
        animation: fadeInUp 0.6s ease-out forwards;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Touch feedback animations */
    .touch-feedback {
        transition: transform 0.1s ease-out;
    }

    .touch-feedback:active {
        transform: scale(0.95);
    }

    /* Swipe animations */
    .swipe-left {
        animation: swipeLeft 0.3s ease-out;
    }

    .swipe-right {
        animation: swipeRight 0.3s ease-out;
    }

    @keyframes swipeLeft {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(-100%);
        }
    }

    @keyframes swipeRight {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(100%);
        }
    }

    /* Pull to refresh indicator */
    #pull-to-refresh-indicator {
        transition: transform 0.3s ease-out;
    }

    /* Mobile-optimized deal cards */
    .deal-card {
        transition: all 0.3s ease-out;
        will-change: transform;
    }

    .deal-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }

    /* Mobile countdown timers */
    .countdown-mobile {
        font-size: 0.875rem;
        font-weight: 600;
    }

    /* Mobile notification styles */
    .notification {
        max-width: calc(100vw - 2rem);
        margin: 0 1rem;
    }

    /* Mobile search enhancements */
    .mobile-search-active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1000;
        padding: 1rem;
    }

    /* Mobile menu enhancements */
    .mobile-menu-item {
        padding: 1rem;
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
        transition: all 0.2s ease-out;
    }

    .mobile-menu-item:active {
        background-color: rgba(59, 130, 246, 0.1);
        transform: scale(0.98);
    }

    /* Mobile flash sale banner */
    .flash-sale-mobile {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        position: relative;
        overflow: hidden;
    }

    .flash-sale-mobile::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
        animation: float 20s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0px) rotate(0deg); }
        50% { transform: translateY(-10px) rotate(180deg); }
    }

    /* Mobile deal categories */
    .deal-category-mobile {
        background: white;
        border-radius: 1rem;
        padding: 1.5rem;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease-out;
        cursor: pointer;
    }

    .deal-category-mobile:active {
        transform: scale(0.95);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .deal-category-mobile.active {
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        color: white;
        transform: scale(1.02);
    }

    /* Mobile quick view modal */
    .quick-view-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        padding: 1rem;
    }

    .quick-view-content {
        background: white;
        border-radius: 1rem;
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        animation: modalSlideUp 0.3s ease-out;
    }

    @keyframes modalSlideUp {
        from {
            opacity: 0;
            transform: translateY(50px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mobile haptic feedback simulation */
    .haptic-feedback {
        animation: hapticPulse 0.1s ease-out;
    }

    @keyframes hapticPulse {
        0% { transform: scale(1); }
        50% { transform: scale(0.98); }
        100% { transform: scale(1); }
    }

    /* Mobile scroll optimizations */
    .smooth-scroll {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile image optimizations */
    .lazy-image {
        opacity: 0;
        transition: opacity 0.3s ease-out;
    }

    .lazy-image.loaded {
        opacity: 1;
    }

    /* Mobile button enhancements */
    .mobile-button {
        position: relative;
        overflow: hidden;
    }
    
    .mobile-button::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease-out, height 0.3s ease-out;
    }

    .mobile-button:active::before {
        width: 200px;
        height: 200px;
    }

    /* Mobile progress indicators */
    .progress-bar {
        height: 4px;
        background: rgba(59, 130, 246, 0.2);
        border-radius: 2px;
        overflow: hidden;
    }
    
    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #3b82f6, #1d4ed8);
        border-radius: 2px;
        transition: width 0.3s ease-out;
    }

    /* Mobile skeleton loading */
    .skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: skeletonLoading 1.5s infinite;
    }

    @keyframes skeletonLoading {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    /* Mobile accessibility improvements */
    .focus-visible {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }

    /* Mobile reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* Mobile dark mode support */
    @media (prefers-color-scheme: dark) {
        .deal-card {
            background: #1f2937;
            border-color: #374151;
            color: #f9fafb;
        }

        .deal-category-mobile {
            background: #1f2937;
            color: #f9fafb;
        }

        .quick-view-content {
            background: #1f2937;
            color: #f9fafb;
        }
    }

    /* Mobile landscape optimizations */
    @media (orientation: landscape) and (max-height: 500px) {
        .flash-sale-mobile {
            padding: 1rem 0;
        }

        .deal-card {
            margin-bottom: 1rem;
        }

        .quick-view-content {
            max-height: 80vh;
        }
    }

    /* Mobile high DPI display optimizations */
    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
        .deal-card img {
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
        }
    }

    /* Mobile battery optimization */
    @media (prefers-reduced-data: reduce) {
        .deal-card img {
            loading: lazy;
        }

        .animation {
            animation: none !important;
        }
    }
}

/* Tablet-specific enhancements */
@media (min-width: 769px) and (max-width: 1024px) {
    .deal-card {
        transition: all 0.3s ease-out;
    }

    .deal-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    }

    .deal-category-mobile {
        padding: 2rem;
    }
}

/* High-performance mobile devices */
@media (min-width: 768px) and (max-width: 1024px) and (min-resolution: 2dppx) {
    .deal-card {
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
    }
}

/* Mobile gesture indicators */
.gesture-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.gesture-indicator.show {
    opacity: 1;
}

/* Mobile loading states */
.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile error states */
.error-state {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ef4444;
}

/* Mobile success states */
.success-state {
        text-align: center;
    padding: 2rem;
    color: #059669;
}

.success-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #10b981;
}

/* Mobile empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

/* Mobile offline indicator */
.offline-indicator {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 0.5rem;
        z-index: 1001;
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
}

.offline-indicator.show {
    transform: translateY(0);
}

/* Mobile performance monitoring */
.performance-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.performance-indicator.show {
    opacity: 1;
}

/* Mobile accessibility focus styles */
@media (prefers-reduced-motion: no-preference) {
    .focus-visible {
        transition: outline 0.2s ease-out;
    }
}

/* Mobile print styles */
@media print {
    .deal-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .mobile-menu,
    .notification,
    .quick-view-modal {
        display: none !important;
    }
} 