/* Кастомный брейкпоинт для 1010px */
@media (max-width: 999px) {
    .hide-below-1010 {
        display: none !important;
    }
    .show-below-1010 {
        display: block !important;
    }
}
@media (min-width: 1000px) {
    .hide-above-1010 {
        display: none !important;
    }
    .show-above-1010 {
        display: block !important;
    }
}

/* ========== СТИЛИ ДЛЯ ПОИСКА С АВТОДОПОЛНЕНИЕМ ========== */

/* Стили для автодополнения поиска */
.search-autocomplete-container {
    position: relative;
    width: 100%;
}

.search-autocomplete-container .input-group {
    position: relative;
}

/* Dropdown меню для результатов поиска - ЗАКРЕПЛЕНО СО СТРОКОЙ ПОИСКА */
.autocomplete-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1060 !important;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px !important;
    width: 100% !important;
}

/* Заголовки секций */
.autocomplete-dropdown .dropdown-header,
.autocomplete-dropdown .section-header {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    color: #6c757d;
}

/* Разделители */
.autocomplete-dropdown .dropdown-divider {
    margin: 0;
}

/* Элементы результатов */
.autocomplete-dropdown .autocomplete-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #212529;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.autocomplete-dropdown .autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-dropdown .autocomplete-item:hover {
    background-color: #f8f9fa !important;
    text-decoration: none;
}

.autocomplete-dropdown .autocomplete-item.active {
    background-color: #e7f1ff !important;
}

/* ========== АДАПТИВНЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 999px) {
    .autocomplete-dropdown {
        /* УБИРАЕМ fixed - теперь absolute как и на десктопе */
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: 100% !important;
        bottom: auto !important;
        width: 100% !important;
        max-height: 50vh !important;
        margin-top: 4px !important;
    }
    
    @media (max-width: 576px) {
        .autocomplete-dropdown {
            margin-top: 3px !important;
        }
    }
}

/* Анимация */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.autocomplete-dropdown {
    animation: fadeIn 0.2s ease-out;
}

/* ========== СТИЛИ ДЛЯ ПЛАШЕК СЕРВИСОВ ========== */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

.service-content {
    overflow: hidden;
}

