/* Recently viewed (HAGZI_RECENTLY_VIEWED): the home/listing strip and the account grid. */

.hzrv-strip[hidden],
.hzrv-strip [hidden] {
    display: none !important;
}

.hzrv-strip {
    padding-block: 28px 8px;
}

.hzrv-strip__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.hzrv-strip__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.hzrv-strip__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--hz-ink, #12141a);
}

.hzrv-strip__tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hzrv-strip__nav {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--hz-line, #e7e9ee);
    border-radius: 50%;
    background: #fff;
    color: var(--hz-nav, #3c414c);
    cursor: pointer;
}

.hzrv-strip__nav svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[dir="rtl"] .hzrv-strip__nav svg {
    transform: scaleX(-1);
}

.hzrv-strip__all,
.hzrv-strip__clear {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--hzp-accent, var(--hagzi-primary, #0745D9));
    background: none;
    border: 0;
    padding: 4px 2px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.hzrv-strip__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 240px);
    gap: 14px;
    margin: 0;
    padding: 2px 2px 10px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.hzrv-strip__track > .hzrv-tile {
    scroll-snap-align: start;
}

.hzrv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hzrv-tile {
    position: relative;
    min-width: 0;
    border: 1px solid var(--hz-line, #e7e9ee);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.hzrv-tile__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hzrv-tile__media {
    display: block;
    width: 100%;
    height: 132px;
    object-fit: cover;
    background: #f4f5f7;
}

.hzrv-tile__body {
    display: grid;
    gap: 3px;
    padding: 10px 12px 12px;
}

.hzrv-tile__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--hzp-accent, var(--hagzi-primary, #0745D9));
}

.hzrv-tile__price small {
    font-size: 12px;
    font-weight: 600;
}

.hzrv-tile__title,
.hzrv-tile__where {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hzrv-tile__title {
    font-size: 14px;
    color: var(--hz-ink, #12141a);
}

.hzrv-tile__where {
    font-size: 12px;
    color: #6b7280;
}

.hzrv-tile__remove {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-end: 8px;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 20, 26, 0.72);
    color: #fff;
    cursor: pointer;
}

.hzrv-tile__remove svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.hzrv-tile__remove:disabled {
    opacity: 0.5;
}

.hzrv-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: #6b7280;
}

@media (max-width: 640px) {
    .hzrv-strip {
        padding-block: 20px 4px;
    }

    .hzrv-strip__inner {
        padding: 0 16px;
    }

    .hzrv-strip__title {
        font-size: 18px;
    }

    .hzrv-strip__nav {
        display: none;
    }

    .hzrv-strip__track {
        grid-auto-columns: 72%;
        gap: 10px;
    }

    .hzrv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .hzrv-tile__media {
        height: 110px;
    }
}
