/* EduMagnet Product Description v1.0.0 — one clean description section on single product pages */

/* 1) When a full description exists: hide the duplicate "Description:" heading + short-description widget */
body.em-pdesc-has-long .elementor-location-single .elementor-widget-heading:has(+ .elementor-widget-woocommerce-product-short-description),
body.em-pdesc-has-long .elementor-location-single .elementor-widget-woocommerce-product-short-description {
	display: none !important;
}

/* 2) When there is no full description: hide the empty full-width content widget */
body.em-pdesc-no-long .elementor-location-single .elementor-widget-woocommerce-product-content {
	display: none !important;
}

/* 3) Tablet/desktop: put the description directly under the summary, beside the image (no empty gap) */
@media (min-width: 768px) {
	body.em-pdesc-has-long .elementor-location-single .e-con-inner:has(> .elementor-widget-woocommerce-product-content):has(> .e-con .elementor-widget-woocommerce-product-images) {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 20px;
		row-gap: 0;
		align-items: start;
	}
	body.em-pdesc-has-long .elementor-location-single .e-con-inner:has(> .elementor-widget-woocommerce-product-content) > * {
		grid-column: 1 / -1;
	}
	body.em-pdesc-has-long .elementor-location-single .e-con-inner:has(> .elementor-widget-woocommerce-product-content) > .e-con:has(.elementor-widget-woocommerce-product-images),
	body.em-pdesc-has-long .elementor-location-single .e-con-inner:has(> .elementor-widget-woocommerce-product-content) > .e-con:has(.elementor-widget-woocommerce-product-images) > .e-con-inner {
		display: contents !important;
	}
	body.em-pdesc-has-long .elementor-location-single .e-con:has(> .elementor-widget-woocommerce-product-images) {
		grid-column: 2 !important;
		grid-row: span 2;
		width: auto !important;
		max-width: none !important;
		position: sticky;
		top: 24px;
		align-self: start;
	}
	body.em-pdesc-has-long .elementor-location-single .e-con:has(> .elementor-widget-woocommerce-product-short-description) {
		grid-column: 1 !important;
		width: auto !important;
		max-width: none !important;
	}
	body.em-pdesc-has-long .elementor-location-single .e-con-inner > .elementor-widget-woocommerce-product-content {
		grid-column: 1 !important;
		width: auto !important;
		max-width: none !important;
		margin-top: 8px;
	}
}

/* 4) The description card */
.em-pdesc {
	background: #ffffff;
	border: 1px solid #ece3f1;
	border-top: 4px solid #F7BE28;
	border-radius: 14px;
	box-shadow: 0 6px 22px rgba(59, 18, 75, 0.07);
	padding: 24px 26px 18px;
	margin: 6px 0 24px;
	color: #2f2836;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	font-size: 16px;
	line-height: 1.65;
	text-align: left;
}
.em-pdesc .em-pdesc__title {
	margin: 0 0 12px;
	color: #3b124b;
	font-family: Montserrat, sans-serif;
	font-size: 23px;
	font-weight: 700;
	line-height: 1.25;
}
.em-pdesc .em-pdesc__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: 10px;
	border-radius: 4px;
	background: #F7BE28;
}
.em-pdesc .em-pdesc__body h2,
.em-pdesc .em-pdesc__body h3,
.em-pdesc .em-pdesc__body h4 {
	margin: 22px 0 8px;
	padding-left: 10px;
	border-left: 4px solid #F7BE28;
	color: #3b124b;
	font-family: Montserrat, sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}
.em-pdesc .em-pdesc__body p { margin: 0 0 12px; }
.em-pdesc .em-pdesc__body ul,
.em-pdesc .em-pdesc__body ol { margin: 0 0 14px; padding-left: 1.3em; }
.em-pdesc .em-pdesc__body li { margin: 0 0 6px; padding-left: 2px; }
.em-pdesc .em-pdesc__body ul li::marker { color: #d9a00f; }
.em-pdesc .em-pdesc__body ol li::marker { color: #3b124b; font-weight: 700; }
.em-pdesc .em-pdesc__body strong { color: #3b124b; }
.em-pdesc .em-pdesc__body a { color: #581f64; text-decoration: underline; }
.em-pdesc .em-pdesc__body ul + ul { margin-top: -6px; }

/* Short description (products without a full description): readable, on brand */
body.em-pdesc-no-long .elementor-location-single .woocommerce-product-details__short-description {
	color: #2f2836;
	font-size: 16px;
	line-height: 1.65;
}

@media (max-width: 767px) {
	.em-pdesc { padding: 18px 16px 12px; border-radius: 12px; font-size: 15.5px; margin-top: 14px; }
	.em-pdesc .em-pdesc__title { font-size: 20px; }
	.em-pdesc .em-pdesc__body h2, .em-pdesc .em-pdesc__body h3, .em-pdesc .em-pdesc__body h4 { font-size: 17px; }
}
