/*
 * Homepage: minimal multi-brand electronics marketplace.
 * This file loads only on the front page and intentionally owns every
 * `.odpx-market-*` rule so older homepage experiments cannot affect it.
 */

.odpx-market-home {
	padding-bottom: 0;
	background: #fff;
}

.odpx-market-hero {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--odpx-brand-mint);
}

.odpx-market-hero__media,
.odpx-market-hero__media img {
	display: block;
	width: 100%;
}

.odpx-market-hero__media img {
	height: auto;
	object-fit: contain;
}

.odpx-market-hero__copy {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: max(16px, calc((100% - var(--odpx-container)) / 2 + 16px));
	width: min(40%, 500px);
	padding: clamp(24px, 2.5vw, 38px);
	border: 1px solid rgba(255, 255, 255, .78);
	border-radius: 18px;
	background: rgba(255, 255, 255, .82);
	box-shadow: 0 20px 50px rgba(30, 48, 36, .08);
	backdrop-filter: blur(10px);
	transform: translateY(-50%);
}

.odpx-market-hero__copy > img {
	width: min(170px, 52%);
	height: auto;
	margin-bottom: 20px;
}

.odpx-market-hero .odpx-market-hero__eyebrow {
	margin-bottom: 8px;
	color: var(--odpx-brand-dark);
	font-size: .68rem;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.odpx-market-hero h1 {
	max-width: 14ch;
	margin-bottom: 12px;
	color: #202b24;
	font-size: clamp(1.85rem, 2.65vw, 3.1rem);
	font-weight: 700;
	letter-spacing: -.045em;
	line-height: 1.08;
}

.odpx-market-hero .odpx-market-hero__lead {
	max-width: 46ch;
	margin-bottom: 22px;
	color: #536057;
	font-size: clamp(.9rem, 1.15vw, 1.05rem);
}

.odpx-market-hero__actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.odpx-market-hero__link {
	color: var(--odpx-brand-dark);
	font-size: .86rem;
	font-weight: 700;
}

.odpx-market-hero__trust {
	display: flex;
	flex-wrap: wrap;
	gap: 7px 16px;
	margin-top: 18px;
	color: #68736b;
	font-size: .68rem;
}

.odpx-market-home .odpx-btn--primary {
	border: 1px solid var(--odpx-brand-dark);
	background: var(--odpx-brand-dark);
	color: #fff;
}

.odpx-market-section {
	margin-block: clamp(50px, 6vw, 78px);
}

.odpx-market-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
}

.odpx-market-heading h2 {
	position: relative;
	margin: 0;
	padding-bottom: 9px;
	color: #202b24;
	font-size: clamp(1.4rem, 2.3vw, 2rem);
	letter-spacing: -.035em;
}

.odpx-market-heading h2::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 40px;
	height: 2px;
	background: var(--odpx-brand);
	content: "";
}

.odpx-market-heading > a {
	padding-bottom: 3px;
	border-bottom: 1px solid var(--odpx-brand);
	color: var(--odpx-brand-dark);
	font-size: .82rem;
	font-weight: 700;
	white-space: nowrap;
}

.odpx-market-promos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.odpx-market-promos__featured,
.odpx-market-promos__grid > a {
	display: block;
	overflow: hidden;
	border: 1px solid #edf0ed;
	border-radius: 10px;
	background: #f7f8f6;
}

.odpx-market-promos__featured img,
.odpx-market-promos__grid img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform .25s ease;
}

.odpx-market-promos a:hover img,
.odpx-market-promos a:focus-visible img {
	transform: scale(1.015);
}

.odpx-market-promos__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.odpx-market-brands {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	border: 1px solid #edf0ed;
	border-radius: 10px;
	background: #fff;
}

.odpx-market-brands a {
	display: grid;
	min-width: 0;
	place-items: center;
	padding: 14px;
}

.odpx-market-brands a + a {
	border-left: 1px solid #edf0ed;
}

.odpx-market-brands img {
	width: 100%;
	max-width: 150px;
	height: 62px;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .82;
	transition: filter .2s ease, opacity .2s ease;
}

.odpx-market-brands a:hover img,
.odpx-market-brands a:focus-visible img {
	filter: none;
	opacity: 1;
}

.odpx-market-categories {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
}

