.mg-product {
	--mg-content-width: 1100px;
	--mg-text: #22252a;
	--mg-muted: #687180;
	--mg-border: #e2e6ec;
	--mg-surface: #f5f7fa;
	--mg-surface-strong: #eef1f5;
	--mg-accent: #4a74ff;
	--mg-accent-soft: #eef3ff;
	--mg-success: #18864b;
	--mg-success-soft: #edf8f1;
	--mg-warning: #a66200;
	--mg-warning-soft: #fff6e7;
	--mg-danger: #c43d3d;
	--mg-danger-soft: #fff0f0;
	--mg-radius: 16px;
	--mg-radius-small: 10px;
	--mg-shadow: 0 10px 30px rgba(20, 28, 45, 0.08);

	box-sizing: border-box;
	width: 100%;
	max-width: var(--mg-content-width);
	margin: 0 auto;
	color: var(--mg-text);
	font-size: 16px;
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.mg-product *,
.mg-product *::before,
.mg-product *::after {
	box-sizing: border-box;
}

.mg-product > :first-child {
	margin-top: 0;
}

.mg-product > :last-child {
	margin-bottom: 0;
}

/* Типографика */

.mg-product h2,
.mg-product h3,
.mg-product h4 {
	color: var(--mg-text);
	font-weight: 700;
	letter-spacing: -0.015em;
	scroll-margin-top: 90px;
}

.mg-product h2 {
	margin: 38px 0 14px;
	font-size: clamp(24px, 2.6vw, 30px);
	line-height: 1.25;
}

.mg-product h3 {
	margin: 26px 0 10px;
	font-size: clamp(18px, 2vw, 21px);
	line-height: 1.35;
}

.mg-product h4 {
	margin: 20px 0 8px;
	font-size: 17px;
	line-height: 1.4;
}

.mg-product p {
	margin: 0 0 16px;
}

.mg-product strong {
	font-weight: 700;
}

.mg-product em {
	color: inherit;
}

.mg-product a {
	color: var(--mg-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.mg-product a:hover {
	text-decoration-thickness: 2px;
}

.mg-product a:focus-visible,
.mg-product button:focus-visible,
.mg-product summary:focus-visible {
	outline: 3px solid rgba(74, 116, 255, 0.32);
	outline-offset: 3px;
}

.mg-product .mg-subtitle {
	margin: -4px 0 18px;
	color: var(--mg-muted);
	font-size: clamp(17px, 2vw, 20px);
	line-height: 1.45;
}

.mg-product .mg-lead {
	margin-bottom: 20px;
	font-size: clamp(17px, 1.8vw, 19px);
	line-height: 1.65;
}

.mg-product .mg-muted {
	color: var(--mg-muted);
}

.mg-product .mg-small {
	font-size: 14px;
	line-height: 1.55;
}

.mg-product .mg-eyebrow {
	display: block;
	margin-bottom: 8px;
	color: var(--mg-accent);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* Разделители и секции */

.mg-product .mg-section {
	margin: 38px 0;
}

.mg-product .mg-section--compact {
	margin: 24px 0;
}

.mg-product .mg-divider {
	height: 1px;
	margin: 34px 0;
	border: 0;
	background: var(--mg-border);
}

/* Списки */

.mg-product ul,
.mg-product ol {
	margin: 10px 0 22px;
}

.mg-product ol {
	padding-left: 24px;
}

.mg-product li {
	margin: 7px 0;
}

/* Обычный маркированный список */

.mg-product ul:not(.mg-list--plain):not(.mg-list--check) {
	padding-left: 0;
	list-style: none;
}

.mg-product ul:not(.mg-list--plain):not(.mg-list--check) > li {
	position: relative;
	padding-left: 25px;
}

.mg-product ul:not(.mg-list--plain):not(.mg-list--check) > li::before {
	position: absolute;
	top: 0.7em;
	left: 5px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mg-accent);
	content: "";
}

/* Компактный список */

.mg-product .mg-list--compact li {
	margin: 4px 0;
}

/* Список без маркеров */

.mg-product .mg-list--plain {
	padding-left: 0;
	list-style: none;
}

/* Список с галочками */

.mg-product .mg-list--check {
	padding-left: 0;
	list-style: none;
}

.mg-product .mg-list--check > li {
	position: relative;
	padding-left: 31px;
}

.mg-product .mg-list--check > li::before {
	position: absolute;
	top: 0.15em;
	left: 0;
	width: 21px;
	height: 21px;
	border-radius: 50%;
	color: #fff;
	background: var(--mg-success);
	content: "✓";
	font-size: 13px;
	font-weight: 800;
	line-height: 21px;
	text-align: center;
}

/* Список с крестиками */

.mg-product .mg-list--cross > li::before {
	background: var(--mg-danger);
	content: "×";
	font-size: 16px;
	line-height: 20px;
}

.mg-product .mg-list--compact li {
	margin: 3px 0;
}

.mg-product .mg-list--plain {
	padding-left: 0;
	list-style: none;
}

.mg-product .mg-list--check {
	padding-left: 0;
	list-style: none;
}

.mg-product .mg-list--check li {
	position: relative;
	padding-left: 28px;
}

.mg-product .mg-list--check li::before {
	position: absolute;
	top: 0.15em;
	left: 0;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	color: #fff;
	background: var(--mg-success);
	content: "✓";
	font-size: 12px;
	font-weight: 800;
	line-height: 19px;
	text-align: center;
}

.mg-product .mg-list--cross li::before {
	background: var(--mg-danger);
	content: "×";
	font-size: 15px;
	line-height: 18px;
}

/* Изображения */

.mg-product .mg-media {
	width: 100%;
	margin: 28px auto;
	text-align: center;
}

.mg-product .mg-media a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.mg-product .mg-media img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border: 0;
	border-radius: var(--mg-radius);
}

.mg-product .mg-media--compact {
	max-width: 820px;
}

.mg-product .mg-media--narrow {
	max-width: 620px;
}

.mg-product .mg-media--original img {
	width: auto;
	max-width: 100%;
}

.mg-product .mg-media--square img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.mg-product .mg-media--frame {
	padding: 10px;
	border: 1px solid var(--mg-border);
	border-radius: calc(var(--mg-radius) + 4px);
	background: #fff;
	box-shadow: var(--mg-shadow);
}

.mg-product .mg-media--no-radius img {
	border-radius: 0;
}

.mg-product .mg-media__caption,
.mg-product figcaption {
	margin-top: 9px;
	color: var(--mg-muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

/* Несколько изображений */

.mg-product .mg-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 28px 0;
}

.mg-product .mg-gallery .mg-media {
	margin: 0;
}

/* Видео и встраиваемый контент */

.mg-product .mg-video,
.mg-product .mg-embed {
	position: relative;
	width: 100%;
	margin: 28px auto;
	overflow: hidden;
	border-radius: var(--mg-radius);
	background: #000;
}

.mg-product .mg-video video,
.mg-product .mg-embed iframe {
	display: block;
	width: 100%;
	height: auto;
	border: 0;
}

.mg-product .mg-embed {
	aspect-ratio: 16 / 9;
}

.mg-product .mg-embed iframe {
	height: 100%;
}

/* Примечания и сообщения */

.mg-product .mg-note {
	margin: 20px 0;
	padding: 15px 18px;
	border: 1px solid var(--mg-border);
	border-left: 4px solid var(--mg-accent);
	border-radius: var(--mg-radius-small);
	background: var(--mg-surface);
}

.mg-product .mg-note > :last-child {
	margin-bottom: 0;
}

.mg-product .mg-note--info {
	border-left-color: var(--mg-accent);
	background: var(--mg-accent-soft);
}

.mg-product .mg-note--success {
	border-left-color: var(--mg-success);
	background: var(--mg-success-soft);
}

.mg-product .mg-note--warning {
	border-left-color: var(--mg-warning);
	background: var(--mg-warning-soft);
}

.mg-product .mg-note--danger {
	border-left-color: var(--mg-danger);
	background: var(--mg-danger-soft);
}

.mg-product .mg-note__title {
	display: block;
	margin-bottom: 3px;
	font-weight: 700;
}

/* Бейджи */

.mg-product .mg-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 20px;
}

.mg-product .mg-badge {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 5px 11px;
	border: 1px solid var(--mg-border);
	border-radius: 999px;
	color: var(--mg-text);
	background: var(--mg-surface);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.mg-product .mg-badge--accent {
	border-color: transparent;
	color: #fff;
	background: var(--mg-accent);
}

.mg-product .mg-badge--success {
	border-color: transparent;
	color: #fff;
	background: var(--mg-success);
}

.mg-product .mg-badge--warning {
	border-color: transparent;
	color: #fff;
	background: var(--mg-warning);
}

.mg-product .mg-badge--danger {
	border-color: transparent;
	color: #fff;
	background: var(--mg-danger);
}

/* Сетки и карточки */

.mg-product .mg-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 24px 0;
}

.mg-product .mg-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mg-product .mg-grid--auto {
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.mg-product .mg-card {
	padding: 20px;
	border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius);
	background: #fff;
}

.mg-product .mg-card--soft {
	border-color: transparent;
	background: var(--mg-surface);
}

.mg-product .mg-card--shadow {
	border-color: transparent;
	box-shadow: var(--mg-shadow);
}

.mg-product .mg-card__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
}

.mg-product .mg-card > :last-child {
	margin-bottom: 0;
}

/* Двухколоночный блок: текст + изображение */

.mg-product .mg-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
	gap: 28px;
	align-items: center;
	margin: 32px 0;
}

