/* Move the complete homepage section down exactly 5px (46px -> 51px). */
.homepage #best-sellers { margin-top: 51px; }

.best-sellers-media { position: relative; display: block; min-width: 0; }
.product-platform-badge {
	position: absolute;
	top: 9px;
	left: 9px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	overflow: hidden;
	border-radius: 50%;
	background: #fff;
	pointer-events: none;
}
.product-platform-badge img { display: block; width: 36px; height: 36px; max-width: none; object-fit: contain; }
.product-platform-badge.is-steam { background: #1b639e; }
.product-platform-badge.is-playstation { background: #0070d1; }
.product-platform-badge.is-nintendo { background: #ff2439; }
.product-platform-badge.is-epic { background: #0095ff; }
.product-platform-badge.is-blizzard { background: #148eff; }
.product-platform-badge.is-riot { background: #d32936; }
.product-platform-badge.is-ubisoft { background: #171717; }
.product-platform-badge.is-rockstar { background: #fcb827; }
.product-platform-badge.is-nintendo img,
.product-platform-badge.is-blizzard img,
.product-platform-badge.is-riot img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.product-platform-badge.is-epic img { width: 21px; height: 25px; filter: brightness(0) invert(1); }
.product-platform-badge.is-ubisoft img,
.product-platform-badge.is-rockstar img,
.product-platform-badge.is-microsoft img { width: 26px; height: 26px; }
.product-discount-badge {
	position: absolute;
	left: -3px;
	bottom: -2px;
	z-index: 3;
	isolation: isolate;
	padding: 7px 8px;
	border-radius: 6px 5px 2px 6px;
	background: #e34450;
	color: #fff;
	font: 500 15px/16px "Barlow", Arial, sans-serif;
	white-space: nowrap;
	pointer-events: none;
}
.product-discount-badge::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0 -4px 0 8px;
	border-radius: 5px;
	background: inherit;
	transform: skewX(13deg);
}
.product-discount-badge.is-blue-border { filter: url("../images/discount-badge-outline.svg#blue-border"); }
.best-sellers-cover.is-playing ~ .product-platform-badge,
.best-sellers-cover.is-playing + .product-discount-badge {
	opacity: 0;
	visibility: hidden;
}
.catalog-gift-card .product-discount-badge { top: 6px; right: 7px; bottom: auto; left: auto; padding: 4px 6px; font-size: 11px; line-height: 14px; }

/* Keep homepage and regular platform cards on the same typography rules. */
.homepage #best-sellers .best-sellers-title,
.homepage #best-sellers .best-sellers-price,
.platform-catalog .catalog-card:not(.catalog-gift-card) .best-sellers-title,
.platform-catalog .catalog-card:not(.catalog-gift-card) .best-sellers-price {
	font-family: "Barlow", Arial, sans-serif;
	font-style: normal;
	letter-spacing: normal;
	line-height: 20px;
}

.homepage #best-sellers .best-sellers-title,
.platform-catalog .catalog-card:not(.catalog-gift-card) .best-sellers-title {
	font-size: 15px;
	font-weight: 400;
}

.homepage #best-sellers .best-sellers-price,
.platform-catalog .catalog-card:not(.catalog-gift-card) .best-sellers-price {
	font-size: 18px;
	/* The reference's CSS bold alias uses the actual Barlow Medium font face. */
	font-weight: 500;
}

.questy-catalog-status {
	margin: 0 0 20px;
	color: #9aa6b8;
	font-size: 14px;
	line-height: 1.6;
}

.questy-catalog-retry {
	margin: 0 0 24px;
	padding: 10px 18px;
	border: 1px solid rgba(20, 136, 252, 0.5);
	border-radius: 8px;
	background: rgba(20, 136, 252, 0.12);
	color: #c8e7ff;
	font: inherit;
	cursor: pointer;
}
.questy-catalog-retry:disabled { opacity: 0.6; cursor: wait; }
.questy-catalog-retry:focus-visible,
.questy-bestsellers-back:focus-visible { outline: 2px solid #8acbff; outline-offset: 4px; }

.questy-bestsellers-page {
	width: min(1200px, calc(100% - 48px));
	min-height: 70vh;
	margin: 0 auto;
	padding: 128px 0 64px;
}
.questy-bestsellers-back { color: #9aa6b8; font-size: 14px; text-decoration: none; }
.questy-bestsellers-back:hover { color: #bff6ff; }
.questy-bestsellers-page h1 { margin: 26px 0 12px; font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.questy-bestsellers-intro { margin: 0 0 32px; color: #9aa6b8; line-height: 1.6; }
.questy-bestsellers-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.questy-bestsellers-tools label { display: grid; gap: 8px; color: #c8d2df; font-size: 13px; }
.questy-bestsellers-tools input,
.questy-bestsellers-tools select {
	min-height: 44px;
	max-width: 100%;
	padding: 10px 14px;
	border: 1px solid #334155;
	border-radius: 8px;
	background: #15181f;
	color: #f5f7fb;
	font: inherit;
}
.questy-bestsellers-tools input { width: 300px; }
.questy-bestsellers-tools input:focus-visible,
.questy-bestsellers-tools select:focus-visible { outline: 2px solid #8acbff; outline-offset: 2px; }
.questy-bestsellers-page .best-sellers-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 342px), 342px)); }
.questy-bestsellers-page .best-sellers-cover { aspect-ratio: 342 / 196; }
.questy-bestsellers-page .best-sellers-placeholder { height: auto; min-height: 0; aspect-ratio: 342 / 196; }
.questy-bestsellers-page .best-sellers-card { min-width: 0; }
@media (max-width: 600px) {
	.questy-bestsellers-page { width: calc(100% - 32px); padding-top: 100px; }
	.questy-bestsellers-tools, .questy-bestsellers-tools label, .questy-bestsellers-tools input { width: 100%; }
}
