.mobile-sort-filter {
    display: none;
    justify-content: space-between;
    padding: 12px 15px;
    /* border-bottom: 1px solid #eee; */
    background: #fff;
    order: 2;
}

@media (max-width: 767px) {
    .mobile-sort-filter {
        display: flex;
    }
    .b-catalog-sort {
        display: none;
    }
}

.mobile-filter-trigger,
.mobile-sort-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.mobile-filter-trigger svg,
.mobile-sort-trigger svg {
    flex-shrink: 0;
}

.mobile-sort-trigger .--active {
    font-weight: bold;
    color: #0066cc;
}

@media (max-width: 767px) {
    .__smart-filter {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
        transition: transform 0.3s ease;
    }

    .__smart-filter.--mobile-open {
        left: 0;
    }

    .filter-close {
        position: fixed;
        top: 5px;
        right: 15px;
        font-size: 24px;
        cursor: pointer;
    }

    .b-section-filter.--desktop {
        display: none;
    }
    .mobile-filter-section {
        display: block !important;
        order: -1;
        margin-bottom: 15px;
    }
    .b-section-filter.--mobile {
        background: #f5f5f5;
        padding: 15px;
        border-radius: 8px;
    }
}

@media (min-width: 768px) {
    .mobile-filter-section {
        display: none !important;
    }
}

.fav-delete {
    color: black;
    font-size: 20px !important;
    cursor:pointer;
}

.fav-delete:hover, .fav-delete:active {
    color: #ff0000;
}

