.recently-viewed-band {
    margin: 2.75rem 0 2.25rem;
}

.recently-viewed-band[data-rv-context="pdp"] {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.recently-viewed-band[data-rv-context="home"] {
    margin-top: 3rem;
    margin-bottom: 2.5rem;
}

.recently-viewed-band__head {
    margin-bottom: 1.25rem;
}

.recently-viewed-band__eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.55rem;
    border-radius: 9999px;
    padding: 0.28rem 0.72rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #4338ca;
    background: rgba(79, 70, 229, 0.1);
}

.dark .recently-viewed-band__eyebrow {
    color: #a5b4fc;
    background: rgba(129, 140, 248, 0.15);
}

.recently-viewed-band__title {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.625rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.035em;
}

.recently-viewed-band__title-mark {
    position: relative;
    display: inline-block;
    color: #4f46e5;
    padding-bottom: 0.38rem;
    vertical-align: baseline;
}

.recently-viewed-band__title-mark::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
}

.recently-viewed-band__title-rest {
    color: #0a0a0a;
    font-weight: 800;
}

.dark .recently-viewed-band__title-mark {
    color: #818cf8;
}

.dark .recently-viewed-band__title-rest {
    color: #fafafa;
}

.recently-viewed-band__rail {
    display: flex;
    gap: 0.875rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
}

.recently-viewed-band__rail::-webkit-scrollbar {
    display: none;
}

@media (min-width: 1024px) {
    .recently-viewed-band__rail {
        gap: 1rem;
    }
}

.recently-viewed-card {
    flex: 0 0 auto;
    width: min(72vw, 11.5rem);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 640px) {
    .recently-viewed-card {
        width: 14.5rem;
    }
}

@media (min-width: 1024px) {
    .recently-viewed-card {
        width: 15.75rem;
    }
}

.dark .recently-viewed-card {
    border-color: rgba(63, 63, 70, 0.85);
    background: rgba(24, 24, 27, 0.55);
    box-shadow: 0 10px 28px -20px rgba(0, 0, 0, 0.55);
}

.recently-viewed-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 16px 32px -18px rgba(79, 70, 229, 0.28);
}

.recently-viewed-card__media {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f3f4f6;
}

.dark .recently-viewed-card__media {
    background: #27272a;
}

.recently-viewed-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.recently-viewed-card:hover .recently-viewed-card__img {
    transform: scale(1.05);
}

.recently-viewed-card__body {
    padding: 0.8rem 0.9rem 0.95rem;
}

.recently-viewed-card__name {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2rem;
}

.dark .recently-viewed-card__name {
    color: #fff;
}

.recently-viewed-card__price {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.9375rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #111827;
}

.dark .recently-viewed-card__price {
    color: #fff;
}