.mg-product .mg-split--reverse .mg-split__media {
	order: -1;
}

.mg-product .mg-split .mg-media {
	margin: 0;
}

/* Статистика и ключевые цифры */

.mg-product .mg-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 24px 0;
}

.mg-product .mg-stat {
	padding: 18px;
	border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius);
	background: var(--mg-surface);
	text-align: center;
}

.mg-product .mg-stat__value {
	display: block;
	margin-bottom: 3px;
	font-size: clamp(24px, 4vw, 34px);
	font-weight: 800;
	line-height: 1.1;
}

.mg-product .mg-stat__label {
	display: block;
	color: var(--mg-muted);
	font-size: 13px;
	line-height: 1.4;
}

/* Таблицы */

.mg-product .mg-table {
	width: 100%;
	margin: 24px 0;
	overflow-x: auto;
	border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius-small);
	background: #fff;
	-webkit-overflow-scrolling: touch;
}

.mg-product .mg-table table {
	width: 100%;
	min-width: 560px;
	border: 0;
	border-collapse: collapse;
}

.mg-product .mg-table th,
.mg-product .mg-table td {
	padding: 11px 13px;
	border-right: 1px solid var(--mg-border);
	border-bottom: 1px solid var(--mg-border);
	text-align: left;
	vertical-align: top;
}

