.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 {
    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--margined {
    margin: 0px;
}

.block_popular_products .catalog-block .buy_block:not(.in) .buttons .btn {
    max-width: 97px;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    padding: 5px 10px 5px;
}
.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;
    }
}