main {
    .favorites {
        padding: 12px 0 100px;
        &:has(.content .empty) > .head {
            display: none;
        }
        & > .head {
            display: block;
            margin-bottom: 24px;
            h1 {
                font-size: 32px;
                line-height: 1.1;
                color: var(--text-7);
                .count {
                    display: inline-block;
                    margin-left: 10px;
                    font-size: 18px;
                    font-weight: 600;
                    line-height: 28px;
                    color: var(--text-1);
                    &:empty {
                        display: none;
                    }
                }
            }
            p {
                margin-top: 10px;
                line-height: 20px;
            }
        }
        .content {
            .cards {
                display: grid;
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 12px;
            }
            .empty {
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 60px 40px 100px;
                border-radius: 20px;
                background: var(--bg-3);
                text-align: center;
                img {
                    width: 402px;
                    max-width: 100%;
                    aspect-ratio: 402 / 300;
                    object-fit: cover;
                }
                h1 {
                    max-width: 720px;
                    font-size: 24px;
                    line-height: 1.1;
                    color: var(--text-7);
                }
                p {
                    max-width: 720px;
                    margin-top: 6px;
                    line-height: 20px;
                }
                a {
                    width: 300px;
                    max-width: 100%;
                    margin-top: 24px;
                    line-height: 20px;
                    &::after {
                        content: '\f00f';
                        flex: none;
                        transform: rotate(-90deg);
                    }
                }
            }
            .loading {
                padding: 24px 0;
                line-height: 20px;
            }
        }
        .pager {
            gap: 14px;
            &:has(.pages:empty) {
                display: none;
            }
            .pages {
                flex-wrap: wrap;
                justify-content: center;
            }
        }
        &:not(:has(.content .empty)) > .popular {
            display: none;
        }
        .popular {
            margin-top: 100px;
            .head {
                flex-wrap: wrap;
                gap: 24px;
                margin-bottom: 24px;
                h2 {
                    line-height: 1.1;
                }
                .btn-3 {
                    flex: none;
                    font-size: 14px;
                    line-height: 20px;
                }
            }
            .slider {
                --slide-width: 472px;
                .viewport {
                    .track {
                        .slide {
                            .catalog-card {
                                min-height: 180px;
                                height: 100%;
                                .text {
                                    width: 55%;
                                    max-width: 240px;
                                }
                                img {
                                    width: 45%;
                                    object-fit: cover;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
@media screen and (max-width: 1279px) {
    main {
        .favorites {
            width: calc(100% - 48px);
            padding-bottom: 80px;
            .head {
                h1 {
                    font-size: 28px;
                }
            }
            .content {
                .cards {
                    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
                }
                .empty {
                    padding: 40px 24px 64px;
                }
            }
            .popular {
                margin-top: 80px;
                .head {
                    h2 {
                        font-size: 28px;
                    }
                }
                .slider {
                    --slide-width: min(472px, calc((100% - 12px) / 2));
                }
            }
        }
    }
}
@media screen and (max-width: 767px) {
    main {
        .favorites {
            width: calc(100% - 32px);
            padding-bottom: 60px;
            .head {
                h1 {
                    font-size: 26px;
                }
            }
            .content {
                .cards {
                    grid-template-columns: repeat(2, minmax(0, 1fr));
                }
                .empty {
                    padding: 32px 16px 40px;
                    img {
                        width: 300px;
                    }
                    h1 {
                        font-size: 22px;
                    }
                    p, a {
                        font-size: 14px;
                    }
                }
            }
            .popular {
                margin-top: 60px;
                .head {
                    gap: 16px;
                    h2 {
                        width: 100%;
                        font-size: 26px;
                    }
                }
                .slider {
                    --slide-width: 100%;
                    .viewport {
                        .track {
                            .slide {
                                .catalog-card {
                                    .text {
                                        h3 {
                                            font-size: 20px;
                                        }
                                        p {
                                            font-size: 14px;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}