/* Custom styles for the Amazon deals page */

/* Smooth transitions for all elements */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Custom gradient backgrounds */
.bg-gradient-radial {
    background: radial-gradient(circle at 30% 50%, rgba(251, 146, 60, 0.1), transparent);
}

/* Line clamp utilities for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Floating animation for hero elements */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 3s infinite;
}

/* Custom hover effects */
.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(251, 146, 60, 0.3);
}

/* Deal card enhancements */
.deal-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.deal-card:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-color: rgba(251, 146, 60, 0.3);
}

/* Price styling */
.price-highlight {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge styles */
.badge-gradient {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Button enhancements */
.btn-primary {
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 4px 14px 0 rgba(251, 146, 60, 0.39);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ea580c, #b91c1c);
    box-shadow: 0 6px 20px rgba(251, 146, 60, 0.4);
    transform: translateY(-2px);
}

/* Loading animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Star rating enhancements */
.star-rating {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Responsive design enhancements */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .deal-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .deal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1025px) {
    .deal-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for better accessibility */
.focus-ring:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .deal-card {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .deal-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .deal-card {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: rgba(71, 85, 105, 0.8);
        color: #f1f5f9;
    }
    
    .deal-card:hover {
        border-color: rgba(251, 146, 60, 0.5);
    }
}