.service-content h5 {
    font-size: 1rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service-content .text-muted {
    font-size: 0.8rem;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2; /* Добавлено стандартное свойство */
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-icon i {
    font-size: 1.5rem;
}

@media (max-width: 575.98px) {
    .service-content h5 {
        font-size: 0.9rem;
    }
    .service-content .text-muted {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        line-clamp: 1; /* Добавлено стандартное свойство */
    }
    .service-icon i {
        font-size: 1.2rem;
    }
    .service-icon {
        padding: 0.75rem !important;
    }
    .service-content {
        padding: 0.75rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .service-content h5 {
        font-size: 0.9rem;
    }
    .service-content .text-muted {
        font-size: 0.75rem;
    }
    .service-icon i {
        font-size: 1.4rem;
    }
}

@media (min-width: 1200px) {
    .service-content h5 {
        font-size: 1.1rem;
    }
    .service-content .text-muted {
        font-size: 0.85rem;
    }
    .service-icon i {
        font-size: 1.75rem;
    }
}

/* ========== РАСШИРЕННАЯ ПАЛИТРА ЦВЕТОВ ========== */
:root {
    --bs-custom-1: #4361ee;
    --bs-custom-1-rgb: 67, 97, 238;
    --bs-custom-2: #2a9d8f;
    --bs-custom-2-rgb: 42, 157, 143;
    --bs-custom-3: #e9c46a;
    --bs-custom-3-rgb: 233, 196, 106;
    --bs-custom-4: #f4a261;
    --bs-custom-4-rgb: 244, 162, 97;
    --bs-custom-5: #e76f51;
    --bs-custom-5-rgb: 231, 111, 81;
    --bs-custom-6: #9d4edd;
    --bs-custom-6-rgb: 157, 78, 221;
    --bs-custom-7: #43aa8b;
    --bs-custom-7-rgb: 67, 170, 139;
    --bs-custom-8: #ff6b6b;
    --bs-custom-8-rgb: 255, 107, 107;
    --bs-custom-9: #6c5ce7;
    --bs-custom-9-rgb: 108, 92, 231;
    --bs-custom-10: #00b894;
    --bs-custom-10-rgb: 0, 184, 148;
    --bs-custom-11: #fd79a8;
    --bs-custom-11-rgb: 253, 121, 168;
    --bs-custom-12: #e17055;
    --bs-custom-12-rgb: 225, 112, 85;
}

.bg-custom-1 { background-color: rgba(var(--bs-custom-1-rgb), 0.1) !important; border-left-color: var(--bs-custom-1) !important; }
.bg-custom-2 { background-color: rgba(var(--bs-custom-2-rgb), 0.1) !important; border-left-color: var(--bs-custom-2) !important; }
.bg-custom-3 { background-color: rgba(var(--bs-custom-3-rgb), 0.1) !important; border-left-color: var(--bs-custom-3) !important; }
.bg-custom-4 { background-color: rgba(var(--bs-custom-4-rgb), 0.1) !important; border-left-color: var(--bs-custom-4) !important; }
.bg-custom-5 { background-color: rgba(var(--bs-custom-5-rgb), 0.1) !important; border-left-color: var(--bs-custom-5) !important; }
.bg-custom-6 { background-color: rgba(var(--bs-custom-6-rgb), 0.1) !important; border-left-color: var(--bs-custom-6) !important; }
.bg-custom-7 { background-color: rgba(var(--bs-custom-7-rgb), 0.1) !important; border-left-color: var(--bs-custom-7) !important; }
.bg-custom-8 { background-color: rgba(var(--bs-custom-8-rgb), 0.1) !important; border-left-color: var(--bs-custom-8) !important; }
.bg-custom-9 { background-color: rgba(var(--bs-custom-9-rgb), 0.1) !important; border-left-color: var(--bs-custom-9) !important; }
.bg-custom-10 { background-color: rgba(var(--bs-custom-10-rgb), 0.1) !important; border-left-color: var(--bs-custom-10) !important; }
.bg-custom-11 { background-color: rgba(var(--bs-custom-11-rgb), 0.1) !important; border-left-color: var(--bs-custom-11) !important; }
.bg-custom-12 { background-color: rgba(var(--bs-custom-12-rgb), 0.1) !important; border-left-color: var(--bs-custom-12) !important; }

.text-custom-1 { color: var(--bs-custom-1) !important; }
.text-custom-2 { color: var(--bs-custom-2) !important; }
.text-custom-3 { color: var(--bs-custom-3) !important; }
.text-custom-4 { color: var(--bs-custom-4) !important; }
.text-custom-5 { color: var(--bs-custom-5) !important; }
.text-custom-6 { color: var(--bs-custom-6) !important; }
.text-custom-7 { color: var(--bs-custom-7) !important; }
.text-custom-8 { color: var(--bs-custom-8) !important; }
.text-custom-9 { color: var(--bs-custom-9) !important; }
.text-custom-10 { color: var(--bs-custom-10) !important; }
.text-custom-11 { color: var(--bs-custom-11) !important; }
.text-custom-12 { color: var(--bs-custom-12) !important; }

/* Стили для отображения результатов */
.autocomplete-item .item-content {
    display: flex;
    align-items: center;
}

.autocomplete-item .item-icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    color: #6c757d;
    min-width: 24px;
}

.autocomplete-item .item-text {
    flex: 1;
    min-width: 0;
}

.autocomplete-item .item-title {
    font-weight: 500;
    margin-bottom: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-item .item-meta {
    font-size: 0.875rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-item .item-badge {
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

/* Стили для изображений в результатах */
.autocomplete-item .item-image {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
    border-radius: 0.25rem;
    object-fit: cover;
    flex-shrink: 0;
}

.autocomplete-item .item-image-placeholder {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    flex-shrink: 0;
}

/* Стили для иконок радиостанций */
.autocomplete-item .radio-icon {
    color: #0d6efd;
    background-color: #e7f1ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Стили для иконок телеканалов */
.autocomplete-item .tv-icon {
    color: #dc3545;
    background-color: #ffe6e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Футер с кнопкой "Показать все" */
.autocomplete-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.autocomplete-footer .autocomplete-item {
    text-align: center;
    color: #0d6efd;
    font-weight: 500;
}

/* Отступы для мобильной версии */
@media (max-width: 768px) {
    .search-autocomplete-container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    #mobileSearchInput {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .input-group {
        margin-bottom: 0 !important;
    }
}
/* Стили для ленивой загрузки */
img.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img.lazy-image.loaded {
    opacity: 1;
}

/* Стили для категорий объявлений */
.product-category-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #0d6efd;
}

.product-category-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,110,253,0.15);
}

.product-category-item a {
    color: inherit;
}

.product-category-item .card-body {
    padding: 1rem;
}

.product-category-item i {
    font-size: 2rem;
    color: #0d6efd;
}

/* Стили для объявлений */
.product-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.product-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-item .card.border-warning {
    border-width: 2px;
}

.product-item a {
    color: inherit;
}

.product-icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-icon-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon-placeholder i {
    font-size: 2rem;
    color: #0d6efd;
}

/* Стили для категорий организаций */
.catalog-category-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #0d6efd;
}

.catalog-category-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,110,253,0.15);
}

.catalog-category-item a {
    color: inherit;
}

.catalog-category-item .card-body {
    padding: 1rem;
}

.catalog-category-item i {
    font-size: 2rem;
    color: #0d6efd;
}

/* Стили для категорий статей */
.article-category-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #198754;
}

.article-category-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25,135,84,0.15);
}

.article-category-item a {
    color: inherit;
}

.article-category-item .card-body {
    padding: 1rem;
}

.article-category-item i {
    font-size: 2rem;
    color: #198754;
}

/* Стили для категорий афиши */
.afisha-category-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #ffc107;
}

.afisha-category-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,193,7,0.25);
}

.afisha-category-item a {
    color: inherit;
}

.afisha-category-item .card-body {
    padding: 1rem;
}

.afisha-category-item i {
    font-size: 2rem;
    color: #ffc107;
}

.afisha-category-item img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

/* Стили для статей */
.article-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-item a {
    color: inherit;
}

.article-image-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.article-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}

.article-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-image-placeholder i {
    font-size: 1.5rem;
}

/* Стили для мероприятий афиши */
.afisha-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.afisha-item .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.afisha-item .card:hover .card-title {
    color: #007bff !important;
}

