/* ============================================================
   SINGLE POST PAGE
   Design ref: Figma node 177-2330
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --sp-text: #222;
  --sp-muted: #8a8a8a;
  --sp-muted-dark: #737373;
  --sp-red: #ff2525;
  --sp-bg: #f4f4f4;
  --sp-white: #fff;
  --sp-radius: 20px;
  --sp-container: 1444px;
  --sp-content-w: 740px;
  --sp-sidebar-w: 430px;
  --sp-gap: 32px;
}

/* ── Page wrapper ───────────────────────────────────────────── */
.single-post-page {
  background: var(--sp-bg);
  min-height: 60vh;
  padding-top: 160px;
  padding-bottom: 80px;
}

/* ── Container ──────────────────────────────────────────────── */
.single-post-page .container {
  max-width: var(--sp-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 122px;
  padding-right: 122px;
}

/* ── Two-column layout ──────────────────────────────────────── */
.single-post-page__inner {
  display: grid;
  grid-template-columns: 1fr var(--sp-sidebar-w);
  gap: 32px;
  align-items: start;
}

/* ============================================================
   CONTENT COLUMN
   ============================================================ */
.single-post__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-gap);
}

/* Breadcrumb / danh mục */
.single-post__breadcrumb {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.single-post__cat-link {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--sp-muted);
  text-decoration: none;
  line-height: normal;
  transition: color 0.2s;
}

.single-post__cat-link:hover {
  color: var(--sp-text);
}

/* Tiêu đề */
.single-post__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 40px;
  color: var(--sp-text);
  line-height: normal;
  margin: 0;
  margin-bottom: 32px;
}

/* Excerpt / mô tả */
.single-post__excerpt {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--sp-muted-dark);
  line-height: 1.6;
  margin: 0;
}

/* Meta: lượt xem + tác giả/ngày/thời gian đọc */
.single-post__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 60px;
}

.single-post__meta-views {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.single-post__meta-icon {
  display: block;
  flex-shrink: 0;
}

.single-post__meta-views span {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--sp-muted);
  line-height: normal;
  min-width: 30px;
}

.single-post__meta-info {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--sp-muted);
  line-height: normal;
  white-space: nowrap;
}

/* Ảnh đại diện */
.single-post__thumbnail {
  width: 100%;
  border-radius: var(--sp-radius);
  overflow: hidden;
}

.single-post__thumb-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ============================================================
   POST BODY — Classic Editor + Block Editor (Gutenberg)
   Scope: .single-post__body
   ============================================================ */

/* ── Base ───────────────────────────────────────────────────── */
.single-post__body {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--sp-text);
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
  padding: 60px 41px 60px 40px;
  border-radius: 20px;
  background: #fff;
}

/* ── Headings ───────────────────────────────────────────────── */
.single-post__body h1,
.single-post__body h2,
.single-post__body h3,
.single-post__body h4,
.single-post__body h5,
.single-post__body h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--sp-text);
  line-height: 1.3;
  margin: 1.6em 0 0.5em;
}

.single-post__body h1 {
  font-size: 36px;
}
.single-post__body h2 {
  font-size: 28px;
}
.single-post__body h3 {
  font-size: 22px;
}
.single-post__body h4 {
  font-size: 18px;
}
.single-post__body h5 {
  font-size: 16px;
}
.single-post__body h6 {
  font-size: 14px;
}

/* ── Paragraph ──────────────────────────────────────────────── */
.single-post__body p {
  margin: 0 0 1.2em;
}

.single-post__body p:last-child {
  margin-bottom: 0;
}

