/* Recently viewed row. Sizes in px: the theme's root font size is 10px. Colours fall back when the theme has no variables. */

.ch-recent[hidden],
.ch-recent [hidden] {
    display: none !important;
}

.ch-recent,
.ch-recent * {
    box-sizing: border-box;
}

.ch-recent {
    margin: 0;
    padding: 48px 0 16px;
}

/* On the home page the row is a full-width band of its own, so it brings its own page margins. */
.ch-recent--home {
    background: #fff;
    border-bottom: 1px solid var(--color-line, #e3e6ec);
    padding: 40px 0 28px;
}

.ch-recent--home .ch-recent__inner {
    margin: 0 auto;
    max-width: 1360px;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .ch-recent--home .ch-recent__inner {
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .ch-recent--home .ch-recent__inner {
        padding: 0 32px;
    }
}

.ch-recent__head {
    align-items: flex-end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 0 20px;
}

.ch-recent__title {
    color: var(--color-navy-950, #01123b);
    font-family: var(--font-display, inherit);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 400;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin: 0;
}

.ch-recent__tools {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 16px;
}

.ch-recent__back {
    border: 1px solid rgba(1, 18, 59, .2);
    border-radius: 999px;
    color: var(--color-navy-950, #01123b);
    font-size: 13px;
    font-weight: 600;
    max-width: 260px;
    overflow: hidden;
    padding: 8px 16px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ch-recent__back::after {
    content: " \2192";
}

.ch-recent__back:hover {
    background: var(--color-navy-950, #01123b);
    color: #fff;
}

.ch-recent__clear {
    background: none;
    border: 0;
    color: var(--color-muted, #6b7892);
    cursor: pointer;
    font-size: 13px;
    padding: 8px 0;
    text-decoration: underline;
}

.ch-recent__clear:hover {
    color: var(--color-navy-950, #01123b);
}

.ch-recent__track {
    display: flex;
    gap: 14px;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.ch-recent__item {
    flex: 0 0 168px;
    margin: 0;
    position: relative;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .ch-recent__item {
        flex-basis: 196px;
    }
}

.ch-recent__card {
    background: #fff;
    border: 1px solid var(--color-line, #e3e6ec);
    border-radius: 18px;
    color: var(--color-navy-950, #01123b);
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 10px 14px 14px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.ch-recent__card:hover {
    border-color: #d8dde4;
    box-shadow: 0 14px 30px -18px rgba(1, 18, 59, .35);
    color: var(--color-navy-950, #01123b);
    text-decoration: none;
    transform: translateY(-2px);
}

.ch-recent__picture {
    aspect-ratio: 1;
    display: block;
    margin: 0 0 6px;
}

.ch-recent__picture img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.ch-recent__brand {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ch-recent__name {
    display: -webkit-box;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ch-recent__price {
    font-size: 15px;
    font-weight: 700;
    margin-top: auto;
    padding-top: 6px;
}

.ch-recent__price small {
    color: var(--color-muted, #6b7892);
    font-size: 11px;
    font-weight: 400;
}

.ch-recent__stock {
    color: var(--color-muted, #6b7892);
    font-size: 12px;
}

.ch-recent__remove {
    background: #fff;
    border: 1px solid var(--color-line, #e3e6ec);
    border-radius: 50%;
    color: var(--color-muted, #6b7892);
    cursor: pointer;
    font-size: 16px;
    height: 28px;
    line-height: 1;
    opacity: 0;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    transition: opacity .2s;
    width: 28px;
}

.ch-recent__item:hover .ch-recent__remove,
.ch-recent__remove:focus-visible {
    opacity: 1;
}

@media (hover: none) {
    .ch-recent__remove {
        opacity: 1;
    }
}

.ch-recent__remove:hover {
    border-color: var(--color-navy-950, #01123b);
    color: var(--color-navy-950, #01123b);
}

@media (max-width: 479px) {
    .ch-recent__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}