.block_popular_products .owl-carousel .owl-stage-outer {
    font-size: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.block_popular_products .catalog-block__item {
    padding: 12px 10px 12px 10px;
    height: 100%;
}
.block_popular_products .catalog-block__info {
    margin-top: 0;
    flex-basis: auto;
}
.block_popular_products .catalog-block__info-tech {
    margin: 4px 0px 0px;
}
.block_popular_products .catalog-block .line-block.status {
    font-weight: normal;
    flex-direction: column-reverse;
    align-items: flex-start;
    margin-bottom: 10px;
}
.catalog-block__info-inner .catalog-block__info-title .switcher-title {
    font-weight: normal;
}
.block_popular_products .catalog-block__info-bottom {
    margin-top: 14px;
    position: relative;
}
.block_popular_products .catalog-block__info-bottom .line-block--20 {
    margin-left: 0;
    margin-right: 0;
}
.block_popular_products .catalog-block .line-block {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-end;
}
.block_popular_products .catalog-block .price_block {
    width: calc(100% - 135px);
    margin: 0;
    align-items: center;
    flex-direction: column;
}
.block_popular_products .catalog-block__info-bottom .price_block .price_block_labels_vat,
.block_popular_products .catalog-block__info-bottom .price_block .price_block_prices {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.block_popular_products .catalog-block__info-bottom .price_block .price_block_prices {
    flex: 5;
    width: 100%;
}
.block_popular_products .catalog-block__info-bottom .price_block .price_block_prices .price_block_price__old,
.block_popular_products .catalog-block__info-bottom .price_block .price_block_prices .price_block_price__new,
.block_popular_products .catalog-block__info-bottom .price_block .price_block_prices .price_block_ps,
.block_popular_products .catalog-block__info-bottom .price_block .price_block_labels_vat .price_block_vat {
    line-height: 1em;
    white-space: nowrap;
}
.block_popular_products .catalog-block__info-bottom .price__new-val {
    color: var(--basic_text_black);
    font-weight: bold;
    white-space: nowrap;
}
.block_popular_products .catalog-block__info-bottom .price__new-val .price_block_price__new_one_el {
    font-weight: normal;
    padding-left: 5px;
}
.block_popular_products .catalog-block__info-bottom .price_block .price_block_prices .price_block_ps>small {
    font-size: 14px;
    font-weight: normal;
}
.block_popular_products .catalog-block__info-bottom .price_block .price_block_labels_vat {
    flex: 4;
    text-align: right;
}
.catalog-block .catalog-block__info-bottom .price_block .price_block_vat {
    display: none;
}
.block_popular_products .catalog-block .catalog-block__info-bottom .catalog-block__info-btn {
    width: 135px;
    text-align: end;
}
.block_popular_products .catalog-block .catalog-block__info-bottom--margined {
    margin: 0px;
}
.block_popular_products .catalog-block .buy_block:not(.in) .buttons .btn span {display:none;}
.block_popular_products .catalog-block .buy_block:not(.in) .buttons .btn {
    padding-top: 25px;
    width: 38px;
    background-image: url(data:image/svg+xml,%3Csvg%20width%3D%2223%22%20height%3D%2221%22%20viewBox%3D%220%200%2023%2021%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M17.1763%2018.22C16.7892%2018.22%2016.4594%2018.3526%2016.187%2018.6178C15.9146%2018.8831%2015.7784%2019.2056%2015.7784%2019.5856C15.7784%2019.9655%2015.9146%2020.2917%2016.187%2020.5641C16.4594%2020.8365%2016.7892%2020.9727%2017.1763%2020.9727C17.5634%2020.9727%2017.886%2020.8365%2018.144%2020.5641C18.4021%2020.2917%2018.5311%2019.9655%2018.5311%2019.5856C18.5311%2019.2056%2018.4021%2018.8831%2018.144%2018.6178C17.886%2018.3526%2017.5634%2018.22%2017.1763%2018.22ZM10.2731%2018.22C9.9003%2018.22%209.5813%2018.3526%209.31607%2018.6178C9.05084%2018.8831%208.91822%2019.2056%208.91822%2019.5856C8.91822%2019.9655%209.05084%2020.2917%209.31607%2020.5641C9.5813%2020.8365%209.90388%2020.9727%2010.2838%2020.9727C10.6637%2020.9727%2010.9899%2020.8365%2011.2623%2020.5641C11.5347%2020.2917%2011.6709%2019.9655%2011.6709%2019.5856C11.6709%2019.2056%2011.5347%2018.8831%2011.2623%2018.6178C10.9899%2018.3526%2010.6602%2018.22%2010.2731%2018.22ZM22.6602%206.60707L22.6817%206.49954C22.6817%206.39918%2022.6602%206.30599%2022.6171%206.21997L22.5311%206.11244C22.4738%206.01208%2022.3878%205.93323%2022.2731%205.87588L22.187%205.83287C22.144%205.81853%2022.0795%205.81137%2021.9935%205.81137H7.58489L6.23005%200.822119C6.18704%200.664413%206.09743%200.538965%205.96123%200.445774C5.82503%200.352585%205.67091%200.30599%205.49887%200.30599H1.34833C1.16195%200.30599%201.00066%200.37409%200.864457%200.51029C0.728257%200.646492%200.660156%200.807781%200.660156%200.994162C200.660156%201.18054%200.728257%201.34542%200.864457%201.48878C1.00066%201.63215%201.16195%201.70384%201.34833%201.70384H4.93973L8.8322%2016.349C8.88955%2016.4924%208.98632%2016.6071%209.12252%2016.6931C9.25872%2016.7791%209.41284%2016.8221%209.58489%2016.8221H19.2408C19.3698%2016.8221%2019.4953%2016.7576%2019.6171%2016.6286C19.739%2016.4995%2019.8358%2016.2988%2019.9075%2016.0264L22.6602%206.67158V6.60707ZM18.7247%2015.4673H10.144L7.95048%207.20922H21.1548L18.7247%2015.4673Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E);
    background-repeat: no-repeat;
    background-position: center;
}
.block_popular_products .catalog-block .count_error {
    font-weight: normal;
    position: absolute;
    width: auto;
    right: 0px;
    bottom: 45px;
}

@media (min-width: 768px) {
    .block_popular_products .catalog-block__wrapper:hover {
        z-index: 5;
    }
}

@media (max-width: 768px) {
    .block_popular_products .catalog-block .count_error {
        right: -10px;
    }
}

@media (max-width: 480px) {
    .block_popular_products .catalog-block .line-block {
        height: 100%;
    }
    .block_popular_products .catalog-block .line-block .line-block__item a.btn {
        display: none;
    }
}

@media (max-width: 420px) {
    .block_popular_products .catalog-block__info-bottom .price_block .price_block_prices .price_block_ps>small {
        font-size: 12px;
        font-weight: normal;
    }
}

@media (max-width: 380px) {
    .block_popular_products .catalog-block__info-bottom .price_block .price_block_prices .price_block_ps>small {
        font-size: 14px;
        font-weight: normal;
    }
}

.block_popular_products .top-label .fav-button{
    position:absolute;
    right:0;
    top:0;
    display:block;
}
.block_popular_products .top-label .price__sales__label_div{
    position:absolute;
    left:0;
    top:0px;
    bottom:auto;
    display:block;
}

.block_popular_products .price__sales__label{
    font-size: 15px;
    line-height:1.2;
    height:auto;
    font-weight:400;
    border-radius: 4px;
    padding: 4px 10px;
}

.block_popular_products .price_block_labels_vat .price__sales__label{
    display:none;
}

.price_block_labels_vat .top-label .fav-button{
    top:0;
}
.grid-list__item {
    min-width: 0px;
}

.grid-list--gap-5 {
    grid-gap: 10px !important;
}

@media (max-width: 768px) {
    .grid-list--items-5 {
        grid-template-columns: repeat(auto-fill, minmax(215px, 3fr)) !important;
    }
}

@media (min-width: 992px) {
    .grid-list--items-5 {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .grid-list--items-5 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 2fr)) !important;
    }
    .grid-list--gap-5 {
        grid-gap: 10px !important;
    }
    .topic{margin-top:50px;}
}