.odpx-market-categories a {
	display: grid;
	min-width: 0;
	padding: 14px;
	border: 1px solid #edf0ed;
	border-radius: 10px;
	background: #fafbf9;
	text-align: center;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.odpx-market-categories a:hover,
.odpx-market-categories a:focus-visible {
	border-color: var(--odpx-brand);
	background: #fff;
	box-shadow: 0 12px 26px rgba(30, 69, 43, .08);
	transform: translateY(-2px);
}

.odpx-market-categories img {
	width: 100%;
	aspect-ratio: 1;
	margin-bottom: 10px;
	object-fit: contain;
}

.odpx-market-categories strong,
.odpx-market-categories span {
	display: block;
}

.odpx-market-categories strong {
	min-height: 2.8em;
	color: #344039;
	font-size: .85rem;
	line-height: 1.4;
}

.odpx-market-categories span {
	margin-top: 3px;
	color: #879087;
	font-size: .72rem;
}

.odpx-market-products .odpx-grid--products {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 28px 18px;
}

.odpx-market-products .odpx-card {
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: visible;
	box-shadow: none;
}

.odpx-market-products .odpx-card__media {
	overflow: hidden;
	border-radius: 8px;
	background: #f7f8f6;
}

.odpx-market-products .odpx-card__body {
	display: flex;
	min-height: 154px;
	padding: 11px 1px 0;
}

.odpx-market-products .odpx-card__title {
	min-height: 2.9em;
	font-size: .82rem;
	line-height: 1.45;
}

.odpx-market-products .odpx-card__rating {
	min-height: 19px;
	margin-block: 3px;
}

.odpx-market-products .odpx-card__price {
	margin-top: auto;
	color: var(--odpx-brand-dark);
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.4;
}

.odpx-market-products .odpx-card__price ins {
	text-decoration: none;
}

.odpx-market-products .odpx-card__price del {
	margin-right: 5px;
	color: #8b938d;
	font-size: .76rem;
	font-weight: 500;
}

.odpx-market-products .odpx-badge--sale {
	top: 8px;
	left: 8px;
	padding: 4px 7px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .1);
	color: #b32f2a;
	font-size: .66rem;
}

.odpx-market-products .odpx-card__wishlist {
	opacity: 0;
	transition: opacity .2s ease;
}

.odpx-market-products .odpx-card:hover .odpx-card__wishlist,
.odpx-market-products .odpx-card:focus-within .odpx-card__wishlist {
	opacity: 1;
}

.odpx-market-products .odpx-card__add {
	margin-top: 9px;
	padding: 7px 9px;
	border-radius: 6px;
	font-size: .72rem;
}

@media (max-width: 1100px) {
	.odpx-market-products .odpx-grid--products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.odpx-market-products .odpx-card:nth-child(n+9) {
		display: none;
	}

	.odpx-market-categories {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		margin-right: -16px;
		padding: 10px 16px 10px 0;
		scroll-padding-left: 1px;
		scroll-snap-type: x mandatory;
	}

	.odpx-market-categories a {
		min-width: min(44vw, 180px);
		scroll-snap-align: start;
	}

	.odpx-market-brands {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.odpx-market-brands a:nth-child(4) {
		border-left: 0;
	}

	.odpx-market-brands a:nth-child(n+4) {
		border-top: 1px solid #edf0ed;
	}
}

@media (max-width: 900px) {
	.odpx-market-products .odpx-grid--products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.odpx-market-products .odpx-card:nth-child(n+7) {
		display: none;
	}
}

@media (max-width: 767px) {
	.odpx-market-hero {
		display: block;
		min-height: 680px;
		background: var(--odpx-brand-mint);
	}

	.odpx-market-hero__copy {
		position: relative;
		z-index: 2;
		top: auto;
		left: auto;
		width: 100%;
		padding: 34px 20px 30px;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		backdrop-filter: none;
		transform: none;
	}

	.odpx-market-hero__copy > img {
		width: 145px;
		margin-bottom: 13px;
	}

	.odpx-market-hero h1 {
		max-width: 12ch;
		font-size: clamp(2rem, 10vw, 2.6rem);
	}

	.odpx-market-hero__media {
		position: absolute;
		z-index: 0;
		inset: 0;
		height: 100%;
	}

	.odpx-market-hero__media::after {
		position: absolute;
		inset: 0;
		background: linear-gradient(180deg, rgba(212, 250, 241, .94) 0%, rgba(255, 255, 255, .78) 54%, rgba(212, 250, 241, .08) 100%);
		content: "";
	}

	.odpx-market-hero__media img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: 67% center;
	}

	.odpx-market-promos {
		display: block;
	}

	.odpx-market-promos__featured {
		margin-bottom: 12px;
	}

	.odpx-market-promos__grid {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		margin-right: -16px;
		padding-right: 16px;
		scroll-snap-type: x mandatory;
	}

	.odpx-market-promos__grid > a {
		min-width: min(76vw, 320px);
		scroll-snap-align: start;
	}

	.odpx-market-brands {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.odpx-market-brands a {
		min-width: 145px;
		border-top: 0 !important;
		border-left: 1px solid #edf0ed !important;
		scroll-snap-align: start;
	}

	.odpx-market-brands a:first-child {
		border-left: 0 !important;
	}

	.odpx-market-categories {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		margin-right: -16px;
		padding-right: 16px;
		scroll-padding-left: 1px;
		scroll-snap-type: x mandatory;
	}

	.odpx-market-categories a {
		min-width: min(44vw, 180px);
		scroll-snap-align: start;
	}

	.odpx-market-products .odpx-grid--products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 18px 12px;
	}

	.odpx-market-products .odpx-card:nth-child(n+7) {
		display: none;
	}

	.odpx-market-products .odpx-card__wishlist {
		opacity: 1;
	}
}

@media (max-width: 420px) {
	.odpx-market-heading {
		align-items: start;
		flex-direction: column;
		gap: 8px;
	}

	.odpx-market-categories a {
		padding: 10px;
	}
}
