/*
 * Производители: индекс и страница производителя.
 */

.nd-mf-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	background: var(--nd-surface);
	border-radius: var(--nd-radius-card);
	overflow: hidden;
}

.nd-mf-stat {
	padding: 16px 20px;
	border-left: 1px solid var(--nd-line);
}

.nd-mf-stat:first-child {
	border-left: 0;
}

.nd-mf-stat strong {
	display: block;
	font-size: 26px;
	line-height: 1.15;
	font-weight: 700;
	color: var(--nd-text);
}

.nd-mf-stat span {
	font-size: 13px;
	color: var(--nd-text-2);
}

.nd-mf-section,
.nd-mf-group,
.nd-mf-desc {
	background: var(--nd-surface);
	border-radius: var(--nd-radius-card);
	padding: 20px 22px;
}

.nd-mf-section {
	display: grid;
	gap: 14px;
}

.nd-mf-h2 {
	font-size: 20px;
	line-height: 1.25;
	font-weight: 700;
	margin: 0;
}

.nd-mf-h3 {
	font-size: 15px;
	font-weight: 700;
	margin: 6px 0 0;
	color: var(--nd-text-2);
}

.nd-mf-desc {
	color: var(--nd-text);
	line-height: 1.55;
}

.nd-mf-desc > :first-child { margin-top: 0; }
.nd-mf-desc > :last-child { margin-bottom: 0; }

.nd-mf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nd-mf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: var(--nd-radius-pill);
	border: 1px solid var(--nd-line-2);
	background: #F4F5F7;
	color: var(--nd-text);
	font-size: 14px;
	text-decoration: none;
	transition: border-color .15s, background .15s;
}

.nd-mf-chip:hover {
	border-color: var(--nd-accent);
	background: var(--nd-surface);
}

.nd-mf-chip span {
	color: var(--nd-text-2);
	font-size: 12px;
}

/* Список препаратов уже из карточек — секцию не оборачиваем в белое второй раз. */
.nd-mf-section#treatments {
	background: transparent;
	padding: 0;
}

.nd-mf-section#treatments .nd-trs-form {
	margin: 0;
}

.nd-mf-reviews {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
}

.nd-mf-reviews li {
	padding: 10px 0;
	border-bottom: 1px solid var(--nd-line);
}

.nd-mf-reviews li:last-child {
	border-bottom: 0;
}

.nd-mf-letters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	background: var(--nd-surface);
	border-radius: var(--nd-radius-card);
	padding: 14px 16px;
	position: sticky;
	top: 64px;
	z-index: 2;
}

.nd-mf-letters a {
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: #F4F5F7;
	color: var(--nd-text);
	font-weight: 600;
	text-decoration: none;
}

.nd-mf-letters a:hover {
	background: var(--nd-accent);
	color: #fff;
}

.nd-mf-group {
	scroll-margin-top: 140px;
}

.nd-mf-letter {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 10px;
}

.nd-mf-list {
	list-style: none;
	padding: 0;
	margin: 0;
	columns: 3 240px;
	column-gap: 28px;
}

.nd-mf-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--nd-line);
	break-inside: avoid;
}

.nd-mf-list a {
	color: var(--nd-text);
	text-decoration: none;
}

.nd-mf-list a:hover {
	color: var(--nd-accent);
}

.nd-mf-list span {
	flex: none;
	color: var(--nd-text-2);
	font-size: 13px;
}

@media (max-width: 640px) {
	.nd-mf-section,
	.nd-mf-group,
	.nd-mf-desc {
		padding: 16px;
	}
	.nd-mf-stat {
		border-left: 0;
		border-top: 1px solid var(--nd-line);
	}
	.nd-mf-stats {
		grid-template-columns: 1fr 1fr;
	}
	.nd-mf-stat:nth-child(-n+2) {
		border-top: 0;
	}
	.nd-mf-stat:nth-child(even) {
		border-left: 1px solid var(--nd-line);
	}
	.nd-mf-list {
		columns: 1;
	}
}

