/**
 * Walmart-style homepage rows — scoped to .marketplace-home-ebay
 */

.marketplace-home-ebay .wm-section {
	padding: 8px 0 16px;
}

.marketplace-home-ebay .wm-section > .container {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 20px 16px 16px;
	box-sizing: border-box;
}

/* Section header */
.marketplace-home-ebay .wm-section-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.marketplace-home-ebay .wm-section-head__title {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	color: #191919;
	letter-spacing: -0.02em;
}

.marketplace-home-ebay .wm-section-head__subtitle {
	margin: 4px 0 0;
	font-size: 14px;
	color: #707070;
}

.marketplace-home-ebay .wm-section-head__link {
	flex-shrink: 0;
	font-size: 14px;
	font-weight: 600;
	color: #191919;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.marketplace-home-ebay .wm-section-head__link:hover {
	color: var(--color-primary);
}

/* Scroll row */
.marketplace-home-ebay .wm-scroll-row {
	position: relative;
}

.marketplace-home-ebay .wm-scroll-row__viewport {
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-right: 48px;
}

.marketplace-home-ebay .wm-scroll-row__viewport::-webkit-scrollbar {
	display: none;
}

.marketplace-home-ebay .wm-scroll-row__track {
	display: flex;
	gap: 16px;
	align-items: stretch;
}

.marketplace-home-ebay .wm-scroll-row__next {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #e5e5e5;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	color: #191919;
	z-index: 2;
}

.marketplace-home-ebay .wm-scroll-row__next:hover {
	border-color: #191919;
}

.marketplace-home-ebay .wm-scroll-row__next[hidden] {
	display: none;
}

/* Category tiles */
.marketplace-home-ebay .wm-cat-tile {
	flex: 0 0 120px;
	display: grid;
	gap: 10px;
	text-decoration: none;
	color: #191919;
}

.marketplace-home-ebay .wm-cat-tile__img {
	display: block;
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
}

.marketplace-home-ebay .wm-cat-tile__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.marketplace-home-ebay .wm-cat-tile__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
}

/* Product cards */
.marketplace-home-ebay .wm-product-card {
	flex: 0 0 168px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.marketplace-home-ebay .wm-product-card__link {
	display: grid;
	gap: 6px;
	text-decoration: none;
	color: #191919;
}

.marketplace-home-ebay .wm-product-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
}

.marketplace-home-ebay .wm-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.marketplace-home-ebay .wm-product-card__flag {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
}

.marketplace-home-ebay .wm-product-card__flag--clearance {
	background: #ffc220;
	color: #191919;
}

.marketplace-home-ebay .wm-product-card__flag--deal {
	background: #fff;
	border: 1px solid #0071dc;
	color: #0071dc;
}

.marketplace-home-ebay .wm-product-card__price {
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
}

.marketplace-home-ebay .wm-product-card__price del {
	font-size: 13px;
	font-weight: 500;
	color: #707070;
	margin-left: 4px;
}

.marketplace-home-ebay .wm-product-card__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 13px;
	line-height: 1.4;
	min-height: 36px;
}

.marketplace-home-ebay .wm-product-card__sponsored {
	font-size: 11px;
	color: #707070;
}

.marketplace-home-ebay .wm-product-card__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin-top: auto;
	padding: 8px 14px;
	border: 1px solid #191919;
	border-radius: 999px;
	background: #fff;
	color: #191919;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

.marketplace-home-ebay .wm-product-card__add:hover {
	background: #191919;
	color: #fff;
}

.marketplace-home-ebay .wm-product-card--flash {
	flex: 0 0 180px;
}

/* Social cards */
.marketplace-home-ebay .wm-social-card {
	flex: 0 0 220px;
}

.marketplace-home-ebay .wm-social-card__link {
	position: relative;
	display: block;
	height: 300px;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}

.marketplace-home-ebay .wm-social-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.marketplace-home-ebay .wm-social-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}

.marketplace-home-ebay .wm-social-card__author {
	position: absolute;
	left: 12px;
	bottom: 12px;
	font-size: 13px;
	font-weight: 700;
	z-index: 1;
}

.marketplace-home-ebay .wm-social-card__hotspot {
	position: absolute;
	left: 50%;
	top: 42%;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
	transform: translate(-50%, -50%);
	z-index: 1;
}

