/**
 * Giao diện bài viết: Tạp chí / Cẩm nang / Giới thiệu sản phẩm (inc/post-templates.php).
 * Màu theo theme: đỏ #b00e29, vàng đồng #fdc97d.
 */
.pt {
	--pt-red: var(--mainColor, #b00e29);
	--pt-red-dark: #6e0718;
	--pt-ink: #2b1d14;
	--pt-gold: #c99a4b;
	--pt-gold-soft: var(--subColor, #fdc97d);
	--pt-cream: #fbf6ee;
	--pt-line: #eadfcd;
	--pt-serif: 'Roboto Slab', Georgia, serif;
	color: var(--pt-ink);
	background: #fff;
	overflow-x: clip;
}
.pt .breadcrumbs { background: transparent; }

/* ---------- Thanh tiến độ đọc ---------- */
.pt-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000;
	background: transparent; pointer-events: none;
}
.pt-progress span {
	display: block; height: 100%; width: 100%;
	transform-origin: 0 50%; transform: scaleX(0);
	background: linear-gradient(90deg, var(--pt-red), var(--pt-gold-soft));
}

/* ---------- Thành phần chung ---------- */
.pt-chip {
	display: inline-block; padding: 5px 14px; border-radius: 99px;
	font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	background: var(--pt-red); color: #fff !important; text-decoration: none !important;
}
.pt-chip--gold { background: var(--pt-gold-soft); color: var(--pt-red-dark) !important; }
.pt-eyebrow {
	display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
	font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pt-red);
}
.pt-eyebrow svg { width: 16px; height: 16px; fill: currentColor; }
.pt-lead { font-size: 18px; line-height: 1.65; margin: 16px 0 0; max-width: 46em; }

.pt-meta {
	display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 20px 0 0; padding: 0;
	font-size: 14px; opacity: .9;
}
.pt-meta li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.pt-meta svg { width: 15px; height: 15px; fill: currentColor; opacity: .8; }

.pt-orn { display: flex; justify-content: flex-start; margin: 36px 0 26px; }
.pt-orn--center { justify-content: center; }
.pt-orn svg { fill: none; stroke: var(--pt-gold); stroke-width: 1.4; overflow: visible; }
.pt-orn circle { fill: var(--pt-gold); stroke: none; }
.pt-orn .pt-orn__in { fill: var(--pt-gold); stroke: none; }

.pt-section-title {
	font-family: var(--pt-serif); font-size: 30px; font-weight: 700; text-align: center;
	color: var(--pt-ink); margin: 0;
}
.pt-section-title + .pt-orn { margin: 12px 0 30px; }

.pt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 24px; border-radius: 4px; border: 1.5px solid transparent;
	font-weight: 700; font-size: 15px; text-decoration: none !important; cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.pt-btn svg { width: 18px; height: 18px; fill: currentColor; }
.pt-btn:hover { transform: translateY(-2px); }
.pt-btn--gold {
	background: linear-gradient(180deg, #ffe0a3, var(--pt-gold-soft) 45%, #e0a957);
	color: var(--pt-red-dark) !important; box-shadow: 0 6px 18px rgba(201, 154, 75, .35);
}
.pt-btn--gold:hover { box-shadow: 0 10px 26px rgba(201, 154, 75, .5); }
.pt-btn--line { border-color: currentColor; color: inherit !important; background: transparent; }
.pt-btn--line:hover { background: rgba(255, 255, 255, .1); }

/* Khung ảnh viền vàng đồng */
.pt-frame { position: relative; margin: 0; }
.pt-frame img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; position: relative; z-index: 1; }
.pt-frame::before {
	content: ""; position: absolute; inset: -12px 12px 12px -12px; border: 2px solid var(--pt-gold); border-radius: 8px;
}
.pt-frame--gold::before { border-color: var(--pt-gold-soft); }
.pt-frame--gold::after {
	content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid rgba(253, 201, 125, .45); border-radius: 8px;
}