/* ── Links ──────────────────────────────────────────────────── */
.single-post__body a {
  color: var(--sp-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.single-post__body a:hover {
  color: var(--sp-red);
}

/* ── Strong / Em ────────────────────────────────────────────── */
.single-post__body strong,
.single-post__body b {
  font-weight: 700;
}

.single-post__body em,
.single-post__body i {
  font-style: italic;
}

.single-post__body u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post__body s,
.single-post__body del {
  text-decoration: line-through;
  opacity: 0.6;
}

/* ── Lists ──────────────────────────────────────────────────── */
.single-post__body ul,
.single-post__body ol {
  margin: 0 0 1.2em;
  padding-left: 1.6em;
}

.single-post__body ul {
  list-style-type: disc;
}

.single-post__body ol {
  list-style-type: decimal;
}

.single-post__body li {
  margin-bottom: 0.4em;
  line-height: 1.7;
}

.single-post__body li > ul,
.single-post__body li > ol {
  margin-top: 0.3em;
  margin-bottom: 0;
}

/* ── Blockquote ─────────────────────────────────────────────── */
.single-post__body blockquote {
  border-left: 4px solid var(--sp-muted);
  margin: 1.8em 0;
  padding: 0.8em 1.2em;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0 8px 8px 0;
  color: var(--sp-muted-dark);
  font-style: italic;
}

.single-post__body blockquote p {
  margin: 0;
}

.single-post__body blockquote cite {
  display: block;
  margin-top: 0.6em;
  font-size: 14px;
  font-style: normal;
  color: var(--sp-muted);
}

/* ── Horizontal rule ────────────────────────────────────────── */
.single-post__body hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2em 0;
}

/* ── Images (Classic + Block) ───────────────────────────────── */
.single-post__body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Classic editor image alignment */
.single-post__body img.aligncenter,
.single-post__body .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.single-post__body img.alignleft,
.single-post__body .alignleft {
  float: left;
  margin: 0.4em 1.4em 1em 0;
}

.single-post__body img.alignright,
.single-post__body .alignright {
  float: right;
  margin: 0.4em 0 1em 1.4em;
}

.single-post__body img.alignnone {
  margin: 1em 0;
}

/* Classic editor caption */
.single-post__body .wp-caption {
  max-width: 100%;
  margin: 1.2em 0;
}

.single-post__body .wp-caption img {
  margin: 0;
  border-radius: 12px 12px 0 0;
}

.single-post__body .wp-caption-text {
  font-size: 13px;
  color: var(--sp-muted);
  text-align: center;
  padding: 6px 8px;
  margin: 0;
  font-style: italic;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0 0 8px 8px;
}

/* Clearfix after floated images */
.single-post__body::after {
  content: "";
  display: table;
  clear: both;
}

/* ── Tables ─────────────────────────────────────────────────── */
.single-post__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
  overflow-x: auto;
  display: block;
}

.single-post__body thead {
  background: var(--sp-text);
  color: #fff;
}

.single-post__body th,
.single-post__body td {
  padding: 10px 14px;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.single-post__body th {
  font-weight: 700;
}

.single-post__body tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

/* ── Code ───────────────────────────────────────────────────── */
.single-post__body code {
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c0392b;
  word-break: break-all;
}

.single-post__body pre {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
  padding: 1.2em 1.4em;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5em 0;
  white-space: pre;
}

.single-post__body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
  word-break: normal;
}

/* ── Gutenberg Blocks ───────────────────────────────────────── */

/* -- wp:image -- */
.single-post__body .wp-block-image {
  margin: 1.5em 0;
}

.single-post__body .wp-block-image img {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
}

.single-post__body .wp-block-image figcaption {
  font-size: 13px;
  color: var(--sp-muted);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}

.single-post__body .wp-block-image.aligncenter {
  text-align: center;
}

.single-post__body .wp-block-image.alignleft {
  float: left;
  margin-right: 1.4em;
  margin-bottom: 1em;
}

.single-post__body .wp-block-image.alignright {
  float: right;
  margin-left: 1.4em;
  margin-bottom: 1em;
}

.single-post__body .wp-block-image.alignfull,
.single-post__body .wp-block-image.alignwide {
  width: 100%;
  max-width: 100%;
}

/* -- wp:gallery -- */
.single-post__body .wp-block-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.5em 0;
  padding: 0;
  list-style: none;
}

