
:root{--mg-green:#85c441;--mg-green-hover:#6eab33;--mg-dark:#0f3f2e;--mg-text:#31453b;--mg-muted:#6b7e74;--mg-soft:#f8fbf5;--mg-soft-green:#eef5e8;--mg-line:#e4ede0;--mg-white:#fff;--mg-shadow:0 18px 44px rgba(15,63,46,.08)}
.single-product .site-main,.single-product #main{padding-top:0!important;padding-bottom:0!important}
.mg-product-page{background:#fff;color:var(--mg-text)}
.mg-product-container{width:min(1240px,calc(100% - 40px));margin:0 auto}
.mg-breadcrumbs{padding:24px 0 22px;font-size:13px;color:var(--mg-muted)}
.mg-breadcrumbs .woocommerce-breadcrumb{margin:0}
.mg-product-hero{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);gap:56px;align-items:start;padding-bottom:64px}
.mg-product-gallery{display:grid;grid-template-columns:82px minmax(0,1fr);gap:16px}
.mg-product-gallery:not(:has(.mg-product-thumbs)){grid-template-columns:minmax(0,1fr)}
.mg-product-thumbs{display:flex;flex-direction:column;gap:12px}
.mg-product-thumb{padding:0;border:2px solid transparent;border-radius:12px;overflow:hidden;background:#fff;cursor:pointer}
.mg-product-thumb.is-active{border-color:var(--mg-green)}
.mg-product-thumb img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain;background:var(--mg-soft)}
.mg-product-main-image{position:relative;display:flex;align-items:center;justify-content:center;min-height:560px;max-height:690px;padding:24px;border:1px solid var(--mg-line);border-radius:24px;overflow:hidden;background:var(--mg-soft);box-shadow:var(--mg-shadow)}
.mg-product-main-image>img{display:block;width:100%;height:100%;max-height:640px;object-fit:contain;object-position:center}
.mg-product-summary{padding-top:14px}
.mg-product-kicker{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}
.mg-stock-badge,.mg-product-category-label{display:inline-flex;align-items:center;min-height:32px;padding:6px 12px;border-radius:999px;font-size:12px;font-weight:800}
.mg-stock-badge{background:var(--mg-soft-green);color:var(--mg-dark)}
.mg-stock-badge:before{content:"";width:8px;height:8px;margin-right:7px;border-radius:50%;background:var(--mg-green)}
.mg-product-category-label{background:#f3f5f2;color:var(--mg-muted)}
.mg-product-title{margin:0 0 20px;color:#102d21;font-size:clamp(36px,4vw,54px);line-height:1.05}
.mg-product-intro{margin-bottom:18px;font-size:17px;line-height:1.65;color:#435a4f}
.mg-product-price{margin:18px 0 26px;color:var(--mg-dark);font-size:32px;font-weight:900}
.mg-product-specs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:24px}
.mg-product-spec{padding:15px 16px;border:1px solid var(--mg-line);border-radius:14px;background:var(--mg-soft)}
.mg-product-spec span{display:block;margin-bottom:5px;color:var(--mg-muted);font-size:12px}
.mg-product-spec strong{display:block;color:var(--mg-dark);font-size:16px}
.mg-stock-note,.mg-wholesale-note{margin-bottom:22px;padding:16px 18px;border-left:4px solid var(--mg-green);border-radius:0 12px 12px 0;background:var(--mg-soft)}
.mg-product-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}
.mg-btn{display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:13px 22px;border-radius:12px;font-weight:800;text-align:center}
.mg-btn--primary{background:var(--mg-green);color:#fff}
.mg-btn--secondary{border:1px solid var(--mg-green);background:#fff;color:var(--mg-dark)}
.mg-product-trust{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;margin:0;padding:22px 0 0;border-top:1px solid var(--mg-line);list-style:none}
.mg-product-trust li{position:relative;padding-left:24px;font-size:14px}
.mg-product-trust li:before{content:"✓";position:absolute;left:0;color:var(--mg-green);font-weight:900}
.mg-section-eyebrow{display:block;margin-bottom:10px;color:var(--mg-green-hover);font-size:12px;font-weight:900;letter-spacing:.14em}
.mg-section-heading{margin-bottom:30px}
.mg-section-heading h2,.mg-product-content h2,.mg-product-request h2{margin:0;color:var(--mg-dark);font-size:clamp(30px,4vw,42px)}
.mg-section-heading p{margin:12px 0 0;color:var(--mg-muted);max-width:760px;line-height:1.6}

/* Отдельный блок видео */
.mg-social-videos{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding:70px max(20px,calc((100vw - 1240px)/2));border-top:1px solid var(--mg-line);background:#fff}
.mg-section-heading--video{display:flex;justify-content:space-between;align-items:end}
.mg-social-video-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.mg-social-video-card{overflow:hidden;border:1px solid var(--mg-line);border-radius:20px;background:#fff;box-shadow:0 14px 36px rgba(15,63,46,.07)}
.mg-social-video-card__media{position:relative;display:block;height:360px;overflow:hidden;background:#eaf0e6}
.mg-social-video-card__media:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.42))}
.mg-social-video-card__media img{width:100%;height:100%;object-fit:cover}
.mg-social-video-card__play{position:absolute;z-index:2;left:50%;top:50%;display:flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:50%;background:rgba(255,255,255,.96);color:var(--mg-green);font-size:25px;box-shadow:0 14px 34px rgba(0,0,0,.22);transform:translate(-50%,-50%)}
.mg-social-video-card__number{position:absolute;z-index:2;left:18px;top:18px;padding:7px 10px;border-radius:999px;background:var(--mg-green);color:#fff;font-size:12px;font-weight:900}
.mg-social-video-card__body{padding:22px}
.mg-social-video-card__body h3{margin:0 0 9px;color:var(--mg-dark);font-size:21px;line-height:1.25}
.mg-social-video-card__body p{margin:0 0 14px;color:var(--mg-muted);font-size:14px;line-height:1.55}
.mg-social-video-card__link{color:var(--mg-green-hover);font-weight:900}

.mg-live-section,.mg-product-content,.mg-related-section{padding:68px 0;border-top:1px solid var(--mg-line)}
.mg-live-section{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding-left:max(20px,calc((100vw - 1240px)/2));padding-right:max(20px,calc((100vw - 1240px)/2));background:var(--mg-soft)}
.mg-live-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.mg-live-card{overflow:hidden;border:1px solid var(--mg-line);border-radius:20px;background:#fff}
.mg-live-card__media{position:relative;display:flex;align-items:center;justify-content:center;height:360px;padding:14px;overflow:hidden;background:#edf3e9}
.mg-live-card__media img{width:100%;height:100%;object-fit:contain}
.mg-live-label{position:absolute;left:16px;bottom:16px;padding:7px 11px;border-radius:999px;background:var(--mg-green);color:#fff;font-size:12px;font-weight:800}
.mg-live-card__body{padding:20px}
.mg-live-card__body h3{margin:0 0 8px;color:var(--mg-dark);font-size:20px}
.mg-live-card__body p{margin:0;color:var(--mg-muted);line-height:1.55}
.mg-product-content__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.mg-info-card{padding:32px;border:1px solid var(--mg-line);border-radius:20px;background:#fff}
.mg-info-card--wide{grid-column:1/-1}
.mg-info-card__number{display:block;margin-bottom:18px;color:var(--mg-green);font-weight:900}
.mg-info-card h2{margin-bottom:16px;font-size:28px}
.mg-info-card p,.mg-richtext{color:#43594f;font-size:16px;line-height:1.7}
.mg-product-request{display:grid;grid-template-columns:.8fr 1.2fr;gap:48px;align-items:center;margin:0 0 68px;padding:40px;border-radius:24px;background:linear-gradient(135deg,#0f3f2e,#1d5e43);color:#fff}
.mg-product-request h2,.mg-product-request .mg-section-eyebrow{color:#fff}
.mg-product-request__form input,.mg-product-request__form textarea{width:100%;margin-bottom:10px;border-radius:10px}
.mg-related-section ul.products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:22px!important;margin:0!important}
.mg-related-section ul.products li.product{width:auto!important;margin:0!important}
.mg-related-section ul.products li.product ul.entry-meta,.mg-related-section ul.products li.product li.meta-categories{display:none!important}

@media(max-width:1024px){
.mg-product-hero{grid-template-columns:1fr}
.mg-social-video-grid,.mg-live-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.mg-related-section ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px){
.mg-product-container{width:calc(100% - 24px)}
.mg-product-gallery{display:flex;flex-direction:column}
.mg-product-thumbs{order:2;flex-direction:row;overflow-x:auto}
.mg-product-thumb{flex:0 0 74px}
.mg-product-main-image{min-height:420px;padding:12px}
.mg-product-main-image>img{max-height:500px}
.mg-product-specs,.mg-product-actions,.mg-product-trust,.mg-social-video-grid,.mg-live-grid,.mg-product-content__grid,.mg-product-request{grid-template-columns:1fr}
.mg-social-video-card__media{height:440px}
.mg-info-card--wide{grid-column:auto}
.mg-related-section ul.products{grid-template-columns:1fr!important}
}

/* Дополнения и исправления v4 */

.mg-product-empty-note {
	margin-bottom: 24px;
	padding: 16px 18px;
	border: 1px dashed var(--mg-line);
	border-radius: 14px;
	background: var(--mg-soft);
	color: var(--mg-muted);
	font-size: 14px;
	line-height: 1.5;
}

.mg-live-card__media {
	height: 420px;
	padding: 18px;
}

.mg-live-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mg-product-request--compact {
	grid-template-columns: 1fr auto;
}

.mg-btn--light {
	background: #fff;
	color: var(--mg-dark);
}

.mg-btn--small {
	min-height: 42px;
	padding: 10px 18px;
	font-size: 14px;
}

.mg-related-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}

.mg-related-card {
	overflow: hidden;
	border: 1px solid var(--mg-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(15, 63, 46, .06);
}

.mg-related-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 300px;
	padding: 12px;
	background: var(--mg-soft);
}

.mg-related-card__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mg-related-card__body {
	padding: 18px;
}

.mg-related-card__body h3 {
	margin: 0 0 10px;
	color: var(--mg-dark);
	font-size: 18px;
	line-height: 1.3;
}

.mg-related-card__price {
	margin-bottom: 16px;
	color: var(--mg-dark);
	font-weight: 800;
}

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

@media (max-width: 700px) {
	.mg-product-request--compact {
		grid-template-columns: 1fr;
	}

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