/* ---------- Nội dung bài ---------- */
.pt-content { font-size: 17px; line-height: 1.85; }
.pt-content > *:first-child { margin-top: 0; }
.pt-content p { margin: 0 0 1.25em; }
.pt-content a { color: var(--pt-red); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(176, 14, 41, .35); }
.pt-content a:hover { text-decoration-color: currentColor; }
.pt-content h2, .pt-content h3, .pt-content h4 {
	font-family: var(--pt-serif); color: var(--pt-ink); line-height: 1.35; scroll-margin-top: 24px;
}
.pt-content h2 { font-size: 27px; font-weight: 700; margin: 1.9em 0 .7em; }
.pt-content h3 { font-size: 21px; font-weight: 700; margin: 1.6em 0 .6em; }
.pt-content h4 { font-size: 18px; margin: 1.4em 0 .5em; }
.pt-content img { max-width: 100%; height: auto; border-radius: 6px; }
.pt-content figure, .pt-content .wp-caption { max-width: 100%; margin: 2em auto; }
.pt-content figcaption, .pt-content .wp-caption-text {
	font-size: 14px; color: #7a6a5c; text-align: center; margin-top: 10px; font-style: italic;
}
.pt-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.pt-content .alignleft { float: left; margin: .3em 1.6em 1em 0; max-width: 50%; }
.pt-content .alignright { float: right; margin: .3em 0 1em 1.6em; max-width: 50%; }
.pt-content ul, .pt-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.pt-content li { margin-bottom: .45em; }
.pt-content ul li::marker { color: var(--pt-gold); }
.pt-content ol li::marker { color: var(--pt-red); font-weight: 700; }
.pt-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 15px; display: block; overflow-x: auto; }
.pt-content th, .pt-content td { border: 1px solid var(--pt-line); padding: 10px 14px; text-align: left; }
.pt-content thead th, .pt-content tr:first-child th { background: var(--pt-red); color: #fff; border-color: var(--pt-red); }
.pt-content tbody tr:nth-child(even) { background: var(--pt-cream); }
.pt-content iframe, .pt-content video { max-width: 100%; border-radius: 6px; }
.pt-content hr { border: 0; height: 1px; background: var(--pt-line); margin: 2.4em 0; }
.pt-content::after { content: ""; display: table; clear: both; }

/* Trích dẫn mặc định = câu nổi bật */
.pt-content blockquote {
	position: relative; margin: 2.2em 0; padding: 26px 30px 26px 74px;
	background: var(--pt-cream); border-left: 4px solid var(--pt-gold); border-radius: 0 8px 8px 0;
	font-family: var(--pt-serif); font-size: 20px; line-height: 1.6; color: var(--pt-red-dark);
}
.pt-content blockquote::before {
	content: "\201C"; position: absolute; left: 20px; top: 6px;
	font-family: Georgia, serif; font-size: 72px; line-height: 1; color: var(--pt-gold);
}
.pt-content blockquote p:last-child { margin-bottom: 0; }

/* ---------- Chia sẻ ---------- */
.pt-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.pt-share__label { font-weight: 700; font-size: 14px; margin-right: 6px; }
.pt-share__btn {
	display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
	border: 1px solid var(--pt-line); border-radius: 99px; background: #fff; color: var(--pt-ink) !important;
	font-size: 14px; font-weight: 600; text-decoration: none !important; cursor: pointer; transition: all .2s ease;
}
.pt-share__btn svg { width: 16px; height: 16px; fill: currentColor; }
.pt-share__btn--fb:hover { background: #1877f2; border-color: #1877f2; color: #fff !important; }
.pt-share__btn--pin:hover { background: #e60023; border-color: #e60023; color: #fff !important; }
.pt-share__btn--copy:hover, .pt-share__btn--copy.is-done { background: var(--pt-ink); border-color: var(--pt-ink); color: #fff !important; }

/* ---------- Dải tư vấn ---------- */
.pt-cta { margin: 56px 0 0; }
.pt-cta__box {
	position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px;
	padding: 42px 48px; border-radius: 10px; color: #fff; overflow: hidden;
	background:
		radial-gradient(circle at 100% 0, rgba(253, 201, 125, .22), transparent 45%),
		repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 14px),
		linear-gradient(135deg, var(--pt-red-dark), var(--pt-red));
}
.pt-cta__box::before {
	content: ""; position: absolute; inset: 8px; border: 1px solid rgba(253, 201, 125, .4); border-radius: 6px; pointer-events: none;
}
.pt-cta__eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--pt-gold-soft); font-weight: 700; }
.pt-cta__title { font-family: var(--pt-serif); font-size: 26px; margin: 0 0 8px; color: #fff; }
.pt-cta__desc { margin: 0; opacity: .88; max-width: 34em; }
.pt-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; position: relative; }

/* ---------- Bài liên quan ---------- */
.pt-related { padding: 60px 0 50px; }
.pt-related .item-blog { margin-bottom: 24px; }

/* =========================================================
   1. TẠP CHÍ – ẢNH BÌA LỚN
   ========================================================= */
.pt-mag-hero {
	position: relative; display: flex; align-items: flex-end; min-height: min(78vh, 680px);
	padding: 120px 0 56px; color: #fff;
	background: var(--pt-hero) center / cover no-repeat, var(--pt-red-dark);
}
.pt-mag-hero::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(0deg, rgba(28, 6, 10, .94) 0%, rgba(28, 6, 10, .6) 45%, rgba(28, 6, 10, .12) 100%);
}
.pt-mag-hero--noimg {
	min-height: 0; padding-top: 80px;
	background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 14px), linear-gradient(135deg, var(--pt-red-dark), var(--pt-red));
}
.pt-mag-hero > .container { position: relative; width: 100%; }
.pt-mag-hero__inner { max-width: 860px; animation: pt-rise .8s ease both; }
.pt-mag-hero__title {
	font-family: var(--pt-serif); font-size: clamp(30px, 4.6vw, 52px); line-height: 1.18; font-weight: 700;
	margin: 18px 0 0; color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}