@media (max-width: 400px) {
    #add-all-to-cart{display: none !important}
    .topic{margin-top:0px;display:none !important;}
}

.empty-favorites {
    background: white;
    padding: 32px 20px;
    text-align: center;
    max-width: 100%;
    width: 100%;
    margin: 40px auto;
}

.heart-icon {
    width: 116px;
    height: 86px;
    margin: 0 auto 20px;
}

.heart-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #ff3b5c;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-favorites h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #222;
}

.empty-favorites p {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.4;
    padding: 0 10px;
}

.catalog-btn {
    display: inline-block;
    background-color: #4a7dff;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 125, 255, 0.2);
    width: 80%;
    max-width: 240px;
}

.catalog-btn:hover {
    background-color: #3a6de8;
}

@media (max-width: 374px) {
    .empty-favorites {
        padding: 24px 16px;
    }
    .heart-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }
    .empty-favorites h1 {
        font-size: 18px;
    }
    .empty-favorites p {
        font-size: 13px;
    }
}

.show-more-btn:disabled {
    display:none;
}

.favorites-navigation-wrapper {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.show-more-container {
    order: 2;
}

.pagination-container {
    order: 1;
    width: 100%;
}

.pagination-container .modern-pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}
.pagination-container .modern-pagination li {
    margin: 0 5px;
}
.pagination-container .modern-pagination a,
.pagination-container .modern-pagination span {
    display: block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}
.pagination-container .modern-pagination a:hover {
    background-color: #f5f5f5;
}

.pagination-container .modern-pagination .current span {
    background-color: #0068b3;
    color: white;
    border-color: #0068b3;
}

@media (max-width: 768px) {
    .pagination-container .modern-pagination li {
        margin: 0 2px;
    }

    .pagination-container .modern-pagination a,
    .pagination-container .modern-pagination span {
        padding: 6px 10px;
    }
}
.favorites-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.favorites-action-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    color: black;
}

.favorites-action-link svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.add-all-to-cart-link:hover {
    color: #004d99;
}

.clear-favorites-link:hover {
    color: #c82333;
}

#delete-all-favorites[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

#delete-all-favorites .fa-spinner {
    margin-right: 8px;
}

@media (max-width: 767px) {
    .favorites-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        padding: 0 10px;
    }

    .favorites-action-link {
        width: calc(50% - 5px);
        padding: 10px 5px;
        font-size: 13px;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .favorites-action-link svg {
        margin-right: 5px;
    }
    .add-all-to-cart-link {
        display: inline-flex !important;
        justify-content: flex-start;
        margin-right: auto;
    }

    .clear-favorites-link {
        justify-content: flex-end;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .favorites-action-link {
        font-size: 12px;
        padding: 8px 5px;
    }

    .favorites-action-link svg {
        width: 16px;
        height: 16px;
    }
}
.__smart-filter{float:left;}
.search-page {
    width: 100%;
}

.b-catalog-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: grid;
    grid-template-areas:
        "filter content";
    grid-template-columns: 350px 1fr;
    grid-gap: 20px;
    margin-bottom: 32px;
    align-items: start;
}

.__smart-filter {
    grid-area: filter;
    order: 1;
}

.mobile-sections-container {
    grid-area: categories;
    display: block;
}

.block_popular_products {
    grid-area: content;
}
@media (max-width: 1024px) {
    .__smart-filter{padding-top: 40px;}
    .b-catalog-grid {
        grid-template-areas:
            "categories"
            "filter"
            "content";
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .b-show-all-link {
        margin-bottom: 100px !important;
    }

    .desktop-filter-btn {
        display: none !important;
    }

    .search-page h1 {
        display: none;
    }

    .b-search-result-text {
        display: none;
    }

    .b-section-filter.--desktop {
        display: none !important;
    }

    .mobile-sort-filter {
        display: flex;
    }

    .b-catalog-sort {
        display: none;
    }

    .__smart-filter {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
        transition: transform 0.3s ease;
    }

    .__smart-filter.--mobile-open {
        left: 0;
    }

    .filter-close {
        position: fixed;
        top: 5px;
        right: 15px;
        font-size: 24px;
        cursor: pointer;
    }

    .mobile-filter-section {
        display: block !important;
        order: -1;
        margin-bottom: 15px;
    }

    .b-section-filter.--mobile {
        background: #f5f5f5;
        padding: 15px;
        border-radius: 8px;
    }
}

@media (max-width: 1024px) {
    .grid-list--items-5 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 3fr));
    }
}