.afisha-item .position-relative {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.afisha-item img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.afisha-item .card:hover img {
    transform: scale(1.05);
}

.afisha-item .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    z-index: 2;
}

.afisha-item .card-body {
    padding: 1.25rem;
}

.afisha-item .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.afisha-item .text-success {
    color: #28a745 !important;
    font-size: 1.1rem;
}

/* Стили для изображений организаций */
.organization-image-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0.375rem;
}

.organization-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.organization-image-wrapper:hover .organization-image {
    transform: scale(1.05);
}

.organization-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
}

.organization-image-placeholder i {
    font-size: 2rem;
    color: #0d6efd;
}

/* Стили для организаций */
.organization-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.organization-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.organization-item .card:hover .organization-image {
    transform: scale(1.05);
}

.organization-item a {
    color: inherit;
}

/* Стили для телеканалов */
.tv-channel-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.tv-channel-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tv-channel-item a {
    color: inherit;
}

/* Стили для радиостанций */
.radio-station-item .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.radio-station-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.radio-station-item a {
    color: inherit;
}

/* Стили для логотипов радио и ТВ */
.station-logo-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.station-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.default-logo-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.default-logo-placeholder i {
    font-size: 1.5rem;
}

.default-logo {
    object-fit: contain;
}

/* Стили для найденных категорий */
.found-ad-categories .btn-outline-primary,
.found-afisha-categories .btn-outline-warning {
    transition: all 0.2s;
}

.found-ad-categories .btn-outline-primary:hover,
.found-afisha-categories .btn-outline-warning:hover {
    transform: translateY(-2px);
}

.found-ad-categories .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #fff;
}

.found-afisha-categories .btn-outline-warning:hover {
    background-color: #ffc107;
    color: #000;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .product-category-item .card-body,
    .catalog-category-item .card-body,
    .article-category-item .card-body,
    .afisha-category-item .card-body,
    .product-item .d-flex,
    .article-item .d-flex,
    .organization-item .d-flex,
    .tv-channel-item .d-flex,
    .radio-station-item .d-flex,
    .afisha-item .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .product-category-item i,
    .catalog-category-item i,
    .article-category-item i,
    .afisha-category-item i {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
    
    .product-icon-wrapper,
    .article-image-wrapper,
    .organization-image-wrapper,
    .tv-channel-item .station-logo-wrapper,
    .tv-channel-item .bg-light,
    .radio-station-item .station-logo-wrapper,
    .radio-station-item .bg-light,
    .afisha-item .station-logo-wrapper,
    .afisha-item .bg-light {
        margin: 0 auto 1rem auto;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
    
    .afisha-item .card-title {
        font-size: 1rem;
    }
    
    .afisha-item .text-success {
        font-size: 1rem;
    }
}

.modal-xl {
    max-width: 1200px;
}

.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    background: linear-gradient(135deg, #0d6efd, #6ea8fe);
    color: white;
    border-bottom: none;
    padding: 20px 30px;
}

.modal-title {
    font-weight: 600;
    font-size: 1.5rem;
}

.modal-body {
    height: 80vh;
    display: flex;
    flex-direction: column;
}

/* Стили для скроллинга */
#catalogParentCategoriesScroll,
#catalogChildCategoriesScroll {
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f8f9fa;
    padding-right: 5px;
}

#catalogParentCategoriesScroll::-webkit-scrollbar,
#catalogChildCategoriesScroll::-webkit-scrollbar {
    width: 8px;
}

#catalogParentCategoriesScroll::-webkit-scrollbar-track,
#catalogChildCategoriesScroll::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

#catalogParentCategoriesScroll::-webkit-scrollbar-thumb,
#catalogChildCategoriesScroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0d6efd, #6ea8fe);
    border-radius: 4px;
}

#catalogParentCategoriesScroll::-webkit-scrollbar-thumb:hover,
#catalogChildCategoriesScroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0a58ca, #4d8ff7);
}

/* Стили для левой колонки (родительские категории) */
#catalogParentCategoriesList .nav-link {
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

#catalogParentCategoriesList .nav-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateX(5px);
}

#catalogParentCategoriesList .nav-link.active {
    background: linear-gradient(135deg, #0d6efd, #6ea8fe);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
    transform: translateX(5px);
}

#catalogParentCategoriesList .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

#catalogParentCategoriesList .nav-link .category-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

#catalogParentCategoriesList .nav-link .category-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
}

#catalogParentCategoriesList .nav-link:not(.active) .category-count {
    background: #f8f9fa;
    color: #6c757d;
}

/* Стиль для категорий без подкатегорий */
#catalogParentCategoriesList .nav-link.no-children {
    border-left: 4px solid #28a745;
}

#catalogParentCategoriesList .nav-link.no-children:hover {
    border-left-color: #218838;
}

#catalogParentCategoriesList .nav-link.no-children .no-children-icon {
    color: #28a745;
    font-size: 14px;
    margin-left: 5px;
}

/* Стили для правой колонки */
.catalog-child-categories-container {
    padding: 25px;
    min-height: 100%;
}

.category-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding-top: 10px;
    margin-top: -10px;
}

.category-header h4 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-header .description {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Стили для краткого описания */
.short-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.4;
    font-style: italic;
    padding-left: 10px;
    border-left: 3px solid #0d6efd;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.05), transparent);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 15px;
}

.short-description.priority {
    border-left-color: #ffc107;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.05), transparent);
}

