/* Основные стили для каталога */
.b-home-group-catalog {
    padding: 0;
    background-color:white;
    margin: 0;
}

.b-home-group-catalog,
.b-home-group-catalog .container,
.b-home-group-catalog .row {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    background-color:white;
}

.b-catalog-sort-left{
    padding: 15px;
}

/* Основная сетка */
.row {
    margin-left: 0;
    margin-right: 0;
}

.catalog-categories {
    padding: 15px;
}

.catalog-category-item .category-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

/* При наведении — чуть ярче */
.catalog-category-item .category-link:hover {
    color: #333;
}

/* Активная категория — оранжевая */
.catalog-category-item.active .category-link {
    color: #ff4f12;
    font-weight: 600;
}

/* Колонка фильтров */
.col-md-3 {
    padding-left: 0 !important;
    margin-left: 0;
    width: 25%; /* Maintain 25% width on desktop */
}

.mfilter-box {
    background: #fff;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 0;
}

.mfilter-heading {
    padding: 15px;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    margin: 0;
}

.mfilter-content {
    padding: 15px;
}

.mfilter-option {
    margin-bottom: 20px;
}

.mfilter-option:last-child {
    margin-bottom: 0;
}

/* Стили для выпадающего списка */
.subcategory-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* Стили для ползунка цены */
.mfilter-slider {
    padding: 0;
}

.mfilter-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.mfilter-input-price-min,
.mfilter-input-price-max {
    width: 45%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Стили для радио-кнопок */
/* Скрыть стандартный чекбокс */
.mfilter-option-list input[type="checkbox"] {
    display: none;
}

/* Стилизация label */
.mfilter-option-list label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #999;
    cursor: pointer;
    position: relative;
    padding-left: 26px;
    margin-bottom: 8px;
    user-select: none;
}

/* Кастомный чекбокс */
.mfilter-option-list label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    border: 2px solid #ff4f12;
    border-radius: 4px;
    background: transparent;
    box-sizing: border-box;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Галочка при выборе */
.mfilter-option-list input[type="checkbox"]:checked + span::before {
    background-color: #ff4f12;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5L4 8L11 1' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
}

/* Чтобы ::before работал на <span> */
.mfilter-option-list span {
    position: relative;
    padding-left: 0;
}

/* Галочка-рамка по умолчанию */
.mfilter-option-list span::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 2px;
    width: 16px;
    height: 16px;
    border: 2px solid #ff4f12;
    border-radius: 4px;
    background: transparent;
    box-sizing: border-box;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Цвет активного текста */
.mfilter-option-list input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #ff4f12;
}

/* Кнопки фильтра */
.mfilter-footer {
    display: flex;
    padding: 12px 15px;
    /* background: #f8f9fa; */
    /* border-top: 1px solid #eee; */
}

.mfilter-btn {
    flex: 1;
    margin-right: 10px;
    background-color: #ff4f12;
    color: white;
    border: none;
    padding: 8px;
    font-weight: 600;
    border-radius: 4px;
}

.mfilter-reset {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    align-self: center;
    background: none;
    border: none;
    padding: 0;
}

/* Колонка товаров */
.col-md-9 {
    padding-right: 0 !important;
    margin-right: 0;
    background: white;
    width: 75%; /* Maintain 75% width on desktop */
}

