.favorite {
    padding: 40px 0 100px;
}

.favorite-header {
    margin-bottom: 32px;
}

.favorite-header h1 {
    font-weight: 500;
    font-size: 48px;
    line-height: 105%;
    color: #262626;
}

@media screen and (max-width: 1279px) {
    .favorite {
        padding: 32px 0 60px;
    }

    .favorite-header h1 {
        font-size: 42px;
    }
}

@media screen and (max-width: 767px) {
    .favorite {
        padding: 24px 0 56px;
    }

    .favorite-header {
        margin-bottom: 20px;
    }

    .favorite-header h1 {
        font-size: 30px;
    }
}

.catalog-items {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 12px;
}

.catalog-item {
    width: calc(25% - 9px);
}

.catalog-item-wrapper {
    overflow: hidden;
    border-radius: 12px;
}

.catalog-item-hover .catalog-item-wrapper {
    box-shadow: 0 8px 45px rgba(0, 0, 0, 0.08);
    background-color: #fff;
    transition: background 300ms, box-shadow 300ms;
}

.catalog-item-hover {
    position: relative;
    z-index: 1;
}

.catalog-item-photo {
    position: relative;
    height: 0;
    padding-top: 100%;
    margin-bottom: 16px;
    background-color: #f5f5f5;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    transition: border-radius 300ms;
}

.catalog-item-hover .catalog-item-photo {
    border-radius: 0;
}

.catalog-item-photo img {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    object-fit: cover;
}

.catalog-item-photo a {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.catalog-item-content {
    padding: 0 12px 16px;
}

.catalog-item-name {
    font-weight: 500;
    font-size: 16px;
    line-height: 115%;
    color: #262626;
}

.catalog-item-text {
    font-size: 14px;
    line-height: 135%;
    color: #515151;
    margin-top: 4px;
}

.catalog-item-prices {
    margin-top: 12px;
}

.catalog-item-price {
    font-weight: 500;
    font-size: 18px;
    line-height: 115%;
    color: #262626;
}

.catalog-price-desc {
    font-size: 14px;
    line-height: 135%;
    margin-top: 2px;
    color: #515151;
}

.catalog-item-footer {
    display: none;
    max-height: 0;
    overflow: hidden;
}

.catalog-item-hover .catalog-item-footer {
    transition: max-height 300ms;
}

.catalog-item-footer-content {
    padding: 0 12px 16px;
}

.catalog-item-link {
    margin-top: 4px;
}

.catalog-item-link a {
    font-size: 14px;
    text-decoration: underline;
    transition: color 300ms;
}

.catalog-item-link a:hover {
    text-decoration: none;
    color: #262626;
}

.catalog-item-btn {
    margin-top: 16px;
}

.catalog-item-btn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 24px;
    width: 100%;
    border: 1px solid #CFCFCF;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    color: #262626;
    transition: border 300ms;
}

.catalog-item-btn a:hover {
    border-color: #262626;
}

.element-price-text {
    display: block;
    font-size: 14px;
    line-height: 100%;
    margin-top: 4px;
    color: #515151;
}

.catalog-item-favorite {
    position: absolute;
    width: 22px;
    top: 16px;
    right: 16px;
    cursor: pointer;
}

.catalog-item-favorite svg {
    width: 22px;
    height: 20px;
    display: inline-block;
}

.catalog-item-favorite svg:last-child {
    position: absolute;
    left: 0;
    opacity: 0;
}

.catalog-item-favorite.active svg:first-child {
    opacity: 0;
}

.catalog-item-favorite.active svg:last-child {
    opacity: 1;
}

@media screen and (min-width: 650px) {
    .catalog-item-favorite:hover svg:first-child {
        opacity: 0;
    }

    .catalog-item-favorite:hover svg:last-child {
        opacity: 1;
    }
}

.element-button-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 52px;
    gap: 10px;
    white-space: nowrap;
    cursor: pointer;
}

.element-button-favorite-icon {
    position: relative;
    flex: none;
}

.element-button-favorite-icon svg {
    display: inline-block;
    transition: opacity 300ms;
}

.element-button-favorite-icon svg:first-child {
    width: 100%;
    height: auto;
}

.element-button-favorite-icon svg:last-child {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    object-fit: cover;
    opacity: 0;
}

.element-button-favorite:hover .element-button-favorite-icon svg:first-child,
.element-button-favorite.active .element-button-favorite-icon svg:first-child {
    opacity: 0;
}

.element-button-favorite:hover .element-button-favorite-icon svg:last-child,
.element-button-favorite.active .element-button-favorite-icon svg:last-child {
    opacity: 1;
}

.element-button-favorite-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 115%;
    color: #262626;
}

.element-button-favorite-text span:last-child {
    display: none;
}

.element-button-favorite.active .element-button-favorite-text span:first-child {
    display: none;
}

.element-button-favorite.active .element-button-favorite-text span:last-child {
    display: inline-block;
}

@media screen and (max-width: 1279px) {
    .catalog-item {
        width: calc(33.33333% - 8px);
    }

    .catalog-item-photo {
        margin-bottom: 8px;
        border-radius: 0 0 8px 8px;
    }

    .catalog-item-wrapper {
        border-radius: 8px 8px 0 0;
    }

    .catalog-item-content {
        padding: 0;
    }

    .catalog-item-name {
        font-size: 14px;
    }

    .catalog-item-text {
        font-size: 12px;
    }

    .catalog-item-prices {
        margin-top: 8px;
    }

    .catalog-item-price {
        font-weight: 500;
        font-size: 16px;
    }

    .catalog-price-desc {
        font-size: 12px;
    }

    .catalog-item-footer {
        max-height: none;
    }

    .catalog-item-footer-content {
        padding: 0;
    }

    .catalog-item-link {
        display: none;
    }

    .catalog-item-link a {
        font-size: 12px;
    }

    .catalog-item-btn {
        display: none;
    }

    .element-price-text {
        font-size: 12px;
    }

    .element-button-favorite-text {
        font-size: 14px;
    }

    .element-button-favorite {
        height: 45px;
        padding: 0 12px;
    }
}

@media screen and (max-width: 650px) {
    .catalog-item {
        width: calc(50% - 6px);
    }
}

@media screen and (max-width: 428px) {
    .catalog-items {
        gap: 20px 8px;
    }

    .catalog-item {
        width: calc(50% - 4px);
    }

    .catalog-item-price {
        font-size: 14px;
    }

    .catalog-item-favorite {
        top: 10px;
        right: 10px;
    }
}

.catalog-empty {
    width: 100%;
    border: 1px solid #E6E6E6;
    border-radius: 16px;
    padding: 70px 24px;
    text-align: center;
}

.catalog-empty-icon img {
    width: 90px;
    height: auto;
}

.catalog-empty-text {
    font-size: 18px;
    line-height: 150%;
    margin-top: 18px;
}

@media screen and (max-width: 1279px) {
    .catalog-empty {
        padding: 40px 24px;
    }

    .catalog-empty-text {
        font-size: 16px;
    }
}