/* Premium Design Enhancements - Professional, Stylish, Animated */

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Header Enhancements - Premium White */
.header {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

/* Logo - Consistent with parts-orders.html */
.logo-img {
    display: block;
    height: 65px !important;
    width: auto;
    max-height: 65px !important;
    object-fit: contain;
    margin-right: 12px;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    flex-shrink: 0;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.logo:hover {
    transform: translateY(-2px);
}

/* Navigation Enhancements - High Contrast */
.nav a,
.header .nav a {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: color, transform;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    letter-spacing: 0.01em;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4af37 0%, #f4d03f 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav a:hover,
.header .nav a:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    font-weight: 700;
}

.nav a:hover::after {
    width: 100%;
}

.nav a.active,
.header .nav a.active {
    color: #ffffff !important;
    font-weight: 700;
}

.nav a.active::after {
    width: 100%;
}

/* Car Cards - Premium Professional Design */
.car-card {
    border-radius: 20px !important;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    will-change: transform, box-shadow;
    position: relative;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.car-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(244, 208, 63, 0.08) 50%, rgba(212, 175, 55, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-radius: 20px;
    z-index: 1;
}

.car-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.car-card:hover {
    transform: translateY(-12px) scale(1.03) rotateX(2deg) !important;
    border-color: rgba(212, 175, 55, 0.5) !important;
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 8px 24px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(212, 175, 55, 0.3) !important;
}

.car-card:hover::before {
    opacity: 1;
}

.car-card:hover::after {
    opacity: 1;
}

/* Car Image Enhancements - Square Format */
.car-image {
    background: #000000 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    height: 480px !important;
    min-height: 480px !important;
    max-height: 480px !important;
    aspect-ratio: 4 / 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px 8px 0 0 !important;
}

.car-image img,
.car-gallery-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    box-sizing: border-box !important;
    padding: 8px !important;
}

.car-card {
    display: flex !important;
    flex-direction: column !important;
}

.car-card:hover .car-image {
    transform: scale(1.02);
}

.car-gallery-img {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Buttons - Premium Animated Design */
.btn-primary,
.filter-btn,
.cta-btn {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%) !important;
    background-size: 200% 200% !important;
    color: #1f2937 !important;
    border: none !important;
    padding: 0.75rem 2rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.02em !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25), 0 2px 4px rgba(212, 175, 55, 0.15) !important;
    will-change: transform, box-shadow, background-position;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform: translateY(0) scale(1);
}

/* Animated gradient background */
.btn-primary::before,
.filter-btn::before,
.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Shine effect overlay */
.btn-primary::after,
.filter-btn::after,
.cta-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

/* Hover state - gradient shift and movement */
.btn-primary:hover,
.filter-btn:hover,
.cta-btn:hover {
    background-position: 100% 0% !important;
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4), 0 4px 8px rgba(212, 175, 55, 0.3) !important;
}

.btn-primary:hover::before,
.filter-btn:hover::before,
.cta-btn:hover::before {
    left: 100%;
}

.btn-primary:hover::after,
.filter-btn:hover::after,
.cta-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Active state - press down effect */
.btn-primary:active,
.filter-btn:active,
.cta-btn:active {
    background-position: 0% 0% !important;
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3), 0 1px 2px rgba(212, 175, 55, 0.2) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Button text positioning */
.btn-primary > *,
.filter-btn > *,
.cta-btn > * {
    position: relative;
    z-index: 2;
}

/* Secondary button style */
.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    border: 2px solid rgba(212, 175, 55, 0.3) !important;
    color: #f3f4f6 !important;
    padding: 0.75rem 2rem !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #374151 0%, #4b5563 50%, #374151 100%) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    color: #ffffff !important;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Gallery Arrows - Premium */
.gallery-arrow {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, opacity;
}

.gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.85) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Catalog Filters - Premium Professional White */
.catalog-filters {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%) !important;
    background-size: 200% 200% !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem !important;
    position: relative;
    overflow: hidden;
}

.catalog-filters label {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

.catalog-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.05), transparent);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.catalog-filters:hover {
    background-position: 100% 0% !important;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 6px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(212, 175, 55, 0.2) !important;
}

.catalog-filters:hover::before {
    left: 100%;
}

.filter-group select,
.filter-group input {
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
    outline: none !important;
}

/* Hero Section - Premium Professional Gradients */
.hero {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 25%, #f3f4f6 50%, #e5e7eb 75%, #d1d5db 100%) !important;
    background-size: 400% 400% !important;
    position: relative;
    overflow: hidden;
    animation: heroGradientShift 15s ease infinite;
    color: #1f2937 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

@keyframes heroGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.25) 0%, transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(244, 208, 63, 0.2) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 75%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.3) 0%, transparent 50%);
    pointer-events: none;
    animation: heroGlow 12s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.6) 0%, rgba(15, 23, 42, 0.85) 40%, rgba(15, 23, 42, 0.95) 100%);
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.05);
    }
}