.single-post__body .wp-block-gallery .blocks-gallery-item,
.single-post__body .wp-block-gallery figure {
  flex: 1 1 calc(33.333% - 10px);
  min-width: 120px;
  margin: 0;
}

.single-post__body .wp-block-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.single-post__body .wp-block-gallery figcaption {
  font-size: 12px;
  color: var(--sp-muted);
  text-align: center;
  margin-top: 4px;
}

/* -- wp:quote -- */
.single-post__body .wp-block-quote {
  border-left: 4px solid var(--sp-muted);
  margin: 1.8em 0;
  padding: 0.8em 1.2em;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 0 8px 8px 0;
}

.single-post__body .wp-block-quote p {
  font-style: italic;
  color: var(--sp-muted-dark);
  margin: 0;
}

.single-post__body .wp-block-quote cite,
.single-post__body .wp-block-quote footer {
  display: block;
  margin-top: 0.6em;
  font-size: 14px;
  font-style: normal;
  color: var(--sp-muted);
}

/* -- wp:pullquote -- */
.single-post__body .wp-block-pullquote {
  border-top: 4px solid var(--sp-text);
  border-bottom: 4px solid var(--sp-text);
  padding: 1.4em 0;
  margin: 2em 0;
  text-align: center;
}

.single-post__body .wp-block-pullquote blockquote {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

.single-post__body .wp-block-pullquote p {
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  color: var(--sp-text);
  margin: 0;
}

.single-post__body .wp-block-pullquote cite {
  font-size: 14px;
  color: var(--sp-muted);
  font-style: normal;
  margin-top: 0.5em;
  display: block;
}

/* -- wp:heading -- */
.single-post__body .wp-block-heading {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--sp-text);
  line-height: 1.3;
  margin: 1.6em 0 0.5em;
}

/* -- wp:list -- */
.single-post__body .wp-block-list {
  margin: 0 0 1.2em;
  padding-left: 1.6em;
}

/* -- wp:separator -- */
.single-post__body .wp-block-separator {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2em 0;
}

.single-post__body .wp-block-separator.is-style-wide {
  width: 100%;
}

.single-post__body .wp-block-separator.is-style-dots {
  border: none;
  text-align: center;
  line-height: 1;
  height: auto;
}

.single-post__body .wp-block-separator.is-style-dots::before {
  content: "···";
  font-size: 24px;
  letter-spacing: 0.5em;
  color: var(--sp-muted);
}

/* -- wp:code / wp:preformatted -- */
.single-post__body .wp-block-code,
.single-post__body .wp-block-preformatted {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
  padding: 1.2em 1.4em;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5em 0;
  white-space: pre;
}

.single-post__body .wp-block-code code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

/* -- wp:table -- */
.single-post__body .wp-block-table {
  margin: 1.5em 0;
  overflow-x: auto;
  display: block;
}

.single-post__body .wp-block-table table {
  display: table;
  margin: 0;
}

.single-post__body .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.04);
}

.single-post__body .wp-block-table figcaption {
  font-size: 13px;
  color: var(--sp-muted);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}

/* -- wp:columns -- */
.single-post__body .wp-block-columns {
  display: flex;
  gap: 24px;
  margin: 1.5em 0;
  flex-wrap: wrap;
}

.single-post__body .wp-block-column {
  flex: 1 1 0;
  min-width: 0;
}

/* -- wp:media-text -- */
.single-post__body .wp-block-media-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin: 1.5em 0;
}

.single-post__body .wp-block-media-text .wp-block-media-text__media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.single-post__body .wp-block-media-text.has-media-on-the-right {
  direction: rtl;
}

.single-post__body .wp-block-media-text.has-media-on-the-right > * {
  direction: ltr;
}

/* -- wp:embed / oembed (video, iframe) -- */
.single-post__body .wp-block-embed,
.single-post__body .wp-block-video {
  margin: 1.5em 0;
}

.single-post__body .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}

.single-post__body .wp-block-embed__wrapper iframe,
.single-post__body .wp-block-embed__wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

