/* ========== ОСНОВНЫЕ СТИЛИ ФИЛЬТРА ========== */
.sectionFilter {
    display: flex;
    border-left: 1px solid #ececec;
    border-right: 1px solid #ececec;
    padding-left: 25px;
    padding-right: 25px;
    position: relative;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.blockProp, .bx_filter_parameters_box_title {
    position: relative;
}

.blockProp .bx_filter_parameters_box_title {
    position: relative;
    top: 13px;
    margin-right: 20px;
}

.filter-panel-wrapper {
    position: relative;
    z-index: 3000;
}

/* ========== ВЫПАДАЮЩИЕ БЛОКИ ========== */
.DownListBlock {
    display: none;
    position: absolute;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #ececec;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    z-index: 100;
    width: 280px;
    padding: 15px;
    top: 100%;
    left: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.DownListBlock.opened {
    display: block;
}

.listProp, .listProp li {
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1000;
    list-style: none;
}

.listProp li {
    margin-bottom: 8px;
}

.listProp li:last-child {
    margin-bottom: 0;
}

.hideButton {
    display: none !important;
}

.blockCount {
    display: none;
    background: #e1428b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    margin-left: 10px;
}

.blockCount:hover {
    background: #c12e74;
    transform: scale(1.02);
}

.blockCount a {
    color: white;
    text-decoration: none;
}

.blockCount a:hover {
    color: white;
    text-decoration: none;
}

/* Стрелка для кнопки внутри списка */
.blockCount .fArrow {
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 8px solid #e1428b;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.blockCount:hover .fArrow {
    border-right-color: #c12e74;
}

/* Анимация появления */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.blockCount {
    animation: none;
    /* animation: fadeInRight 0.3s ease; */
}

.underButtons {
    position: relative;
    bottom: 0;
    width: 245px;
    z-index: 205;
    margin-top: 30px;
}

.underButtons > div {
    margin: auto;
    margin-bottom: 10px;
    text-align: center;
}

.blockProp .bx_filter_search_reset {
    margin-top: 16px;
}

.countUnder, .reset a {
    box-shadow: -2px -1px 26px 0px rgba(0, 0, 0, 0.1);
}

.countUnder.btn.btn-default a {
    color: #fff;
    display: block;
}

.reset {
    margin-top: 14px;
}

.reset a {
    display: block;
    width: 100%;
    height: 100%;
}

.reset .btn.btn-default {
    background: #fff;
    color: #0098db !important;
}

.reset .btn.btn-default:hover {
    color: #fff !important;
}

/* ========== ЗАГОЛОВКИ БЛОКОВ ========== */
.zag {
    padding: 0;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    border-radius: 8px;
}

.zag.downOpen:hover span{
  color: #fff;
}

.zag span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #0098db;
    color: #fff;
    border: 1px solid #0098db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.zag span i svg path {
    fill: white;
}

.zag:hover span {
    background: none;
    color: #595959;
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.15);
    border: 1px solid #0098db;
}

.zag:hover span i svg path {
    fill: #595959;
}

.zag.checkedZag span {
    background: #595959;
    border: 1px solid #595959;
    color: #fff;
}

.zag.checkedZag span i svg path {
    fill: #fff;
}

.zag.downOpen span {
    background: #595959;
    border-color: #595959;
}

.zag span i {
    transition: transform 0.3s;
}

.zag.downOpen span i {
    transform: rotate(180deg);
}

.delete_filter {
    display: none;
    cursor: pointer;
    margin-left: 10px;
}

.delete_filter:hover svg path {
    fill: #ff0000;
}

/* ========== МОБИЛЬНЫЕ СТИЛИ ========== */
.FilterClose {
    display: none;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    z-index: 101;
}

.FilterClose i svg path {
    fill: #0098db;
}

.scrolledBlock {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    max-height: 300px;
}

/* ========== ПОЛЕ ПОИСКА В ФИЛЬТРЕ ========== */
.filterValues {
    padding: 8px 10px;
    border: 1px dashed #0098db !important;
    width: 100%;
    font-size: 13px !important;
    font-style: italic;
    margin-bottom: 10px;
    border-radius: 6px;
    box-sizing: border-box;
}

.filterValues:focus {
    outline: none;
    border: 1px solid #0098db !important;
}

/* ========== КНОПКИ ========== */
.ButtOnMobileFilter {
    display: none;
}

.ButtOnMobileFilter strong {
    border-bottom: 1px dashed #383838;
}

.showAll {
    display: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background: #0098db;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s;
}

.showAll:hover {
    background: none;
    color: #0098db;
    border: 1px solid #0098db;
}

/* ========== БЛОКИРОВКА ========== */
.OffBlock {
    position: absolute;
    height: 100%;
    width: 100%;
    cursor: not-allowed;
    z-index: 3;
    background: rgba(255, 255, 255, 0.7);
    top: 0;
    left: 0;
    border-radius: 8px;
}

.alertZag {
    font-size: 12px;
    color: red;
    display: block;
    margin-bottom: 10px;
}

/* ========== СПИСКИ ========== */
.listProp li.hideItem {
    display: none;
}

.listProp li::before {
    display: none;
}

