/**
 * Phase 5.8.2 — premium marketplace polish.
 * Distinct shelf identities, promo blocks, richer discovery.
 */

/* —— Global premium density —— */
.nds-home--marketplace {
	--nds-polish-radius: 1.25rem;
	--nds-polish-shadow: 0 18px 44px rgba(7, 19, 31, 0.1);
}

.nds-home--marketplace .nds-shelf {
	padding: 2.35rem 0 1.35rem;
}

.nds-home--marketplace .nds-shelf__title {
	font-size: clamp(1.45rem, 2.4vw, 2.05rem);
	letter-spacing: -0.035em;
}

.nds-home--marketplace .nds-shelf__all {
	font-weight: 700;
}

/* —— Promo strip (replaces flat quick lanes) —— */
.nds-promo-strip {
	padding: 0.35rem 0 1.5rem;
}

.nds-promo-strip__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
}

.nds-promo-chip {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-height: 8.5rem;
	padding: 1.35rem 1.3rem 1.2rem;
	border-radius: var(--nds-polish-radius);
	overflow: hidden;
	text-decoration: none;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: var(--nds-polish-shadow);
	transition: transform 0.35s var(--nds-ease, cubic-bezier(0.22, 1, 0.36, 1)), box-shadow 0.35s ease;
}

.nds-promo-chip__glow {
	position: absolute;
	inset: -40% auto auto -20%;
	width: 12rem;
	height: 12rem;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
	pointer-events: none;
	z-index: 0;
}

.nds-promo-chip > *:not(.nds-promo-chip__glow) {
	position: relative;
	z-index: 1;
}

.nds-promo-chip__eyebrow {
	font-size: 0.72rem;
	font-weight: 750;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.78;
}