/* Стили для поиска */
#catalogCategorySearch {
    border-radius: 25px;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}

#catalogCategorySearch:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#catalogClearSearch {
    border-radius: 25px;
    padding: 0 20px;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}

#catalogClearSearch:hover {
    background-color: #f8f9fa;
    border-color: #6c757d;
}

/* Стили для результатов поиска */
.search-results-container {
    padding: 10px 0;
}

.search-result-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
    background: white;
}

.search-result-card:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    transform: translateX(5px);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.search-result-category {
    font-weight: 600;
    color: #212529;
    font-size: 16px;
}

.search-result-path {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.search-result-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Стили для краткого описания в результатах поиска */
.search-result-short-description {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 5px 0 8px 0;
    font-style: italic;
    padding-left: 8px;
    border-left: 2px solid #0d6efd;
}

.search-result-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* Стили для хлебных крошек */
#catalogCategoryBreadcrumb .breadcrumb {
    padding: 0;
    margin: 0;
    background: transparent;
}

#catalogCategoryBreadcrumb .breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

#catalogCategoryBreadcrumb .breadcrumb-item a:hover {
    color: #084298;
    text-decoration: underline;
}

#catalogCategoryBreadcrumb .breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

#catalogCategoryBreadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Адаптивность Desktop */
@media (max-width: 1200px) {
    .slider-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 992px) {
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
}