.nd-mf-chip.is-active { background: var(--nd-accent); border-color: var(--nd-accent); color: #fff; }
.nd-mf-chip.is-active span { color: rgba(255,255,255,.8); }


.nd-mf-filterable { display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: opacity .15s; }
.nd-mf-filterable.is-loading { opacity: .5; pointer-events: none; }
.nd-mf-pills { margin: 0; }
.nd-mf-empty-reset { margin: 0; text-align: center; }
.nd-mf-empty-reset a { color: var(--nd-accent); font-weight: 600; }


.nd-mf-chip.is-empty { opacity: .45; cursor: default; }
.nd-mf-chip.is-empty:hover { border-color: var(--nd-line-2); background: #F4F5F7; }
.nd-trs-types label:has(input:disabled) { opacity: .45; cursor: default; }


/* Партнёрская карточка производителя: цвета партнёра в --mfp-*, задаются inline из inc/portal-mf-partners.php. */
.nd-mfp-hero {
	position: relative;
	overflow: hidden;
	border-radius: var(--nd-radius-card);
	padding: 22px 24px 0;
	color: #fff;
	background:
		radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--mfp-accent) 85%, transparent) 0%, transparent 55%),
		linear-gradient(135deg, var(--mfp-primary) 0%, color-mix(in srgb, var(--mfp-primary) 70%, #000) 100%);
}

.nd-mfp-hero-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.nd-mfp-ad {
	font-size: 12px;
	letter-spacing: .02em;
	opacity: .8;
}

.nd-mfp-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .3);
	font-size: 13px;
	font-weight: 600;
}

.nd-mfp-hero-main {
	display: flex;
	gap: 24px;
	align-items: center;
	padding: 22px 0 26px;
}

.nd-mfp-logo {
	flex: 0 0 auto;
	width: 260px;
	height: 104px;
	border-radius: 20px;
	background: #fff;
	display: grid;
	place-items: center;
	padding: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.nd-mfp-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.nd-mfp-kicker {
	margin: 0 0 4px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .8;
}

.nd-mfp-h1 {
	margin: 0;
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.1;
	font-weight: 800;
}

.nd-mfp-tagline {
	margin: 10px 0 0;
	max-width: 60ch;
	font-size: 16px;
	line-height: 1.5;
	opacity: .95;
}

.nd-mfp-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.nd-mfp-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: transform .15s ease, background-color .15s ease;
}

.nd-mfp-btn:hover {
	transform: translateY(-1px);
}

.nd-mfp-btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.nd-mfp-btn--primary,
.nd-mfp-btn--light {
	background: #fff;
	color: var(--mfp-primary);
}

.nd-mfp-btn--ghost {
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .45);
}

.nd-mfp-btn--ghost:hover {
	background: rgba(255, 255, 255, .12);
}

.nd-mfp-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	margin: 0 -24px;
	background: rgba(0, 0, 0, .18);
}

.nd-mfp-fact {
	padding: 14px 24px;
	border-left: 1px solid rgba(255, 255, 255, .14);
}

.nd-mfp-fact:first-child {
	border-left: 0;
}

.nd-mfp-fact dt {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.15;
}

.nd-mfp-fact dd {
	margin: 2px 0 0;
	font-size: 13px;
	opacity: .85;
}

.nd-mfp-dir-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nd-mfp-dir-list li {
	padding: 8px 14px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--mfp-primary) 10%, var(--nd-surface));
	color: var(--mfp-primary);
	font-weight: 600;
	font-size: 14px;
}

.nd-mfp .nd-mf-chip.is-active {
	background: var(--mfp-primary);
	border-color: var(--mfp-primary);
	color: #fff;
}

.nd-mfp-about p {
	margin: 0;
	line-height: 1.6;
	color: var(--nd-text);
}

.nd-mfp-efirs {
	display: grid;
	gap: 10px;
}

.nd-mfp-efir {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid var(--nd-line);
	text-decoration: none;
	color: var(--nd-text);
	transition: border-color .15s ease;
}

.nd-mfp-efir:hover {
	border-color: var(--mfp-accent);
}

.nd-mfp-efir-play {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--mfp-accent);
	color: #fff;
}

.nd-mfp-efir-text {
	display: grid;
	gap: 2px;
}

.nd-mfp-efir-text span {
	font-size: 13px;
	color: var(--nd-text-2);
}

.nd-mfp-cta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 22px 24px;
	border-radius: var(--nd-radius-card);
	background: linear-gradient(135deg, var(--mfp-primary), var(--mfp-accent));
	color: #fff;
}

.nd-mfp-cta-h {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
}

.nd-mfp-cta p {
	margin: 4px 0 0;
	font-size: 14px;
	opacity: .9;
}

@media (max-width: 640px) {
	.nd-mfp-hero {
		padding: 18px 16px 0;
	}

	.nd-mfp-hero-main {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.nd-mfp-logo {
		width: 220px;
		height: 80px;
		padding: 12px;
		border-radius: 18px;
	}

	.nd-mfp-facts {
		margin: 0 -16px;
		grid-template-columns: 1fr 1fr;
	}

	.nd-mfp-fact {
		padding: 12px 16px;
	}

	.nd-mfp-fact:nth-child(odd) {
		border-left: 0;
	}

	.nd-mfp-btn {
		flex: 1 1 100%;
		justify-content: center;
	}
}