/* Base Styles - МАКСІПОЛЕ */
/* CSS Variables, Reset, and Core Styles */

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary-50: #f0fdf4;
    --primary-100: #dcfce7;
    --primary-200: #bbf7d0;
    --primary-300: #86efac;
    --primary-400: #4ade80;
    --primary-500: #22c55e;
    --primary-600: #16a34a;
    --primary-700: #15803d;
    --primary-800: #166534;
    --primary-900: #14532d;
    
    /* Neutral Colors */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    
    /* Accent Colors */
    --accent-orange: #f97316;
    --accent-yellow: #eab308;
    --accent-blue: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--neutral-800);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Selection styles */
::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-300);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-400);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--space-8);
        padding-right: var(--space-8);
    }
}

/* Main content containers - top padding for fixed header */
/* Header height: header-top (~46px) + navbar (~92px) = ~138px + spacing = 155px */
main.container {
    padding-top: 155px !important;
    padding-bottom: 60px !important;
}

section.products-section {
    padding-top: 155px !important;
    padding-bottom: 60px !important;
}

@media (max-width: 768px) {
    /* Mobile header: header-top (~28px) + navbar (~70px) = ~98px + spacing = 130px */
    main.container {
        padding-top: 130px !important;
        padding-bottom: 40px !important;
    }
    
    section.products-section {
        padding-top: 130px !important;
        padding-bottom: 40px !important;
    }
    
    /* Оптимизация для мобильных устройств */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
    
    /* Улучшение производительности скролла */
    .hero, .categories-section, .popular-section, .features-section {
        will-change: transform;
    }
    
    /* Оптимизация анимаций для мобильных */
    .animate-fade-in, .animate-slide-in-left, .animate-slide-in-right {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
}

@media (max-width: 480px) {
    main.container {
        padding-top: 125px !important;
        padding-bottom: 30px !important;
    }
    
    section.products-section {
        padding-top: 125px !important;
        padding-bottom: 30px !important;
    }
}



/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}



/* Highlight matching text */
.highlight {
    background: rgba(34, 197, 94, 0.2);
    color: var(--primary-700);
    font-weight: 600;
    padding: 0 2px;
    border-radius: 3px;
}