.single-post__body .wp-block-video video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* -- wp:audio -- */
.single-post__body .wp-block-audio audio {
  width: 100%;
  margin: 1em 0;
  display: block;
}

/* -- wp:file -- */
.single-post__body .wp-block-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  margin: 1.2em 0;
}

.single-post__body .wp-block-file a {
  font-weight: 600;
  text-decoration: none;
  color: var(--sp-text);
}

.single-post__body .wp-block-file a:hover {
  color: var(--sp-red);
}

.single-post__body .wp-block-file .wp-block-file__button {
  background: var(--sp-text);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.single-post__body .wp-block-file .wp-block-file__button:hover {
  background: var(--sp-red);
}

/* -- wp:button / wp:buttons -- */
.single-post__body .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.5em 0;
}

.single-post__body .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--sp-text);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}

.single-post__body .wp-block-button__link:hover {
  background: var(--sp-red);
  color: #fff;
}

.single-post__body .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 2px solid var(--sp-text);
  color: var(--sp-text);
}

.single-post__body
  .wp-block-button.is-style-outline
  .wp-block-button__link:hover {
  border-color: var(--sp-red);
  color: var(--sp-red);
}

/* -- wp:cover -- */
.single-post__body .wp-block-cover {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5em 0;
  padding: 2em;
}

.single-post__body .wp-block-cover__image-background,
.single-post__body .wp-block-cover__video-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post__body .wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
}

/* -- wp:group / wp:row / wp:stack -- */
.single-post__body .wp-block-group {
  margin: 1.2em 0;
}

/* -- wp:spacer -- */
.single-post__body .wp-block-spacer {
  display: block;
}

/* -- wp:html (custom HTML block) -- */
.single-post__body .wp-block-html {
  margin: 1em 0;
}

/* -- wp:verse -- */
.single-post__body .wp-block-verse {
  font-family: "Montserrat", sans-serif;
  font-style: italic;
  white-space: pre-wrap;
  padding: 1em 1.4em;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  margin: 1.5em 0;
  color: var(--sp-muted-dark);
}

/* -- wp:details (accordion) -- */
.single-post__body .wp-block-details {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0;
  margin: 1.2em 0;
  overflow: hidden;
}

.single-post__body .wp-block-details summary {
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.03);
  list-style: none;
  user-select: none;
}

.single-post__body .wp-block-details summary::-webkit-details-marker {
  display: none;
}

.single-post__body .wp-block-details[open] summary {
  border-bottom: 1px solid #e0e0e0;
}

.single-post__body .wp-block-details > *:not(summary) {
  padding: 12px 16px;
}

/* -- Figcaption chung -- */
.single-post__body figcaption {
  font-size: 13px;
  color: var(--sp-muted);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}

/* -- Iframe nhúng trực tiếp (Classic editor) -- */
.single-post__body iframe {
  max-width: 100%;
  border-radius: 12px;
  display: block;
  margin: 1em 0;
}

/* -- Responsive iframe/video (Classic editor) -- */
.single-post__body .embed-responsive,
.single-post__body .video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 1.5em 0;
}

.single-post__body .embed-responsive iframe,
.single-post__body .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Responsive: body content ───────────────────────────────── */
@media (max-width: 768px) {
  .single-post__body .wp-block-columns {
    flex-direction: column;
  }

  .single-post__body .wp-block-media-text {
    grid-template-columns: 1fr;
  }

  .single-post__body .wp-block-media-text.has-media-on-the-right {
    direction: ltr;
  }

  .single-post__body .wp-block-gallery .blocks-gallery-item,
  .single-post__body .wp-block-gallery figure {
    flex: 1 1 calc(50% - 10px);
  }

  .single-post__body .wp-block-pullquote p {
    font-size: 18px;
  }

  .single-post__body table {
    font-size: 13px;
  }

  .single-post__body th,
  .single-post__body td {
    padding: 8px 10px;
  }
}