.pt-mag-hero .pt-lead { color: rgba(255, 255, 255, .88); font-size: 19px; }
.pt-mag-hero .pt-meta { color: #fff; }
.pt-mag-hero .pt-meta li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--pt-gold-soft); margin-right: 8px; }

.pt-mag-body { max-width: 760px; margin: 0 auto; padding: 56px 0 10px; }
.pt-content--dropcap > p:first-of-type::first-letter {
	float: left; font-family: var(--pt-serif); font-weight: 700; font-size: 4.4em; line-height: .82;
	padding: 6px 12px 0 0; color: var(--pt-red);
}
.pt--magazine .pt-content h2 { text-align: center; }
.pt--magazine .pt-content h2::after {
	content: ""; display: block; width: 56px; height: 3px; margin: 14px auto 0;
	background: linear-gradient(90deg, var(--pt-red), var(--pt-gold-soft)); border-radius: 2px;
}
/* Ảnh trong bài tạp chí rộng hơn cột chữ */
@media (min-width: 992px) {
	.pt--magazine .pt-content .aligncenter,
	.pt--magazine .pt-content > p > img.size-full,
	.pt--magazine .pt-content > figure.size-full {
		width: calc(100% + 200px) !important; max-width: none; margin-left: -100px;
	}
	.pt--magazine .pt-content blockquote {
		margin-left: -60px; margin-right: -60px; padding: 34px 60px 34px 96px; font-size: 23px; text-align: left;
	}
}
.pt--magazine .pt-share { justify-content: center; }

/* =========================================================
   2. CẨM NANG – CÓ MỤC LỤC
   ========================================================= */
