.home-slider .big-content {
    width: 100%; /* full width */
    height: 356px;
    /* background: #222; */
    /* center images in cells with flexbox */
    display: block;
    align-items: center;
    justify-content: center;
}

.home-slider .big-content img {
    display: block;
    /* max-height: 100%; */
}

.popular-slider .single-product {
    /* width: 236px;
    height: 322px; */
    /* background: #222; */
    /* center images in cells with flexbox */
    display: block;
    /* align-items: center;
    justify-content: center; */
}

.popular-slider .single-product img {
    display: block;
    /* max-height: 100%; */
}


/* Стили для галереи изображений запчастей */

/* Ограничиваем высоту галереи */
.product-gallery {
    max-height: 600px;
    margin-bottom: 20px;
}

/* Контейнер основного изображения */
.product-gallery .flexslider-thumbnails .slides li {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 450px;
    background-color: #f8f9fa;
    overflow: hidden;
    border-radius: 5px;
}

/* Основное изображение и скрытие неактивных слайдов */
.product-gallery .flexslider-thumbnails .slides li img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.product-gallery .flexslider-thumbnails .slides li:not(.flex-active-slide) img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: absolute;
    left: -9999px;
}

/* Контейнер галереи */
.product-gallery .flexslider-thumbnails {
    position: relative;
}

/* Стили для миниатюр */
.product-gallery .flexslider-thumbnails .flex-control-nav {
    margin-top: 15px;
    text-align: center;
}

.product-gallery .flexslider-thumbnails .flex-control-nav li {
    display: inline-block;
    margin: 0 5px;
    width: 80px;
    height: 60px;
    background-color: #f8f9fa;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.product-gallery .flexslider-thumbnails .flex-control-nav li.flex-active {
	border-color: #0088CC;
}

.product-gallery .flexslider-thumbnails .flex-control-nav li img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* =================================================================
   Product Action Buttons
   ================================================================= */

/* Скругление углов для кнопок */
.product-buy .btn {
    border-radius: 5px !important;
}


/* =================================================================
   Product Tabs Typography Spacing
   ================================================================= */

/* Отступы для параграфов внутри табов с информацией о товаре */
.product-info p {
    margin-bottom: 1em;
}

/* Отступы для заголовков внутри табов с информацией о товаре */
.product-info h1,
.product-info h2,
.product-info h3,
.product-info h4,
.product-info h5,
.product-info h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

/* Убираем верхний отступ у первого заголовка в табах */
.product-info h1:first-child,
.product-info h2:first-child,
.product-info h3:first-child,
.product-info h4:first-child,
.product-info h5:first-child,
.product-info h6:first-child {
    margin-top: 0;
}


/* =================================================================
   Mobile Responsive Tabs (Product Info)
   ================================================================= */

/* Скругление углов для всех вкладок на всех устройствах */
.product-info .nav-tabs .nav-link {
    border-radius: 5px !important;
}

/* Мобильная адаптация вкладок */
@media (max-width: 767px) {
    /* Контейнер вкладок - флекс для создания сетки */
    .product-info .nav-tabs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px;
        border-bottom: none !important;
    }
    
    /* Элементы вкладок - по 50% ширины */
    .product-info .nav-tabs .nav-item {
        flex: 1 0 calc(50% - 4px) !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Ссылки вкладок */
    .product-info .nav-tabs .nav-link {
        width: 100% !important;
        text-align: center !important;
        padding: 12px 8px !important;
        font-size: 14px !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 5px !important;
        margin: 0 !important;
    }
    
    /* Активная вкладка */
    .product-info .nav-tabs .nav-link.active {
        border-radius: 5px !important;
        color: #fff !important;
    }
}


/* Tablet specific styles - добавляем вертикальный отступ между строками вкладок */
@media (min-width: 768px) and (max-width: 991px) {
    .product-info .nav-tabs .nav-item {
        margin-bottom: 8px !important;
    }
}


/* =================================================================
   Mobile Responsive Gallery (Product Images)
   ================================================================= */

@media (max-width: 767px) {
    /* Убираем ограничение высоты галереи на мобильных */
    .product-gallery {
        max-height: none;
    }
    
    /* Делаем контейнер изображения с соотношением сторон 4:3 */
    .product-gallery .flexslider-thumbnails .slides li {
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
    }
}
