/*
Theme Name: AffiliateCMS Child
Theme URI: https://affiliatecms.com/
Description: Child theme for AffiliateCMS Theme. Add your custom styles and overrides here.
Author: AffiliateCMS Team
Author URI: https://affiliatecms.com/
Template: affiliateCMS-theme
Version: 1.5.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: affiliatecms-child
*/
.header__menu .sub-menu {
  width: max-content !important;
  min-width: max-content !important;
}

.header__menu .sub-menu li {
  width: auto !important;
}

.header__menu .sub-menu a {
  display: block;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
}
/* ==========================================================================
   Custom Styles - Add your overrides below
   ========================================================================== */

/* ==========================================================================
   Footer: nền tối #222, chữ và link màu trắng #fff
   ========================================================================== */
.site-footer {
  background-color: #222;
  color: #fff;
  border-top-color: rgba(255, 255, 255, 0.12);
}

/* Toàn bộ chữ trong footer mặc định màu trắng */
.site-footer,
.site-footer .footer__logo,
.site-footer .footer__logo-text,
.site-footer .footer__description,
.site-footer .footer__description strong,
.site-footer .footer__info,
.site-footer .footer__disclosure,
.site-footer .footer__copyright {
  color: #fff;
}

/* Mọi anchor / link trong footer màu trắng */
.site-footer a,
.site-footer .footer__link,
.site-footer .footer__disclosure-link,
.site-footer .footer__social-link {
  color: #fff;
}

/* Hover link: giữ trắng, mờ nhẹ để có phản hồi thị giác */
.site-footer a:hover,
.site-footer .footer__link:hover,
.site-footer .footer__disclosure-link:hover {
  color: #fff;
  opacity: 0.75;
}

