/* Основной макет каталога */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 20px 0;
}

/* Стили для фильтров */
.filters {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filters h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #444;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range input {
    width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.category-options,
.manufacturer-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-check {
    margin-bottom: 5px;
}

.form-check-label {
    cursor: pointer;
}

/* Стили для сетки товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    padding-top: 100%;
    background: #f8f8f8;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3FB03F;
    margin: 0 0 10px 0;
}

.badge {
    font-size: 0.8rem;
    padding: 5px 10px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.page-btn.active {
    background: #3FB03F;
    color: white;
    border-color: #3FB03F;
}

/* Адаптивность */
@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .price-range {
        flex-direction: column;
        align-items: stretch;
    }

    .price-range input {
        width: 100%;
    }
}

/* Стили для страницы каталога */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

/* Блок фильтров */
.filters {
    width: 250px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
    flex-shrink: 0;
}

.filters h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
    border-bottom: 2px solid #3FB03F;
    padding-bottom: 10px;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1em;
}

/* Стили для дерева категорий */
.category-tree {
    max-height: 300px;
    overflow-y: auto;
}

.category-item {
    margin-bottom: 10px;
}

.category-item label {
    display: block;
    padding: 8px 0;
    cursor: pointer;
    font-weight: 500;
}

.category-item input[type="checkbox"] {
    margin-right: 8px;
}

.subcategories {
    margin-left: 20px;
    margin-top: 5px;
}

.subcategory {
    display: block;
    padding: 5px 0;
    font-size: 0.9em;
    color: #666;
}

/* Стили для диапазона цен */
.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.price-range span {
    color: #666;
    font-weight: bold;
}

/* Стили для опций брендов */
.brand-options {
    max-height: 200px;
    overflow-y: auto;
}

.brand-options label {
    display: block;
    padding: 8px 0;
    cursor: pointer;
}

.brand-options input[type="checkbox"] {
    margin-right: 8px;
}

/* Кнопки фильтров */
.apply-filters, .clear-filters {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.apply-filters {
    background: linear-gradient(to right, #3FB03F, #009684);
    color: white;
}

.apply-filters:hover {
    background: linear-gradient(to right, #009684, #3FB03F);
    transform: translateY(-2px);
}

.clear-filters {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.clear-filters:hover {
    background: #e9ecef;
}

/* Основной блок с товарами */
.products {
    flex: 1;
    min-width: 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.products-header h1 {
    color: #333;
    font-size: 2em;
    margin: 0;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

/* Сообщение об отсутствии товаров */
.no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
    background: #f8f9fa;
    border-radius: 8px;
    grid-column: 1 / -1;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-btn:hover {
    background: #f8f9fa;
    border-color: #3FB03F;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-number {
    color: #666;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .filters {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }

    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .price-range {
        flex-direction: column;
        gap: 5px;
    }

    .pagination {
        flex-direction: column;
        gap: 10px;
    }
}

.sort-price-options label {
    display: block;
    margin-bottom: 5px;
    cursor: pointer;
}
.Sub_Category_Name {
    display: block;
    margin-left: 2%;
    margin-top: 5px;
}
.two-columns {
    column-count: 2;
    column-gap: 20px; /* расстояние между колонками */
    /* Выравнивание по центру */
    margin: 0 auto;
    width: 80%; /* или фиксированная ширина */
    max-width: 1200px; /* максимальная ширина */
}