/* ====== MOBILE СТИЛИ ====== */
@media (max-width: 992px) {
    .modal-dialog.modal-xl.d-none.d-lg-block {
        display: none !important;
    }
    
    .modal-dialog-bottom {
        margin: 0;
        max-width: 100%;
        height: 90vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }
    
    .modal.show .modal-dialog-bottom {
        transform: translateY(0);
    }
    
    .modal.fade .modal-dialog-bottom {
        transform: translateY(100%);
    }
    
    .modal-content.rounded-top-4 {
        border-radius: 1.5rem 1.5rem 0 0 !important;
        border: none;
        height: 90vh;
        overflow: hidden;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .modal-header {
        padding-top: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .modal-title {
        font-size: 1.125rem;
    }
    
    .search-container .input-group-sm {
        border-radius: 50px;
        border: 1px solid #dee2e6;
        background: #f8f9fa;
        overflow: hidden;
    }
    
    .search-container .input-group-text {
        background: transparent;
        padding-left: 1rem;
        padding-right: 0.5rem;
    }
    
    .search-container .form-control {
        background: transparent;
        border: none;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.875rem;
        height: auto;
    }
    
    .search-container .btn {
        background: transparent;
        border: none;
        padding-right: 1rem;
        padding-left: 0.5rem;
    }
    
    .search-container .btn svg {
        width: 16px;
        height: 16px;
    }
    
    .catalog-categories-container {
        position: relative;
        height: calc(90vh - 120px);
        overflow: hidden;
    }
    
    .catalog-categories-layer {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 60px;
    }
    
    .catalog-categories-layer.active {
        transform: translateX(0);
        z-index: 2;
    }
    
    .catalog-categories-layer.slide-out {
        transform: translateX(-100%);
    }
    
    .catalog-categories-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 12px;
    }
    
    @media (max-width: 576px) {
        .catalog-categories-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            padding: 10px;
        }
    }
    
    @media (max-width: 360px) {
        .catalog-categories-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            padding: 8px;
        }
    }
    
    .category-card-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 6px;
        border: 1px solid #f0f0f0;
        border-radius: 10px;
        background: white;
        transition: all 0.2s ease;
        text-decoration: none;
        color: inherit;
        min-height: 110px;
        position: relative;
    }
    
    .category-card-mobile:active {
        background-color: #f8f9fa;
        transform: scale(0.98);
    }
    
    .category-card-mobile:hover {
        border-color: #0d6efd;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
    }
    
    .category-card-mobile.no-children {
        border-left: 3px solid #28a745;
    }
    
    .category-icon-mobile {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #6ea8fe, #0d6efd);
        border-radius: 8px;
        margin-bottom: 8px;
        color: white;
        font-size: 16px;
    }
    
    @media (max-width: 576px) {
        .category-icon-mobile {
            width: 32px;
            height: 32px;
            font-size: 14px;
            margin-bottom: 6px;
        }
    }
    
    .category-name-mobile {
        font-size: 11px;
        font-weight: 500;
        text-align: center;
        line-height: 1.2;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
    }
    
    .category-short-description-mobile {
        font-size: 10px;
        color: #6c757d;
        text-align: center;
        line-height: 1.2;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-style: italic;
        min-height: 24px;
    }
    
    .category-count-mobile {
        font-size: 10px;
        color: #6c757d;
        background: #f8f9fa;
        padding: 1px 6px;
        border-radius: 8px;
        margin-top: 2px;
    }
    
    .catalog-subcategories-content {
        padding-top: 0;
    }
    
    .subcategory-item {
        display: flex;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
        color: inherit;
        transition: background-color 0.2s;
    }
    
    .subcategory-item:active {
        background-color: #f8f9fa;
    }
    
    .subcategory-item:last-child {
        border-bottom: none;
    }
    
    .subcategory-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 8px;
        margin-right: 12px;
        color: #0d6efd;
        font-size: 14px;
        position: relative;
    }
    
    .subcategory-info {
        flex: 1;
    }
    
    .subcategory-name {
        font-weight: 500;
        margin-bottom: 2px;
        font-size: 14px;
    }
    
    .subcategory-short-description {
        font-size: 11px;
        color: #6c757d;
        margin-bottom: 4px;
        font-style: italic;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .subcategory-meta {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .subcategory-count {
        font-size: 11px;
        color: #6c757d;
    }
    
    .subcategory-arrow {
        color: #6c757d;
        font-size: 12px;
    }
    
    .search-result-item {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
        color: inherit;
        display: block;
        transition: background-color 0.2s;
    }
    
    .search-result-item:active {
        background-color: #f8f9fa;
    }
    
    .search-result-item:last-child {
        border-bottom: none;
    }
    
    .search-result-category {
        font-weight: 500;
        margin-bottom: 4px;
        color: #212529;
        font-size: 14px;
    }
    
    .search-result-short-description-mobile {
        font-size: 11px;
        color: #6c757d;
        margin-bottom: 6px;
        font-style: italic;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        padding-left: 6px;
        border-left: 2px solid #0d6efd;
    }
    
    .search-result-path {
        font-size: 11px;
        color: #6c757d;
        margin-bottom: 6px;
    }
    
    .search-result-badge {
        font-size: 11px;
        background: linear-gradient(135deg, #6ea8fe, #0d6efd);
        color: white;
        padding: 1px 6px;
        border-radius: 8px;
        display: inline-block;
    }
    
    .current-path-item {
        display: inline-flex;
        align-items: center;
        font-size: 11px;
        color: #6c757d;
    }
    
    .current-path-item:not(:last-child):after {
        content: '›';
        margin: 0 4px;
        color: #adb5bd;
    }
    
    .btn-link {
        color: #0d6efd;
        text-decoration: none;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color 0.2s;
    }
    
    .btn-link:active {
        background-color: #f0f0f0;
    }
    
    .sticky-top {
        position: sticky;
        top: 0;
        z-index: 10;
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
    }
    
    .fs-7 {
        font-size: 0.75rem !important;
    }
    
    @keyframes fadeInMobile {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .fade-in {
        animation: fadeInMobile 0.3s ease;
    }
    
    .catalog-categories-layer::-webkit-scrollbar {
        width: 4px;
    }
    
    .catalog-categories-layer::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .catalog-categories-layer::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .catalog-categories-layer::-webkit-scrollbar-thumb:hover {
        background: #a1a1a1;
    }
    
    .search-container .input-group:focus-within {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    }
    
    @supports (-webkit-touch-callout: none) {
        .catalog-categories-layer {
            padding-bottom: calc(60px + env(safe-area-inset-bottom));
        }
        
        .modal-content.rounded-top-4 {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Стили для выделения при прокрутке */
.nav-link.scroll-highlight {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* ====== DESKTOP СТИЛИ ДЛЯ СПИСКА ====== */
.child-categories-list {
    padding-right: 5px;
}

.category-list-item .card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-list-item .card:hover {
    border-color: #0d6efd;
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.category-list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f0f7ff, #e3f2fd);
    border-radius: 10px;
    position: relative;
}

.category-actions .btn {
    min-width: 120px;
}

.search-result-item .card {
    border-left: 4px solid #0d6efd;
}

/* Убираем стили слайдера */
.categories-slider,
.slider-container,
.slider-nav,
.slider-indicators {
    display: none;
}

/* Стиль для краткого описания в элементах списка */
.category-short-description-list {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 5px 0 10px 0;
    line-height: 1.4;
    font-style: italic;
    padding: 6px 10px;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.05), transparent);
    border-radius: 6px;
    border-left: 3px solid #0d6efd;
}

.category-short-description-list.priority {
    border-left-color: #ffc107;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.05), transparent);
}

/* Адаптивность для списка */
@media (max-width: 992px) {
    .category-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .category-actions .btn {
        min-width: 100px;
        font-size: 0.875rem;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .category-list-item .card-body {
        padding: 15px;
    }
    
    .category-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .category-actions .btn {
        min-width: 90px;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Стили для текущей категории */
.current-category-selector .card {
    background: linear-gradient(135deg, #f8f9ff, #f0f7ff);
    border: 2px solid #0d6efd;
}

.current-category-selector .card.priority {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
}

/* Разделитель для подкатегорий */
.subcategories-divider {
    margin: 25px 0;
}

.subcategories-divider .border-bottom {
    border-color: #dee2e6 !important;
}

.subcategories-divider .text-muted {
    color: #6c757d !important;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Стиль для описания в текущей категории */
.current-category-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

.current-category-description.priority {
    border-left-color: #ffc107;
    background: #fff9e6;
}

/* Стили для навигации вверх */
#catalogGoUpButton {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    padding: 4px 10px;
}

/* ====== АДАПТИВНОСТЬ ДЛЯ ПРОМЕЖУТОЧНЫХ ЭКРАНОВ ====== */
@media (max-width: 1000px) {
    .modal-dialog.modal-xl.d-none.d-lg-block {
        display: none !important;
    }
    
    .modal-dialog.modal-fullscreen.modal-dialog-bottom.d-lg-none {
        display: block !important;
    }
}

@media (min-width: 1000px) {
    .modal-dialog.modal-xl.d-none.d-lg-block {
        display: block !important;
    }
    
    .modal-dialog.modal-fullscreen.modal-dialog-bottom.d-lg-none {
        display: none !important;
    }
}

@media (min-width: 910px) and (max-width: 1199px) {
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
}

@media (max-width: 1000px) {
    .modal-dialog-bottom {
        margin: 0;
        max-width: 100%;
        height: 85vh;
    }
    
    .modal-content.rounded-top-4 {
        height: 85vh;
    }
    
    .catalog-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 15px;
    }
    
    .category-card-mobile {
        padding: 15px 8px;
        min-height: 120px;
    }
    
    .category-name-mobile {
        font-size: 12px;
    }
    
    .category-short-description-mobile {
        font-size: 11px;
    }
}
.modal-xl {
    max-width: 1200px;
}

.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    background: linear-gradient(135deg, #0d6efd, #6ea8fe);
    color: white;
    border-bottom: none;
    padding: 20px 30px;
}

.modal-title {
    font-weight: 600;
    font-size: 1.5rem;
}

.modal-body {
    height: 80vh;
    display: flex;
    flex-direction: column;
}

/* Стили для скроллинга */
#parentCategoriesScroll,
#childCategoriesScroll {
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f8f9fa;
    padding-right: 5px;
}

#parentCategoriesScroll::-webkit-scrollbar,
#childCategoriesScroll::-webkit-scrollbar {
    width: 8px;
}

#parentCategoriesScroll::-webkit-scrollbar-track,
#childCategoriesScroll::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

#parentCategoriesScroll::-webkit-scrollbar-thumb,
#childCategoriesScroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0d6efd, #6ea8fe);
    border-radius: 4px;
}

#parentCategoriesScroll::-webkit-scrollbar-thumb:hover,
#childCategoriesScroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0a58ca, #4d8ff7);
}

/* Стили для левой колонки (родительские категории) */
.nav-pills .nav-link {
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.nav-pills .nav-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateX(5px);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #0d6efd, #6ea8fe);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
    transform: translateX(5px);
}

.nav-pills .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

.nav-pills .nav-link .category-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-pills .nav-link .category-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
}

.nav-pills .nav-link:not(.active) .category-count {
    background: #f8f9fa;
    color: #6c757d;
}

/* Стиль для категорий без подкатегорий */
.nav-pills .nav-link.no-children {
    border-left: 4px solid #28a745;
}

.nav-pills .nav-link.no-children:hover {
    border-left-color: #218838;
}

.nav-pills .nav-link.no-children .no-children-icon {
    color: #28a745;
    font-size: 14px;
    margin-left: 5px;
}

/* Стили для правой колонки (слайдер дочерних категорий) */
.child-categories-container {
    padding: 25px;
    min-height: 100%;
}

.category-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding-top: 10px;
    margin-top: -10px;
}

.category-header h4 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 5px;
}

.category-header .description {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Стили для краткого описания */
.short-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.4;
    font-style: italic;
    padding-left: 10px;
    border-left: 3px solid #0d6efd;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.05), transparent);
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 15px;
}

.short-description.priority {
    border-left-color: #ffc107;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.05), transparent);
}

/* Стили для слайдера категорий */
.categories-slider {
    position: relative;
    margin-bottom: 30px;
}

.slider-container {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    margin: 0 -10px;
}

.slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
    padding: 10px;
}