.b-catalog-list {
    background: #fff;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Карточка товара */
.b-catalog-item {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.b-catalog-item-inner {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
}

.b-catalog-item-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.b-catalog-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}

.b-catalog-item-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.b-catalog-item-stock.in-stock {
    background-color: #e6f7ee;
    color: #00a046;
}

.b-catalog-item-stock.out-of-stock {
    background-color: #ffebee;
    color: #f44336;
}

.b-catalog-item-title {
    padding: 15px;
    font-size: 14px;
    font-weight: 500;
    flex-grow: 1;
    min-height: 0; /* Разрешаем сжатие */
}

.b-catalog-item-price {
    padding: 0 15px 15px;
}

.b-catalog-item-price-current {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.b-catalog-item-actions {
    padding: 0 15px 15px;
}

/* Пагинация */
.b-catalog-pagination {
    margin-top: 20px;
}

.pagination {
    justify-content: center;
    margin: 0;
    padding: 0;
}

.page-link {
    color: #ff4f12;
    border: 1px solid #ddd;
    margin: 0 2px;
    border-radius: 4px;
    padding: 5px 10px;
}

.b-catalog-item-image,
.b-catalog-item-price,
.b-catalog-item-actions {
    flex-shrink: 0; /* Запрещаем сжатие */
}

#catalogue_section.row {
    display: flex;
    flex-wrap: wrap;
}

/* 2. Каждая колонка растягивается на всю доступную высоту */
#catalogue_section .col-md-4 {
    display: flex;
}

/* СЛАЙДЕР */
/* Контейнер трека */
.noUi-target {
    background: #ccc;
    border-radius: 2px;
    border: none;
    height: 4px;
    box-shadow: none;
}

/* Цветной прогресс между двумя ползунками */
.noUi-connect {
    background: #f44336;
}

/* Кружки-ползунки */
.noUi-handle {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50%;
    background: #fcfcfc;;
    border: solid;
    border-color: #ff4f12;
    border-width: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    cursor: pointer;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Убираем "ручку" внутри ползунка */
.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

/* Поддержка фокуса */
.noUi-handle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,140,0,0.3);
}

.alert-info {
    background: #f8c8c83b;
    color: #000000;
}


.active>.page-link, .page-link.active {
    background-color: #ff4f12 !important; 
    border-color: #ff4f12 !important;
}



  


/* Мобильная версия */
@media (max-width: 767px) {
    .b-home-group-catalog {
        padding: 0;
    }

    .col-md-3 {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        background: rgba(0,0,0,0.5);
        margin: 0;
        padding: 0;
    }

    .col-md-3.active {
        display: block;
    }

    .mfilter-box {
        width: 100%;
        height: 100%;
        overflow-y: auto;
        position: fixed;
        left: 0;
        top: 0;
        margin: 0;
        background: white;
        border-radius: 0;
    }

    .mobile-filters-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: #ff4f12;
        color: white;
        border: none;
        border-radius: 4px;
        margin-left: 10px;
        padding: 0;
    }

    .mobile-filters-btn i {
        font-size: 16px;
    }

    .close-filters {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 24px;
        color: #666;
        z-index: 1001;
    }

    .col-md-9 {
        width: 100%;
        padding: 0 !important;
    }

    .b-catalog-list {
        border-radius: 0;
        box-shadow: none;
        padding: 10px;
    }

    .b-catalog-sort {
        display: flex;
        align-items: center;
        padding: 10px 15px;
    }

    .b-catalog-sort-left {
        display: flex;
        align-items: center;
        flex-grow: 1;
    }

    .b-catalog-sort-label {
        margin-right: 10px;
        white-space: nowrap;
    }

    .b-catalog-sort-select {
        flex-grow: 1;
        max-width: 180px;
    }
}

/* Десктопные стили */
@media (min-width: 768px) {
    .mobile-filters-btn,
    .close-filters {
        display: none;
    }

    .col-md-3 {
        display: block !important;
        /* position: static; */
        width: 25%;
    }

    .mfilter-box {
        width: 100%;
        position: static;
    }

    .col-md-9 {
        width: 75%;
        padding-left: 15px !important;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#catalogue_section {
    animation: fadeIn 0.3s ease-in-out;
}

/* Индикатор загрузки */
#loading-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#loading-indicator.show {
    display: flex;
}


.mfilter-box,
.b-catalog-list {
    border-radius: 0;
    box-shadow: none;
}

/* Remove last remaining gaps */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.centered-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto; /* Центровка по горизонтали */
}