.favorite__cards-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    justify-content: center;
}

.favorite__card {
    width: 100%;
    min-width: 180px;
}

@media (min-width: 768px) {
    .favorite__cards-wrapper {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
        column-gap: 10px;
        row-gap: 15px;
        justify-content: center;
    }
    .favorite__card {
        max-width: 425px;
    }
}

@media (min-width: 1200px) {
    .favorite__cards-wrapper {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 20px;
        row-gap: 60px;
        justify-content: center;
    }
}

/* Mobile (Figma "М. Избранное"): two fluid columns, 5px gap, 15px gutters (179px cards at 393px) */
@media (max-width: 767px) {
    .favorite__cards-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .favorite__card.card {
        width: 100%;
        min-width: 0;
    }
}

/* Figma "Избранное" 1920: four 425px cards per row, 20px / 60px gaps */
@media (min-width: 1600px) {
    .favorite__cards-wrapper {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.favorite__cards-wrapper[hidden],
.favorite__empty[hidden] {
    display: none;
}

/* Breadcrumbs exist only in the desktop frame (1200px and up) */
.favorite__crumbs {
    display: none;
}

@media (min-width: 1200px) {
    .favorite__crumbs {
        display: block;
        margin-bottom: 40px;
        font: 500 clamp(15px, 10px + 0.4167vw, 18px)/140% var(--font-family);
        color: var(--seryy);
    }

    .favorite__crumbs-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0 6px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .favorite__crumbs-list li:not(:last-child)::after {
        content: "/";
        margin-left: 6px;
    }

    .favorite__crumbs a {
        color: inherit;
    }

    .favorite__crumbs a:hover {
        color: var(--firmennyy);
    }
}

/* Empty state */
.favorite__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 50px 15px;
    text-align: center;
    background: var(--belyy);
    box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.07);
}

.favorite__empty-icon {
    width: 40px;
    height: auto;
}

.favorite__empty-title {
    margin: 0;
    font-weight: 600;
    font-size: 20px;
    line-height: 120%;
    color: var(--chernyy);
}

.favorite__empty-text {
    margin: 0;
    max-width: 420px;
    font-weight: 500;
    font-size: 16px;
    line-height: 140%;
    color: var(--seryy);
}

.favorite__empty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 50px;
    margin-top: 10px;
    padding: 0 30px;
    font-weight: 600;
    font-size: 18px;
    color: var(--belyy);
    background: var(--firmennyy);
    text-decoration: none;
}

.favorite__empty-btn:hover {
    background: var(--firmennyy-2);
}

@media (max-width: 767px) {
    .favorite__empty-btn {
        width: 100%;
    }
}

/* Cards fill their grid column (the global .card is a fixed 330px from 1200px up) */
@media (min-width: 1200px) {
    .favorite__card.card {
        width: 100%;
        max-width: none;
    }
}