.slider-item {
    flex: 0 0 calc(25% - 15px);
    min-width: 200px;
}

.category-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.15);
    transform: translateY(-5px);
}

.category-card:active {
    transform: translateY(-2px);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #6ea8fe);
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon-large {
    font-size: 36px;
    color: #0d6efd;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.category-card:hover .category-icon-large {
    transform: scale(1.1);
}

.category-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-short-description {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: 35px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.category-count-slider {
    font-size: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #0d6efd, #6ea8fe);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.subcategories-count {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 3px 10px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.indicator.active {
    background: #0d6efd;
    transform: scale(1.3);
}

/* Стили для поиска */
#categorySearch {
    border-radius: 25px;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}

#categorySearch:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#clearSearch {
    border-radius: 25px;
    padding: 0 20px;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
}

#clearSearch:hover {
    background-color: #f8f9fa;
    border-color: #6c757d;
}

/* Стили для результатов поиска */
.search-results-container {
    padding: 10px 0;
}

.search-result-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
    background: white;
}

.search-result-card:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    transform: translateX(5px);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.search-result-category {
    font-weight: 600;
    color: #212529;
    font-size: 16px;
}

.search-result-path {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.search-result-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Стили для краткого описания в результатах поиска */
.search-result-short-description {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 5px 0 8px 0;
    font-style: italic;
    padding-left: 8px;
    border-left: 2px solid #0d6efd;
}

.search-result-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* Стили для хлебных крошек */
#categoryBreadcrumb .breadcrumb {
    padding: 0;
    margin: 0;
    background: transparent;
}

#categoryBreadcrumb .breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

#categoryBreadcrumb .breadcrumb-item a:hover {
    color: #084298;
    text-decoration: underline;
}

#categoryBreadcrumb .breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

#categoryBreadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Адаптивность Desktop */
@media (max-width: 1200px) {
    .slider-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 992px) {
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .slider-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 180px;
    }
}

