/*
|--------------------------------------------------------------------------
| Favorites
|--------------------------------------------------------------------------
*/

.favorites-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 0 60px;
    box-sizing: border-box;
}

.favorites-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    padding-bottom: 16px;
    border-bottom: 1px solid #c8c8a8;
}

.favorites-page__header h1 {
    margin: 0;
    color: #222;
    font-size: 30px;
    line-height: 1.15;
}

.favorites-page__subtitle {
    margin-top: 7px;
    color: #777;
    font-size: 14px;
}

.favorites-page__heart {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d5d5d5;
    border-radius: 50%;
    background: #fff;
    color: #9f0000;
    font-size: 28px;
}

/*
|--------------------------------------------------------------------------
| Empty state
|--------------------------------------------------------------------------
*/

.favorites-page__empty {
    max-width: 680px;
    margin: 50px auto;
    padding: 48px 30px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.favorites-page__empty-icon {
    margin-bottom: 12px;
    color: #a00000;
    font-size: 56px;
    line-height: 1;
}

.favorites-page__empty h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.favorites-page__empty p {
    margin: 0 auto 22px;
    max-width: 520px;
    color: #666;
    line-height: 1.55;
}

.favorites-page__back {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0 20px;
    border-radius: 5px;
    background: #a00000;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.favorites-page__back:hover {
    background: #850000;
    color: #fff;
}

.ws-header__favorite {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.ws-header__favorite-count {
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #b40000;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    line-height: 18px;
}

@media (max-width: 900px) {
    .favorites-page {
        padding-left: 16px;
        padding-right: 16px;
    }

}

@media (max-width: 620px) {
   .favorites-page__products {
        grid-template-columns: 1fr;
    }
}

/*
|--------------------------------------------------------------------------
| Favorites cards = Catalog2 cards
|--------------------------------------------------------------------------
*/
.favorites-page__products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.favorites-product {
    position: relative;
}

.favorites-product .ws-catalog-product__image {
    position: relative;
}

.favorites-product .ws-catalog-product__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 10px 12px 12px;
    box-sizing: border-box;
}

.favorites-product .ws-catalog-product__actions {
    margin-top: auto;
}

.favorites-product .ws-catalog-product__image .ws-favorite-button {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 6;
}

.favorites-product .ws-catalog-product__stock.is-stock-low {
    color: #b00000;
}

.favorites-product .ws-catalog-product__stock.is-stock-good {
    color: #159447;
}

@media (max-width: 1000px) {
   .favorites-page__products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