/* Smooth Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.car-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.car-card:nth-child(1) { animation-delay: 0.1s; }
.car-card:nth-child(2) { animation-delay: 0.2s; }
.car-card:nth-child(3) { animation-delay: 0.3s; }
.car-card:nth-child(4) { animation-delay: 0.4s; }
.car-card:nth-child(5) { animation-delay: 0.5s; }
.car-card:nth-child(6) { animation-delay: 0.6s; }
.car-card:nth-child(7) { animation-delay: 0.7s; }
.car-card:nth-child(8) { animation-delay: 0.8s; }

/* Loading States */
.car-image img {
    transition: opacity 0.3s ease;
}

.car-image img[loading="lazy"] {
    opacity: 0;
}

.car-image img.loaded {
    opacity: 1;
}

/* Performance: GPU Acceleration */
.car-card,
.car-image,
.gallery-arrow,
.btn-primary,
.filter-btn,
.logo-img {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Scroll Animations */
@media (prefers-reduced-motion: no-preference) {
    .car-card {
        opacity: 0;
        animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

/* Currency and Language Selectors - Dark Theme - Maximum Specificity */
.header .header-actions .currency-selector .currency-select,
.header .header-actions .language-selector .language-select,
.currency-selector .currency-select,
.language-selector .language-select,
#currencySelector.currency-select,
#languageSelector.language-select,
select.currency-select,
select.language-select {
    background: linear-gradient(135deg, #374151 0%, #1f2937 50%, #374151 100%) !important;
    background-size: 200% 200% !important;
    animation: gradientShift 3s ease infinite !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    background-size: 12px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 90px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    position: relative !important;
    overflow: hidden !important;
    will-change: transform, box-shadow, background-position !important;
}

.header .header-actions .currency-selector .currency-select:hover,
.header .header-actions .language-selector .language-select:hover,
.currency-selector .currency-select:hover,
.language-selector .language-select:hover,
#currencySelector.currency-select:hover,
#languageSelector.language-select:hover,
select.currency-select:hover,
select.language-select:hover {
    background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #1f2937 100%) !important;
    background-size: 200% 200% !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 20px rgba(31, 41, 55, 0.5) !important;
    transform: translateY(-2px) scale(1.02) !important;
    animation-duration: 2s !important;
}

.header .header-actions .currency-selector .currency-select:focus,
.header .header-actions .language-selector .language-select:focus,
.currency-selector .currency-select:focus,
.language-selector .language-select:focus,
#currencySelector.currency-select:focus,
#languageSelector.language-select:focus,
select.currency-select:focus,
select.language-select:focus {
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.4), 0 4px 12px rgba(0, 0, 0, 0.35) !important;
    animation-duration: 1.5s !important;
}

.header .header-actions .currency-selector .currency-select:active,
.header .header-actions .language-selector .language-select:active,
.currency-selector .currency-select:active,
.language-selector .language-select:active,
#currencySelector.currency-select:active,
#languageSelector.language-select:active,
select.currency-select:active,
select.language-select:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Cart Button - Premium White */
.cart-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    color: #1f2937 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform;
    font-weight: 600 !important;
}

.cart-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
}

/* Image Count Badge */
.image-count {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
}

/* Contact Section - Professional Gradients */
.contact {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    background-size: 200% 200% !important;
    position: relative;
    overflow: hidden;
    animation: contactGradient 15s ease infinite;
}

@keyframes contactGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.contact-item {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 16px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.contact-item:hover {
    transform: translateY(-4px) scale(1.02) !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Footer - Professional Design */
.footer {
    background: linear-gradient(180deg, #0a0e1a 0%, #0f172a 100%) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

/* Orders CTA Section */
.orders-cta {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    background-size: 200% 200% !important;
    position: relative;
    overflow: hidden;
    animation: ctaGradient 12s ease infinite;
}

@keyframes ctaGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.orders-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Responsive Optimizations */
@media (max-width: 768px) {
    .car-card:hover {
        transform: translateY(-6px) scale(1.01) !important;
    }
    
    .logo-img {
        height: 55px !important;
        max-height: 55px !important;
        padding: 0 !important;
    }
    
    .btn-primary,
    .filter-btn,
    .cta-btn {
        padding: 0.65rem 1.5rem !important;
        font-size: 0.85rem !important;
    }
    
    .btn-primary:hover,
    .filter-btn:hover,
    .cta-btn:hover {
        transform: translateY(-2px) scale(1.01) !important;
    }
}