/* ====== MOBILE СТИЛИ ====== */
@media (max-width: 992px) {
    /* Скрываем desktop версию на мобильных */
    .modal-dialog.modal-xl.d-none.d-lg-block {
        display: none !important;
    }
    
    /* Модальное окно снизу как в приложении */
    .modal-dialog-bottom {
        margin: 0;
        max-width: 100%;
        height: 90vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }
    
    .modal-dialog-bottom.show {
        transform: translateY(0);
    }
    
    .modal.fade .modal-dialog-bottom {
        transform: translateY(100%);
    }
    
    .modal.show .modal-dialog-bottom {
        transform: translateY(0);
    }
    
    .modal-content.rounded-top-4 {
        border-radius: 1.5rem 1.5rem 0 0 !important;
        border: none;
        height: 90vh;
        overflow: hidden;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    }
    
    /* Уменьшенный хедер */
    .modal-header {
        padding-top: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    /* Уменьшенный заголовок */
    .modal-title {
        font-size: 1.125rem;
    }
    
    /* Уменьшенная строка поиска */
    .search-container .input-group-sm {
        border-radius: 50px;
        border: 1px solid #dee2e6;
        background: #f8f9fa;
        overflow: hidden;
    }
    
    .search-container .input-group-text {
        background: transparent;
        padding-left: 1rem;
        padding-right: 0.5rem;
    }
    
    .search-container .form-control {
        background: transparent;
        border: none;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.875rem;
        height: auto;
    }
    
    .search-container .btn {
        background: transparent;
        border: none;
        padding-right: 1rem;
        padding-left: 0.5rem;
    }
    
    .search-container .btn i {
        font-size: 0.875rem;
    }
    
    /* Контейнер категорий */
    .categories-container {
        position: relative;
        height: calc(90vh - 120px);
        overflow: hidden;
    }
    
    .categories-layer {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 60px;
    }
    
    .categories-layer.active {
        transform: translateX(0);
        z-index: 2;
    }
    
    .categories-layer.slide-out {
        transform: translateX(-100%);
    }
    
    /* Стили для списка основных категорий - уменьшенные */
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 12px;
    }
    
    @media (max-width: 576px) {
        .categories-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            padding: 10px;
        }
    }
    
    @media (max-width: 360px) {
        .categories-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            padding: 8px;
        }
    }
    
    .category-card-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 12px 6px;
        border: 1px solid #f0f0f0;
        border-radius: 10px;
        background: white;
        transition: all 0.2s ease;
        text-decoration: none;
        color: inherit;
        min-height: 110px;
        position: relative;
    }
    
    .category-card-mobile:active {
        background-color: #f8f9fa;
        transform: scale(0.98);
    }
    
    .category-card-mobile:hover {
        border-color: #0d6efd;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
    }
    
    /* Стиль для категорий без подкатегорий на мобильных */
    .category-card-mobile.no-children {
        border-left: 3px solid #28a745;
    }
    
    /* Уменьшенные иконки */
    .category-icon-mobile {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #6ea8fe, #0d6efd);
        border-radius: 8px;
        margin-bottom: 8px;
        color: white;
        font-size: 16px;
    }
    
    @media (max-width: 576px) {
        .category-icon-mobile {
            width: 32px;
            height: 32px;
            font-size: 14px;
            margin-bottom: 6px;
        }
    }
    
    .category-name-mobile {
        font-size: 11px;
        font-weight: 500;
        text-align: center;
        line-height: 1.2;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
    }
    
    .category-short-description-mobile {
        font-size: 10px;
        color: #6c757d;
        text-align: center;
        line-height: 1.2;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-style: italic;
        min-height: 24px;
    }
    
    .category-count-mobile {
        font-size: 10px;
        color: #6c757d;
        background: #f8f9fa;
        padding: 1px 6px;
        border-radius: 8px;
        margin-top: 2px;
    }
    
    /* Стили для списка подкатегорий */
    .subcategories-content {
        padding-top: 0;
    }
    
    .subcategory-item {
        display: flex;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
        color: inherit;
        transition: background-color 0.2s;
    }
    
    .subcategory-item:active {
        background-color: #f8f9fa;
    }
    
    .subcategory-item:last-child {
        border-bottom: none;
    }
    
    /* Уменьшенные иконки подкатегорий */
    .subcategory-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 8px;
        margin-right: 12px;
        color: #0d6efd;
        font-size: 14px;
    }
    
    .subcategory-info {
        flex: 1;
    }
    
    .subcategory-name {
        font-weight: 500;
        margin-bottom: 2px;
        font-size: 14px;
    }
    
    .subcategory-short-description {
        font-size: 11px;
        color: #6c757d;
        margin-bottom: 4px;
        font-style: italic;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .subcategory-meta {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .subcategory-count {
        font-size: 11px;
        color: #6c757d;
    }
    
    .subcategory-arrow {
        color: #6c757d;
        font-size: 12px;
    }
    
    /* Стили для результатов поиска */
    .search-result-item {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
        color: inherit;
        display: block;
        transition: background-color 0.2s;
    }
    
    .search-result-item:active {
        background-color: #f8f9fa;
    }
    
    .search-result-item:last-child {
        border-bottom: none;
    }
    
    .search-result-category {
        font-weight: 500;
        margin-bottom: 4px;
        color: #212529;
        font-size: 14px;
    }
    
    .search-result-short-description-mobile {
        font-size: 11px;
        color: #6c757d;
        margin-bottom: 6px;
        font-style: italic;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        padding-left: 6px;
        border-left: 2px solid #0d6efd;
    }
    
    .search-result-path {
        font-size: 11px;
        color: #6c757d;
        margin-bottom: 6px;
    }
    
    .search-result-badge {
        font-size: 11px;
        background: linear-gradient(135deg, #6ea8fe, #0d6efd);
        color: white;
        padding: 1px 6px;
        border-radius: 8px;
        display: inline-block;
    }
    
    /* Стили для текущего пути */
    .current-path-item {
        display: inline-flex;
        align-items: center;
        font-size: 11px;
        color: #6c757d;
    }
    
    .current-path-item:not(:last-child):after {
        content: '›';
        margin: 0 4px;
        color: #adb5bd;
    }
    
    /* Стили для кнопки "Назад" */
    .btn-link {
        color: #0d6efd;
        text-decoration: none;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color 0.2s;
    }
    
    .btn-link:active {
        background-color: #f0f0f0;
    }
    
    /* Стили для sticky хедеров */
    .sticky-top {
        position: sticky;
        top: 0;
        z-index: 10;
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
    }
    
    /* Дополнительный размер шрифта */
    .fs-7 {
        font-size: 0.75rem !important;
    }
    
    /* Анимации */
    @keyframes fadeInMobile {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .fade-in {
        animation: fadeInMobile 0.3s ease;
    }
    
    /* Стили для скролла */
    .categories-layer::-webkit-scrollbar {
        width: 4px;
    }
    
    .categories-layer::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .categories-layer::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .categories-layer::-webkit-scrollbar-thumb:hover {
        background: #a1a1a1;
    }
    
    /* Стили для поиска */
    .search-container .input-group:focus-within {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    }
    
    /* Дополнительные стили для iOS */
    @supports (-webkit-touch-callout: none) {
        .categories-layer {
            padding-bottom: calc(60px + env(safe-area-inset-bottom));
        }
        
        .modal-content.rounded-top-4 {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Стили для выделения при прокрутке */
.nav-link.scroll-highlight {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* ====== DESKTOP СТИЛИ ДЛЯ СПИСКА ====== */
.child-categories-list {
    padding-right: 5px;
}

.category-list-item .card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-list-item .card:hover {
    border-color: #0d6efd;
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.category-list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f0f7ff, #e3f2fd);
    border-radius: 10px;
}

.category-actions .btn {
    min-width: 120px;
}

.search-result-item .card {
    border-left: 4px solid #0d6efd;
}

/* Убираем стили слайдера */
.categories-slider,
.slider-container,
.slider-nav,
.slider-indicators {
    display: none;
}

/* Стиль для краткого описания в элементах списка */
.category-short-description-list {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 5px 0 10px 0;
    line-height: 1.4;
    font-style: italic;
    padding: 6px 10px;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.05), transparent);
    border-radius: 6px;
    border-left: 3px solid #0d6efd;
}

.category-short-description-list.priority {
    border-left-color: #ffc107;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.05), transparent);
}

/* Адаптивность для списка */
@media (max-width: 992px) {
    .category-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .category-actions .btn {
        min-width: 100px;
        font-size: 0.875rem;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .category-list-item .card-body {
        padding: 15px;
    }
    
    .category-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .category-actions .btn {
        min-width: 90px;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Стили для текущей категории */
.current-category-selector .card {
    background: linear-gradient(135deg, #f8f9ff, #f0f7ff);
    border: 2px solid #0d6efd;
}

.current-category-selector .card.priority {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
}

/* Разделитель для подкатегорий */
.subcategories-divider {
    margin: 25px 0;
}

.subcategories-divider .border-bottom {
    border-color: #dee2e6 !important;
}

.subcategories-divider .text-muted {
    color: #6c757d !important;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Стиль для описания в текущей категории */
.current-category-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

.current-category-description.priority {
    border-left-color: #ffc107;
    background: #fff9e6;
}

/* ====== АДАПТИВНОСТЬ ДЛЯ ПРОМЕЖУТОЧНЫХ ЭКРАНОВ (910px - 1000px) ====== */
@media (max-width: 1000px) {
    .modal-dialog.modal-xl.d-none.d-lg-block {
        display: none !important;
    }
    
    .modal-dialog.modal-fullscreen.modal-dialog-bottom.d-lg-none {
        display: block !important;
    }
}

@media (min-width: 1000px) {
    .modal-dialog.modal-xl.d-none.d-lg-block {
        display: block !important;
    }
    
    .modal-dialog.modal-fullscreen.modal-dialog-bottom.d-lg-none {
        display: none !important;
    }
}

@media (min-width: 910px) and (max-width: 1199px) {
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .slider-item {
        flex: 0 0 calc(33.333% - 14px);
    }
    
    .category-name {
        font-size: 14px;
        min-height: 40px;
    }
    
    .category-icon-large {
        font-size: 32px;
    }
    
    .category-card {
        padding: 15px 10px;
    }
}

@media (max-width: 1000px) {
    .modal-dialog-bottom {
        margin: 0;
        max-width: 100%;
        height: 85vh;
    }
    
    .modal-content.rounded-top-4 {
        height: 85vh;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 15px;
    }
    
    .category-card-mobile {
        padding: 15px 8px;
        min-height: 120px;
    }
    
    .category-name-mobile {
        font-size: 12px;
    }
    
    .category-short-description-mobile {
        font-size: 11px;
    }
}