/* Khối trình bày bài viết (kiểu "smart content"). Chỉ trang bài viết nạp file này, sau pages.css. */

.post { max-width: 920px; }
.post__cover { margin: 0 0 22px; }
.post__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--c-bg-image); }
.post__lead { margin: 0 0 20px; padding: 16px 20px; border-left: 4px solid var(--c-primary); background: var(--c-bg-pink); border-radius: 0 9px 9px 0; font-size: 17px; line-height: 1.65; }

/* Ảnh minh họa trong bài */
.post-fig { margin: 22px 0; }
.prose .post-fig img { display: block; width: 100%; height: auto; margin: 0; border-radius: 10px; background: var(--c-bg-image); }
.post-fig figcaption { margin-top: 8px; color: #555; font-size: 14px; line-height: 1.5; text-align: center; }
/* Ảnh cạnh chữ */
.prose .post-side { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: center; margin: 22px 0; padding: 12px; background: var(--c-bg-card); border: 1px solid var(--c-border); border-radius: 14px; }
.prose .post-side img { display: block; width: 100%; height: auto; margin: 0; border-radius: 10px; background: var(--c-bg-image); }
.prose .post-side--rev img { order: 2; }
.post-side figcaption { color: var(--c-text); font-size: 15px; line-height: 1.6; }
.post-side figcaption b { display: block; margin-bottom: 4px; color: var(--c-heading); font-size: 17px; }
/* Cụm 2-3 ảnh */
.prose .post-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 22px 0; }
.post-row figure { margin: 0; }
.prose .post-row img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; margin: 0; border-radius: 10px; background: var(--c-bg-image); }
.post-row figcaption { margin-top: 6px; color: #555; font-size: 14px; line-height: 1.45; text-align: center; }
@media (max-width: 640px) {
  .prose .post-side { grid-template-columns: 1fr; gap: 10px; }
  .prose .post-side--rev img { order: 0; }
}

/* Mục lục */
.tv-toc { margin: 0 0 24px; padding: 16px 20px; background: var(--c-bg-card); border: 1px solid var(--c-border); border-radius: 9px; }
.tv-toc > b { display: block; margin-bottom: 6px; color: var(--c-heading); font-size: 17px; }
.prose .tv-toc ol { margin: 0; padding-left: 22px; }
.tv-toc li { padding: 3px 0; }
.prose .tv-toc a { text-decoration: none; color: var(--c-text); }
.prose .tv-toc a:hover { color: var(--c-heading); text-decoration: underline; }

/* Tiêu đề mục có số */
.prose h2.tv-h { display: flex; align-items: center; gap: 12px; margin-top: 34px; padding-bottom: 8px; border-bottom: 2px solid var(--c-bg-pink); }
.tv-h__no { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c-primary); color: #fff; font-size: 16px; }

/* Slider ảnh */
.tv-slider { position: relative; margin: 20px 0; }
.tv-slider__track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 2px; }
.tv-slider__track::-webkit-scrollbar { display: none; }
.tv-slide { flex: 0 0 calc((100% - 28px) / 3); scroll-snap-align: start; margin: 0; background: var(--c-bg-card); border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; }
.prose .tv-slide img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; border-radius: 0; background: var(--c-bg-image); }
.tv-slide figcaption { padding: 10px 12px 12px; font-size: 14px; line-height: 1.5; }
.tv-slide figcaption b { display: block; margin-bottom: 2px; color: var(--c-heading); font-size: 16px; }
.tv-slider__btn { position: absolute; top: calc(50% - 40px); z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--c-border); border-radius: 50%; background: #fff; color: var(--c-heading); cursor: pointer; }
.tv-slider [hidden] { display: none; }
.tv-slider__btn:disabled { opacity: .35; cursor: default; }
.tv-slider__btn--prev { left: -12px; }
.tv-slider__btn--next { right: -12px; }
.tv-slider__btn--prev .ic { transform: rotate(180deg); }
.tv-slider__dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.tv-slider__dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #d9cfcf; cursor: pointer; }
.tv-slider__dots button[aria-current="true"] { width: 22px; border-radius: 5px; background: var(--c-primary); }

/* Quy trình */
.prose ol.tv-process { counter-reset: step; list-style: none; margin: 20px 0; padding: 0; }
.tv-process > li { counter-increment: step; position: relative; padding: 0 0 18px 58px; }
.tv-process > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-green); color: #fff; font-weight: 700; }
.tv-process > li::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: #d7e6d0; }
.tv-process > li:last-child { padding-bottom: 0; }
.tv-process > li:last-child::after { display: none; }
.prose .tv-process h3 { margin: 6px 0 4px; font-size: 18px; }
.prose .tv-process p { margin: 0; }

