.best-sellers {
    --bseller-panel: #191e4b;
    --bseller-muted: #c1c5df;
    --bseller-border: var(--bm-block-border, #272b48);
    padding-block: clamp(2.25rem, 4vw, 4rem);
    scroll-margin-top: 5rem;
    background: #0c1036;
    color: #f6f7ff;
}

.best-sellers__header {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1.125rem 2rem;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.best-sellers__header h2 {
    margin: 0;
    color: inherit;
    font: inherit;
    font-size: clamp(2rem, 3.4vw, 2.625rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.best-sellers__header p,
.best-sellers__empty {
    margin: .375rem 0 0;
    color: var(--bseller-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.best-sellers__filters {
    display: none;
    flex-wrap: wrap;
    gap: .125rem;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: .25rem;
    border: 1px solid var(--bseller-border);
    border-radius: .75rem;
    background: #171b40;
}

.best-sellers__filters label {
    position: relative;
    flex: auto;
    margin: 0;
    cursor: pointer;
}

.best-sellers__filters input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.best-sellers__filters label span {
    display: grid;
    place-items: center;
    min-height: 2.75rem;
    padding-inline: clamp(.625rem, 1.2vw, 1rem);
    border-radius: .5rem;
    color: var(--bseller-muted);
    font-size: .9375rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}

.best-sellers__filters input:checked + span {
    background: var(--bm-button, #4936c7);
    color: #fff;
}

.best-sellers__filters input:focus-visible + span,
.best-sellers__card:focus-visible {
    outline: 2px solid var(--bm-button-focus, #d9d3ff);
    outline-offset: 2px;
}

.best-sellers__panel { display: none; }
#best-sellers-all { display: block; }

/* Native radios provide arrow-key navigation and filtering without a script or round trip. */
@supports selector(:has(:checked)) {
    .best-sellers__filters { display: flex; }
    .best-sellers:has(input:not([value="all"]):checked) #best-sellers-all { display: none; }
    .best-sellers:has(input[value="gta-6"]:checked) #best-sellers-gta-6,
    .best-sellers:has(input[value="gta-5"]:checked) #best-sellers-gta-5,
    .best-sellers:has(input[value="forza"]:checked) #best-sellers-forza,
    .best-sellers:has(input[value="call-of-duty"]:checked) #best-sellers-call-of-duty { display: block; }
}

.best-sellers__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.75rem, 1.4vw, 1.125rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.best-sellers__card {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: end;
    min-height: 15rem;
    height: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--bseller-border);
    border-radius: 1.125rem;
    background: var(--bseller-panel);
    color: #fff;
    text-decoration: none;
}

.best-sellers__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    display: block;
    object-fit: cover;
}

.best-sellers__details {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: clamp(.875rem, 1.5vw, 1.25rem);
}

.best-sellers__details::before {
    position: absolute;
    z-index: -1;
    inset: -5rem 0 0;
    background: linear-gradient(to bottom, transparent, rgb(12 16 54 / 86%) 5.75rem, #101431 100%);
    content: "";
}

.best-sellers__game {
    display: flex;
    align-items: center;
    gap: .375rem;
    margin-bottom: .45rem;
    color: #d3d8ff;
    font-size: .8125rem;
    font-weight: 650;
    line-height: 1.3;
}

.best-sellers__game::before {
    flex: none;
    width: .375rem;
    height: .375rem;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.best-sellers__card h3 {
    margin: 0;
    color: #fff;
    font: inherit;
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    font-weight: 750;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.best-sellers__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .875rem;
}

.best-sellers__price {
    min-width: 0;
    color: var(--bseller-muted);
    font-size: .8125rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.best-sellers__price .amount {
    color: #fff;
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    font-weight: 750;
    white-space: nowrap;
}

.best-sellers__price del .amount { color: var(--bseller-muted); font-size: .875rem; }
.best-sellers__price ins { text-decoration: none; }

.best-sellers__view {
    flex: none;
    padding: .5rem .875rem;
    border-radius: .625rem;
    background: var(--bm-button-surface, var(--bm-button, #4936c7));
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.3;
}

.best-sellers__empty {
    margin: 0;
    padding: 2rem;
    border: 1px solid var(--bseller-border);
    border-radius: 1.125rem;
    background: #171b40;
    text-align: center;
}

@media (hover: hover) {
    .best-sellers__filters label:hover span { color: #fff; }
    .best-sellers__filters label:hover input:not(:checked) + span { background: #30345b; }
    .best-sellers__card:hover { border-color: #9599ed; text-decoration: none; }
    .best-sellers__card:hover .best-sellers__view,
    .best-sellers__filters label:hover input:checked + span { background: var(--bm-button-hover, #5946d7); }
}

.best-sellers__card:active .best-sellers__view { background: var(--bm-button-pressed, #39299e); }

@media (max-width: 991px) {
    .best-sellers__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 539px) {
    .best-sellers__filters { width: 100%; }
    .best-sellers__filters label span { padding-inline: .4rem; }
    .best-sellers__grid { grid-template-columns: minmax(0, 1fr); }
    .best-sellers__card { aspect-ratio: 6 / 5; }
    .best-sellers__art { object-position: center top; }
}