/* ========== ИНДИКАТОР ЗАГРУЗКИ ========== */
.loader {
    background-image: url(/local/templates/aspro_max/images/loaders/double_ring.svg);
    background-repeat: no-repeat;
    background-position: center center;
    display: block;
    width: 100%;
    height: 48px;
    margin: auto;
}

/* Анимация загрузки через CSS */
.loader-css {
    text-align: center;
    padding: 15px;
    color: #666;
}

.loader-css::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-top-color: #0098db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== ПЛЕЙСХОЛДЕРЫ ========== */
.placeholder-models {
    color: #999;
    font-style: italic;
    padding: 10px;
    text-align: center;
}

.empty-models, .error-models {
    color: #999;
    padding: 10px;
    text-align: center;
}

.error-models {
    color: #e1428b;
}

/* ========== КАСТОМНЫЕ ЧЕКБОКСЫ ========== */
.containerFilterItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 6px 10px;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    transition: background 0.2s;
}

.containerFilterItem:hover {
    background: #f5f5f5;
}

.containerFilterItem span:first-child {
    flex: 1;
    font-size: 13px;
}

.containerFilterItem .filter-count {
    color: #999;
    font-size: 11px;
    margin: 0 8px;
}

/* Hide the browser's default checkbox */
.containerFilterItem input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #eee;
    border-radius: 4px;
}

/* On mouse-over, add a grey background color */
.containerFilterItem:hover input ~ .checkmark {
    background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.containerFilterItem input:checked ~ .checkmark {
    background-color: #0098db;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.containerFilterItem input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.containerFilterItem .checkmark:after {
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* ========== СТИЛИ ДЛЯ РЕЗУЛЬТАТОВ ========== */
#pagetitle {
    font-size: 26px;
}

.item-buttons .more_text {
    display: none;
}

.block_side_WIDE .title-menu {
    font-size: 14px;
}

.table-view .item-actions .item-price {
    width: 110px;
    text-align: right;
}

/* ========== ПАНЕЛЬ ФИЛЬТРОВ ========== */
.catalog-filters {
    position: relative;
}

.results-count {
    margin-left: auto;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.clear-filters {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
}

.clear-filters:hover {
    background: #e1428b;
    color: white;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f5f5f5;
    color: #333;
}

.filter-tag.active {
    background: #4caf50;
    color: white;
}

.filter-tag:hover {
    background: #e0e0e0;
}

.filter-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

/* Активное состояние заголовков фильтров */
.zag span.checkedZag {
    background: #595959 !important;
    border: 1px solid #595959 !important;
    color: #fff !important;
}

.zag span.checkedZag i svg path {
    fill: #fff !important;
}

.zag span.checkedZag:hover {
    background: #595959 !important;
    color: #fff !important;
}

/* ========== АДАПТИВ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ========== */
@media (max-width: 900px) {
    .page-top > div {
        z-index: unset !important;
    }

    #mobButtonFilter {
        width: 30px;
        height: 110px;
        display: block !important;
        position: fixed;
        left: 0px;
        top: 35%;
        z-index: 10000;
        padding: 0px;
        border-radius: 0px;
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
        background: #0098db;
        cursor: pointer;
    }

    #mobButtonFilter span {
        display: inline-block;
        position: absolute;
        transform: rotate(-90deg) translate(-120%, 50%);
        transform-origin: left center;
        left: 4px;
        top: 7px;
        font-size: 13px;
        color: white;
    }

    #mobButtonFilter i {
        position: absolute;
        top: 10px;
        left: 7px;
    }

    #mobButtonFilter i svg {
        filter: brightness(0) invert(1);
    }

    .FilterClose {
        display: block;
        color: #0098db;
        text-align: right;
        position: absolute;
        right: 15px;
        top: 10px;
        cursor: pointer;
    }

    .FilterClose svg path {
        fill: #0098db !important;
    }

    .blockProp.title {
        display: none;
    }

    .blockProp .zag i {
        display: none;
    }

    .zag span {
        border: 0px;
        font-size: 16px;
        padding-left: 0px;
        background: none;
        color: #0098db;
    }

    .zag:hover span {
        background: none;
    }

    .DownListBlock {
        display: block;
        position: relative;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 10px 0;
    }

    #filterCustom {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
        width: 85%;
        height: 100%;
        background: #fff;
        box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.33);
        padding: 60px 20px 20px;
        overflow-y: auto;
    }

    .ButtOnMobileFilter {
        display: block;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .blockCount a {
        font-size: 12px !important;
    }

    .sectionFilter {
        display: block;
        padding: 0;
    }

    .blockCount {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px !important;
    }

    .blockCount a {
        font-size: 12px;
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .results-count {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ========== */
.blockProp {
    margin-bottom: 10px;
}

/* Стили для скролла в выпадающих списках */
.DownListBlock::-webkit-scrollbar {
    width: 5px;
}

.DownListBlock::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.DownListBlock::-webkit-scrollbar-thumb {
    background: #0098db;
    border-radius: 5px;
}

.DownListBlock::-webkit-scrollbar-thumb:hover {
    background: #0077b3;
}

/* Анимация для кнопки с количеством */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blockCount {
    animation: fadeInUp 0.3s ease;
}