.mg-product .mg-table tr:last-child > * {
	border-bottom: 0;
}

.mg-product .mg-table tr > *:last-child {
	border-right: 0;
}

.mg-product .mg-table thead th {
	background: var(--mg-surface-strong);
	font-weight: 700;
}

.mg-product .mg-table tbody th {
	width: 34%;
	background: var(--mg-surface);
	font-weight: 700;
}

.mg-product .mg-table--specs tbody td:first-child {
	width: 34%;
	background: var(--mg-surface);
	font-weight: 700;
}

.mg-product .mg-table--striped tbody tr:nth-child(even) {
	background: var(--mg-surface);
}

.mg-product .mg-table .mg-row--highlight {
	background: var(--mg-accent-soft);
}

.mg-product .mg-table .mg-cell--best {
	color: var(--mg-success);
	font-weight: 800;
}

.mg-product .mg-table__note {
	margin: -12px 0 24px;
	color: var(--mg-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* Характеристики без таблицы */

.mg-product .mg-specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 24px;
	margin: 24px 0;
	border-top: 1px solid var(--mg-border);
}

.mg-product .mg-spec {
	display: grid;
	grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--mg-border);
}

.mg-product .mg-spec__name {
	color: var(--mg-muted);
	font-weight: 600;
}

.mg-product .mg-spec__value {
	font-weight: 600;
}

/* Этапы */

.mg-product .mg-steps {
	margin: 24px 0;
	padding: 0;
	counter-reset: mg-step;
	list-style: none;
}

.mg-product .mg-step {
	position: relative;
	margin: 0;
	padding: 0 0 24px 52px;
	counter-increment: mg-step;
}

.mg-product .mg-step::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #fff;
	background: var(--mg-accent);
	content: counter(mg-step);
	font-weight: 800;
	line-height: 34px;
	text-align: center;
}

.mg-product .mg-step:not(:last-child)::after {
	position: absolute;
	top: 38px;
	bottom: 4px;
	left: 16px;
	width: 2px;
	background: var(--mg-border);
	content: "";
}

.mg-product .mg-step__title {
	display: block;
	margin-bottom: 4px;
	font-weight: 700;
}

/* FAQ */

