/* ============================================
   КАТАЛОГ - УВЕЛИЧЕННАЯ ВЕРСИЯ
   ============================================ */

/* Основная карточка фильтров */
.filter-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 25px;
    border: 1px solid #f0f0f0;
    position: sticky;
    top: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.filter-card::-webkit-scrollbar {
    width: 8px;
}
.filter-card::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 6px;
}
.filter-card::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 6px;
}
.filter-card::-webkit-scrollbar-thumb:hover {
    background: #6c3bd2;
}

/* Заголовок фильтров */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.filter-header h5 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.filter-header h5 i {
    font-size: 22px;
    color: #6c3bd2;
    margin-right: 12px;
}

.reset-link {
    font-size: 14px;
    color: #999;
    text-decoration: none;
    padding: 5px 10px;
}

.reset-link:hover {
    color: #6c3bd2;
}

/* Группы фильтров */
.filter-group {
    margin-bottom: 25px;
}

.filter-group label {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    display: block;
}

.filter-group label i {
    color: #6c3bd2;
    margin-right: 10px;
    font-size: 16px;
}

/* Поле поиска */
.filter-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    transition: all 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: #6c3bd2;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(108, 59, 210, 0.1);
}

/* Контейнеры для категорий и брендов */
.filter-group > div[style*="max-height"] {
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    background: #f8f9fa;
    margin-top: 8px;
}

/* Категории */
.filter-group:has(.form-check input[name="category"]) > div {
    max-height: 400px !important;
    padding: 8px !important;
}

/* Бренды */
.filter-group:has(.form-check input[name="brand"]) > div {
    max-height: 400px !important;
    padding: 8px !important;
}

.filter-group .form-check {
    margin-bottom: 3px !important;
    padding: 3px 6px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 6px;
    transition: background 0.2s;
}

.filter-group .form-check:hover {
    background: #f5f0ff;
}

.filter-group .form-check-input {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    margin: 0 !important;
    margin-right: 10px !important;
    cursor: pointer;
    accent-color: #6c3bd2;
    flex-shrink: 0;
}

.filter-group .form-check-label {
    font-size: 13px !important;
    color: #4b5563;
    cursor: pointer;
    line-height: 1.3;
}

.filter-group .form-check-label:hover {
    color: #6c3bd2;
}

/* Текст "Прокрутите" */
.filter-group .text-muted {
    font-size: 12px;
    margin-top: 10px;
    display: block;
    color: #999;
}

/* Ползунок цены */
.price-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    color: #6c3bd2;
}

.price-slider-container {
    position: relative;
    height: 40px;
    margin: 0 8px;
}

.price-slider-track {
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    height: 5px;
    background: #e0e0e0;
    border-radius: 5px;
}

.price-slider {
    position: absolute;
    width: 100%;
    top: 10px;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #6c3bd2;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Кнопка фильтра */
.filter-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6c3bd2, #3b82f6);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 59, 210, 0.4);
}

/* Карточка товара */
.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid #f0f0f0;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(108, 59, 210, 0.12);
}

.product-img {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
    padding: 20px;
}

.product-img img {
    max-width: 130px;
    max-height: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4757;
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}

.product-info {
    padding: 18px;
}

.product-brand {
    font-size: 12px;
    color: #6c3bd2;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    height: 44px;
    overflow: hidden;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #6c3bd2;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: #6c3bd2;
    margin: 10px 0;
}

.product-old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-cart {
    flex: 2;
    background: #6c3bd2;
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.btn-cart:hover {
    background: #5a2cb8;
    transform: translateY(-2px);
}

.btn-details {
    flex: 1;
    background: #f0f0f0;
    color: #666;
    text-align: center;
    padding: 8px;
    border-radius: 40px;
    font-size: 12px;
    text-decoration: none;
    transition: 0.2s;
}

.btn-details:hover {
    background: #e0e0e0;
    color: #6c3bd2;
}

/* Заголовок каталога */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.catalog-count {
    font-size: 16px;
    color: #666;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 50px;
}

.catalog-count strong {
    color: #6c3bd2;
    font-size: 18px;
}

/* Выпадающий список сортировки */
.sort-dropdown {
    position: relative;
    display: inline-block;
}

.sort-dropdown-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 190px;
    justify-content: space-between;
}

.sort-dropdown-btn:hover {
    background: #f0f0ff;
    border-color: #6c3bd2;
}

.sort-dropdown-btn i {
    color: #6c3bd2;
    font-size: 14px;
}

.sort-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.2s;
    z-index: 100;
    border: 1px solid #f0f0f0;
}

.sort-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-option {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    gap: 12px;
    transition: 0.15s;
}

.sort-option i {
    width: 20px;
    color: #999;
    font-size: 14px;
}

.sort-option:hover {
    background: #f5f0ff;
    color: #6c3bd2;
}

.sort-option.active {
    background: #f5f0ff;
    color: #6c3bd2;
    font-weight: 600;
}

.empty-catalog {
    text-align: center;
    padding: 80px;
    background: #f8f9fa;
    border-radius: 28px;
}

.empty-catalog i {
    font-size: 70px;
    color: #ccc;
    margin-bottom: 25px;
}

.empty-catalog h4 {
    font-size: 24px;
    margin-bottom: 12px;
}

.empty-catalog p {
    color: #999;
    font-size: 16px;
    margin-bottom: 25px;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .filter-card {
        max-height: none !important;
        position: relative !important;
        top: 0 !important;
        margin-bottom: 30px !important;
        padding: 20px !important;
    }
    
    .filter-header h5 {
        font-size: 18px;
    }
    
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-dropdown {
        width: 100%;
    }
    
    .sort-dropdown-btn {
        width: 100%;
        justify-content: space-between;
    }
    
    .product-img {
        height: 160px;
    }
    
    .product-title {
        font-size: 14px;
        height: 40px;
    }
    
    .product-price {
        font-size: 16px;
    }
}