/* Root color variables */
:root {
    --color-primary: #2563eb;      /* Blue-600 */
    --color-primary-light: #3b82f6;/* Blue-500 */
    --color-secondary: #f59e42;    /* Orange-400 */
    --color-accent: #10b981;       /* Emerald-500 */
    --color-background: #f9fafb;   /* Gray-50 */
    --color-surface: #ffffff;      /* White */
    --color-border: #e5e7eb;       /* Gray-200 */
    --color-text: #1f2937;         /* Gray-800 */
    --color-muted: #6b7280;        /* Gray-500 */
    --color-danger: #ef4444;       /* Red-500 */
    --color-success: #22c55e;      /* Green-500 */
}

/* Custom utilities using CSS variables */
.bg-primary { background-color: var(--color-primary); }
.bg-primary-light { background-color: var(--color-primary-light); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.border-primary { border-color: var(--color-primary); }
.hover\:bg-primary:hover { background-color: var(--color-primary); }
.hover\:bg-secondary:hover { background-color: var(--color-secondary); }

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Product card hover effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Category card effects */


/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

/* Search Animation Styles */
.search-overlay {
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-overlay.active {
    transform: translateY(0);
}

.search-input-container {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

.search-overlay.active .search-input-container {
    transform: scale(1);
    opacity: 1;
}

.search-suggestion {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.search-overlay.active .search-suggestion {
    opacity: 1;
    transform: translateY(0);
}

.search-suggestion:nth-child(1) { transition-delay: 0.1s; }
.search-suggestion:nth-child(2) { transition-delay: 0.15s; }
.search-suggestion:nth-child(3) { transition-delay: 0.2s; }
.search-suggestion:nth-child(4) { transition-delay: 0.25s; }
.search-suggestion:nth-child(5) { transition-delay: 0.3s; }

.search-highlight {
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

/* Custom Scrollbar Styles */
.scrollbar-thin {
    scrollbar-width: thin;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 3px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 1.5px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Smooth scroll behavior */
#searchSuggestions {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar on mobile devices */
@media (max-width: 640px) {
    .scrollbar-thin::-webkit-scrollbar {
        display: none;
    }
    .scrollbar-thin {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* Enhanced footer animations and effects */
.footer-link {
    position: relative;
    transition: all 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.social-icon:hover::before {
    left: 100%;
}

.social-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.newsletter-input {
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-bg {
    background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #0f172a 100%);
}

.trust-badge {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-cart {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    background: linear-gradient(135deg, var(--color-secondary), #D97706);
    transition: all 0.3s ease;
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.4);
}

.floating-cart {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}