/**
 * DS Elements — Mô tả sản phẩm
 *
 * Thu gọn bằng max-height + lớp mờ ở đáy. Lớp mờ chỉ hiện khi đang thu gọn (JS
 * gỡ .is-collapsed khi mở), nếu không nó phủ luôn dòng cuối lúc đã mở hết.
 */

.elementor-widget-ds-product-description {
	width: 100%;
	min-width: 0;
}

.ds-pd {
	--ds-pd-max: 320px;

	width: 100%;
	min-width: 0;
}

.ds-pd *,
.ds-pd *::before,
.ds-pd *::after {
	box-sizing: border-box;
}

.ds-pd__heading {
	margin: 0 0 var(--ds-space-4);
	color: var(--ds-pd-heading-color, var(--ds-color-brand));
	font-size: var(--ds-pd-heading-fs, var(--ds-fs-h3));
	font-weight: var(--ds-fw-bold);
	line-height: var(--ds-lh-h3);
	text-transform: uppercase;
}

/* --- Vùng nội dung ------------------------------------------------------ */

.ds-pd__content {
	position: relative;
	overflow: hidden;
}

.ds-pd__content.is-collapsed {
	max-height: var(--ds-pd-max, 320px);
}

/* Lớp mờ đáy: chỉ khi đang thu gọn. Cao 96px, chuyển từ trong suốt sang màu nền. */
.ds-pd__content.is-collapsed::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 96px;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0),
		var(--ds-pd-fade, var(--ds-color-white))
	);
}

/* --- Chữ thân bài ------------------------------------------------------- */

.ds-pd__prose {
	color: var(--ds-pd-text-color, var(--ds-color-body));
	font-size: var(--ds-fs-body);
	line-height: var(--ds-lh-body);
}

.ds-pd__prose > :first-child {
	margin-top: 0;
}

.ds-pd__prose > :last-child {
	margin-bottom: 0;
}

.ds-pd__prose p {
	margin: 0 0 var(--ds-space-4);
}

.ds-pd__prose h2,
.ds-pd__prose h3,
.ds-pd__prose h4 {
	margin: var(--ds-space-6) 0 var(--ds-space-3);
	color: var(--ds-color-heading);
	font-weight: var(--ds-fw-semibold);
	line-height: var(--ds-lh-h4);
}

.ds-pd__prose h2 { font-size: var(--ds-fs-h3); }
.ds-pd__prose h3 { font-size: var(--ds-fs-h4); }
.ds-pd__prose h4 { font-size: var(--ds-fs-body); }

.ds-pd__prose ul,
.ds-pd__prose ol {
	margin: 0 0 var(--ds-space-4);
	padding-left: var(--ds-space-6);
}

.ds-pd__prose li {
	margin-bottom: var(--ds-space-2);
}

.ds-pd__prose img {
	max-width: 100%;
	height: auto;
	border-radius: var(--ds-radius-md);
}

.ds-pd__prose a {
	color: var(--ds-color-brand-light);
	text-decoration: underline;
}

/* --- Nút đọc thêm ------------------------------------------------------- */

.ds-pd__toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--ds-space-2);
	margin-top: var(--ds-space-4);
	padding: 0;

	background: none;
	border: 0;
	color: var(--ds-pd-toggle-color, var(--ds-color-brand-light));
	font-size: var(--ds-fs-button);
	font-weight: var(--ds-fw-semibold);
	line-height: var(--ds-lh-button);
	letter-spacing: var(--ds-ls-button);
	text-transform: uppercase;
	cursor: pointer;
}

.ds-pd__toggle:hover {
	color: var(--ds-color-brand);
}

/* Mũi tên xuống, xoay ngược khi đã mở. */
.ds-pd__toggle-chev {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform var(--ds-transition);
}

.ds-pd__toggle[aria-expanded="true"] .ds-pd__toggle-chev {
	transform: translateY(1px) rotate(-135deg);
}