.mg-product .mg-faq {
	margin: 22px 0;
	border-top: 1px solid var(--mg-border);
}

.mg-product .mg-faq details {
	border-bottom: 1px solid var(--mg-border);
}

.mg-product .mg-faq summary {
	position: relative;
	padding: 17px 42px 17px 0;
	cursor: pointer;
	font-weight: 700;
	line-height: 1.4;
	list-style: none;
}

.mg-product .mg-faq summary::-webkit-details-marker {
	display: none;
}

.mg-product .mg-faq summary::after {
	position: absolute;
	top: 50%;
	right: 4px;
	content: "+";
	font-size: 25px;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-50%);
}

.mg-product .mg-faq details[open] summary::after {
	content: "−";
}

.mg-product .mg-faq__answer {
	padding: 0 34px 17px 0;
	color: var(--mg-muted);
}

.mg-product .mg-faq__answer > :last-child {
	margin-bottom: 0;
}

/* Цитаты */

.mg-product blockquote,
.mg-product .mg-quote {
	margin: 24px 0;
	padding: 18px 20px;
	border-left: 4px solid var(--mg-accent);
	border-radius: 0 var(--mg-radius-small) var(--mg-radius-small) 0;
	background: var(--mg-surface);
	font-size: 17px;
}

.mg-product blockquote > :last-child,
.mg-product .mg-quote > :last-child {
	margin-bottom: 0;
}

/* Состояние товара */

.mg-product .mg-condition {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	margin: 22px 0;
	padding: 16px 18px;
	border: 1px solid var(--mg-border);
	border-radius: var(--mg-radius);
	background: var(--mg-surface);
}

.mg-product .mg-condition__label {
	padding: 5px 9px;
	border-radius: 7px;
	color: #fff;
	background: var(--mg-accent);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
}

.mg-product .mg-condition--used .mg-condition__label {
	background: var(--mg-warning);
}

.mg-product .mg-condition--refurbished .mg-condition__label {
	background: var(--mg-success);
}

/* Кнопки и ссылки-действия */

.mg-product .mg-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 22px 0;
}

.mg-product .mg-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 9px 16px;
	border: 1px solid var(--mg-accent);
	border-radius: 10px;
	color: #fff;
	background: var(--mg-accent);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.mg-product .mg-button:hover {
	color: #fff;
	filter: brightness(0.94);
	text-decoration: none;
}

.mg-product .mg-button--secondary {
	color: var(--mg-text);
	border-color: var(--mg-border);
	background: #fff;
}

.mg-product .mg-button--secondary:hover {
	color: var(--mg-text);
	background: var(--mg-surface);
}

/* Служебные модификаторы */

.mg-product .mg-align-center {
	text-align: center;
}

.mg-product .mg-align-left {
	text-align: left;
}

.mg-product .mg-no-margin {
	margin: 0;
}

.mg-product .mg-hide-desktop {
	display: none;
}

/* Адаптивность */

@media (max-width: 900px) {
	.mg-product .mg-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mg-product .mg-split {
		grid-template-columns: 1fr;
	}

	.mg-product .mg-split--reverse .mg-split__media {
		order: 0;
	}

	.mg-product .mg-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mg-product .mg-specs {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.mg-product {
		font-size: 15px;
		line-height: 1.62;
	}

	.mg-product h2 {
		margin-top: 32px;
	}

	.mg-product h3 {
		margin-top: 22px;
	}

	.mg-product .mg-grid,
	.mg-product .mg-grid--3,
	.mg-product .mg-gallery {
		grid-template-columns: 1fr;
	}

	.mg-product .mg-stats {
		grid-template-columns: 1fr;
	}

	.mg-product .mg-media,
	.mg-product .mg-video,
	.mg-product .mg-embed {
		margin: 22px auto;
	}

	.mg-product .mg-media img,
	.mg-product .mg-video,
	.mg-product .mg-embed {
		border-radius: 12px;
	}

	.mg-product .mg-table th,
	.mg-product .mg-table td {
		padding: 9px 10px;
	}

	.mg-product .mg-card {
		padding: 17px;
	}

	.mg-product .mg-condition {
		grid-template-columns: 1fr;
	}

	.mg-product .mg-button {
		width: 100%;
	}

	.mg-product .mg-hide-mobile {
		display: none;
	}

	.mg-product .mg-hide-desktop {
		display: initial;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mg-product *,
	.mg-product *::before,
	.mg-product *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
