/* === БАЗОВЫЕ НАСТРОЙКИ === */
:root {
    --neon-orange: #ff9900;
    --neon-purple: #9d00ff;
    --neon-green: #00ff2a;
    --bg-dark: #050505;
    --ai-blue: #007bff; /* Цвет для AI */
}
* { box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: #fff;
    font-family: 'Inter', sans-serif; 
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }

/* ========================================= */
/* === НАВИГАЦИЯ === */
/* ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: rgba(0,0,0,0.95);
    border-bottom: 2px solid #222;
    position: sticky; top: 0; z-index: 1000;
    height: 60px;
}

.nav-left { display: none; }

/* Логотип (Машинка) */
.nav-logo-center {
    width: 60px; display: flex; justify-content: center; position: relative;
}

.driving-car-container { position: relative; width: 60px; height: 40px; }
.driving-car {
    font-size: 2.2rem; color: transparent;
    -webkit-text-stroke: 2px var(--neon-orange); text-shadow: 0 0 15px var(--neon-orange);
    animation: car-bounce 0.5s infinite alternate;
}
.road-line {
    position: absolute; bottom: 5px; left: 0; width: 100%; height: 2px;
    background: repeating-linear-gradient(90deg, #555, #555 10px, transparent 10px, transparent 20px);
    animation: road-move 0.5s linear infinite;
}
@keyframes car-bounce { 0% { transform: translateY(0); } 100% { transform: translateY(-2px); } }
@keyframes road-move { 0% { transform: translateX(0); } 100% { transform: translateX(-20px); } }

/* Ссылки меню */
.nav-links { display: flex; justify-content: center; flex-grow: 1; }
.nav-links a { margin: 0 15px; font-weight: 600; font-size: 0.9rem; color: #aaa; transition: 0.3s; text-transform: uppercase; }
.nav-links a:hover { color: #fff; }

.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-phone-icon, .cart-btn { color: #fff; font-size: 1.2rem; transition: 0.3s; }
.nav-phone-icon:hover { color: var(--neon-orange); }

/* ========================================= */
/* === ГЛАВНАЯ СТРАНИЦА === */
/* ========================================= */
.hero-section {
    position: relative; min-height: 90vh; display: flex; align-items: center; justify-content: center;
    background: url('https://images.unsplash.com/photo-1562920619-b7c2964b9991?q=80&w=2000&auto=format&fit=crop') no-repeat center center/cover;
}
.hero-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.8); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 800px; padding: 0 20px; width: 100%; }

.neon-sign {
    font-size: 5rem; margin: 0; color: #fff; font-weight: 900;
    text-shadow: 0 0 10px #fff, 0 0 20px var(--neon-orange);
    font-family: 'Inter', sans-serif; text-transform: uppercase; line-height: 1; letter-spacing: -2px;
}
.flicker { animation: flicker 3s infinite alternate; }
@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px var(--neon-purple); opacity: 1; }
    20%, 24%, 55% { text-shadow: none; opacity: 0.5; }
}
.hero-slogan {
    font-weight: 600; font-size: 1rem;
    letter-spacing: 0.3em; text-transform: uppercase; margin-top: 20px;
    color: #ccc;
}

