/**
 * Giao diện trang chi tiết bài viết (single post).
 * Dựng lại bố cục: breadcrumb → nội dung (thẻ trắng) + sidebar phải.
 *
 * Mọi rule scope trong #content.nma-single để không ảnh hưởng phần còn lại của site.
 *
 * @package flatsome-child
 */

.nma-single {
	--nma-accent: var(--primary-color);   /* màu nhấn cho chuyên mục / sidebar — dùng màu chính của theme */
	--tt-lg: 30px;
}
@media (min-width: 992px)  { .nma-single { --tt-lg: 34px; } }
@media (min-width: 1200px) { .nma-single { --tt-lg: 38px; } }

/* ===== Tiện ích nền / khoảng cách (scope nội bộ) ===== */
.nma-single .bg-lighter { background-color: #f0f0f0; }
.nma-single .bg-white   { background-color: #fff; border-radius: 10px; }
.nma-single .p-3        { padding: 1rem; }
.nma-single .py-3       { padding-top: 1rem; padding-bottom: 1rem; }
.nma-single .pt-2       { padding-top: .5rem; }
.nma-single .mb-0       { margin-bottom: 0; }
.nma-single .mb-3       { margin-bottom: 1rem; }
.nma-single .mb-4       { margin-bottom: 1.5rem; }
.nma-single .mr-2       { margin-right: .5rem; }
.nma-single .ml-1       { margin-left: .25rem; }
.nma-single .text-center     { text-align: center; }
.nma-single .text-uppercase  { text-transform: uppercase; }
.nma-single .letter-spacing-1 { letter-spacing: 1px; }
.nma-single .fw-medium  { font-weight: 500; }
.nma-single .text-primary { color: var(--nma-accent); }
.nma-single .font-18    { font-size: 18px; }

.nma-single .mainer { margin: auto; min-height: 380px; }

/* ===== Breadcrumb ===== */
.nma-single .breadcrumb-o { background: #fff; border-bottom: 1px solid #eee; }
.nma-single .hrm-breadcrums {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	padding: 10px 0;
	margin-bottom: 0;
	font-size: .875rem;
	line-height: 1.4;
	list-style: none;
	color: #6e7987;
}
.nma-single .hrm-breadcrums a { color: #6e7987; text-decoration: none !important; }
.nma-single .hrm-breadcrums a:hover { color: var(--nma-accent); }
.nma-single .hrm-breadcrums .separator,
.nma-single .hrm-breadcrums .delimiter { margin: 0 8px; opacity: .6; }
.nma-single .hrm-breadcrums .last,
.nma-single .hrm-breadcrums .current { color: #353849; }

/* ===== Bố cục 2 cột ===== */
.nma-single [data-wrapper] {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	-webkit-box-align: start;
	-ms-flex-align: start;
	align-items: flex-start;
	--gutter: 10px;
	margin-left: calc(var(--gutter) * -1);
	margin-right: calc(var(--gutter) * -1);
}
.nma-single .mainbody,
.nma-single .sidebar {
	width: 100%;
	-webkit-box-flex: 0;
	-ms-flex: 0 0 100%;
	flex: 0 0 100%;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

@media (min-width: 992px) {
	.nma-single .block-sidebar { --sidebar: 30%; }
	.nma-single .mainbody {
		width: calc(100% - var(--sidebar));
		-webkit-box-flex: 1;
		-ms-flex: 1 1 auto;
		flex: 1 1 auto;
	}
	.nma-single .sidebar {
		width: var(--sidebar);
		-webkit-box-flex: 0;
		-ms-flex: 0 0 var(--sidebar);
		flex: 0 0 var(--sidebar);
	}
	/* Sidebar dính theo cuộn (thay cho JS data-stick của bản gốc) */
	.nma-single .sidebar > [data-stick] {
		position: -webkit-sticky;
		position: sticky;
		top: 82px;
	}
}

/* ===== Tiêu đề / chữ ===== */
.nma-single .content-master { position: relative; }
.nma-single .tt,
.nma-single .tt-lg,
.nma-single .tt-xs {
	font-weight: 600;
	margin: 0 0 10px;
	color: #353849;
	letter-spacing: -.25px;
}
.nma-single .tt a { color: inherit; font-weight: inherit; text-decoration: none !important; }
.nma-single .tt { font-size: 16px; line-height: 1.35; font-weight: 500; }
.nma-single .tt-lg { font-size: var(--tt-lg); line-height: 1.1; letter-spacing: -1px; }
.nma-single .tt-post { margin-top: 6px; }
.nma-single .tt-xs { font-size: 22px; line-height: 1.3; letter-spacing: -.3px; }

.nma-single hr { margin: 16px 0; border: 0; border-top: 1px solid #e6e6e6; }

/* ===== Nội dung bài viết ===== */
.nma-single .content-post { line-height: 1.7; color: #2b2f3a; }
.nma-single .content-post.font-18 { margin-bottom: 15px; }
.nma-single .content-post img {
	margin: 0 auto;
	display: block;
	height: auto !important;
	border-radius: 6px;
}
.nma-single .content-post figure { margin: 18px 0; }
.nma-single .content-post figcaption,
.nma-single .content-post .wp-caption-text {
	text-align: center;
	font-size: 14px;
	color: #8a8f9a;
	margin-top: 6px;
}
.nma-single .content-post h2,
.nma-single .content-post h3,
.nma-single .content-post h4 {
	color: #353849;
	line-height: 1.3;
	margin: 22px 0 12px;
}
.nma-single .content-post h2 { font-size: 24px; }
.nma-single .content-post h3 { font-size: 20px; }
.nma-single .content-post h4 { font-size: 18px; }
.nma-single .content-post a { color: var(--nma-accent); }
.nma-single .content-post table {
	width: 100%;
	border-collapse: collapse;
	margin: 18px 0;
	font-size: 16px;
}
.nma-single .content-post table td,
.nma-single .content-post table th {
	border: 1px solid #e0e0e0;
	padding: 8px 10px;
}
.nma-single .content-post table tr:first-child td,
.nma-single .content-post table th { background: #f5f7fb; }

/* ===== Tin liên quan ===== */
.nma-single .other-post { padding-top: 30px; }
.nma-single .other-post .tt-xs {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	border-bottom: 1px solid #ddd;
	padding-bottom: 9px;
	text-transform: uppercase;
}
.nma-single .other-post .tt-xs > a {
	text-transform: initial;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: -.5px;
	margin-left: auto;
	color: var(--nma-accent);
	text-decoration: none;
	white-space: nowrap;
}
.nma-single .other-post .tt-xs > a:hover { text-decoration: underline; }

.nma-single .list-news-text {
	line-height: 1.45;
	padding: 0;
	margin: 18px 0 10px;
}
.nma-single .list-news-text li {
	list-style: none;
	margin-bottom: 10px;
	position: relative;
	padding-left: 17px;
	color: #444a57;
}
.nma-single .list-news-text li:before {
	content: "";
	width: 6px;
	height: 6px;
	background: #444a57;
	position: absolute;
	top: 9px;
	left: 0;
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
	opacity: .7;
	-webkit-transition: all .2s ease;
	transition: all .2s ease;
}
.nma-single .list-news-text a { color: inherit; text-decoration: none; }
.nma-single .list-news-text li a:hover { color: var(--nma-accent); }
.nma-single .list-news-text li:hover:before {
	background: var(--nma-accent);
	opacity: 1;
	width: 8px;
	height: 8px;
	-webkit-transform: none;
	transform: none;
}

/* ===== Sidebar: panel danh mục ===== */
.nma-single .tt-pane {
	text-transform: uppercase;
	font-size: 19px;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	color: var(--nma-accent);
	position: relative;
	padding: 7px 3px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--nma-accent);
}
.nma-single .menu-vertical { margin: 0; padding: 0; list-style: none; }
.nma-single .menu-vertical li { list-style: none; margin: 0 0 2px; position: relative; }
.nma-single .menu-vertical a {
	display: block;
	color: #393e49;
	padding: 7px 10px;
	line-height: 1.35;
	letter-spacing: -.2px;
	border-radius: 7px;
	text-decoration: none !important;
	position: relative;
	overflow: hidden;
	-webkit-transition: all .3s ease;
	transition: all .3s ease;
}
.nma-single .menu-vertical a:before {
	content: "\F285"; /* bootstrap-icons: chevron-right */
	font-family: "bootstrap-icons" !important;
	margin-right: 8px;
	font-size: 11px;
	opacity: .6;
}
.nma-single .menu-vertical a:after {
	content: "";
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: 0;
	background: color-mix(in srgb, var(--primary-color) 7%, transparent);
	-webkit-transition: width .3s cubic-bezier(.71, .01, .21, .99);
	transition: width .3s cubic-bezier(.71, .01, .21, .99);
}
.nma-single .menu-vertical li.current-cat > a,
.nma-single .menu-vertical li:hover > a { color: var(--nma-accent); }
.nma-single .menu-vertical li.current-cat > a:after,
.nma-single .menu-vertical li:hover > a:after { width: 100%; left: 0; right: auto; }

/* ===== Sidebar: panel "Sản phẩm mới" ===== */
.nma-single .sidebar .bg-white + .bg-white,
.nma-single.nma-archive__side .bg-white + .bg-white { margin-top: 20px; }

.nma-single .latest-products { margin: 0; padding: 0; list-style: none; }
.nma-single .latest-products li {
	list-style: none;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	gap: 10px;
	padding: 10px 0;
	margin: 0;
	border-bottom: 1px solid #eee;
}
.nma-single .latest-products li:first-child { padding-top: 0; }
.nma-single .latest-products li:last-child { padding-bottom: 0; border-bottom: 0; }
.nma-single .lp-thumb {
	-webkit-box-flex: 0;
	-ms-flex: 0 0 64px;
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border-radius: 7px;
}
.nma-single .lp-thumb img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.nma-single .lp-info { min-width: 0; }
.nma-single .lp-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: #353849;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 500;
	letter-spacing: -.2px;
	text-decoration: none !important;
	-webkit-transition: color .25s ease;
	transition: color .25s ease;
}
.nma-single .latest-products li:hover .lp-title { color: var(--nma-accent); }
.nma-single .lp-date {
	margin-top: 5px;
	font-size: 12px;
	color: #9aa0ad;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	gap: 5px;
}

/* ===== Mobile ===== */
@media (max-width: 48em) {
	.nma-single .tt-lg { letter-spacing: -.5px; }
	.nma-single .content-post,
	.nma-single .font-18 { font-size: 16px; }
}