.pt-guide-hero {
	padding: 48px 0 56px; border-bottom: 1px solid var(--pt-line);
	background:
		radial-gradient(circle at 12% 20%, rgba(253, 201, 125, .25), transparent 40%),
		radial-gradient(rgba(201, 154, 75, .14) 1px, transparent 1.4px) 0 0 / 18px 18px,
		var(--pt-cream);
}
.pt-guide-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.pt-guide-hero__grid--solo { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.pt-guide-hero__text { animation: pt-rise .7s ease both; }
.pt-guide-hero__title { font-family: var(--pt-serif); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.22; font-weight: 700; margin: 0; color: var(--pt-ink); }
.pt-guide-hero__img { aspect-ratio: 4 / 3; animation: pt-rise .9s .1s ease both; }

.pt-guide-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; padding: 52px 0 10px; align-items: start; }
.pt-guide-body--notoc { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
.pt-guide-main { min-width: 0; max-width: 800px; }

.pt-toc-wrap { position: sticky; top: 20px; }
.pt-toc { background: #fff; border: 1px solid var(--pt-line); border-radius: 10px; box-shadow: 0 10px 30px rgba(43, 29, 20, .06); overflow: hidden; }
.pt-toc summary {
	display: flex; align-items: center; gap: 9px; padding: 15px 18px; cursor: pointer; list-style: none;
	font-family: var(--pt-serif); font-weight: 700; font-size: 17px; color: #fff; background: var(--pt-red);
}
.pt-toc summary::-webkit-details-marker { display: none; }
.pt-toc summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.pt-toc details[open] summary::after { transform: rotate(-135deg); }
.pt-toc summary svg { width: 16px; height: 16px; fill: currentColor; }
.pt-toc__count { font-family: inherit; font-size: 12px; background: rgba(255, 255, 255, .2); border-radius: 99px; padding: 1px 8px; }
.pt-toc ol { list-style: none; margin: 0; padding: 10px 0; max-height: calc(100vh - 140px); overflow-y: auto; counter-reset: pt-toc; }
.pt-toc li { margin: 0; }
.pt-toc a {
	display: block; padding: 8px 18px 8px 20px; font-size: 14px; line-height: 1.45; color: #5d4c3f !important;
	text-decoration: none !important; border-left: 3px solid transparent; transition: all .2s;
}
.pt-toc .pt-toc__l2 { counter-increment: pt-toc; }
.pt-toc .pt-toc__l2 > a::before { content: counter(pt-toc, decimal-leading-zero) "  "; font-weight: 700; color: var(--pt-gold); white-space: pre; }
.pt-toc .pt-toc__l3 > a { padding-left: 46px; font-size: 13px; }
.pt-toc a:hover { color: var(--pt-red) !important; background: var(--pt-cream); }
.pt-toc a.is-active { color: var(--pt-red) !important; border-left-color: var(--pt-red); background: var(--pt-cream); font-weight: 700; }

/* H2 đánh số */
.pt-content--guide { counter-reset: pt-h2; }
.pt-content--guide h2 {
	counter-increment: pt-h2; display: flex; align-items: flex-start; gap: 16px;
	padding-bottom: 14px; border-bottom: 1px solid var(--pt-line);
}
.pt-content--guide h2::before {
	content: counter(pt-h2, decimal-leading-zero); flex-shrink: 0;
	display: grid; place-items: center; width: 48px; height: 48px; margin-top: -4px; border-radius: 50%;
	font-size: 17px; color: var(--pt-red-dark); background: radial-gradient(circle at 35% 30%, #ffe7b8, var(--pt-gold-soft) 60%, #e0a957);
	box-shadow: 0 4px 12px rgba(201, 154, 75, .4);
}
.pt-content--guide h3 { padding-left: 16px; border-left: 3px solid var(--pt-gold); }
/* Trích dẫn = hộp Lưu ý */
.pt-content--guide blockquote {
	font-family: inherit; font-size: 16px; color: var(--pt-ink); padding: 22px 24px 20px 24px;
	background: #fff8ea; border: 1px solid #f1d9a8; border-left: 4px solid var(--pt-gold); border-radius: 8px;
}
.pt-content--guide blockquote::before {
	content: "Lưu ý"; position: static; display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
	font-family: var(--pt-serif); font-size: 16px; font-weight: 700; line-height: 1.4; color: #9a6a1c;
}

/* =========================================================
   3. GIỚI THIỆU SẢN PHẨM
   ========================================================= */
.pt-prod-hero {
	position: relative; color: #fff; padding: 70px 0 90px; overflow: hidden;
	background:
		radial-gradient(circle at 85% 30%, rgba(253, 201, 125, .25), transparent 40%),
		repeating-linear-gradient(-45deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 16px),
		linear-gradient(120deg, #4d0511, var(--pt-red-dark) 40%, var(--pt-red));
}
.pt-prod-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
	background: linear-gradient(90deg, transparent, var(--pt-gold-soft), transparent);
}
.pt-prod-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 70px; align-items: center; }
.pt-prod-hero__grid--solo { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.pt-prod-hero__text { animation: pt-rise .7s ease both; }
.pt-prod-hero__title { font-family: var(--pt-serif); font-size: clamp(30px, 4vw, 48px); line-height: 1.2; font-weight: 700; margin: 18px 0 0; color: #fff; }
.pt-prod-hero .pt-lead { color: rgba(255, 255, 255, .88); }
.pt-prod-hero .pt-meta { color: rgba(255, 255, 255, .85); }
.pt-prod-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.pt-prod-hero__img { aspect-ratio: 1; max-width: 480px; justify-self: center; width: 100%; animation: pt-rise .9s .1s ease both; }
.pt-prod-hero__img img { box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }

.pt-promise {
	position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0; list-style: none; margin: -40px auto 0; padding: 0; background: #fff; border-radius: 10px;
	box-shadow: 0 16px 40px rgba(43, 29, 20, .12); overflow: hidden;
}
.pt-promise li { display: flex; flex-direction: column; gap: 3px; padding: 20px 24px; margin: 0; border-right: 1px solid var(--pt-line); }
.pt-promise li:last-child { border-right: 0; }
.pt-promise span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pt-gold); }
.pt-promise strong { font-size: 16px; color: var(--pt-red-dark); }

.pt-prod-body { max-width: 820px; margin: 0 auto; padding: 54px 0 0; }
.pt--product .pt-content h2 { position: relative; padding-left: 22px; }
.pt--product .pt-content h2::before {
	content: ""; position: absolute; left: 0; top: .35em; width: 10px; height: 10px; transform: rotate(45deg);
	background: var(--pt-gold-soft); box-shadow: 0 0 0 3px rgba(253, 201, 125, .35);
}
.pt--product .pt-share { margin-top: 30px; }
.pt-products { padding: 64px 0 10px; margin-top: 56px; background: var(--pt-cream); }

/* ---------- Hiệu ứng ---------- */
@keyframes pt-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.pt *, .pt *::before { animation: none !important; transition: none !important; }
}

/* ---------- Máy tính bảng / điện thoại ---------- */
@media (max-width: 991px) {
	.pt-guide-hero__grid, .pt-prod-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.pt-guide-hero__img, .pt-prod-hero__img { max-width: 520px; margin: 0 auto; }
	.pt-guide-body { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 30px; }
	.pt-toc-wrap { position: static; }
	.pt-toc ol { max-height: none; }
	.pt-cta__box { flex-direction: column; align-items: flex-start; padding: 34px 28px; }
}
@media (max-width: 767px) {
	.pt-content { font-size: 16px; line-height: 1.8; }
	.pt-content h2 { font-size: 22px; }
	.pt-content h3 { font-size: 19px; }
	.pt-content .alignleft, .pt-content .alignright { float: none; max-width: 100%; margin: 1.4em auto; }
	.pt-content blockquote { padding: 20px 20px 20px 56px; font-size: 18px; }
	.pt-content blockquote::before { left: 14px; font-size: 56px; }
	.pt-content--guide blockquote { padding: 18px 18px 16px; font-size: 15px; }
	.pt-content--guide h2 { gap: 12px; }
	.pt-content--guide h2::before { width: 38px; height: 38px; font-size: 14px; margin-top: -2px; }
	.pt-lead { font-size: 16px; }
	.pt-mag-hero { min-height: 70vh; padding: 90px 0 36px; }
	.pt-mag-hero .pt-lead { font-size: 16px; }
	.pt-mag-body { padding-top: 36px; }
	.pt-guide-hero { padding: 30px 0 36px; }
	.pt-prod-hero { padding: 44px 0 76px; }
	.pt-frame::before { inset: -8px 8px 8px -8px; }
	.pt-frame--gold::after { inset: 10px -8px -8px 10px; }
	.pt-promise { grid-template-columns: 1fr 1fr; margin-left: 16px; margin-right: 16px; width: auto; }
	.pt-promise li { padding: 14px 16px; border-bottom: 1px solid var(--pt-line); }
	.pt-promise li:nth-child(2n) { border-right: 0; }
	.pt-promise strong { font-size: 14px; }
	.pt-section-title { font-size: 24px; }
	.pt-cta__title { font-size: 22px; }
	.pt-cta__actions, .pt-cta__actions .pt-btn { width: 100%; }
	.pt-prod-hero__actions .pt-btn { flex: 1 1 auto; }
	.pt-related { padding: 44px 0 30px; }
}

/* Không để phần tử trong lưới đẩy tràn ngang trên điện thoại */
.pt-guide-hero__grid > *, .pt-prod-hero__grid > *, .pt-guide-body > * { min-width: 0; }
.pt-content { overflow-wrap: anywhere; }
@media (max-width: 991px) { .pt-content img, .pt-content figure, .pt-content .wp-caption { max-width: 100% !important; height: auto; } }
