/* ============================================================
   MLFH Product Spotlight - frontend styles
   - Container queries so the layout responds to the spotlight's
     actual width, not just the viewport. This survives themes
     with unusual viewport meta tags or container wrappers.
   - Higher-specificity selectors and resets so the design isn't
     blown apart by theme h3/h4/li overrides.
   ============================================================ */

.mlfh-ps {
	--mlfh-ps-bg: #fdfaf5;
	--mlfh-ps-border: #e8e2d3;
	--mlfh-ps-accent: #8b6f47;
	--mlfh-ps-button: #1f1d1a;
	--mlfh-ps-button-hover: #3a3733;
	--mlfh-ps-pro: #4a7c59;
	--mlfh-ps-con: #b85c4a;
	--mlfh-ps-text: #2d2a26;
	--mlfh-ps-muted: #5a544d;

	display: block;
	width: 100%;
	max-width: 100%;
	padding: 36px;
	margin: 40px 0;
	background: var(--mlfh-ps-bg);
	border: 1px solid var(--mlfh-ps-border);
	border-radius: 4px;
	position: relative;
	font-family: inherit;
	color: var(--mlfh-ps-text);
	box-sizing: border-box;
	container-type: inline-size;
	container-name: ps;
}

.mlfh-ps *,
.mlfh-ps *::before,
.mlfh-ps *::after {
	box-sizing: border-box;
}

/* Defensive resets - undo common theme h3/h4/p/ul/li styling that
   would clash with our design. */
.mlfh-ps p {
	margin: 0;
}
.mlfh-ps ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.mlfh-ps li {
	margin: 0;
	padding: 0;
}
.mlfh-ps h3,
.mlfh-ps h4 {
	margin: 0;
	padding: 0;
	font-family: inherit;
	line-height: 1.25;
}

/* Corner accents */
.mlfh-ps::before {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	width: 32px;
	height: 32px;
	border-top: 2px solid var(--mlfh-ps-accent);
	border-left: 2px solid var(--mlfh-ps-accent);
	pointer-events: none;
}
.mlfh-ps::after {
	content: "";
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 32px;
	height: 32px;
	border-bottom: 2px solid var(--mlfh-ps-accent);
	border-right: 2px solid var(--mlfh-ps-accent);
	pointer-events: none;
}

/* ----- Top row: image + intro ----- */

.mlfh-ps .mlfh-ps__top {
	display: grid;
	grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
	gap: 32px;
	margin-bottom: 28px;
	align-items: start;
}

.mlfh-ps .mlfh-ps__media {
	display: block;
	min-width: 0;
}

.mlfh-ps .mlfh-ps__media a {
	display: block;
	overflow: hidden;
	border-radius: 2px;
	background: #fff;
	border: 1px solid var(--mlfh-ps-border);
}

.mlfh-ps .mlfh-ps__image {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.mlfh-ps .mlfh-ps__media a:hover .mlfh-ps__image {
	transform: scale(1.04);
}

.mlfh-ps .mlfh-ps__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.mlfh-ps .mlfh-ps__eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mlfh-ps-accent);
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--mlfh-ps-border);
}

.mlfh-ps .mlfh-ps__title {
	font-size: 1.4rem;
	line-height: 1.25;
	margin: 0 0 14px;
	font-weight: 700;
	color: var(--mlfh-ps-text);
}

.mlfh-ps .mlfh-ps__title a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.3s ease;
}

.mlfh-ps .mlfh-ps__title a:hover {
	background-size: 100% 1px;
}

.mlfh-ps .mlfh-ps__description {
	margin: 0;
	line-height: 1.6;
	color: var(--mlfh-ps-muted);
	font-size: 0.95rem;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.mlfh-ps .mlfh-ps__description p {
	margin: 0 0 0.8em;
}
.mlfh-ps .mlfh-ps__description p:last-child {
	margin-bottom: 0;
}

/* ----- Pros / Cons (full-width below) ----- */

.mlfh-ps .mlfh-ps__procons {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	margin: 0 0 28px;
	padding: 24px 26px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid var(--mlfh-ps-border);
	border-radius: 2px;
}

.mlfh-ps .mlfh-ps__list {
	min-width: 0;
}

.mlfh-ps .mlfh-ps__list-title {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--mlfh-ps-border);
	line-height: 1.4;
}

