/* Post SP - style cho single Product Review, dua theo demo v8 da duoc duyet */

.postsp-page {
  --pink: #fc238e;
  --pink-soft: #fde7f1;
  --teal-dark: #183a43;
  --teal-btn: #179895;
  --white: #ffffff;
  --page-bg: #f0f1f2;
  --card-bg: #ffffff;
  --sidebar-bg: #f5f5f5;
  --border: #e6e6e6;
  --text: #333333;
  --text-muted: #767676;
  --good-bg: #e9f6f0;
  --good: #1f8a5a;
  --bad-bg: #fdeceb;
  --bad: #c23b30;
  --shadow: 0 1px 2px rgba(24,58,67,0.04), 0 8px 24px -14px rgba(24,58,67,0.22);

  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 90px;
  color: var(--text);
  font-family: 'Open Sans', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.postsp-page *,
.postsp-page *::before,
.postsp-page *::after { box-sizing: border-box; }

.postsp-page h1, .postsp-page h2, .postsp-page h3, .postsp-page h4 {
  font-family: 'Montserrat', -apple-system, "Segoe UI", sans-serif;
  font-weight: 800;
}
.postsp-page a { color: inherit; }

.postsp-page .post-eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px;
  color: var(--pink); font-weight: 700; margin: 0 0 8px; font-family: 'Open Sans', sans-serif;
}
.postsp-page .post-title {
  font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; margin: 0 0 24px;
  text-wrap: balance; color: var(--teal-dark);
}

.postsp-page .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
@media (max-width: 880px) { .postsp-page .layout { grid-template-columns: 1fr; } }

.postsp-page .sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
@media (max-width: 880px) { .postsp-page .sidebar { position: static; } }
.postsp-page .side-box { background: var(--sidebar-bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.postsp-page .side-box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px; color: var(--teal-dark); }
.postsp-page .toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.postsp-page .toc a { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; text-decoration: none; color: var(--text-muted); font-weight: 600; }
.postsp-page .toc a::before { content: "\2014"; color: var(--pink); font-weight: 700; }
.postsp-page .toc a:hover { color: var(--pink); }
.postsp-page .follow-row { display: flex; gap: 10px; }
.postsp-page .follow-btn { display: flex; align-items: center; gap: 8px; background: var(--teal-dark); color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 8px; }
.postsp-page .follow-btn svg { width: 15px; height: 15px; }
.postsp-page .follow-btn:hover { background: var(--pink); }
.postsp-page .side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.postsp-page .side-list li a { display: flex; gap: 10px; text-decoration: none; align-items: center; }
.postsp-page .side-thumb { flex: none; width: 56px; height: 44px; border-radius: 6px; background: linear-gradient(135deg, var(--pink-soft), #ffffff); border: 1px solid var(--border); overflow: hidden; }
.postsp-page .side-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.postsp-page .side-list .t { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.35; }

/* ---- noi dung bai viet ---- */
.postsp-page .article { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 30px 32px; }

.postsp-page .article p { margin: 0 0 20px; font-size: 16px; }
.postsp-page .article h2 { font-size: 21px; color: var(--teal-dark); margin: 36px 0 14px; scroll-margin-top: 20px; }
.postsp-page .article h2:first-of-type { margin-top: 0; }
.postsp-page .article h3 { font-size: 18px; color: var(--teal-dark); margin: 26px 0 12px; }
.postsp-page .article ul, .postsp-page .article ol { margin: 0 0 20px; padding-left: 22px; }
.postsp-page .article li { margin-bottom: 6px; }

/* Anh chen trong bai (Image block cua editor) */
.postsp-page .article img { max-width: 100%; height: auto; display: block; border-radius: 10px; }
.postsp-page .article figure { margin: 6px 0 24px; }
.postsp-page .article figure img { border-radius: 10px; }
.postsp-page .article figcaption { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 6px; }

/* ---- Anh review thuc te (psp_review_ids, tu chen xen ke trong bai, cach deu nhau) ---- */
/* Anh nay can bang 2 le voi doan van (khong dong khung, khong bo them padding rieng) */
.postsp-page .article img.review-photo-inline {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: 10px; display: block; margin: 8px 0 28px;
}

/* ---- Product Card giua bai (shortcode [postsp_carousel]) ---- */
.postsp-page .carousel-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 24px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 28px; margin: 8px 0 28px;
}
@media (max-width: 620px) { .postsp-page .carousel-card { grid-template-columns: 1fr; } }

.postsp-page .carousel-gallery { display: flex; flex-direction: column; gap: 10px; }
.postsp-page .carousel-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
  background: var(--sidebar-bg); display: flex; align-items: center; justify-content: center;
}
.postsp-page .carousel-frame .carousel-noimg { font-size: 13px; color: var(--text-muted); }
.postsp-page .carousel-frame .carousel-slide-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 0; opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.postsp-page .carousel-frame .carousel-slide-img.active { opacity: 1; pointer-events: auto; }
.postsp-page .carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; min-width: 24px; max-width: 24px; border-radius: 50%;
  border: none; padding: 0; margin: 0; line-height: 1; appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(2px); color: var(--pink); z-index: 2; font-size: 16px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s ease;
}
.postsp-page .carousel-nav:hover { background: rgba(255, 255, 255, 0.85); }
.postsp-page .carousel-nav.prev { left: 4px; }
.postsp-page .carousel-nav.next { right: 4px; }
.postsp-page .carousel-thumbs-row { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.postsp-page .carousel-thumb {
  width: 30px; height: 30px; padding: 0; border-radius: 0; border: 1px solid transparent;
  overflow: hidden; cursor: pointer; background: var(--sidebar-bg); flex: none; opacity: 0.6; transition: opacity 0.15s ease, border-color 0.15s ease;
}
.postsp-page .carousel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; filter: grayscale(100%); transition: filter 0.15s ease; }
.postsp-page .carousel-thumb:hover { opacity: 0.85; }
.postsp-page .carousel-thumb.active { border-color: var(--pink); opacity: 1; }
.postsp-page .carousel-thumb.active img { filter: grayscale(0%); }