.nds-promo-chip__title {
	font-family: var(--nds-font-display);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.nds-promo-chip__cta {
	margin-top: auto;
	font-size: 0.88rem;
	font-weight: 750;
	opacity: 0.9;
}

.nds-promo-chip__cta::after {
	content: " →";
}

.nds-promo-chip--practice { background: linear-gradient(145deg, #3d2f66 0%, #6b5b95 55%, #8f7ab8 100%); }
.nds-promo-chip--bundles { background: linear-gradient(145deg, #0a4f48 0%, #148a7a 55%, #2aa896 100%); }
.nds-promo-chip--free { background: linear-gradient(145deg, #7a3d18 0%, #c4894a 55%, #e0a86a 100%); }
.nds-promo-chip--new { background: linear-gradient(145deg, #123a5c 0%, #1e6fa0 55%, #3d8fc4 100%); }

@media (prefers-reduced-motion: no-preference) {
	.nds-promo-chip:hover,
	.nds-promo-chip:focus-visible {
		transform: translateY(-5px);
		box-shadow: 0 24px 48px rgba(7, 19, 31, 0.18);
	}
}

/* —— Premium promo blocks —— */
.nds-promo-block {
	position: relative;
	isolation: isolate;
	margin: 2.25rem 0;
	overflow: hidden;
}

.nds-promo-block__eyebrow {
	margin: 0 0 0.65rem;
	font-size: 0.74rem;
	font-weight: 750;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.nds-promo-block h2 {
	margin: 0 0 0.85rem;
	max-width: 14ch;
	font-family: var(--nds-font-display);
	font-size: clamp(1.85rem, 3.4vw, 3rem);
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1.08;
}

.nds-promo-block__lede {
	margin: 0 0 1.5rem;
	max-width: 38ch;
	font-size: 1.05rem;
	line-height: 1.55;
	opacity: 0.88;
}

.nds-promo-block--cinema {
	min-height: clamp(22rem, 48vh, 30rem);
	color: #fff;
	border-radius: 0;
}

.nds-promo-block--cinema .nds-promo-block__stage {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(105deg, rgba(4, 22, 28, 0.92) 0%, rgba(4, 22, 28, 0.55) 48%, rgba(4, 22, 28, 0.35) 100%),
		var(--nds-promo-image) center / cover no-repeat;
	transform: scale(1.02);
}

.nds-promo-block--cinema .nds-promo-block__veil {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 50% 70% at 80% 40%, rgba(11, 95, 105, 0.35), transparent 65%),
		linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
	pointer-events: none;
}

.nds-promo-block--cinema .nds-promo-block__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: inherit;
	padding: 3.5rem 0;
	max-width: 36rem;
}

.nds-promo-block--cinema .nds-promo-block__eyebrow {
	color: #9fd4d8;
}

.nds-promo-block--split {
	margin: 2.75rem 0;
}

.nds-promo-block__split-inner {
	display: grid;
	grid-template-columns: 0.95fr 1.05fr;
	gap: 0;
	align-items: stretch;
	border-radius: 1.5rem;
	overflow: hidden;
	background: linear-gradient(135deg, #0b5f69 0%, #0a3d4a 48%, #1a5274 100%);
	box-shadow: var(--nds-polish-shadow);
	color: #fff;
	min-height: 22rem;
}

.nds-promo-block__split-visual {
	position: relative;
	display: grid;
	place-items: center;
	padding: 2rem;
	background:
		radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.18), transparent 50%),
		linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent);
}

.nds-promo-block__split-visual img {
	position: relative;
	z-index: 1;
	width: min(14rem, 70%);
	border-radius: 0.85rem;
	box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4);
	transform: rotate(-6deg);
}

.nds-promo-block__orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(2px);
	opacity: 0.45;
}

.nds-promo-block__orb--a {
	width: 10rem;
	height: 10rem;
	background: rgba(159, 212, 216, 0.45);
	top: 12%;
	left: 10%;
}

.nds-promo-block__orb--b {
	width: 7rem;
	height: 7rem;
	background: rgba(255, 255, 255, 0.2);
	bottom: 14%;
	right: 16%;
}

.nds-promo-block__split-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 2.75rem 2.5rem;
}

.nds-promo-block__split-copy .nds-promo-block__eyebrow {
	color: #9fd4d8;
}

.nds-promo-block--panel {
	margin: 2.5rem 0;
}

.nds-promo-block__panel-inner {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 0;
	border-radius: 1.5rem;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(7, 19, 31, 0.06);
	box-shadow: var(--nds-polish-shadow);
	min-height: 18rem;
}

.nds-promo-block__panel-copy {
	padding: 2.5rem 2.25rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.nds-promo-block__panel-copy .nds-promo-block__eyebrow {
	color: var(--nds-market-teal, #0b5f69);
}

.nds-promo-block__panel-copy h2,
.nds-promo-block__panel-copy .nds-promo-block__lede {
	color: var(--nds-market-ink, #07131f);
	opacity: 1;
}

.nds-promo-block__panel-copy .nds-promo-block__lede {
	color: var(--nds-color-muted, #5a6570);
}

.nds-promo-block__panel-media {
	background:
		linear-gradient(135deg, rgba(11, 95, 105, 0.35), rgba(7, 19, 31, 0.25)),
		var(--nds-promo-image) center / cover no-repeat;
	min-height: 14rem;
}

.nds-promo-block--ink {
	margin: 2.75rem 0;
	padding: 3.5rem 0;
	background:
		radial-gradient(ellipse at 20% 0%, rgba(11, 95, 105, 0.35), transparent 45%),
		radial-gradient(ellipse at 90% 100%, rgba(26, 82, 116, 0.35), transparent 40%),
		linear-gradient(135deg, #07131f 0%, #0b3a42 55%, #123a5c 100%);
	color: #fff;
	text-align: center;
}

.nds-promo-block__ink-inner {
	max-width: 42rem;
	margin-inline: auto;
}

.nds-promo-block--ink h2 {
	max-width: 16ch;
	margin-inline: auto;
}

.nds-promo-block--ink .nds-promo-block__lede {
	margin-inline: auto;
}

.nds-promo-block--ink .nds-promo-block__eyebrow {
	color: #9fd4d8;
}

/* —— Distinct shelf personalities —— */
.nds-shelf--showcase {
	padding: 2.75rem 0 1.75rem !important;
	margin: 0.5rem 0 1.25rem;
	background:
		radial-gradient(ellipse 80% 60% at 10% 0%, rgba(11, 95, 105, 0.14), transparent 55%),
		linear-gradient(180deg, #0b5f69 0%, #0a454c 40%, #f4f7f8 40%, #f4f7f8 100%);
	color: #fff;
}

.nds-shelf--showcase .nds-shelf__eyebrow,
.nds-shelf--showcase .nds-shelf__title,
.nds-shelf--showcase .nds-shelf__desc,
.nds-shelf--showcase .nds-shelf__all {
	color: #fff;
}

.nds-shelf--showcase .nds-shelf__desc,
.nds-shelf--showcase .nds-shelf__all {
	opacity: 0.85;
}

.nds-shelf--showcase .nds-container {
	padding-top: 0.5rem;
}

.nds-shelf--showcase .nds-shelf__head {
	margin-bottom: 3.5rem;
}

.nds-shelf--showcase .nds-shelf__item {
	width: min(15rem, 58vw);
}

.nds-shelf--showcase .nds-product-card {
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.nds-shelf--ranked {
	padding: 2.4rem 0 1.5rem !important;
	background:
		linear-gradient(90deg, rgba(184, 122, 50, 0.12), transparent 50%),
		linear-gradient(180deg, #fffaf3, #ffffff);
	border-block: 1px solid rgba(184, 122, 50, 0.15);
}

.nds-shelf--ranked .nds-shelf__eyebrow {
	color: #9a6520;
}

.nds-shelf--ranked .nds-shelf__item {
	counter-increment: nds-rank;
	position: relative;
}

.nds-shelf--ranked .nds-shelf__rail {
	counter-reset: nds-rank;
}

.nds-shelf--ranked .nds-shelf__item::before {
	content: counter(nds-rank);
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
	z-index: 3;
	width: 1.85rem;
	height: 1.85rem;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: #9a6520;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 800;
	box-shadow: 0 8px 16px rgba(154, 101, 32, 0.35);
}

.nds-shelf--magazine {
	padding: 2.2rem 0 1.3rem !important;
}

.nds-shelf--magazine .nds-shelf__head {
	padding-bottom: 1rem;
	margin-bottom: 1.25rem;
	border-bottom: 2px solid var(--nds-market-ink, #07131f);
}

.nds-shelf--magazine .nds-shelf__item {
	width: min(12.5rem, 52vw);
}

.nds-shelf--mosaic .nds-shelf__rail {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.15rem;
	overflow: visible;
	padding-bottom: 0.25rem;
}

.nds-shelf--mosaic .nds-shelf__item {
	width: auto;
	min-width: 0;
}

.nds-shelf--cinema {
	padding: 2.5rem 0 1.5rem !important;
	background:
		linear-gradient(100deg, rgba(26, 82, 116, 0.1), transparent 55%),
		#f3f7fa;
	border-radius: 1.5rem;
	margin: 1rem 0;
}

.nds-shelf--cinema .nds-shelf__item {
	width: min(13.5rem, 55vw);
}

.nds-shelf--panel {
	padding: 2.35rem 0 1.4rem !important;
	background: linear-gradient(180deg, #f7f4fb, #ffffff);
	border-top: 1px solid rgba(92, 76, 130, 0.12);
}

.nds-shelf--panel .nds-shelf__eyebrow {
	color: #5c4c82;
}

.nds-shelf--mint {
	padding: 2.35rem 0 1.4rem !important;
	background:
		radial-gradient(circle at 90% 10%, rgba(42, 168, 150, 0.16), transparent 40%),
		linear-gradient(180deg, #eef9f6, #ffffff);
	border-radius: 1.35rem;
	margin: 0.85rem 0;
}

.nds-shelf--ink {
	padding: 2.5rem 0 1.5rem !important;
	background: linear-gradient(180deg, #0f1c24, #16303a);
	color: #fff;
	margin: 1rem 0;
}

.nds-shelf--ink .nds-shelf__eyebrow,
.nds-shelf--ink .nds-shelf__title,
.nds-shelf--ink .nds-shelf__desc,
.nds-shelf--ink .nds-shelf__all {
	color: #fff;
}

.nds-shelf--ink .nds-shelf__desc,
.nds-shelf--ink .nds-shelf__all {
	opacity: 0.8;
}

.nds-shelf--ink .nds-product-card {
	background: rgba(255, 255, 255, 0.97);
}

.nds-shelf--soft {
	padding: 2.2rem 0 1.35rem !important;
	background: linear-gradient(180deg, rgba(42, 111, 74, 0.08), transparent 70%);
}

.nds-shelf--soft .nds-shelf__eyebrow {
	color: var(--nds-color-success, #2a6f4a);
}

.nds-shelf--bundles {
	padding: 2.6rem 0 1.6rem !important;
	margin: 1rem 0;
	background:
		radial-gradient(ellipse at 0% 0%, rgba(11, 95, 105, 0.12), transparent 45%),
		linear-gradient(160deg, #e8f5f2 0%, #ffffff 60%);
	border-radius: 1.5rem;
	border: 1px solid rgba(11, 95, 105, 0.1);
}

.nds-shelf--bundles .nds-shelf__item {
	width: min(14rem, 56vw);
}

.nds-shelf--compact {
	padding: 1.75rem 0 1rem !important;
	opacity: 0.98;
}

.nds-shelf--compact .nds-shelf__item {
	width: min(10.25rem, 42vw);
}

.nds-shelf--alt {
	padding: 2rem 0 1.2rem !important;
}

.nds-shelf--alt .nds-shelf__head {
	background: #f4f7f8;
	margin: 0 -0.5rem 1.15rem;
	padding: 1rem 1rem 0.95rem;
	border-radius: 1rem;
}

/* —— Delivery / story polish —— */
.nds-delivery--polish {
	padding: 3rem 0 2rem;
	background: linear-gradient(180deg, #ffffff, #eef2f4);
}

.nds-delivery--polish .nds-delivery__step {
	border-radius: 1.1rem;
	box-shadow: 0 10px 28px rgba(7, 19, 31, 0.06);
	border: 0;
}

.nds-home--marketplace .nds-story--market {
	padding: 3rem 0;
}

.nds-home--marketplace .nds-story__panel {
	background: linear-gradient(145deg, #0b5f69, #1a5274);
	color: #fff;
	border-radius: 1.35rem;
}

.nds-home--marketplace .nds-story__name,
.nds-home--marketplace .nds-story__tag {
	color: #fff;
}

/* —— Hide legacy lane styles if cached —— */
.nds-quick-lanes {
	display: none !important;
}

@media (max-width: 1100px) {
	.nds-promo-strip__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nds-shelf--mosaic .nds-shelf__rail {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nds-promo-block__split-inner,
	.nds-promo-block__panel-inner {
		grid-template-columns: 1fr;
	}

	.nds-promo-block--cinema {
		min-height: 20rem;
	}
}

@media (max-width: 760px) {
	.nds-promo-strip__grid {
		grid-template-columns: 1fr;
	}

	.nds-shelf--showcase {
		background:
			radial-gradient(ellipse 80% 40% at 50% 0%, rgba(11, 95, 105, 0.18), transparent 55%),
			linear-gradient(180deg, #0b5f69 0%, #0a454c 28%, #f4f7f8 28%, #f4f7f8 100%);
	}

	.nds-shelf--showcase .nds-shelf__head {
		margin-bottom: 2rem;
	}

	.nds-shelf--mosaic .nds-shelf__rail {
		display: flex;
		overflow-x: auto;
		grid-template-columns: none;
	}

	.nds-shelf--mosaic .nds-shelf__item {
		width: min(11.5rem, 70vw);
		flex: 0 0 auto;
	}

	.nds-promo-block__split-copy,
	.nds-promo-block__panel-copy {
		padding: 1.75rem 1.35rem;
	}

	.nds-promo-block--ink {
		padding: 2.5rem 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nds-promo-chip,
	.nds-promo-block--cinema .nds-promo-block__stage {
		transition: none;
	}
}
