:root {
    --primary: #FF9500;
    --primary-dark: #E68600;
    --primary-light: #FFB800;
    --accent: #FFA500;
    --dark: #1a1a1a;
    --text: #333333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
}

/* === НАВИГАЦИЯ === */
.navbar {
    padding: 20px 0;
    transition: all 0.4s ease;
    background: transparent !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar.scrolled {
    position: fixed;
    top: 0;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 700;
    transition: all 0.3s ease;
    color: #fff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 6px;
}

.navbar.scrolled .navbar-brand {
    color: #FF9500 !important;
    text-shadow: none;
    background: transparent;
}

.navbar-brand img {
    max-height: 50px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.navbar.scrolled .navbar-brand img {
    filter: none;
}

.nav-link {
    font-weight: 600;
    padding: 10px 18px !important;
    transition: all 0.3s ease;
    color: #fff !important;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled .nav-link {
    color: #333 !important;
    text-shadow: none;
}

.nav-link:hover {
    color: #FF9500 !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #FF9500;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
}

.navbar.scrolled .navbar-toggler {
    border-color: #FF9500;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FF9500' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .btn-primary {
    background: linear-gradient(135deg, #FF9500, #FFB800);
    border: none;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.navbar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.5);
}

.navbar #favoritesLink {
    color: #fff !important;
    transition: all 0.3s ease;
}

.navbar.scrolled #favoritesLink {
    color: #333 !important;
}

.navbar #favoritesLink:hover {
    color: #FF9500 !important;
}

.navbar #favoritesLink i {
    font-size: 1.5rem;
}

.navbar #favoritesCount {
    background: #dc3545 !important;
    font-size: 0.7rem !important;
    padding: 4px 7px !important;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .navbar {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        padding: 12px 0;
    }
    
    .navbar .navbar-brand {
        color: #FF9500 !important;
        text-shadow: none;
    }
    
    .navbar .nav-link {
        color: #333 !important;
        padding: 12px 18px !important;
        text-shadow: none;
    }
    
    .navbar #favoritesLink {
        color: #333 !important;
    }
    
    .navbar-toggler {
        border-color: #FF9500;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FF9500' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

.navbar.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FF9500' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar .btn-primary {
    background: linear-gradient(135deg, #FF9500, #FFB800);
    border: none;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.navbar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.5);
}

.navbar #favoritesLink {
    color: #fff !important;
    transition: all 0.3s ease;
}

.navbar.scrolled #favoritesLink {
    color: #333 !important;
}

.navbar #favoritesLink:hover {
    color: #FF9500 !important;
}

.navbar #favoritesLink i {
    font-size: 1.5rem;
}

.navbar #favoritesCount {
    background: #dc3545 !important;
    font-size: 0.7rem !important;
    padding: 4px 7px !important;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .navbar {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        padding: 12px 0;
    }
    
    .navbar .nav-link {
        color: #333 !important;
        padding: 12px 18px !important;
    }
    
    .navbar #favoritesLink {
        color: #333 !important;
    }
    
    .navbar-toggler {
        border-color: #FF9500;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FF9500' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* === КНОПКИ === */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-warning {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    color: #fff !important;
    font-weight: 600;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* === КАРТОЧКИ === */
.card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.category-card {
    cursor: pointer;
}

.category-card:hover {
    border: 2px solid var(--primary) !important;
}

.car-card {
    overflow: hidden;
}

.car-card img {
    transition: transform 0.5s ease;
}

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

/* === HERO === */
.hero-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.hero-section .btn-primary {
    background: linear-gradient(135deg, #FF9500, #FFB800);
    border: none;
    box-shadow: 0 8px 25px rgba(255, 149, 0, 0.4);
    transition: all 0.3s ease;
}

.hero-section .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 149, 0, 0.6);
}

.hero-section .btn-outline-light {
    border-width: 2px;
    transition: all 0.3s ease;
}

.hero-section .btn-outline-light:hover {
    background: #fff;
    color: #FF9500;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-section .lead {
        font-size: 1.1rem !important;
    }
    
    .hero-section .btn-lg {
        padding: 12px 24px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 450px;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
}

/* === FAQ / АККОРДЕОН === */
.accordion-button {
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: #fff9f0;
    color: var(--dark);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(255, 149, 0, 0.25);
}

/* === БЕЙДЖИ === */
.badge.bg-warning {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
}

/* === ФУТЕР === */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary) !important;
}

/* === АДАПТИВ === */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-placeholder {
        height: 300px !important;
    }
}

/* === ЛАЙТБОКС === */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
}

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

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    text-align: center;
    margin-top: 1rem;
    color: #fff;
    font-size: 0.9rem;
}

.lightbox-counter {
    color: #9ca3af;
    font-size: 0.85rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: #FF9500;
    border-color: #FF9500;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    background: #FF9500;
    border-color: #FF9500;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    max-width: 90vw;
    overflow-x: auto;
    padding: 5px;
}

.lightbox-thumbnails img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.lightbox-thumbnails img:hover,
.lightbox-thumbnails img.active {
    opacity: 1;
    border-color: #FF9500;
}

.photo-zoom {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.photo-zoom:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    .lightbox-content img {
        max-height: 70vh;
    }
    .lightbox-thumbnails img {
        width: 50px;
        height: 38px;
    }
}

/* === ЯНДЕКС.КАРТА === */
#yandexMap {
    border-radius: 12px;
    overflow: hidden;
}

#yandexMap .ymaps-2-1-79-balloon__content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#yandexMap .ymaps-2-1-79-balloon__content a {
    color: #FF9500;
    text-decoration: none;
    font-weight: 600;
}

#yandexMap .ymaps-2-1-79-balloon__content a:hover {
    color: #E68600;
}

/* === ЗАГЛУШКА ДЛЯ АВТО БЕЗ ФОТО === */
.car-card .card-img-top {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-card .card-img-top svg {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.car-card:hover .card-img-top svg {
    opacity: 0.8;
}

/* Для страницы авто */
.page-car-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.page-car-placeholder svg {
    opacity: 0.5;
}