/* ПОИСК (ОСНОВНОЙ) */
.search-bar {
    margin-top: 40px; display: flex; justify-content: center;
    width: 100%; max-width: 700px; margin-left: auto; margin-right: auto;
}
.search-bar input {
    width: 70%; padding: 20px; border: none; font-size: 1rem; font-family: 'Inter', sans-serif;
    background: #fff; color: #000; border-radius: 5px 0 0 5px; outline: none;
}
.search-bar button {
    width: 30%; background: var(--neon-orange); border: none; font-weight: 800; font-family: 'Inter', sans-serif;
    cursor: pointer; border-radius: 0 5px 5px 0; transition: 0.3s;
}
.search-bar button:hover { background: #ffaa33; }

/* === AI POISK (СЕРГЕЙ) === */
.ai-search-wrapper {
    max-width: 650px; 
    margin: 30px auto; 
    position: relative; 
    z-index: 10;
}

.ai-input-container {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 50px;
    border: 1px solid var(--ai-blue);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
    align-items: center;
}

.ai-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding-left: 15px;
    outline: none;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.ai-btn {
    background: var(--ai-blue);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap; /* Текст не переносится */
}
.ai-btn:hover { background: #0056b3; box-shadow: 0 0 10px var(--ai-blue); }

/* Окно ответа */
#ai-response-block {
    display: none;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px;
    border-radius: 15px;
    text-align: left;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    position: relative;
    border: 1px solid var(--ai-blue);
}
/* ========================= */


.quick-tags { margin-top: 25px; display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; }
.quick-tags span {
    color: #aaa; font-size: 0.9rem; cursor: pointer; padding-bottom: 5px;
    border-bottom: 2px solid transparent; transition: 0.3s;
}
.quick-tags span:hover { color: var(--neon-orange); border-bottom-color: var(--neon-orange); }

/* КАТЕГОРИИ */
.categories-section { padding: 80px 40px; background: #080808; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 60px; font-weight: 800; letter-spacing: -1px; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; }
.grid-item { background: #111; padding: 40px 20px; text-align: center; border: 1px solid #222; transition: 0.3s; border-radius: 10px; }
.grid-item i { font-size: 3.5rem; color: #444; margin-bottom: 20px; transition: 0.3s; }
.grid-item h3 { margin: 0; font-weight: 700; font-size: 1.1rem; }

.item-oil:hover { border-color: #ff00de; box-shadow: 0 0 25px rgba(255,0,222,0.3); } .item-oil:hover i { color: #ff00de; }
.item-brakes:hover { border-color: #ff0000; box-shadow: 0 0 25px rgba(255,0,0,0.3); } .item-brakes:hover i { color: #ff0000; }
.item-suspension:hover { border-color: #ffea00; box-shadow: 0 0 25px rgba(255,234,0,0.3); } .item-suspension:hover i { color: #ffea00; }
.item-engine:hover { border-color: var(--neon-orange); box-shadow: 0 0 25px rgba(255,153,0,0.3); } .item-engine:hover i { color: var(--neon-orange); }
.item-body:hover { border-color: #00f3ff; box-shadow: 0 0 25px rgba(0,243,255,0.3); } .item-body:hover i { color: #00f3ff; }
.item-electric:hover { border-color: #2979ff; box-shadow: 0 0 25px rgba(41,121,255,0.3); } .item-electric:hover i { color: #2979ff; }
.item-filters:hover { border-color: #00ff2a; box-shadow: 0 0 25px rgba(0,255,42,0.3); } .item-filters:hover i { color: #00ff2a; }
.item-accessories:hover { border-color: #aa00ff; box-shadow: 0 0 25px rgba(170,0,255,0.3); } .item-accessories:hover i { color: #aa00ff; }

/* ШАГИ РАБОТЫ */
.steps-section { padding: 80px 40px; background: #0a0a0a; text-align: center; }
.steps-container { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 30px; }
.step-card { width: 250px; text-align: center; }
.step-num { font-size: 3.5rem; font-weight: 900; color: #222; text-shadow: -2px -2px 0 var(--neon-orange); }
.step-line { width: 60px; height: 2px; background: #333; margin-top: 60px; }

/* ЗАПРОС ПО VIN */
.europe-section { padding: 100px 20px; background: linear-gradient(135deg, #050505 40%, #1a001a 100%); display: flex; justify-content: center; }
.europe-content { max-width: 500px; width: 100%; text-align: center; border: 2px solid var(--neon-purple); padding: 50px; box-shadow: 0 0 40px rgba(157,0,255,0.2); background: rgba(0,0,0,0.6); border-radius: 20px; }
.vin-form { width: 100%; margin-top: 20px; }
.form-row { display: flex; gap: 10px; margin-bottom: 15px; }
.vin-form input { width: 100%; padding: 15px; background: #111; border: 1px solid #444; color: #fff; border-radius: 5px; outline: none; font-family: 'Inter', sans-serif; }
.vin-form input:focus { border-color: var(--neon-purple); }

/* ОТЗЫВЫ И FAQ */
.reviews-section { padding: 80px 40px; background: #080808; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.review-card { background: #111; padding: 30px; border-radius: 10px; border: 1px solid #222; }
.stars { color: var(--neon-orange); margin-bottom: 15px; }

.faq-section { padding: 80px 40px; max-width: 800px; margin: 0 auto; }
details { background: #111; margin-bottom: 15px; padding: 20px; border: 1px solid #333; border-radius: 5px; cursor: pointer; }
summary { font-weight: 700; outline: none; }

/* ФУТЕР */
.neon-footer { background: #020202; border-top: 3px solid var(--neon-purple); padding: 80px 40px 30px; margin-top: 80px; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; max-width: 1100px; margin: 0 auto; }
.footer-logo { font-size: 3.5rem; color: #fff; margin: 0; text-shadow: 3px 3px 0 var(--neon-purple); font-weight: 900; letter-spacing: -2px;}
.footer-phone { font-size: 1.5rem; font-weight: bold; color: #fff !important; }
.social-icons { display: flex; gap: 20px; font-size: 1.8rem; margin-top: 20px; }
.copyright { text-align: center; margin-top: 60px; color: #555; font-size: 0.9rem; }

/* ПЛАВАЮЩИЕ ЭЛЕМЕНТЫ */
.telegram-float { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #0088cc; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; z-index: 9999; animation: pulse-tg 2s infinite; }
@keyframes pulse-tg { 0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(0, 136, 204, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); } }

/* AI WIDGET */
.ai-widget { position: fixed; bottom: 30px; left: 30px; z-index: 9998; }
.ai-toggle-btn { background: linear-gradient(45deg, #9d00ff, #ff00de); color: #fff; border: none; padding: 15px 25px; border-radius: 30px; font-weight: 900; cursor: pointer; display: flex; align-items: center; gap: 10px; box-shadow: 0 0 20px rgba(157,0,255,0.5); }
.chat-window { display: none; flex-direction: column; position: absolute; bottom: 70px; left: 0; width: 320px; height: 450px; background: #111; border: 1px solid var(--neon-purple); border-radius: 15px; overflow: hidden; box-shadow: 0 0 30px rgba(0,0,0,0.8); }
.chat-header { background: linear-gradient(90deg, #9d00ff, #5500aa); padding: 15px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.close-chat { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.chat-body { flex-grow: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #0a0a0a; }
.message { padding: 10px 15px; border-radius: 10px; font-size: 0.9rem; max-width: 85%; line-height: 1.4; }
.bot-msg { background: #222; align-self: flex-start; border-bottom-left-radius: 0; }
.user-msg { background: var(--neon-orange); color: #000; font-weight: 600; align-self: flex-end; border-bottom-right-radius: 0; }
.chat-input-area { padding: 10px; background: #151515; display: flex; gap: 5px; flex-shrink: 0; }
.chat-input-area input { flex: 1; background: #000; border: 1px solid #333; padding: 10px; color: #fff; border-radius: 5px; font-family: 'Inter', sans-serif; }
.chat-input-area button { background: #333; border: none; color: #fff; width: 40px; cursor: pointer; border-radius: 5px; }
.ai-warning { font-size: 0.75rem; color: #aaa; background: rgba(255, 153, 0, 0.1); border: 1px solid #333; padding: 10px; border-radius: 5px; text-align: center; }

/* ========================================= */
/* === КАТАЛОГ СТИЛИ === */
/* ========================================= */
.catalog-header { padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #222; background: rgba(0,0,0,0.9); position: sticky; top:0; z-index: 100; }
.catalog-layout { display: flex; max-width: 1400px; margin: 0 auto; padding: 20px 40px; gap: 30px; }

/* Сайдбар */
.sidebar { width: 250px; flex-shrink: 0; background: #0a0a0a; border: 1px solid #222; border-radius: 10px; padding: 20px; height: fit-content; position: sticky; top: 100px; }
.filter-group { margin-bottom: 25px; }
.filter-title { font-weight: bold; margin-bottom: 15px; color: var(--neon-orange); border-bottom: 1px solid #333; padding-bottom: 5px; font-size: 0.9rem; letter-spacing: 1px; }
.filter-option { display: block; margin-bottom: 10px; color: #ccc; cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.filter-option:hover { color: #fff; }
.filter-option input { margin-right: 10px; accent-color: var(--neon-orange); }

/* Сетка товаров */
.products-grid { flex-grow: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
.product-card { background: #0a0a0a; border: 1px solid #222; border-radius: 10px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; height: 100%; transition: 0.3s; position: relative; overflow: hidden; }
.product-card:hover { border-color: var(--neon-orange); box-shadow: 0 0 15px rgba(255, 153, 0, 0.2); transform: translateY(-5px); }

/* Карточка */
.product-image-placeholder { height: 150px; background: #fff; display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #222; margin: -20px -20px 15px -20px; border-radius: 10px 10px 0 0; position: relative; overflow: hidden; }
.category-icon-fallback { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; background: #0f0f0f; }
.category-icon-fallback i { font-size: 4rem; filter: drop-shadow(0 0 10px rgba(255,255,255,0.1)); }
.brand { font-size: 0.8rem; color: #888; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.sku { font-size: 0.9rem; color: var(--neon-purple); font-weight: bold; margin-bottom: 10px; }
.name { font-size: 1.1rem; margin-bottom: 15px; line-height: 1.4; flex-grow: 1; font-weight: 600; }
.price { font-size: 1.4rem; font-weight: 900; color: #fff; }
.rub { color: var(--neon-orange); font-size: 1rem; }
.stock { font-size: 0.8rem; margin-bottom: 5px; }
.in-stock { color: #00ff2a; }
.no-stock { color: #ff3333; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 15px; border-top: 1px solid #222; }
.buy-btn { background: none; border: 1px solid #444; color: #fff; width: 40px; height: 40px; border-radius: 5px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.buy-btn:hover { background: var(--neon-orange); border-color: var(--neon-orange); color: #000; }
.pagination { display: flex; justify-content: center; gap: 10px; margin: 50px 0; padding-bottom: 50px; }
.page-link { padding: 10px 15px; border: 1px solid #333; color: #888; text-decoration: none; border-radius: 5px; transition: 0.3s; }
.page-link:hover, .page-link.active { background: var(--neon-purple); color: #fff; border-color: var(--neon-purple); }
.search-input { padding: 15px; width: 300px; max-width: 80%; background: #111; border: 1px solid #444; color: #fff; border-radius: 5px 0 0 5px; outline: none; font-family: 'Inter', sans-serif; }
.search-btn { padding: 15px 25px; background: var(--neon-orange); border: none; font-weight: bold; cursor: pointer; border-radius: 0 5px 5px 0; }

/* ========================================= */
/* === МОБИЛЬНАЯ ВЕРСИЯ === */
/* ========================================= */
@media (max-width: 768px) {
    .navbar { height: 60px; padding: 0 15px; }
    .nav-left { display: flex; width: 60px; z-index: 20; }
    .hamburger-btn { display: flex !important; width: 30px; height: 25px; position: relative; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 1001; flex-direction: column; justify-content: space-between; }
    .hamburger-btn span { display: block; width: 100%; height: 3px; background-color: #fff; border-radius: 2px; transition: all 0.4s ease-in-out; }
    .hamburger-btn.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); background-color: var(--neon-orange); }
    .hamburger-btn.active span:nth-child(2) { opacity: 0; transform: translateX(-20px); }
    .hamburger-btn.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); background-color: var(--neon-orange); }
    
    .nav-links { display: flex !important; flex-direction: column; position: absolute; top: 60px; left: 0; width: 100%; background: rgba(0,0,0,0.98); border-bottom: 2px solid var(--neon-orange); padding: 20px 0; z-index: 999; opacity: 0; visibility: hidden; transform: translateY(-20px); transition: all 0.4s; }
    .nav-links.active { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav-links a { margin: 15px 0; display: block; width: 100%; text-align: center; font-size: 1.2rem; }
    
    .nav-logo-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; z-index: 10; margin: 0; }

    .hero-section { min-height: auto !important; height: auto !important; padding-top: 100px; padding-bottom: 40px; align-items: flex-start; }
    .hero-content h1.neon-sign { font-size: 3rem; line-height: 1; }
    
    /* ФИКС ДЛЯ ОСНОВНОГО ПОИСКА */
    .search-bar { flex-direction: column; width: 100% !important; margin-top: 25px; gap: 10px; }
    .search-bar input, .search-bar button { width: 100% !important; border-radius: 5px !important; margin: 0 !important; height: 50px; }
    
    /* === ФИКС ДЛЯ AI (СЕРГЕЯ) НА МОБИЛЬНОМ === */
    .ai-input-container { flex-direction: column; border-radius: 15px; }
    .ai-input { width: 100%; padding: 15px; text-align: left; }
    .ai-btn { width: 100%; border-radius: 10px; padding: 15px; }
    /* =========================================== */

    .catalog-header { flex-direction: column; align-items: flex-start; gap: 15px; padding: 15px; }
    .catalog-header form { display: flex; width: 100%; }
    .search-input { width: 100% !important; max-width: none !important; border-radius: 5px 0 0 5px; }
    .search-btn { width: auto !important; padding: 0 20px; }

    .catalog-layout { flex-direction: column; padding: 10px; gap: 15px; }
    .sidebar { width: 100%; margin-bottom: 10px; position: static; padding: 15px; border: 1px solid #333; background: #111; }
    .sidebar .filter-group { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
    .sidebar .filter-title { width: 100%; margin-bottom: 5px; }
    
    .products-grid { padding: 0; grid-template-columns: 1fr 1fr; gap: 8px; }
    .product-card { padding: 10px; min-height: 290px; }
    .product-image-placeholder { height: 90px; margin: -10px -10px 10px -10px; }
    .product-image-placeholder i { font-size: 2.5rem; }
    
    .name { font-size: 0.8rem; line-height: 1.3; height: auto; min-height: 34px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-break: break-word; }
    .sku { font-size: 0.7rem; margin-bottom: 5px; }
    .brand { font-size: 0.65rem; }
    .price { font-size: 1rem; }
    .rub { font-size: 0.8rem; }
    .price-row { margin-top: 8px; padding-top: 8px; }
    .buy-btn { width: 32px; height: 32px; font-size: 0.9rem; }
    
    .footer-container { flex-direction: column; text-align: center; }
    .footer-block { margin-bottom: 30px; }
}