/**
 * PDP Product Description (.nds-po)
 * Universal layout for each product’s real WooCommerce description.
 * Isolated from frozen STEP 1 (.nds-pi).
 */

.nds-po {
	--po-ink: #0b1520;
	--po-soft: color-mix(in srgb, var(--po-ink) 72%, transparent);
	--po-mute: color-mix(in srgb, var(--po-ink) 46%, transparent);
	--po-line: color-mix(in srgb, var(--po-ink) 12%, transparent);
	--po-faint: color-mix(in srgb, var(--po-ink) 7%, transparent);
	--po-teal: #0a5962;
	--po-teal-deep: #063f46;
	--po-paper: #fbfbfc;
	--po-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
	--po-sans: "Figtree", "Segoe UI", system-ui, sans-serif;
	--po-measure: 38.5rem;
	box-sizing: border-box;
	color: var(--po-ink);
	font-family: var(--po-sans);
	-webkit-font-smoothing: antialiased;
	width: 100%;
	overflow-x: clip;
	scroll-margin-top: calc(var(--nds-compact-header-offset, 72px) + 12px);
	padding-block: clamp(44px, 5.5vw, 72px);
	background: linear-gradient(180deg, var(--po-paper) 0%, #ffffff 48%, #ffffff 100%);
	border-top: 1px solid var(--po-faint);
}

.nds-po *,
.nds-po *::before,
.nds-po *::after {
	box-sizing: border-box;
}

.nds-po :focus {
	outline: none;
}

.nds-po :focus-visible {
	outline: 2px solid var(--po-teal);
	outline-offset: 3px;
}

/* Controlled desktop measure — does not stretch on large / 4K screens. */
.nds-po__shell {
	width: min(100%, 1040px);
	margin-inline: auto;
	padding-inline: clamp(20px, 3.5vw, 40px);
}

.nds-po__grid {
	display: grid;
	/* Fixed editorial + reading tracks — no loose 1fr dead space between columns. */
	grid-template-columns: minmax(13rem, 14.75rem) minmax(0, 38.5rem);
	column-gap: clamp(1.5rem, 2.4vw, 2.35rem);
	row-gap: 1.5rem;
	align-items: start;
	justify-content: center;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
}

/* —— Aside —— */
.nds-po__aside {
	position: relative;
	padding-left: 1.15rem;
	padding-top: 0.1rem;
	min-width: 0;
}

.nds-po__aside::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2rem;
	bottom: 0.2rem;
	width: 2px;
	border-radius: 999px;
	background: linear-gradient(
		180deg,
		var(--po-teal) 0%,
		color-mix(in srgb, var(--po-teal) 28%, transparent) 100%
	);
}

.nds-po__eyebrow {
	margin: 0 0 0.55rem;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--po-teal);
	line-height: 1.35;
}

.nds-po__title {
	margin: 0 0 0.85rem;
	max-width: 12.5rem;
	font-family: var(--po-serif);
	font-size: clamp(1.7rem, 2.1vw, 2.15rem);
	font-weight: 560;
	line-height: 1.18;
	letter-spacing: -0.022em;
	text-wrap: balance;
	color: var(--po-ink);
}

.nds-po__rule {
	display: none;
}

.nds-po__signals {
	margin: 0;
	padding: 0.85rem 0 0;
	list-style: none;
	border-top: 1px solid var(--po-line);
	display: grid;
	gap: 0.62rem;
	width: 100%;
	max-width: 14.5rem;
}

.nds-po__signals li {
	display: grid;
	gap: 0.08rem;
	min-width: 0;
}

.nds-po__signals span {
	font-size: 0.69rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--po-mute);
	line-height: 1.3;
}

.nds-po__signals strong {
	font-size: 0.95rem;
	font-weight: 650;
	color: var(--po-ink);
	line-height: 1.32;
	overflow-wrap: anywhere;
}

/* —— Description body (real WooCommerce HTML) —— */
.nds-po__main {
	min-width: 0;
	width: 100%;
	padding-top: 0.15rem;
}

.nds-po__content {
	max-width: var(--po-measure);
	min-width: 0;
	font-size: 1.0625rem;
	line-height: 1.68;
	color: var(--po-soft);
	text-align: start;
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: manual;
}

.nds-po__content > *:first-child {
	margin-top: 0;
}

.nds-po__content > *:last-child {
	margin-bottom: 0;
}

.nds-po__content p,
.nds-po__content > div:not([class]) {
	margin: 0 0 1.05em;
	text-align: start;
}

.nds-po__content p:last-child {
	margin-bottom: 0;
}

.nds-po__content h2,
.nds-po__content h3,
.nds-po__content h4,
.nds-po__content h5,
.nds-po__content h6 {
	margin: 1.45em 0 0.5em;
	max-width: 100%;
	font-family: var(--po-serif);
	font-weight: 560;
	letter-spacing: -0.018em;
	line-height: 1.28;
	color: var(--po-ink);
	text-align: start;
	/* Prefer natural wraps; avoid balance orphans like a lone final word. */
	text-wrap: pretty;
	overflow-wrap: break-word;
}

.nds-po__content h2 {
	font-size: clamp(1.26rem, 1.45vw, 1.42rem);
}

.nds-po__content h3 {
	font-size: clamp(1.14rem, 1.25vw, 1.28rem);
}

.nds-po__content h4,
.nds-po__content h5,
.nds-po__content h6 {
	font-size: clamp(1.05rem, 1.15vw, 1.15rem);
}

.nds-po__content h2 b,
.nds-po__content h2 strong,
.nds-po__content h3 b,
.nds-po__content h3 strong {
	font-weight: 560;
}