.postsp-page .carousel-info { display: flex; flex-direction: column; }
.postsp-page .carousel-eyebrow {
  display: inline-block; width: fit-content; color: var(--pink);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.postsp-page .carousel-name { font-size: 21px; line-height: 1.28; margin: 0 0 14px; color: var(--teal-dark); text-wrap: balance; }
.postsp-page .carousel-cta-row {
  display: flex; align-items: stretch; width: fit-content; max-width: 100%;
  background: #fff; border: 1.5px solid var(--pink); border-radius: 999px;
  overflow: hidden; margin-bottom: 18px;
}
.postsp-page .carousel-price {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px;
  font-family: 'Montserrat', sans-serif; color: var(--teal-dark); white-space: nowrap;
}
.postsp-page .carousel-price .price-original {
  text-decoration: line-through; font-weight: 600; color: var(--text-muted);
}
.postsp-page .carousel-price .price-arrow { color: var(--text-muted); font-weight: 600; }
.postsp-page .carousel-price .price-sale { color: var(--pink); }
.postsp-page .carousel-divider { flex: none; width: 1px; margin: 10px 0; background: var(--pink); opacity: 0.35; }
.postsp-page .carousel-cta {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--pink); font-weight: 700; font-size: 12.5px; letter-spacing: 0.02em;
  text-decoration: none; text-transform: uppercase; padding: 12px 18px; white-space: nowrap;
}
.postsp-page .carousel-cta svg { width: 13px; height: 13px; }

.postsp-page .carousel-prosli { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.postsp-page .carousel-prosli li { display: flex; gap: 8px; font-size: 14px; align-items: flex-start; margin-bottom: 0; }
.postsp-page .carousel-prosli .mark { flex: none; width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.postsp-page .carousel-prosli .mark svg { width: 10px; height: 10px; }
.postsp-page .carousel-prosli.good .mark { background: var(--good-bg); color: var(--good); }
.postsp-page .carousel-prosli.bad .mark { background: var(--bad-bg); color: var(--bad); }
.postsp-page .carousel-hr { border: none; border-top: 1px solid var(--border); margin: 6px 0 12px; }

/* ---- Bang Key Features (shortcode [postsp_features]) ---- */
.postsp-page .features-wrap { overflow-x: auto; margin: 6px 0 26px; }
.postsp-page table.features { width: 100%; border-collapse: collapse; font-size: 14.5px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.postsp-page table.features td { padding: 12px 16px; border: 1px solid var(--border); }
.postsp-page table.features td:first-child { background: var(--pink-soft); font-weight: 700; width: 38%; color: var(--teal-dark); }
.postsp-page table.features td:last-child { background: #fdeff5; }

/* ---- trich dan (WP quote block hoac blockquote thuong) ---- */
.postsp-page blockquote,
.postsp-page .article blockquote {
  margin: 0 0 24px; padding: 4px 0 4px 18px; border-left: 3px solid var(--pink);
  font-size: 16px; font-style: italic; color: var(--text); max-width: 62ch;
}
.postsp-page blockquote p { margin: 0; }
.postsp-page blockquote cite { display: block; margin-top: 8px; font-size: 13px; font-style: normal; color: var(--text-muted); }

/* ---- Related Articles (grid 4 bai cuoi trang) ---- */
.postsp-page .related-section { margin-top: 44px; }
.postsp-page .related-section h2 { font-size: 22px; color: var(--teal-dark); margin: 0 0 18px; }
.postsp-page .related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 880px) { .postsp-page .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .postsp-page .related-grid { grid-template-columns: 1fr; } }
.postsp-page .related-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow); display: block; }
.postsp-page .related-thumb { aspect-ratio: 4/3; background: linear-gradient(135deg, var(--pink-soft), var(--sidebar-bg)); overflow: hidden; }
.postsp-page .related-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.postsp-page .related-body { padding: 14px; }
.postsp-page .related-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 8px; line-height: 1.35; }
.postsp-page .related-more { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--pink); }

/* ---- More From This Brand (chen ngay sau doan mo bai) ---- */
/* Danh sach link (nut tron + tieu de) dung chung 1 kieu voi cac trang khac,
   style o file assets/css/bci-related-brand.css cua plugin BCI Related Brand. */
.postsp-page .related-section--inline { margin: 24px 0; color: var(--teal-dark); }
.postsp-page .related-section--inline h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink); font-weight: 700; margin: 0 0 8px; font-family: 'Open Sans', sans-serif; }
.postsp-page .related-section--inline .bci-related-brand-list a { color: var(--teal-btn); }