/* Nút mạng xã hội: nền sáng mờ trên nền tối, icon trắng */
.site-footer .footer__social-link {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.site-footer .footer__social-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Đường kẻ phân cách hợp với nền tối */
.site-footer .footer__main {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Category Boxes (Homepage) - khu vực box danh mục kiểu Wirecutter
   Tái dùng .section-header-v2, .posts-grid-v2, .posts-list, .post-card
   ========================================================================== */

/* Khu vực: KHÔNG dùng nền section (bỏ background gradient của .posts-section) */
.category-boxes {
  padding: 2rem 0;
  background: none;
}

@media (min-width: 768px) {
  .category-boxes {
    padding: 3rem 0;
  }
}

/* Mỗi box + khoảng cách (đã BỎ border-bottom của category-box theo yêu cầu) */
.category-boxes .category-box {
  margin-bottom: 2.5rem;
}

.category-boxes .category-box:last-child {
  margin-bottom: 0;
}

.category-boxes .category-box:not(:last-child) {
  padding-bottom: 2.5rem;
}

/* Header: căn theo dòng đầu để hợp với tiêu đề lớn + list danh mục con */
.category-boxes .section-header-v2 {
  align-items: flex-start;
}

/* Đường kẻ đậm kiểu Wirecutter đặt trên DIV LỚN -> kéo dài 100% chiều rộng */
.section-header-v2 {
  border-top: 6.5px solid #000;
  padding-top: 0.5rem;
}

/* Tiêu đề section header = 2.625rem ở MỌI NƠI (Latest Reviews + box danh mục) */
.section-header-v2__title {
  font-size: 2.625rem;
  line-height: 1.15;
}

/* Tên danh mục trong box là link (bỏ link "View All" rời) */
.category-boxes .section-header-v2__title a {
  color: inherit;
  text-decoration: none;
}

.category-boxes .section-header-v2__title a:hover {
  color: var(--color-primary, #e8744f);
}

/* Danh sách danh mục con (thay cho subtitle), kiểu Wirecutter */
.category-box__subcats {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-muted, #6b7280);
}

.category-box__subcats a {
  color: var(--color-text-secondary, #374151);
  text-decoration: underline;
}

.category-box__subcats a:hover {
  color: var(--color-primary, #e8744f);
  text-decoration: underline;
}

/* Nhãn "By" / "Updated" trong footer card (thay cho icon) */
.post-card__meta-label {
  font-weight: 400;
  color: var(--color-text-subtle, #9ca3af);
  margin-right: 2px;
}

/* BỎ border-top của footer card (cả grid-v2 lẫn list) */
.post-card--grid-v2 .post-card__footer-grid,
.post-card--list .post-card__footer-grid {
  border-top: none;
  padding-top: 0;
}

/* Tiêu đề featured trong box = 1.5rem cho đồng bộ với card grid */
.category-boxes .featured-card .featured-card__title {
  font-size: 1.5rem;
  line-height: 1.3;
}

/* Footer-grid trong box Featured: nằm trên overlay ảnh tối -> chữ sáng */
.category-boxes .featured-card .post-card__footer-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.category-boxes .featured-card .post-card__author-text,
.category-boxes .featured-card .post-card__footer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.85);
}

.category-boxes .featured-card .post-card__meta-label {
  color: rgba(255, 255, 255, 0.6);
}

/* Tiêu đề card grid-v2 = 1.5rem ở MỌI NƠI (Latest Reviews + box) cho đồng bộ */
.post-card--grid-v2 .post-card__title {
  font-size: 1.5rem;
  line-height: 1.3;
}

/* ----- Responsive: Tablet (<= 1023px) ----- */
@media (max-width: 1023px) {
  .section-header-v2 {
    border-top-width: 5px;
    padding-top: 0.4rem;
  }

  .section-header-v2__title {
    font-size: 2rem;
  }

  .post-card--grid-v2 .post-card__title,
  .category-boxes .featured-card .featured-card__title {
    font-size: 1.25rem;
  }
}

/* ----- Responsive: Mobile (<= 639px) ----- */
@media (max-width: 639px) {
  .category-boxes {
    padding: 1.5rem 0;
  }

  .category-boxes .category-box {
    margin-bottom: 1.5rem;
  }

  .category-boxes .category-box:not(:last-child) {
    padding-bottom: 1.5rem;
  }

  /* Header: cho phép xuống dòng gọn trên màn nhỏ */
  .category-boxes .section-header-v2 {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .category-boxes .section-header-v2__icon {
    width: 34px;
    height: 34px;
  }

  .section-header-v2 {
    border-top-width: 4px;
    padding-top: 0.35rem;
  }

  .section-header-v2__title {
    font-size: 1.625rem;
  }

  .category-box__subcats {
    font-size: 0.875rem;
  }

  .post-card--grid-v2 .post-card__title,
  .category-boxes .featured-card .featured-card__title {
    font-size: 1.125rem;
  }
}

/* ==========================================================================
   Featured Posts (đầu trang) - cột phải dạng LIST (title + meta nhỏ)
   ========================================================================== */

/* Cột phải: list dọc, trải đều chiều cao để cân với card lớn bên trái */
.featured-grid__side--list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 0;
}

.featured-list-item {
  padding: 0.85rem 0;
}

.featured-list-item:first-child {
  padding-top: 0;
}

.featured-list-item:last-child {
  padding-bottom: 0;
}

.featured-list-item__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Tiêu đề: chữ tối (vì không còn nền ảnh)
   [Dọn 2026-06-08] Bỏ -webkit-line-clamp: 2 (đã bị block "Bỏ cắt chữ title"
   phía dưới unset) và rule hover đổi màu (đã bị block "Bỏ hover featured-card"
   đè) - giữ lại các thuộc tính còn tác dụng */
.featured-grid__side--list .featured-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--color-text, #111827);
  transition: color 0.2s ease;
}

/* Meta nhỏ phía dưới tiêu đề */
.featured-grid__side--list .featured-card__meta {
  margin-top: 0.3rem;
}

.featured-grid__side--list .featured-card__date {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #6b7280);
}

/* Mobile/tablet (<1024px khi cột dồn xuống): bỏ ép chiều cao */
@media (max-width: 1023px) {
  .featured-grid__side--list {
    height: auto;
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Single Post Header - Wirecutter style (.wc-post-header)
   ========================================================================== */
.wc-post-header {
  padding: 2rem 0 0;
}

/* Cột nội dung canh giữa, khớp .post-content (max 900px) */
.wc-post-header__inner {
  max-width: 900px;
  margin: 0 auto;
}

/* ----- Breadcrumb (UPPERCASE, xám) ----- */
.wc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6b7280);
}

.wc-breadcrumb__link {
  color: var(--color-text-muted, #6b7280);
  text-decoration: none;
}

.wc-breadcrumb__link:hover {
  color: var(--color-primary, #e8744f);
}

.wc-breadcrumb__sep {
  color: var(--color-text-muted, #9ca3af);
}

/* ----- Tiêu đề + kẻ đen đậm phía trên ----- */
.wc-post-header__title {
  margin: 0.85rem 0 0;
  padding-top: 1rem;
  border-top: 6.5px solid var(--color-text, #000000);
  font-size: 3rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text, #111111);
}

/* ----- Excerpt ----- */
.wc-post-header__excerpt {
  margin: 1rem 0 0;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--color-text-secondary, #374151);
}

/* ----- Meta: Updated + reading time + views + rating ----- */
.wc-post-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: var(--color-text-muted, #6b7280);
}

.wc-post-header__updated {
  color: var(--color-text-secondary, #374151);
  font-weight: 500;
}

.wc-post-header__metaitem {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.wc-post-header__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--color-text-secondary, #374151);
}

.wc-post-header__rating .wc-post-header__stars {
  color: #f5a623;
}

.wc-post-header__rating-score {
  font-weight: 700;
}

/* ----- Hàng share / action ----- */
.wc-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.wc-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 999px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #111827);
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Nút chỉ có icon -> hình tròn */
.wc-share__btn:not(.wc-share__btn--save) {
  width: 44px;
  padding: 0;
}

.wc-share__btn:hover {
  background: var(--color-surface-hover, #f3f4f6);
  border-color: var(--color-text-muted, #9ca3af);
}

.wc-share__btn.is-copied {
  color: #16a34a;
  border-color: #16a34a;
}

.wc-share__btn--save .wc-share__save-text {
  font-size: 0.95rem;
  font-weight: 600;
}

.wc-share__btn--save.is-saved {
  color: var(--color-primary, #e8744f);
  border-color: var(--color-primary, #e8744f);
}

/* ==========================================================================
   Category Header - Wirecutter style (.cat-header--wc)
   ========================================================================== */
.cat-header--wc {
  padding: 2.5rem 0 0.5rem;
}

.cat-header--wc__crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted, #6b7280);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-header--wc__crumb a {
  color: var(--color-text-muted, #6b7280);
  text-decoration: none;
}

.cat-header--wc__crumb a:hover {
  color: var(--color-primary, #e8744f);
}

.cat-header--wc__crumb-current {
  color: var(--color-text-secondary, #374151);
  font-weight: 600;
}

.cat-header--wc__crumb-sep {
  color: var(--color-text-muted, #9ca3af);
}

.cat-header--wc__title {
  margin: 0.5rem 0 0;
  padding-top: 1rem;
  border-top: 7px solid var(--color-text, #000000);
  font-size: 3.5rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text, #111111);
}

.cat-header--wc__desc {
  margin: 1.25rem 0 0;
  max-width: 1000px;
  font-size: 1.375rem;
  font-weight: 400; /* h2 nhưng giữ vẻ mô tả, không in đậm */
  line-height: 1.5;
  color: var(--color-text-secondary, #374151);
}

.cat-header--wc__desc p {
  margin: 0 0 0.75rem;
}

.cat-header--wc__desc p:last-child {
  margin-bottom: 0;
}

/* Khu vực boxes trên trang danh mục cha */
.category-boxes--archive {
  padding-top: 1.5rem;
}

/* Social tác giả dưới mô tả ở header author (căn trái) */
.cat-header--wc__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.cat-header--wc__social .author-header__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--color-text-muted, #6b7280);
  background-color: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.cat-header--wc__social .author-header__social-link:hover {
  color: #fff;
  background-color: var(--color-primary, #e8744f);
  border-color: var(--color-primary, #e8744f);
}

.cat-header--wc__social .author-header__social-link i {
  font-size: 1rem;
}

@media (max-width: 1023px) {
  .cat-header--wc__title {
    font-size: 2.75rem;
    border-top-width: 6px;
  }
  .cat-header--wc__desc {
    font-size: 1.2rem;
  }
}

@media (max-width: 639px) {
  .cat-header--wc {
    padding-top: 1.5rem;
  }
  .cat-header--wc__title {
    font-size: 2rem;
    border-top-width: 5px;
    padding-top: 0.75rem;
  }
  .cat-header--wc__desc {
    font-size: 1.0625rem;
  }
}

/* Nút Load More: nền primary + chữ trắng */
.load-more__btn {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
}

/* Nút comment khi CÓ số -> dạng pill (icon + số) */
.wc-share__btn--has-count {
  width: auto !important;
  padding: 0 0.9rem !important;
  gap: 0.4rem;
}

.wc-share__count {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ----- Ảnh feature + caption ----- */
.wc-post-header__media {
  margin: 1.75rem 0 0;
}

.wc-post-header__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0; /* bỏ bo góc ảnh featured - đồng bộ phong cách vuông góc toàn site */
}

.wc-post-header__caption {
  margin-top: 0.5rem;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--color-text-muted, #6b7280);
}

/* ----- Byline tác giả (avatar chồng nhau + By A and B) ----- */
.wc-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0;
}

.wc-byline__avatars {
  display: inline-flex;
  flex: 0 0 auto;
}

.wc-byline__avatar {
  display: inline-block;
}

.wc-byline__avatar:not(:first-child) {
  margin-left: -12px;
}

.wc-byline__avatar img {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-surface, #fff);
  object-fit: cover;
}

.wc-byline__names {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text, #111827);
}

.wc-byline__by {
  font-weight: 700;
}

.wc-byline__names a {
  color: var(--color-text, #111827);
  font-weight: 700;
  text-decoration: underline;
}

.wc-byline__names a:hover {
  color: var(--color-primary, #e8744f);
}

/* ----- Responsive: Tablet ----- */
@media (max-width: 1023px) {
  .wc-post-header__title {
    font-size: 2.5rem;
    border-top-width: 5px;
  }

  .wc-post-header__excerpt {
    font-size: 1.125rem;
  }
}

/* ----- Responsive: Mobile ----- */
@media (max-width: 639px) {
  .wc-post-header {
    padding-top: 1.25rem;
  }

  .wc-post-header__title {
    font-size: 1.875rem;
    border-top-width: 4px;
    padding-top: 0.75rem;
  }

  .wc-post-header__excerpt {
    font-size: 1.0625rem;
  }

  .wc-post-header__meta {
    gap: 0.5rem 0.9rem;
    font-size: 0.875rem;
  }

  .wc-share__btn {
    height: 40px;
    min-width: 40px;
  }

  .wc-share__btn:not(.wc-share__btn--save) {
    width: 40px;
  }
}

/* ==========================================================================
   AffiliateCMS Pro - product list overrides (áp dụng trong Post)
   Dùng màu primary của theme, dọn lại pros/cons cho gọn.
   ========================================================================== */

/* 1) Nút Amazon: dùng màu primary của theme (bỏ gradient cam) */
.acms-btn--amazon {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
}

.acms-btn--amazon:hover {
  background: var(--color-primary-hover, var(--color-primary)) !important;
  border-color: var(--color-primary-hover, var(--color-primary)) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* 1) Bỏ uppercase ở toggle-label cho chữ bình thường */
.acms-list__toggle-label {
  text-transform: none !important;
}

/* 2) Mọi icon trong toggle-label (vd bi-card-text, bi-hand-thumbs-up) -> primary */
.acms-list__toggle-label i {
  color: var(--color-primary) !important;
}

/* Tiêu đề Pros/Cons (h4) dùng màu primary của theme */
.acms-list__pros h4,
.acms-list__cons h4 {
  color: var(--color-primary) !important;
}

/* Huy hiệu rank: nền màu primary (bỏ gradient đỏ) */
.acms-list__rank {
  background: var(--color-primary) !important;
}

/* 5) Bỏ viền + nền của pros/cons, canh lại gọn gàng */
.acms-list__pros,
.acms-list__cons {
  border: none !important;
  border-left: none !important;
  background-color: transparent !important;
  padding: 0 !important;
}

/* Khôi phục layout li pros/cons (vì .post-content ul:not([class]) li ghi đè padding) */
.post-content .acms-list__pros ul li,
.post-content .acms-list__cons ul li {
  position: relative !important;
  margin-bottom: 0 !important;
  padding: 0.4rem 0 0.4rem 1.5rem !important;
}

/* 3) + 4) Dấu +/- cho li - GHI ĐÈ chấm tròn của .post-content ul:not([class]) li::before */
/* Cả + và - cùng màu var(--color-primary) của theme */
.post-content .acms-list__pros ul li::before,
.post-content .acms-list__cons ul li::before {
  position: absolute !important;
  left: 0 !important;
  top: 3px !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--color-primary) !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
}

.post-content .acms-list__pros ul li::before {
  content: "+" !important;
}

.post-content .acms-list__cons ul li::before {
  content: "−" !important;
}

/* ==========================================================================
   Related slider - card grid-v2 (giống box) nhưng tiêu đề nhỏ cho vừa slide
   ========================================================================== */
.related-content .post-card--grid-v2 .post-card__title {
  font-size: 1.125rem;
  line-height: 1.35;
}

/* ==========================================================================
   Post footer - About the Author (căn trái, nhiều tác giả)
   ========================================================================== */
.post-footer__authors {
  max-width: 800px;
  margin: 2.5rem auto 0;
  text-align: left;
}

.post-footer__authors-title {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: none; /* bỏ uppercase */
  color: var(--color-text, #111827);
}

.acms-author {
  margin-bottom: 2rem;
}

.acms-author:last-child {
  margin-bottom: 0;
}

/* Hàng đầu: avatar trái + tên/social bên phải */
.acms-author__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.acms-author__avatar {
  flex: 0 0 auto;
  display: block;
}

.acms-author__avatar img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.acms-author__meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.acms-author__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #111827);
  text-decoration: none;
}

.acms-author__name:hover {
  color: var(--color-primary, #e8744f);
}

.acms-author__socials {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.acms-author__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--color-bg-alt, #f3f4f6);
  color: var(--color-text-muted, #6b7280);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.acms-author__social:hover {
  background: var(--color-primary, #e8744f);
  color: #fff;
}

.acms-author__bio {
  margin: 0;
  color: var(--color-text-secondary, #374151);
  line-height: 1.75;
}

@media (max-width: 639px) {
  .post-footer__authors {
    margin-top: 2rem;
  }

  .acms-author__avatar img {
    width: 56px;
    height: 56px;
  }
}

/* ==========================================================================
   Tinh chỉnh nhỏ: bỏ nền icon comment + đổi màu link related
   ========================================================================== */

/* Bỏ nền của icon ở comment form (compact) và empty state */
.comment-form__compact-icon,
.comment-list__empty-icon {
  background-color: transparent !important;
}

/* Link "View All" của related content -> màu trắng */
.related-content__link {
  color: #ffffff !important;
}

/* ==========================================================================
   Cột chữ bài viết: giới hạn 676px, căn giữa (kiểu Medium)
   - Chỉ áp dụng cho các thẻ DẠNG CHỮ là con trực tiếp của .post-content
   - Ảnh, video, acms-list, bảng... KHÔNG đụng tới -> vẫn full width 900px
   - Chỉ set margin-left/right (không dùng shorthand) để giữ nguyên
     margin trên/dưới của theme cha
   ========================================================================== */
.post-content > p,
.post-content > h1,
.post-content > h2,
.post-content > h3,
.post-content > h4,
.post-content > h5,
.post-content > h6,
.post-content > ul:not([class]),
.post-content > ol:not([class]),
.post-content > ul.wp-block-list,
.post-content > ol.wp-block-list,
.post-content > blockquote {
  max-width: 676px;
  margin-left: auto;
  margin-right: auto;
}

/* Hộp mục lục (TOC) đi theo cột chữ 676px (gốc theme cha là 720px) */
.post-content > .toc-expandable {
  max-width: 676px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Bỏ border + border-radius: .post-card, .acms-list__image, .post-content img
   - Theme cha: .post-card có border 1px + radius-xl (post-cards.css:21-22)
   - Plugin: .acms-list__image có radius (frontend.css:1183)
   - Theme cha: .post-content img radius-sm, .post-content__figure img radius-lg
   ========================================================================== */
.post-card {
  border: none;
  border-radius: 0;
}

/* ==========================================================================
   Bỏ background + toàn bộ hiệu ứng hover của .post-card (mọi biến thể)
   - Theme cha: nền surface, hover nhấc card + bóng đổ, zoom ảnh 1.05,
     hiện click-indicator, đổi màu title
   ========================================================================== */
.post-card {
  background-color: transparent;
}

/* Bỏ nhấc card + bóng đổ khi hover.
   Dùng selector kép .post-card.post-card--* để specificity (0,3,0)
   thắng mọi rule inline ".post-card:hover" mà theme cha có thể sinh ra
   từ Customizer (acms_card_hover - hiện đã đặt về 'lift' nên không sinh) */
.post-card:hover,
.post-card.post-card--grid-v2:hover,
.post-card.post-card--slider:hover,
.post-card.post-card--list:hover {
  transform: none;
  box-shadow: none;
}

/* Bỏ zoom ảnh khi hover */
.post-card--grid-v2:hover .post-card__image img,
.post-card--slider:hover .post-card__image img,
.post-card--list:hover .post-card__image img {
  transform: none;
}

/* Bỏ click-indicator hiện ra khi hover */
.post-card--grid-v2:hover .post-card__click-indicator,
.post-card--slider:hover .post-card__click-indicator,
.post-card--list:hover .post-card__click-indicator {
  opacity: 0;
  transform: none;
}

/* Bỏ đổi màu title khi hover (cả link bên trong) */
.post-card--grid-v2:hover .post-card__title,
.post-card--slider:hover .post-card__title,
.post-card--list:hover .post-card__title,
.post-card__title a:hover {
  color: inherit;
}

/* Bỏ hover chip danh mục trên ảnh (grid-v2): trả về đúng trạng thái thường */
.post-card--grid-v2 .post-card__image-category:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: none;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.08);
}

.post-card--grid-v2 .post-card__image-category:hover i {
  color: var(--color-primary);
}

/* ==========================================================================
   Bỏ hover của .acms-list__item (item sản phẩm trong bài review)
   - Plugin frontend.css: hover đổi bóng + viền primary (1133), phóng to
     badge rank 1.1 (1159), zoom ảnh 1.05 (1195), biến thể mobile (1906)
   - Child load SAU plugin nên override cùng selector là thắng
   - Trả mọi giá trị về đúng trạng thái thường
   ========================================================================== */
.acms-list__item:hover {
  box-shadow: var(--acms-shadow-sm);   /* giá trị gốc của item */
  border-color: var(--acms-border);    /* giá trị gốc của item */
}

/* Bỏ phóng to badge số thứ hạng */
.acms-list__item:hover .acms-list__rank {
  transform: translateY(-50%);         /* giá trị gốc, bỏ scale(1.1) */
}

/* Bỏ zoom ảnh sản phẩm */
.acms-list__item:hover .acms-list__image img {
  transform: none;
}

/* Mobile: rank nằm giữa cạnh trên - giữ đúng vị trí gốc, bỏ scale */
@media (max-width: 600px) {
  .acms-list__item:hover .acms-list__rank {
    transform: translateX(-50%) translateY(-50%);
  }
}

/* Chấm bullet trong tab content của acms-list: căn top 0.75em cho cân
   với dòng chữ (theme cha mặc định 1.15em bị lệch thấp) */
.post-content .acms-list__tab-content ul:not([class]) li::before,
.acms-list__tab-content ul:not([class]) li::before {
  top: 0.75em;
}

/* ==========================================================================
   H2 trong bài viết: bỏ thanh dọc trái, thay bằng kẻ ngang trên đầu
   (kiểu section rule của báo Mỹ - NYT/The Atlantic)
   - Bỏ border-left 0.425rem + padding-left của theme cha
   - Kẻ ngang đen trên đầu, mỏng dần ở màn hình nhỏ cho cân đối
   ========================================================================== */
.post-content h2 {
  border-left: none;
  padding-left: 0;
  border-top: 3px solid #000; /* mobile: mỏng hơn cho cân với cỡ chữ nhỏ */
  padding-top: 0.625rem;       /* khoảng thở giữa kẻ ngang và chữ */
}

/* Tablet trở lên */
@media (min-width: 768px) {
  .post-content h2 {
    border-top-width: 4px;
    padding-top: 0.75rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .post-content h2 {
    border-top-width: 4.5px;
  }
}

/* Dark mode: kẻ đen sẽ chìm vào nền tối -> chuyển sang trắng */
[data-theme="dark"] .post-content h2 {
  border-top-color: #fff;
}

/* ==========================================================================
   Bỏ border + border-radius + hover của .featured-card
   - Theme cha: viền 1px + radius-xl (featured-posts.css:54,57),
     hover đổi màu viền + bóng đổ (dòng 66), zoom ảnh 1.05 (dòng 103)
   - Giữ nguyên background (nền tối sau ảnh là chủ ý thiết kế)
   ========================================================================== */
.featured-card {
  border: none;
  border-radius: 0;
}

/* Bỏ bóng đổ + viền khi hover */
.featured-card:hover {
  border: none;
  box-shadow: none;
}

/* Bỏ zoom ảnh khi hover */
.featured-card__link:hover .featured-card__img {
  transform: none;
}

/* Bỏ đổi màu title khi hover (block featured-list custom của child) */
.featured-list-item__link:hover .featured-card__title {
  color: inherit;
}

.acms-list__image {
  border: none;
  border-radius: 0;
}

.post-content img,
.post-content__figure img,
.post-content figure img {
  border: none;
  border-radius: 0;
}

/* ==========================================================================
   Bỏ cắt chữ "..." (line-clamp) trên TITLE của mọi loại card
   - Theme cha giới hạn title 2-3 dòng bằng -webkit-line-clamp -> title dài
     bị cắt "..." nhìn thiếu chuyên nghiệp
   - Cho title hiển thị đầy đủ, tự xuống dòng; card tự giãn chiều cao
   - GIỮ NGUYÊN line-clamp của excerpt/mô tả (chủ ý thiết kế)
   ========================================================================== */
.post-card--grid-v2 .post-card__title,
.post-card--grid-v2 .post-card__title a,
.post-card--slider .post-card__title,
.post-card--list .post-card__title,
.post-card--minimal .post-card__title,
.popular-post__title,
.featured-card__title,
.featured-card--main .featured-card__title,
.featured-grid__side--list .featured-card__title {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
  min-height: 0;
}

/* ==========================================================================
   Fix list Gutenberg (.wp-block-list)
   - Theme cha chỉ style ul/ol:not([class]) nên list do Gutenberg xuất ra
     (có class wp-block-list) bị mất số thứ tự và bullet không đồng nhất
   - Nhân bản đúng style list của theme cha cho .wp-block-list
   ========================================================================== */

/* ---- UL: bullet chấm tròn màu primary (giống ul:not([class])) ---- */
/* margin: 0 auto để giữ căn giữa theo cột chữ 676px (không đè mất margin auto)
   padding-left: 1rem để bullet thụt vào thẳng hàng với mép trái heading */
.post-content ul.wp-block-list {
  margin: 0 auto var(--content-element-spacing);
  padding-left: var(--space-4);
  list-style: none;
}

.post-content ul.wp-block-list li {
  position: relative;
  margin-bottom: var(--space-3);
  padding-left: var(--space-1);
}

.post-content ul.wp-block-list li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-4));
  top: 0.75rem; /* căn bullet giữa dòng chữ đầu cho đẹp */
  width: 7px;
  height: 7px;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
}

/* UL lồng cấp 2: chấm rỗng viền primary */
.post-content ul.wp-block-list ul {
  margin-top: var(--space-3);
  margin-bottom: 0;
  padding-left: var(--space-6);
  list-style: none;
}

.post-content ul.wp-block-list ul li::before {
  width: 6px;
  height: 6px;
  background-color: transparent;
  border: 2px solid var(--color-primary);
}

/* UL lồng cấp 3: chấm nhỏ màu muted */
.post-content ul.wp-block-list ul ul li::before {
  width: 5px;
  height: 5px;
  background-color: var(--content-text-muted);
  border: none;
}

/* ---- OL: số thứ tự trong vòng tròn (giống ol:not([class])) ---- */
/* margin: 0 auto để giữ căn giữa theo cột chữ 676px, vòng tròn số
   nằm sát mép trái thẳng hàng với heading (padding-left: 0) */
.post-content ol.wp-block-list {
  margin: 0 auto var(--content-element-spacing);
  padding-left: 0;
  list-style: none;
  counter-reset: list-counter;
}

.post-content ol.wp-block-list li {
  position: relative;
  margin-bottom: var(--space-4);
  padding-left: var(--space-10);
  counter-increment: list-counter;
}

.post-content ol.wp-block-list li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  border-radius: var(--radius-full);
}

/* OL lồng cấp 2: chữ cái a, b, c... nền xám */
.post-content ol.wp-block-list ol {
  margin-top: var(--space-4);
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: nested-counter;
}

.post-content ol.wp-block-list ol li {
  padding-left: var(--space-8);
  counter-increment: nested-counter;
}

.post-content ol.wp-block-list ol li::before {
  content: counter(nested-counter, lower-alpha);
  width: 24px;
  height: 24px;
  font-size: var(--text-xs);
  background-color: var(--color-bg-alt);
  color: var(--content-text-secondary);
}

/* ==========================================================================
   Details/Accordion + Mã nhúng (YouTube, X/Twitter): theo cột chữ 676px
   ========================================================================== */

/* Khối Details / Accordion (FAQ) căn theo cột chữ */
.post-content > details,
.post-content details.wp-block-details {
  max-width: 676px;
  margin-left: auto;
  margin-right: auto;
}

/* Khối embed Gutenberg (YouTube, X/Twitter, video...) căn theo cột chữ */
.post-content .wp-block-embed,
.post-content figure[class*="wp-block-embed"] {
  max-width: 676px;
  margin-left: auto;
  margin-right: auto;
}

/* Iframe YouTube/X/Twitter chèn trực tiếp (không qua block embed) */
.post-content iframe[src*="youtube.com"],
.post-content iframe[src*="youtu.be"],
.post-content iframe[src*="twitter.com"],
.post-content iframe[src*="x.com"] {
  display: block;
  width: 100%;
  max-width: 676px;
  margin-left: auto;
  margin-right: auto;
}

/* Giữ đúng tỷ lệ 16:9 cho video YouTube khi co giãn theo cột chữ */
.post-content iframe[src*="youtube.com"],
.post-content iframe[src*="youtu.be"] {
  aspect-ratio: 16 / 9;
  height: auto;
}

/* Widget Twitter/X (blockquote gốc và thẻ div sau khi script render) */
.post-content .twitter-tweet {
  max-width: 676px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ==========================================================================
   Separator: đường kẻ ngắn căn giữa (kiểu NYT/Medium)
   - Thay đường kẻ full width bằng đoạn kẻ ngắn 80px ở giữa
   - Giữ nguyên khoảng cách dọc của theme cha
   ========================================================================== */
.post-content hr,
.post-content hr.wp-block-separator {
  width: 80px;
  max-width: 80px;
  height: 2px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--content-border);
}