.nds-po__content ul,
.nds-po__content ol,
.nds-po__content .nds-po-list {
	margin: 0.15em 0 1.2em;
	padding-left: 1.25rem;
	text-align: start;
}

.nds-po__content ol {
	padding-left: 1.4rem;
}

.nds-po__content li {
	margin: 0 0 0.42em;
	padding-left: 0.2rem;
	color: var(--po-ink);
	line-height: 1.55;
	overflow-wrap: break-word;
}

.nds-po__content li:last-child {
	margin-bottom: 0;
}

.nds-po__content ul > li::marker,
.nds-po__content .nds-po-list > li::marker {
	color: var(--po-teal);
	font-size: 0.85em;
}

.nds-po__content ol > li::marker {
	color: var(--po-teal-deep);
	font-weight: 650;
}

.nds-po__content a {
	color: var(--po-teal-deep);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
	overflow-wrap: anywhere;
}

.nds-po__content a:hover,
.nds-po__content a:focus-visible {
	color: var(--po-teal);
}

.nds-po__content strong,
.nds-po__content b {
	font-weight: 650;
	color: var(--po-ink);
}

.nds-po__content em,
.nds-po__content i {
	font-style: italic;
}

.nds-po__content blockquote {
	margin: 1.25em 0;
	padding: 0.15rem 0 0.15rem 1rem;
	border-left: 2px solid var(--po-teal);
	color: var(--po-ink);
	font-family: var(--po-serif);
	font-style: italic;
}

.nds-po__content img,
.nds-po__content video,
.nds-po__content iframe {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.15em 0;
	border-radius: 0.35rem;
}

.nds-po__content figure {
	margin: 1.15em 0;
	max-width: 100%;
}

.nds-po__content figcaption {
	margin-top: 0.4rem;
	font-size: 0.88rem;
	color: var(--po-mute);
}

.nds-po__content pre,
.nds-po__content code {
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	font-size: 0.92em;
	overflow-wrap: anywhere;
}

.nds-po__content pre {
	max-width: 100%;
	overflow-x: auto;
	padding: 0.85rem 1rem;
	border-radius: 0.45rem;
	background: color-mix(in srgb, var(--po-ink) 4%, #fff);
	border: 1px solid var(--po-faint);
}

.nds-po__content .wp-block-table,
.nds-po__content .table-wrap {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.15em 0;
}

.nds-po__content table {
	width: 100%;
	min-width: 18rem;
	border-collapse: collapse;
	font-size: 0.95em;
	text-align: start;
}

.nds-po__content th,
.nds-po__content td {
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--po-line);
	vertical-align: top;
	overflow-wrap: anywhere;
}

.nds-po__content th {
	background: color-mix(in srgb, var(--po-ink) 4%, #fff);
	font-weight: 650;
	color: var(--po-ink);
}

.nds-po__content hr {
	margin: 1.6em 0;
	border: 0;
	border-top: 1px solid var(--po-faint);
}

/* Mid desktop / large tablet — keep two columns while comfortable. */
@media (max-width: 1100px) and (min-width: 861px) {
	.nds-po__shell {
		width: min(100%, 960px);
	}

	.nds-po__grid {
		grid-template-columns: minmax(12.25rem, 13.5rem) minmax(0, 36rem);
		column-gap: 1.85rem;
	}

	.nds-po__content {
		font-size: 1.05rem;
	}
}

/* Stack before either column compresses. */
@media (max-width: 860px) {
	.nds-po {
		padding-bottom: calc(clamp(40px, 7vw, 56px) + var(--nds-fixed-bottom-offset, 0px));
	}

	.nds-po__shell {
		width: min(100%, 40rem);
	}

	.nds-po__grid {
		grid-template-columns: 1fr;
		width: 100%;
		gap: 1.35rem;
	}

	.nds-po__aside {
		padding-left: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.nds-po__aside::before {
		display: none;
	}

	.nds-po__title {
		max-width: 18rem;
		margin-inline: auto;
		font-size: clamp(1.65rem, 5.5vw, 2rem);
	}

	.nds-po__rule {
		display: block;
		width: min(3.75rem, 26%);
		height: 2px;
		margin: 0 auto 0.95rem;
		border-radius: 999px;
		background: var(--po-teal);
	}

	.nds-po__signals {
		width: min(100%, 18rem);
		max-width: none;
		justify-items: center;
		margin-inline: auto;
		text-align: center;
		padding-top: 0.75rem;
		gap: 0.55rem;
	}

	.nds-po__main,
	.nds-po__content {
		width: 100%;
		max-width: 38.5rem;
		margin-inline: auto;
		text-align: start;
		padding-top: 0;
	}

	.nds-po__content p,
	.nds-po__content li,
	.nds-po__content ul,
	.nds-po__content ol,
	.nds-po__content h2,
	.nds-po__content h3,
	.nds-po__content h4,
	.nds-po__content h5,
	.nds-po__content h6 {
		text-align: start;
	}

}

@media (max-width: 640px) {
	.nds-po {
		padding-block: clamp(36px, 7vw, 52px);
		padding-bottom: calc(clamp(36px, 7vw, 52px) + var(--nds-fixed-bottom-offset, 3.75rem));
	}

	.nds-po__content {
		font-size: clamp(1.015rem, 4vw, 1.0625rem);
		line-height: 1.66;
	}

	.nds-po__content h2 {
		font-size: clamp(1.18rem, 4.6vw, 1.32rem);
		line-height: 1.3;
	}

	.nds-po__content ul,
	.nds-po__content ol,
	.nds-po__content .nds-po-list {
		padding-left: 1.15rem;
	}
}

@media (max-width: 360px) {
	.nds-po__shell {
		padding-inline: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nds-po,
	.nds-po * {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}