/* Thẻ lý do / ưu điểm */
.prose ul.tv-reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; padding: 0; list-style: none; }
.tv-reason { display: flex; gap: 14px; padding: 16px; background: var(--c-bg-card); border: 1px solid var(--c-border); border-radius: 10px; }
.tv-ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #eaf3e5; color: var(--c-green-icon); }
.tv-ico svg { width: 28px; height: 28px; }
.prose .tv-reason h3 { margin: 0 0 4px; font-size: 17px; }
.prose .tv-reason p { margin: 0; font-size: 15px; line-height: 1.6; }

/* Thẻ sản phẩm gợi ý */
.prose ul.tv-models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; padding: 0; list-style: none; }
.tv-model { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; }
.prose .tv-model img { width: 100%; aspect-ratio: 1; object-fit: cover; margin: 0; border-radius: 0; background: var(--c-bg-image); }
.tv-model__body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 12px; }
.prose .tv-model h3 { margin: 0; font-size: 17px; }
.prose .tv-model h3 a { color: var(--c-heading); text-decoration: none; }
.prose .tv-model p { margin: 0; font-size: 14px; line-height: 1.55; }
.tv-model__price { margin-top: auto !important; padding-top: 6px; color: var(--c-price); font-weight: 700; font-size: 16px !important; }

/* Hộp ghi chú */
.tv-note { display: flex; gap: 12px; margin: 18px 0; padding: 14px 16px; border-radius: 9px; background: #eef6ea; border: 1px solid #d3e6c9; }
.tv-note > .ic { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--c-green); }
.tv-note--warn { background: #fdf3ea; border-color: #f1d9c1; }
.tv-note--warn > .ic { color: #c0661b; }
.prose .tv-note p { margin: 0; }

/* Bảng */
.tv-table { margin: 18px 0; overflow-x: auto; border: 1px solid var(--c-border); border-radius: 9px; }
.tv-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.tv-table th, .tv-table td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.tv-table thead th { background: var(--c-primary); color: #fff; }
.tv-table tbody tr:nth-child(even) td { background: var(--c-bg-card); }
.tv-table tbody tr:last-child td { border-bottom: 0; }

/* Câu hỏi thường gặp */
.tv-faq { display: grid; gap: 10px; margin: 18px 0; }
.tv-faq-item { border: 1px solid var(--c-border); border-radius: 9px; background: var(--c-bg-card); }
.tv-faq-item summary { position: relative; padding: 13px 44px 13px 16px; font-weight: 700; cursor: pointer; list-style: none; }
.tv-faq-item summary::-webkit-details-marker { display: none; }
.tv-faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--c-primary); font-size: 22px; font-weight: 400; }
.tv-faq-item[open] summary::after { content: "–"; }
.prose .tv-faq-item p { margin: 0; padding: 0 16px 14px; line-height: 1.6; }

/* Kêu gọi + liên hệ */
.tv-contact { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; margin: 30px 0 0; padding: 22px; border-radius: 12px; background: var(--c-bg-hero); border: 1px solid #ecd9d8; }
.prose .tv-contact h2 { margin: 0 0 8px; font-size: 21px; }
.prose .tv-contact ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tv-contact li { display: flex; gap: 8px; align-items: flex-start; }
.tv-contact li .ic { flex: none; width: 18px; height: 18px; margin-top: 4px; color: var(--c-primary); }
.tv-contact__actions { display: grid; gap: 10px; justify-items: stretch; }
.prose .tv-contact__actions a { width: 100%; text-decoration: none; }
.prose .tv-contact__actions .btn-primary { color: #fff; }
.tv-contact__actions .btn-outline { justify-content: center; }

@media (max-width: 991px) {
  .tv-slide { flex-basis: calc((100% - 14px) / 2); }
  .prose ul.tv-models { grid-template-columns: repeat(2, 1fr); }
  .tv-slider__btn--prev { left: 4px; }
  .tv-slider__btn--next { right: 4px; }
}
@media (max-width: 640px) {
  .post__lead { padding: 14px 16px; font-size: 16px; }
  .tv-slide { flex-basis: 84%; }
  .prose ul.tv-reasons { grid-template-columns: 1fr; }
  .prose ul.tv-models { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tv-process > li { padding-left: 52px; }
  .tv-contact { grid-template-columns: 1fr; padding: 18px; }
  .prose h2.tv-h { gap: 10px; }
  .tv-h__no { width: 30px; height: 30px; font-size: 15px; }
}