.mlfh-ps .mlfh-ps__list--pros .mlfh-ps__list-title { color: var(--mlfh-ps-pro); }
.mlfh-ps .mlfh-ps__list--cons .mlfh-ps__list-title { color: var(--mlfh-ps-con); }

.mlfh-ps .mlfh-ps__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mlfh-ps .mlfh-ps__list li {
	padding: 0 0 0 24px;
	position: relative;
	margin: 0 0 10px;
	line-height: 1.55;
	font-size: 0.92rem;
	color: var(--mlfh-ps-text);
	overflow-wrap: break-word;
	word-wrap: break-word;
	list-style: none;
}

.mlfh-ps .mlfh-ps__list li:last-child { margin-bottom: 0; }

.mlfh-ps .mlfh-ps__list--pros li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 13px;
	height: 6px;
	border-left: 2px solid var(--mlfh-ps-pro);
	border-bottom: 2px solid var(--mlfh-ps-pro);
	transform: rotate(-45deg);
}

.mlfh-ps .mlfh-ps__list--cons li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.4em;
	width: 11px;
	height: 11px;
	background: linear-gradient(45deg, transparent 45%, var(--mlfh-ps-con) 45%, var(--mlfh-ps-con) 55%, transparent 55%),
	            linear-gradient(-45deg, transparent 45%, var(--mlfh-ps-con) 45%, var(--mlfh-ps-con) 55%, transparent 55%);
}

/* ----- CTA ----- */

.mlfh-ps .mlfh-ps__cta {
	margin: 0;
}

.mlfh-ps .mlfh-ps__button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	background: var(--mlfh-ps-button);
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 2px;
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	border: none;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	font-family: inherit;
	line-height: 1.2;
}

.mlfh-ps .mlfh-ps__button:hover {
	background: var(--mlfh-ps-button-hover);
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	text-decoration: none !important;
}

.mlfh-ps .mlfh-ps__button:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mlfh-ps .mlfh-ps__button:focus-visible {
	outline: 2px solid var(--mlfh-ps-accent);
	outline-offset: 3px;
}

.mlfh-ps .mlfh-ps__arrow {
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.mlfh-ps .mlfh-ps__button:hover .mlfh-ps__arrow {
	transform: translateX(3px);
}

/* ============================================================
   Mobile/narrow: container query first (responds to actual
   spotlight width), with viewport media query as a fallback for
   older browsers.
   ============================================================ */

@container ps (max-width: 600px) {
	.mlfh-ps {
		padding: 24px 20px;
	}
	.mlfh-ps .mlfh-ps__top {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 22px;
	}
	.mlfh-ps .mlfh-ps__media {
		max-width: 280px;
		width: 100%;
		margin: 0 auto;
	}
	.mlfh-ps .mlfh-ps__body {
		align-items: stretch;
	}
	.mlfh-ps .mlfh-ps__procons {
		grid-template-columns: 1fr;
		gap: 22px;
		padding: 20px 22px;
		margin-bottom: 22px;
	}
	.mlfh-ps .mlfh-ps__title {
		font-size: 1.25rem;
	}
	.mlfh-ps .mlfh-ps__button {
		width: 100%;
		justify-content: center;
		padding: 15px 24px;
	}
	.mlfh-ps .mlfh-ps__cta {
		text-align: center;
	}
}

/* Viewport-based fallback for browsers without container query
   support (older Safari, Firefox < 110, etc.). Same rules as above. */
@media (max-width: 740px) {
	.mlfh-ps {
		padding: 24px 20px;
		margin: 32px 0;
	}
	.mlfh-ps .mlfh-ps__top {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 22px;
	}
	.mlfh-ps .mlfh-ps__media {
		max-width: 280px;
		width: 100%;
		margin: 0 auto;
	}
	.mlfh-ps .mlfh-ps__body {
		align-items: stretch;
	}
	.mlfh-ps .mlfh-ps__procons {
		grid-template-columns: 1fr;
		gap: 22px;
		padding: 20px 22px;
		margin-bottom: 22px;
	}
	.mlfh-ps .mlfh-ps__title {
		font-size: 1.25rem;
	}
	.mlfh-ps .mlfh-ps__button {
		width: 100%;
		justify-content: center;
		padding: 15px 24px;
	}
	.mlfh-ps .mlfh-ps__cta {
		text-align: center;
	}
}
