/* Navid favorites page — Figma 3:7217 / 3:7359 / tablet 328:27376 */

.navid-favorites-page {
    width: 100%;
    max-width: var(--navid-profile-content-w, 900px);
    font-family: var(--navid-font);
}

.navid-favorites-page__title {
    margin: 0 0 40px;
    min-height: var(--navid-profile-item-h, 56px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--navid-secondary);
    font-size: 32px;
    font-weight: 500;
    line-height: normal;
    text-align: right;
}

.navid-favorites-page__alert {
    margin: 0 0 24px;
    padding: 16px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 400;
    line-height: normal;
    text-align: center;
}

.navid-favorites-page__alert--success {
    background: rgba(0, 146, 148, 0.1);
    color: var(--navid-green);
}

.navid-favorites-page__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    width: 100%;
}

.navid-favorites-page__item {
    position: relative;
}

.navid-favorites-page__item .navid-pc {
    gap: 8px;
}

.navid-favorites-page__remove {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: var(--navid-white);
    color: var(--navid-primary);
    box-shadow: 0 2px 8px rgba(0, 54, 99, 0.08);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.navid-favorites-page__remove:hover {
    background: rgba(245, 72, 72, 0.1);
    color: var(--navid-error);
}

.navid-favorites-page__remove-icon {
    display: block;
    width: 24px;
    height: 24px;
}

.navid-favorites-page__remove-icon path {
    fill: currentColor;
    stroke: currentColor;
}

.navid-favorites-page__item .navid-pc__thumb {
    pointer-events: auto;
}

.navid-favorites-page__empty {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 84px;
    padding: 24px;
    border: 1px solid var(--navid-tertiary);
    border-radius: 4px;
    background: var(--navid-white);
    direction: rtl;
}

.navid-favorites-page__empty-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--navid-gray);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    text-align: justify;
}

.navid-favorites-page__empty-link {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--navid-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    text-decoration: none !important;
    white-space: nowrap;
}

.navid-favorites-page__empty-link:hover {
    color: var(--navid-primary-hover);
}

.navid-favorites-page__empty-link-icon {
    display: block;
    width: 24px;
    height: 24px;
}

.navid-favorites-page__empty-link-icon path {
    stroke: currentColor;
}

.navid-favorites-page__pagination {
    margin-top: 40px;
}

/* Desktop: vertical product cards (list-row markup, default grid layout) */
@media (min-width: 1280px) {
    .navid-favorites-page__item .navid-pc--list-row .navid-pc__content {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        direction: inherit;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__info {
        order: 2;
        align-items: stretch;
        gap: 8px;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__media {
        order: 1;
        flex: none;
        width: 100%;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__title-row {
        display: block;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__title-row .navid-pc__inline-rating {
        display: none;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__title {
        font-size: 16px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        text-align: right;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__meta {
        display: block;
        font-size: 12px;
        text-align: right;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__price-row {
        padding: 0 8px;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__currency {
        font-size: 14px;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__price {
        font-size: 18px;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__old {
        font-size: 12px;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__discount-pill {
        min-width: 32px;
        height: 20px;
        font-size: 10px;
    }
}

/* Tablet + mobile: horizontal list-row cards (Figma 328:27376) */
@media (max-width: 1279px) {
    .navid-favorites-page__item .navid-pc__rating-badge {
        display: none;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__price-row {
        width: 100%;
        justify-content: space-between;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__price-row--sale .navid-pc__price-main {
        flex-shrink: 0;
    }

    .navid-favorites-page__item .navid-pc--list-row .navid-pc__price-row--sale .navid-pc__discount-group {
        flex-shrink: 0;
    }

    .navid-favorites-page__remove {
        top: 0;
        left: auto;
        right: 0;
    }

    .navid-favorites-page__empty {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }

    .navid-favorites-page__empty-link {
        align-self: flex-start;
        font-size: 14px;
    }

    .navid-favorites-page__empty-text {
        font-size: 14px;
    }

    .navid-favorites-page__pagination {
        margin-top: 24px;
    }
}

/* Tablet: 2-column grid, 56px column gap (Figma 744px) */
@media (min-width: 768px) and (max-width: 1279px) {
    body.navid-profile-page-active .navid-profile-layout__content:has(.navid-favorites-page) {
        padding-left: 24px;
        padding-right: 24px;
    }

    .navid-favorites-page__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 56px;
        row-gap: 24px;
    }

    .navid-favorites-page__item:last-child:nth-child(odd):not(:only-child) {
        grid-column: 1;
        justify-self: start;
        width: 100%;
        max-width: 320px;
    }
}

/* Mobile: single column */
@media (max-width: 767px) {
    .navid-favorites-page__grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .navid-favorites-page__item:last-child:nth-child(odd):not(:only-child) {
        grid-column: auto;
        justify-self: stretch;
        max-width: none;
    }
}

@media (max-width: 575px) {
    .navid-favorites-page__empty-link {
        align-self: flex-start;
    }
}