.marketplace-home-ebay .wm-social-card__tooltip {
	position: absolute;
	left: 50%;
	top: 52%;
	transform: translateX(-50%);
	display: grid;
	gap: 2px;
	min-width: 160px;
	max-width: 200px;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(25, 25, 25, 0.92);
	z-index: 2;
}

.marketplace-home-ebay .wm-social-card__tooltip-title {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
}

.marketplace-home-ebay .wm-social-card__tooltip-price {
	font-size: 13px;
	font-weight: 800;
	color: #fff;
}

/* Bento promo grid */
.marketplace-home-ebay .wm-promo-bento > .container {
	padding: 16px;
}

.marketplace-home-ebay .wm-bento {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 0.9fr;
	grid-template-rows: 1fr 1fr;
	gap: 12px;
	min-height: 380px;
}

.marketplace-home-ebay .wm-bento__tile {
	position: relative;
	display: flex;
	align-items: flex-end;
	padding: 20px;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: #191919;
	background-color: #f5f5f5;
	background-size: cover;
	background-position: center;
	min-height: 0;
}

.marketplace-home-ebay .wm-bento__tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.75) 100%);
}

.marketplace-home-ebay .wm-bento__tile--hero {
	grid-column: 1;
	grid-row: 1 / -1;
}

.marketplace-home-ebay .wm-bento__tile--wide {
	grid-column: 2 / 4;
	grid-row: 1;
}

.marketplace-home-ebay .wm-bento__tile:nth-child(3) {
	grid-column: 2;
	grid-row: 2;
}

.marketplace-home-ebay .wm-bento__tile:nth-child(4) {
	grid-column: 3;
	grid-row: 2;
}

.marketplace-home-ebay .wm-bento__tile--tall {
	grid-column: 4;
	grid-row: 1 / -1;
}

.marketplace-home-ebay .wm-bento__content {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 8px;
	max-width: 90%;
}

.marketplace-home-ebay .wm-bento__title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
}

.marketplace-home-ebay .wm-bento__tile--hero .wm-bento__title {
	font-size: 24px;
}

.marketplace-home-ebay .wm-bento__tile--tall .wm-bento__title {
	font-size: 16px;
}

.marketplace-home-ebay .wm-bento__cta {
	display: inline-flex;
	align-self: flex-start;
	padding: 8px 16px;
	border-radius: 999px;
	background: #191919;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}

.marketplace-home-ebay .wm-bento__tile--hero .wm-bento__cta {
	background: #fff;
	color: #191919;
	border: 1px solid #191919;
}

@media (max-width: 1024px) {
	.marketplace-home-ebay .wm-bento {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
		min-height: 0;
	}

	.marketplace-home-ebay .wm-bento__tile--hero,
	.marketplace-home-ebay .wm-bento__tile--wide,
	.marketplace-home-ebay .wm-bento__tile--small,
	.marketplace-home-ebay .wm-bento__tile--tall {
		grid-column: auto;
		grid-row: auto;
		min-height: 180px;
	}

	.marketplace-home-ebay .wm-bento__tile--hero {
		grid-column: 1 / -1;
		min-height: 240px;
	}
}

@media (max-width: 768px) {
	.marketplace-home-ebay .wm-section > .container {
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		padding: 16px 14px;
	}

	.marketplace-home-ebay .wm-section-head__title {
		font-size: 18px;
	}

	.marketplace-home-ebay .wm-product-card {
		flex: 0 0 148px;
	}

	.marketplace-home-ebay .wm-social-card {
		flex: 0 0 180px;
	}

	.marketplace-home-ebay .wm-social-card__link {
		height: 260px;
	}

	.marketplace-home-ebay .wm-bento {
		grid-template-columns: 1fr;
	}
}

[data-theme="dark"].marketplace-home-ebay .wm-section .container {
	background: #111827;
	border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"].marketplace-home-ebay .wm-section-head__title,
[data-theme="dark"].marketplace-home-ebay .wm-cat-tile,
[data-theme="dark"].marketplace-home-ebay .wm-product-card__link,
[data-theme="dark"].marketplace-home-ebay .wm-section-head__link {
	color: #f8fafc;
}

[data-theme="dark"].marketplace-home-ebay .wm-product-card__add {
	border-color: #f8fafc;
	background: transparent;
	color: #f8fafc;
}

[data-theme="dark"].marketplace-home-ebay .wm-scroll-row__next {
	background: #1f2937;
	border-color: rgba(255, 255, 255, 0.12);
	color: #f8fafc;
}