@media (min-width: 1025px) {
    .mobile-filter-section {
        display: none !important;
    }

    .mobile-sort-filter {
        display: none !important;
    }

    .b-catalog-sort {
        display: block;
    }
}

/* Обновление стилей для кнопок действий в избранном */
@media (max-width: 1024px) {
    .favorites-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        padding: 0 10px;
    }

    .favorites-action-link {
        width: calc(50% - 5px);
        padding: 10px 5px;
        font-size: 13px;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .favorites-action-link svg {
        margin-right: 5px;
    }
}

/* Обновление стилей пагинации */
@media (max-width: 1024px) {
    .pagination-container .modern-pagination li {
        margin: 0 2px;
    }

    .pagination-container .modern-pagination a,
    .pagination-container .modern-pagination span {
        padding: 6px 10px;
    }
}

@media (max-width: 767px) {
    .b-catalog-grid {
        grid-template-areas:
            "categories"
            "filter"
            "content";
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .desktop-filter-btn{display:none !important;}

    .search-page h1 {
        display: none;
    }

    .b-search-result-text {
        display: none;
    }

    .b-section-filter.--desktop {
        display: none !important;
    }
}

.block_popular_products {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 370px) {
    .block_popular_products .catalog-block__info-bottom .line-block {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }

    .block_popular_products .catalog-block .price_block {
        width: calc(100% - 50px);
        margin: 0;
    }

    .block_popular_products .catalog-block__info-bottom .catalog-block__info-btn {
        width: 50px;
        text-align: right;
    }
}

.module-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    width: 100%;
}

.arrows-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nums {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}


.pagination-numbers {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.page-number,
.pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: rgba(153, 153, 153, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border-radius: 50%;
    border: 1px solid rgba(153, 153, 153, 0.2);
}

.page-number:hover,
.pagination-arrow:hover {
    background-color: rgba(153, 153, 153, 0.1);
    color: #333;
    border-color: rgba(153, 153, 153, 0.5);
}

.page-number.active {
    background-color: red;
    color: white;
    font-weight: bold;
    border-color: transparent;
}

.point-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: rgba(153, 153, 153, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border-radius: 50%;
    border: 1px solid rgba(153, 153, 153, 0.2);
}

.pagination-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-arrow svg {
    display: block;
}

.all_block_nav .page-number {
    padding: 0 12px;
    width: auto;
    border-radius: 18px;
    border: 1px solid rgba(153, 153, 153, 0.2);
}
.mobile-sort-dropdown {
    position: relative;
    display: inline-block;
}

.mobile-sort-trigger svg {
    transition: transform 0.2s ease;
}

.mobile-sort-dropdown.active .mobile-sort-trigger svg {
    transform: rotate(180deg);
}

.mobile-sort-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    margin-top: 5px;
    overflow: hidden;
}

.mobile-sort-dropdown.active .mobile-sort-options {
    display: block;
}

.mobile-sort-option {
    padding: 10px 15px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.mobile-sort-option:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 1px solid #E5E5E5;
    border-radius: 50%;
    background: transparent;
}

.mobile-sort-option.--active:before {
    background: #CC0000;
    border-color: #CC0000;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L4 7L9 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.mobile-sort-option:hover {
    background: #F5F5F5;
    color: #CC0000;
}

.mobile-sort-option.--active {
    color: #CC0000;
    font-weight: 500;
}

@media (max-width: 480px) {
    .mobile-sort-options {
        min-width: 160px;
    }

    .mobile-sort-option {
        padding: 8px 12px;
        font-size: 13px;
    }
}


.b-catalog-sort .__sort {
    float: left;
}
.b-catalog-sort .__typeview {
    float: right;
}
@media (max-width: 768px) {
    .b-show-all-link {
        margin-bottom: 30px !important;
    }
}

.tpl_catalog_table_v2_template {
    margin-bottom: 3rem;
    float: left;
}
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-list--items-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
@media (max-width: 1021px) {
    .b-filter-popup {
        display: none !important;
    }
}

@media (min-width: 1026px) {
    .mobile-filter-link-wrapper {
        display: none !important;
    }
}
@media (max-width: 1025px) {
    .mobile-filter-link-wrapper.visible {
        display: block;
    }
}