/**
 * Phase 5.9.6.1 — Featured product card hierarchy fix.
 * Scoped to #nds-featured.nds-shelf--premium only.
 */

#nds-featured.nds-shelf--premium {
	padding: 3.5rem 0 3.25rem !important;
	margin: 0;
	background:
		linear-gradient(180deg, #f7f5f1 0%, #faf9f7 38%, #ffffff 100%);
	border: 0;
	border-top: 1px solid rgba(7, 19, 31, 0.04);
	color: inherit;
}

#nds-featured.nds-shelf--premium .nds-shelf__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem 2rem;
	margin-bottom: 2.15rem;
	padding-bottom: 0;
	border: 0;
}

#nds-featured.nds-shelf--premium .nds-shelf__intro {
	max-width: 38rem;
}

#nds-featured.nds-shelf--premium .nds-shelf__eyebrow {
	margin: 0 0 0.45rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nds-market-teal, #0b5f69);
	opacity: 1;
}

#nds-featured.nds-shelf--premium .nds-shelf__title {
	margin: 0 0 0.5rem;
	font-family: var(--nds-font-display);
	font-size: clamp(1.7rem, 3vw, 2.35rem);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.12;
	color: var(--nds-market-ink, #07131f);
}

#nds-featured.nds-shelf--premium .nds-shelf__desc {
	margin: 0;
	max-width: 42ch;
	font-size: 1.02rem;
	line-height: 1.55;
	color: var(--nds-color-muted, #5a6570);
	opacity: 1;
}

#nds-featured.nds-shelf--premium .nds-shelf__all {
	flex-shrink: 0;
	align-self: flex-end;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--nds-market-teal, #0b5f69);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 0.1rem;
	opacity: 1;
	transition: border-color 0.25s ease, color 0.25s ease;
}

#nds-featured.nds-shelf--premium .nds-shelf__all:hover,
#nds-featured.nds-shelf--premium .nds-shelf__all:focus-visible {
	color: var(--nds-market-ink, #07131f);
	border-bottom-color: currentColor;
}

#nds-featured.nds-shelf--premium .nds-shelf__all:focus-visible {
	outline: 2px solid var(--nds-market-teal, #0b5f69);
	outline-offset: 4px;
}

#nds-featured.nds-shelf--premium .nds-shelf__rail {
	display: flex;
	align-items: stretch;
	gap: 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0.25rem;
	padding: 0.35rem 0.15rem 1.25rem;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(11, 95, 105, 0.35) transparent;
}

#nds-featured.nds-shelf--premium .nds-shelf__item {
	flex: 0 0 auto;
	width: min(15.25rem, 48vw);
	scroll-snap-align: start;
}

/* Lead card: restrained distinction, not dramatic size jump */
#nds-featured.nds-shelf--premium .nds-shelf__item--lead {
	width: min(15.75rem, 52vw);
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	overflow: hidden;
	border-radius: 0.75rem;
	border: 1px solid rgba(7, 19, 31, 0.08);
	background: #fff;
	box-shadow:
		0 1px 2px rgba(7, 19, 31, 0.03),
		0 8px 22px rgba(7, 19, 31, 0.05);
	transition:
		transform 0.35s var(--nds-ease, cubic-bezier(0.22, 1, 0.36, 1)),
		box-shadow 0.35s var(--nds-ease, cubic-bezier(0.22, 1, 0.36, 1)),
		border-color 0.3s ease;
}

/* Featured Pick: accent frame + editorial label + slightly richer surface */
#nds-featured.nds-shelf--premium .nds-shelf__item--lead .nds-product-card--premium-shelf,
#nds-featured.nds-shelf--premium .nds-product-card--featured-pick {
	background: linear-gradient(180deg, #fbfaf8 0%, #ffffff 48%);
	border-color: rgba(11, 95, 105, 0.28);
	box-shadow:
		0 1px 2px rgba(7, 19, 31, 0.03),
		0 10px 26px rgba(11, 95, 105, 0.08);
}

#nds-featured.nds-shelf--premium .nds-product-card__pick {
	position: absolute;
	top: 0.85rem;
	left: 0.85rem;
	z-index: 3;
	padding: 0.28rem 0.55rem;
	border-radius: 0.3rem;
	background: rgba(255, 255, 255, 0.94);
	color: var(--nds-market-teal, #0b5f69);
	font-size: 0.65rem;
	font-weight: 750;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(7, 19, 31, 0.1);
	pointer-events: none;
}

/* Inset cover: preserve portrait ratio, reduce dominance, more room for info */
#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__media {
	display: block;
	position: relative;
	margin: 0.85rem 0.85rem 0;
	border-radius: 0.5rem;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background:
		linear-gradient(160deg, #e8eef1 0%, #d5dee4 100%);
	box-shadow: inset 0 0 0 1px rgba(7, 19, 31, 0.04);
}

