/* Custom styles for cars rental website */

/* Body and general styles */
html {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    touch-action: pan-y;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Navigation styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* iOS safe area support for notch */
.navbar {
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* Исправление для мобильных браузеров (Telegram, WhatsApp и др.) */
.navbar.fixed-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    touch-action: pan-y;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Специальные исправления для Telegram WebView - убираем fixed полностью */
.telegram-webview .navbar,
.telegram-webview .navbar.fixed-top {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 1030 !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto !important;
}

.telegram-webview body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.telegram-webview html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.telegram-webview .main-content-container {
    position: relative !important;
    overflow: visible !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Убеждаемся, что контент может прокручиваться */
.main-content-container,
.container {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* Main content spacing */
.main-content {
    min-height: calc(100vh - 76px);
    margin-top: 76px;
}

/* Remove top margin on home page since hero handles navbar */
.home-page .main-content {
    margin-top: 0;
}

/* Home page specific styles */
.home-page .hero-section {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: white;
    padding: 0;
    margin-top: -76px;
    position: relative;
    overflow: hidden;
    height: calc(100vh - 76px);
    width: 100%;
}

/* Убеждаемся, что контент находится поверх узора */
.home-page .hero-section .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Ensure row takes full height */
.home-page .hero-section .row {
    width: 100%;
    display: flex;
    align-items: center;
}

/* Hero Text Overlay - positioned on top of particles canvas */
.hero-text-overlay {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    z-index: 2;
}

.hero-text-overlay .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
}

.hero-text-overlay .row {
    width: 100%;
}

.hero-text-overlay .btn {
    pointer-events: auto;
}

/* Абстрактный узор для hero-section */
.home-page .hero-section::before {
    content: ';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Дополнительный слой узора */
.home-page .hero-section::after {
    content: ';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.015) 2px,
            rgba(255, 255, 255, 0.015) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Hero content styling */
.hero-content {
    position: relative;
    z-index: 1;
}

/* Card styles */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid #343a40;
    color: #343a40;
    border-radius: 25px;
    padding: 8px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #343a40;
    border-color: #343a40;
    transform: translateY(-2px);
}

/* Online booking button styles */
.btn-success.online-booking-btn,
.btn-secondary.online-booking-btn {
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-success.online-booking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Footer styles */
footer {
    background: #343a40 !important;
}

footer h5, footer h6 {
    color: #ffffff !important;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff !important;
}

/* Social links */
.social-links a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #343a40 !important;
}

/* Contact page styles */
.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Form styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #343a40;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Badge styles */
.badge {
    border-radius: 20px;
    padding: 8px 15px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .home-page .hero-section {
        margin-top: 0 !important;
        padding-top: 120px !important;
        min-height: 100vh !important;
        height: auto !important;
    }
    
    .hero-text-overlay {
        position: relative !important;
        bottom: auto !important;
        top: auto !important;
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .main-content {
        margin-top: 70px;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom utilities */
.text-gradient {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
}

/* Car detail page styles */
.car-gallery img {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

/* Rental form styles */
.rental-form {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
}

/* Price display */
.price-display {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
}

/* Status badges */
.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-confirmed {
    background-color: #17a2b8;
    color: #fff;
}

.status-active {
    background-color: #28a745;
    color: #fff;
}

.status-completed {
    background-color: #6c757d;
    color: #fff;
}

.status-cancelled {
    background-color: #dc3545;
    color: #fff;
}

/* Enhanced Social links */
.social-links a {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
}

.social-links a:hover {
    background: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.social-links a i {
    font-size: 1.2rem;
}

/* Large social links for contact page */
.social-links-large {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 15px;
    background: #f8f9fa;
    min-width: 120px;
}

.social-link:hover {
    color: #343a40;
    background: #e3f2fd;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.social-link i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #343a40;
}

.social-link span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Specific colors for social networks */
.social-link[title="Facebook"]:hover i {
    color: #1877f2;
}

.social-link[title="Instagram"]:hover i {
    color: #e4405f;
}

.social-link[title="Telegram"]:hover i {
    color: #0088cc;
}

.social-link[title="WhatsApp"]:hover i {
    color: #25d366;
}

/* Force white color for footer headings */
footer .container h5,
footer .container h6,
footer h5.fw-bold,
footer h6.fw-bold {
    color: #ffffff !important;
}

/* Custom Breadcrumb Styles */
.custom-breadcrumb {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 30px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Breadcrumb navigation - consistent spacing from top */
nav[aria-label="breadcrumb"] {
    margin-top: 10px;
}

/* Override to bring breadcrumb closer to navbar */
nav[aria-label="breadcrumb"] {
    margin-top: 0;
}

.custom-breadcrumb {
    margin-top: 0;
}

.custom-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
}

.custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 10px;
}

.breadcrumb-link {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 5px;
}

.breadcrumb-link:hover {
    color: #343a40;
    background: #e9ecef;
    text-decoration: none;
}

.custom-breadcrumb .breadcrumb-item.active {
    color: #343a40;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.custom-breadcrumb .breadcrumb-item.active i {
    color: #343a40;
}

/* Price and badge fixes */
.text-dark {
    color: #343a40 !important;
}

.bg-dark {
    background-color: #343a40 !important;
}

/* Стили для навигации по галерее изображений */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

/* Стили для навигации в модальном окне */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1055;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Скрытие стрелочек на мобильных устройствах */
@media (max-width: 768px) {
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .modal-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .modal-prev {
        left: 15px;
    }
    
    .modal-next {
        right: 15px;
    }
}

/* Стили для навигации в карточках товаров */

.car-card .card-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.car-card:hover .card-nav-btn {
    opacity: 1;
}

.car-card .card-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.car-card .card-prev {
    left: 10px;
}

.car-card .card-next {
    right: 10px;
}

/* Адаптивность для карточек */
@media (max-width: 768px) {
    .car-card .card-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
        opacity: 0.8;
    }
    
    .car-card .card-prev {
        left: 8px;
    }
    
    .car-card .card-next {
        right: 8px;
    }
}

@media (max-width: 576px) {
    .car-card .card-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .car-card .card-prev {
        left: 5px;
    }
    
    .car-card .card-next {
        right: 5px;
    }
}

/* Исправление выравнивания и размеров изображений в карточках */


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

/* Улучшенные стили для навигации в карточках */
.car-card .card-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.car-card:hover .card-nav-btn {
    opacity: 1;
}

.car-card .card-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.car-card .card-prev {
    left: 10px;
}

.car-card .card-next {
    right: 10px;
}

/* Адаптивность для карточек */
@media (max-width: 768px) {

@media (max-width: 576px) {

/* Правильное центрирование и обрезка изображений в карточках */


.car-card:hover .car-image {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Альтернативный способ - через flexbox */
.car-card .card-image-container.flex-method {
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-card .card-image-container.flex-method .car-image {
    position: static;
    transform: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.car-card .card-image-container.flex-method:hover .car-image {
    transform: scale(1.05);
}

/* Адаптивность */
@media (max-width: 768px) {

@media (max-width: 576px) {

/* Самый надежный способ центрирования изображений */
.car-card .card-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
    width: 100%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-card .car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .car-card .card-image-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .car-card .card-image-container {
        height: 180px;
    }
}

/* Исправление центрирования изображений на странице детального просмотра */
.main-image {
    position: relative;
    overflow: hidden;
    height: 400px;
    width: 100%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

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

/* Стили для миниатюр в галерее */
.thumbnail-gallery .thumbnail-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.thumbnail-gallery .thumbnail-image:hover {
    transform: scale(1.1);
}

/* Стили для модального окна */
.modal-body img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Адаптивность для страницы детального просмотра */
@media (max-width: 768px) {
    .main-image {
        height: 300px;
    }
    
    .thumbnail-gallery .thumbnail-image {
        height: 60px;
    }
}

@media (max-width: 576px) {
    .main-image {
        height: 250px;
    }
    
    .thumbnail-gallery .thumbnail-image {
        height: 50px;
    }
}

/* Override Bootstrap primary color to match project theme */
.bg-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
}

/* More specific rule to override Bootstrap CDN */
body .bg-primary, .container .bg-primary, .cta-section.bg-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
}

/* Hero buttons styles */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Mobile styles for hero buttons */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* Particles.js container styles */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Canvas element inside particles container */
#particles-js canvas {
    display: block;
    width: 100%;
    height: 100%;
    z-index: 0;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Стили для пагинации */
.pagination {
    gap: 5px !important;
}

.pagination .page-link {
    border: none !important;
    background-color: #f8f9fa !important;
    color: #343a40 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    padding: 10px 14px !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(52, 58, 64, 0.2) !important;
}

.pagination .page-link:focus {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25) !important;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(52, 58, 64, 0.3) !important;
}

.pagination .page-item.disabled .page-link {
    background-color: #e9ecef !important;
    color: #adb5bd !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

@media (max-width: 576px) {
    .pagination {
        gap: 3px !important;
    }
    
    .pagination .page-link {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }
}

/* Стили для заметной кнопки "Посмотреть все автомобили" */
.view-all-cars-btn,
a.view-all-cars-btn,
a.btn.view-all-cars-btn {
    position: relative !important;
    overflow: hidden !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    padding: 18px 40px !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4) !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
    background-color: #ffc107 !important;
    border: none !important;
    border-color: transparent !important;
    color: #000 !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
}

.view-all-cars-btn:hover,
a.view-all-cars-btn:hover,
a.btn.view-all-cars-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 12px 30px rgba(255, 193, 7, 0.6) !important;
    background: linear-gradient(135deg, #ffca28 0%, #ffa726 100%) !important;
    background-color: #ffca28 !important;
    color: #000 !important;
    text-decoration: none !important;
}

.view-all-cars-btn:active {
    transform: translateY(-1px) scale(1.02) !important;
}

/* Пульсирующая анимация */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(255, 193, 7, 0.7);
    }
}

.view-all-cars-btn {
    animation: pulse 2s ease-in-out infinite;
}

.view-all-cars-btn:hover {
    animation: none;
}

/* Анимация иконки стрелки */
.view-all-cars-btn .arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.view-all-cars-btn:hover .arrow-icon {
    transform: translateX(5px);
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .view-all-cars-btn {
        font-size: 1rem !important;
        padding: 15px 30px !important;
    }
}

/* Стили для бейджа с годом автомобиля */
.car-year-badge {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.6rem !important;
    white-space: nowrap;
}

/* Стили для переключателя вида (плитка/список) */
.view-switcher .btn {
    transition: all 0.3s ease;
}

.view-switcher .btn.active {
    background-color: #343a40;
    color: white;
    border-color: #343a40;
}

/* Вид списком */
.list-view .col-lg-4,
.list-view .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

.list-view .car-card {
    flex-direction: row !important;
}

.list-view .card-image-container {
    width: 280px;
    min-width: 280px;
    height: 100%;
    flex-shrink: 0;
}

.list-view .card-image-container img {
    height: 100%;
    object-fit: cover;
}

.list-view .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.list-view .car-specs .row {
    justify-content: flex-start;
}

.list-view .car-specs .col-3 {
    flex: 0 0 auto;
    width: auto;
    padding-right: 1.5rem;
}

/* Мобильная адаптация для вида списком */
@media (max-width: 768px) {
    .list-view .car-card {
        min-height: 110px !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .list-view .card-image-container {
        width: 100px;
        min-width: 100px;
        height: 110px;
        align-self: stretch;
        border-radius: 8px 0 0 8px;
        overflow: hidden;
    }
    
    .list-view .card-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .list-view .card-body {
        padding: 0.5rem;
        font-size: 0.75rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
    }
    
    .list-view .d-flex.justify-content-between.align-items-center {
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    
    .list-view .card-title {
        font-size: 0.85rem;
        margin-bottom: 0.3rem !important;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
    }
    
    .list-view .d-flex.justify-content-between.align-items-start .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.35rem;
        margin-top: 0.1rem;
    }
    
    /* Скрываем описание на мобильных в виде списка - не помещается */
    .list-view .text-muted.small {
        display: none !important;
    }
    
    .list-view .car-specs {
        margin-bottom: 0.25rem !important;
    }
    
    .list-view .car-specs .row {
        margin: 0;
    }
    
    .list-view .car-specs .col-3 {
        padding: 0 0.25rem;
        font-size: 0.65rem;
    }
    
    .list-view .car-specs small {
        font-size: 0.6rem;
    }
    
    .list-view .car-specs strong {
        font-size: 0.7rem;
    }
    
    .list-view .price {
        margin-bottom: 0;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    
    .list-view .price .h5 {
        font-size: 0.85rem;
        margin-bottom: 0 !important;
        line-height: 1.1;
    }
    
    .list-view .price small {
        font-size: 0.6rem;
        display: block;
        line-height: 1;
    }
    
    .list-view .price .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.35rem;
        display: inline-block;
        white-space: nowrap;
        line-height: 1.2;
    }
    
    .list-view .btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        flex-shrink: 0;
        align-self: flex-start;
    }
    
    /* Скрываем навигационные стрелки галереи в виде списка на мобильных */
    .list-view .card-nav-btn {
        display: none;
    }
    
    .view-switcher .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .view-switcher .btn i {
        margin-right: 0;
    }
    
    .view-switcher .btn:not(.active) span {
        display: none;
    }
}

/* Адаптация категорий для мобильных устройств */
@media (max-width: 576px) {
    /* Категории в 2 колонки на мобильных */
    .category-card .card-body {
        padding: 1rem !important;
    }
    
    .category-card .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .category-card .card-text {
        font-size: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .category-card .btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .category-card .category-image {
        height: 120px !important;
    }
}