/* ============================================================
   SIDEBAR COLUMN
   ============================================================ */
.single-post__sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: sticky;
  top: 100px;
}

/* Sidebar box chung */
.single-post__sidebar-box {
  background: var(--sp-white);
  border-radius: var(--sp-radius);
  padding: 40px 30px;
}

.single-post__sidebar-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #000;
  line-height: normal;
  margin: 0 0 28px;
}

/* ── Tin tức mới nhất ───────────────────────────────────────── */
.single-post__latest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.single-post__latest-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.single-post__latest-item::before {
  content: "•";
  color: var(--sp-text);
  font-size: 16px;
  line-height: 1.4;
  flex-shrink: 0;
  margin-top: 1px;
}

.single-post__latest-link {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--sp-text);
  text-decoration: underline;
  line-height: normal;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-post__latest-link:hover {
  color: var(--sp-red);
}

/* ── Tin tức liên quan ──────────────────────────────────────── */
.single-post__sidebar-box--related {
  background: transparent;
  padding: 0;
}

.single-post__related-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.single-post__related-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.single-post__related-img-wrap {
  flex-shrink: 0;
  width: 136px;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.single-post__related-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.single-post__related-img-wrap:hover .single-post__related-img {
  transform: scale(1.05);
}

.single-post__related-img--placeholder {
  background: #dfdfdf;
  width: 100%;
  height: 100%;
}

.single-post__related-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.single-post__related-cat {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: #000;
  line-height: normal;
}

.single-post__related-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--sp-text);
  line-height: normal;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.single-post__related-title:hover {
  color: var(--sp-red);
}

.single-post__related-excerpt {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #000;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-post__related-readmore {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--sp-red);
  text-decoration: none;
  line-height: normal;
  transition: opacity 0.2s;
}

.single-post__related-readmore:hover {
  opacity: 0.75;
}

/* ============================================================
   POST CONTROL — Prev / Next navigation
   Design ref: Figma node 177-2545
   ============================================================ */

.single-post__control {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

/* ── Hàng mũi tên ───────────────────────────────────────────── */
.single-post__control-arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.single-post__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.2s;
}

.single-post__arrow svg {
  display: block;
  width: 60px;
  height: 60px;
}

.single-post__arrow:hover:not(.single-post__arrow--disabled) {
  opacity: 0.65;
}

.single-post__arrow--disabled {
  cursor: default;
  pointer-events: none;
}

/* ── Hàng thông tin bài trước / sau ────────────────────────── */
.single-post__control-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.single-post__control-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: calc(50% - 10px);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.single-post__control-item:hover {
  opacity: 0.75;
}

.single-post__control-item--next {
  text-align: right;
  align-items: flex-end;
}

.single-post__control-item--empty {
  pointer-events: none;
}

.single-post__control-cat {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--sp-muted);
  line-height: normal;
}