#nds-featured.nds-shelf--premium .nds-shelf__item--lead .nds-product-card__media {
	margin: 0.95rem 0.95rem 0;
	box-shadow:
		inset 0 0 0 1px rgba(11, 95, 105, 0.08),
		0 0 0 1px rgba(11, 95, 105, 0.12);
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(180deg, transparent 75%, rgba(7, 19, 31, 0.05) 100%);
	opacity: 0.65;
	transition: opacity 0.3s ease;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transform: scale(1.01);
	transition: transform 0.5s var(--nds-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 0.35rem;
	padding: 0.95rem 1.05rem 1.1rem;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.2rem;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-badge {
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.22rem 0.45rem;
	border-radius: 0.28rem;
	background: rgba(11, 95, 105, 0.07);
	color: var(--nds-market-teal, #0b5f69);
	border: 0;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-badge--free {
	background: rgba(42, 111, 74, 0.1);
	color: var(--nds-color-success, #2a6f4a);
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__title {
	margin: 0;
	font-family: var(--nds-font-display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.32;
	min-height: 2.65em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

#nds-featured.nds-shelf--premium .nds-shelf__item--lead .nds-product-card__title {
	font-size: 1.24rem;
	font-weight: 700;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__title a {
	color: var(--nds-market-ink, #07131f);
	text-decoration: none;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__title a:hover,
#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__title a:focus-visible {
	color: var(--nds-market-teal, #0b5f69);
}

/* Low-value edition meta removed in PHP for premium; keep rule inert if present */
#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__meta {
	display: none;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__price {
	margin: 0.55rem 0 0.65rem;
	padding-top: 0.2rem;
	font-size: 1.18rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--nds-market-ink, #07131f);
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__price del {
	font-size: 0.85em;
	font-weight: 600;
	opacity: 0.55;
	margin-right: 0.35rem;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__price ins {
	text-decoration: none;
	font-weight: 800;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.45rem;
	margin-top: auto;
	padding-top: 0.15rem;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn {
	width: 100%;
	justify-content: center;
	min-height: 2.35rem;
	padding: 0.55rem 0.85rem;
	font-size: 0.86rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	border-radius: 0.45rem;
	white-space: nowrap;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn--primary {
	background: var(--nds-market-teal, #0b5f69);
	border-color: var(--nds-market-teal, #0b5f69);
	color: #fff;
	box-shadow: 0 4px 12px rgba(11, 95, 105, 0.16);
	transition:
		background 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.25s ease;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn--primary:hover,
#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn--primary:focus-visible {
	background: #094e56;
	border-color: #094e56;
	box-shadow: 0 6px 16px rgba(11, 95, 105, 0.22);
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn--primary:active {
	background: #083f46;
	box-shadow: 0 2px 8px rgba(11, 95, 105, 0.18);
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__details-link {
	display: inline-flex;
	align-self: center;
	margin-top: 0.1rem;
	font-size: 0.82rem;
	font-weight: 650;
	letter-spacing: -0.01em;
	color: var(--nds-market-teal, #0b5f69);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__details-link:hover,
#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__details-link:focus-visible {
	color: var(--nds-market-ink, #07131f);
	border-bottom-color: currentColor;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__details-link:focus-visible {
	outline: 2px solid var(--nds-market-teal, #0b5f69);
	outline-offset: 3px;
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn--secondary,
#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn--ghost {
	display: none;
}

@media (prefers-reduced-motion: no-preference) {
	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf:hover,
	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf:focus-within {
		transform: translateY(-5px);
		border-color: rgba(11, 95, 105, 0.26);
		box-shadow:
			0 18px 40px rgba(7, 19, 31, 0.11),
			0 6px 14px rgba(11, 95, 105, 0.08);
	}

	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf:hover .nds-product-card__media img,
	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf:focus-within .nds-product-card__media img {
		transform: scale(1.05);
	}

	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf:hover .nds-product-card__media::after,
	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf:focus-within .nds-product-card__media::after {
		opacity: 0.85;
	}
}

#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf:focus-within {
	outline: 2px solid var(--nds-market-teal, #0b5f69);
	outline-offset: 3px;
}

@media (max-width: 1100px) {
	#nds-featured.nds-shelf--premium {
		padding: 3rem 0 2.75rem !important;
	}

	#nds-featured.nds-shelf--premium .nds-shelf__item,
	#nds-featured.nds-shelf--premium .nds-shelf__item--lead {
		width: min(14.75rem, 44vw);
	}

	#nds-featured.nds-shelf--premium .nds-shelf__item--lead {
		width: min(15.25rem, 48vw);
	}
}

@media (max-width: 760px) {
	#nds-featured.nds-shelf--premium {
		padding: 2.35rem 0 2.25rem !important;
	}

	#nds-featured.nds-shelf--premium .nds-shelf__head {
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 1.35rem;
		gap: 0.75rem;
	}

	#nds-featured.nds-shelf--premium .nds-shelf__all {
		align-self: flex-start;
	}

	#nds-featured.nds-shelf--premium .nds-shelf__rail {
		gap: 0.95rem;
		padding: 0.2rem 0.05rem 1.1rem;
		scroll-padding-inline: 0.1rem;
	}

	#nds-featured.nds-shelf--premium .nds-shelf__item,
	#nds-featured.nds-shelf--premium .nds-shelf__item--lead {
		width: min(15.5rem, 72vw);
	}

	#nds-featured.nds-shelf--premium .nds-product-card__pick {
		top: 0.75rem;
		left: 0.75rem;
		font-size: 0.6rem;
		padding: 0.24rem 0.45rem;
	}

	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__media {
		margin: 0.75rem 0.75rem 0;
	}

	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__body {
		padding: 0.85rem 0.95rem 1rem;
	}

	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__title {
		font-size: 1.1rem;
		min-height: 2.55em;
	}

	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__price {
		font-size: 1.12rem;
		margin: 0.45rem 0 0.55rem;
	}

	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__actions .nds-btn {
		min-height: 2.4rem;
		padding: 0.5rem 0.75rem;
		font-size: 0.84rem;
	}
}

@media (max-width: 400px) {
	#nds-featured.nds-shelf--premium .nds-shelf__item,
	#nds-featured.nds-shelf--premium .nds-shelf__item--lead {
		width: min(14.75rem, calc(100% - 2.5rem));
	}
}

@media (prefers-reduced-motion: reduce) {
	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf,
	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-product-card__media img,
	#nds-featured.nds-shelf--premium .nds-product-card--premium-shelf .nds-btn--primary {
		transition: none;
	}
}