.single-post__control-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--sp-text);
  line-height: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-post__control-date {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--sp-muted);
  line-height: normal;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .single-post__arrow svg {
    width: 44px;
    height: 44px;
  }

  .single-post__control-title {
    font-size: 16px;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ≤ 1400px */
@media (max-width: 1400px) {
  .single-post-page .container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* ≤ 1200px */
@media (max-width: 1200px) {
  .single-post-page__inner {
    grid-template-columns: 1fr 360px;
  }

  .single-post__title {
    font-size: 32px;
  }
}

/* ≤ 1024px — stack layout */
@media (max-width: 1024px) {
  .single-post-page__inner {
    grid-template-columns: 1fr;
  }

  .single-post__sidebar {
    position: static;
  }

  .single-post__sidebar-box--related {
    padding: 0;
  }
}

/* ≤ 768px */
@media (max-width: 768px) {
  .single-post-page {
    padding-top: 100px;
    padding-bottom: 40px;
  }

  .single-post-page .container {
    padding-left: 0px;
    padding-right: 0px;
  }

  .single-post__title {
    font-size: 24px;
  }

  .single-post__meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .single-post__meta-info {
    white-space: normal;
    font-size: 14px;
  }

  .single-post__sidebar-box {
    padding: 24px 20px;
  }

  .single-post__sidebar-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .single-post__related-img-wrap {
    width: 100px;
    height: 100%;
  }

  .single-post__body h1 {
    font-size: 28px;
  }
  .single-post__body h2 {
    font-size: 22px;
  }
  .single-post__body h3 {
    font-size: 18px;
  }
  .single-post__body h4 {
    font-size: 16px;
  }
  .single-post-page-heading {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .single-post__body {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/*  */
.single-post__share {
  padding: 40px 0;
  margin-bottom: 40px;
  border-bottom: 1px solid #000;
}
.single-post__share-label {
  color: #737373;
  font-family: Montserrat;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin-bottom: 12px;
}
.single-post__share-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ============================================================
   SINGLE POST — SẢN PHẨM LIÊN QUAN
   Design ref: Figma node 177-2446
   ============================================================ */

.single-post-productrelated {
  padding: 60px 122px 80px;
  display: flex;
  flex-direction: column;
  gap: 41px;
  align-items: center;
}

.single-post-productrelated__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #000;
  text-align: center;
  line-height: normal;
  margin: 0;
  width: 100%;
}

/* ── Grid 4 cột ─────────────────────────────────────────────── */
.single-post-productrelated__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  width: 100%;
}

/* ── Card ───────────────────────────────────────────────────── */
.spr-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

/* Ảnh */
.spr-card__img-wrap {
  display: block;
  width: 100%;
  height: 272px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}

.spr-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  transition: transform 0.35s ease;
}

.spr-card__img-wrap:hover .spr-card__img {
  transform: scale(1.04);
}

.spr-card__img--placeholder {
  background: #dfdfdf;
  width: 100%;
  height: 100%;
  border-radius: 20px;
}

/* Tên sản phẩm */
.spr-card__name {
  height: 60px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #000;
  text-align: center;
  line-height: normal;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  transition: color 0.2s;
}

.spr-card__name:hover {
  color: #00d3d7;
}

/* Bottom: rating + nút */
.spr-card__bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

/* Rating */
.spr-card__rating {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  justify-content: center;
}

.spr-card__star {
  display: block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.spr-card__chevron {
  display: block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-left: 1px;
}

.spr-card__review-count {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: #000;
  line-height: normal;
  white-space: nowrap;
  margin-left: 2px;
}

/* Nút thêm vào giỏ */
.bestselling-single-addtocart {
  margin-top: 12px;
  display: flex;
  height: 52px;
  padding: 16px 20px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 100px;
  background: #00d3d7;
  cursor: pointer;
}

.bestselling-single-addtocart span {
  color: #fff;
  font-family: Montserrat;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.bestselling-single-addtocart svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.spr-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background: #00d3d7;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 16px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    opacity 0.2s;
  white-space: nowrap;
}

.spr-card__btn:hover {
  background: #00b8bc;
  color: #fff;
}

.spr-card__btn--outline {
  background: transparent;
  border: 1.5px solid #00d3d7;
  color: #00d3d7;
}

.spr-card__btn--outline:hover {
  background: rgba(0, 211, 215, 0.08);
  color: #00d3d7;
}
.single-post-page-heading {
  margin-bottom: 52px;
}
/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1400px) {
  .single-post-productrelated {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 1024px) {
  .single-post-productrelated__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .single-post-productrelated {
    padding: 40px 20px 60px;
    gap: 28px;
  }

  .single-post-productrelated__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .spr-card__img-wrap {
    height: 180px;
  }

  .spr-card__name {
    font-size: 14px;
  }

  .spr-card__btn {
    font-size: 14px;
    height: 44px;
  }
  .single-post__share {
    padding: 40px 16px;
  }
  .single-post__control {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .single-post-productrelated__grid {
    grid-template-columns: 1fr;
  }

  .spr-card__img-wrap {
    height: 220px;
  }
}
