/* ══════════════════════════════════════════════════════════════════════════════════════════
   S4 — GIAO DIỆN TRANG SẢN PHẨM + DANH MỤC SP đồng bộ DNA (21/10, DN4-2610-090).
   Cùng ngôn ngữ thiet-ke/s4n-bai-viet-v2.css: thép đậm + đỏ S4 dè sẻn + hổ phách;
   Barlow Semi Condensed (tiêu đề) + Be Vietnam Pro (thân). Phạm vi: .single-product + .tax-product_cat.
   Gỡ = bỏ enqueue.
   ══════════════════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@600;700&family=Be+Vietnam+Pro:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

.single-product, .tax-product_cat {
  --s4-steel: #111827;
  --s4-ink: #1F2937;
  --s4-muted: #5B6474;
  --s4-line: #E3E7ED;
  --s4-surface: #F5F7FA;
  --s4-red: #D11E2A;
  --s4-amber: #E8A33D;
  --s4-amber-50: #FFF8EC;
  --s4-navy: #12355B;
  --s4-f-head: 'Barlow Semi Condensed', 'Be Vietnam Pro', system-ui, sans-serif;
  --s4-f-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --s4-f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Tiêu đề sản phẩm + tiêu đề mục + tiêu đề danh mục */
.single-product .product-title,
.single-product .product_title,
.single-product .product-section-title,
.tax-product_cat .page-title,
.tax-product_cat .term-description h2,
.tax-product_cat .term-description h3 {
  font-family: var(--s4-f-head) !important; color: var(--s4-steel); letter-spacing: -.005em;
}
.single-product .product-section-title,
.tax-product_cat .term-description h2 { font-weight: 700; }

/* ── Bảng thông số kỹ thuật (s4ps-tbl): đầu thép, sọc nền, bo góc ─────────────────────────── */
.s4ps-tbl { border-color: var(--s4-line); border-radius: 12px; font-family: var(--s4-f-body); }
.s4ps-tbl th {
  background: var(--s4-steel) !important; color: #fff !important; font-weight: 600;
  border-bottom-color: rgba(255,255,255,.12);
}
.s4ps-tbl td { color: var(--s4-ink); font-variant-numeric: tabular-nums; }
.s4ps-tbl tr:nth-child(even) td { background: var(--s4-surface); }
.s4ps-tbl td code, .tax-product_cat .term-description code {
  font-family: var(--s4-f-mono); font-size: .92em; background: var(--s4-surface);
  border: 1px solid var(--s4-line); border-radius: 5px; padding: 1px 6px; color: var(--s4-navy);
}

/* ── Tiêu đề mục + FAQ (s4ps-h / s4ps-faq) ───────────────────────────────────────────────── */
.s4ps-h { font-family: var(--s4-f-head); color: var(--s4-steel); border-left-color: var(--s4-red); }
.s4ps-faq { border-color: var(--s4-line); border-radius: 12px; }
.s4ps-qa summary { font-family: var(--s4-f-body); color: var(--s4-steel); }
.s4ps-qa summary::after { color: var(--s4-amber); }
.s4ps-qa summary:hover { background: var(--s4-amber-50); }
.s4ps-a { font-family: var(--s4-f-body); color: var(--s4-ink); }

/* ── Mô tả danh mục SP + bảng/FAQ trong đó ───────────────────────────────────────────────── */
.tax-product_cat .term-description { font-family: var(--s4-f-body); color: var(--s4-ink); line-height: 1.7; }
.tax-product_cat .term-description table {
  border-collapse: collapse; width: 100%; display: block; overflow-x: auto; border-radius: 12px; margin: 0 0 18px;
}
.tax-product_cat .term-description thead th,
.tax-product_cat .term-description tr:first-child th {
  background: var(--s4-steel); color: #fff; text-align: left; padding: 11px 14px; font-weight: 600;
}
.tax-product_cat .term-description td { padding: 10px 14px; border-top: 1px solid var(--s4-line); }
.tax-product_cat .term-description tbody tr:nth-child(even) td { background: var(--s4-surface); }

@media (prefers-reduced-motion: reduce) {
  .single-product *, .tax-product_cat * { transition: none !important; }
}

/* ── DN4-2610-101: chuyên mục SP dạng page SEO — dải EEAT + ảnh thiết kế + mô tả thu/mở ─────────── */
.tax-product_cat .s4cat-seo { margin: 26px 0 8px; }
.tax-product_cat .s4cat-eeat {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--s4-surface); border: 1px solid var(--s4-line); border-left: 3px solid var(--s4-red);
  border-radius: 8px; padding: 12px 14px; margin: 0 0 18px;
  font: 400 13.5px/1.6 var(--s4-f-body); color: var(--s4-muted);
}
.tax-product_cat .s4cat-eeat svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--s4-red); margin-top: 1px; }
.tax-product_cat .s4cat-eeat strong { color: var(--s4-ink); }
.tax-product_cat .s4cat-eeat a { color: var(--s4-red); font-weight: 600; white-space: nowrap; }

.tax-product_cat .s4cat-hero-fig { margin: 0 0 20px; }
.tax-product_cat .s4cat-hero-img {
  width: 100%; height: auto; display: block; border: 1px solid var(--s4-line); border-radius: 12px;
}

.tax-product_cat .s4cat-desc { position: relative; }
.tax-product_cat .s4cat-desc-inner { overflow: hidden; }
.tax-product_cat .s4cat-desc.s4cat-collapsed .s4cat-desc-inner { max-height: var(--s4cat-h, 380px); }
.tax-product_cat .s4cat-fade {
  display: none; position: absolute; left: 0; right: 0; bottom: 42px; height: 90px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 92%);
}
.tax-product_cat .s4cat-desc.s4cat-collapsed .s4cat-fade { display: block; }
.tax-product_cat .s4cat-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font: 600 14px/1 var(--s4-f-body); color: var(--s4-red);
  background: #fff; border: 1px solid var(--s4-red); border-radius: 999px; padding: 10px 20px;
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.tax-product_cat .s4cat-more:hover { background: var(--s4-red); color: #fff; }
.tax-product_cat .s4cat-more::after { content: "▾"; font-size: 11px; }
.tax-product_cat .s4cat-desc:not(.s4cat-collapsed) .s4cat-more::after { content: "▴"; }

/* ── DN4-2610-104: chuyên mục SP dạng page — sapo + ảnh hero đầu trang, heading + ảnh trong bài ───── */
.tax-product_cat .s4cat-top { margin: 0 0 22px; }
.tax-product_cat .s4cat-top .s4cat-hero-fig { margin: 14px 0 16px; }
.tax-product_cat .s4cat-sapo {
  font: 500 17px/1.7 var(--s4-f-body); color: var(--s4-ink);
  border-left: 3px solid var(--s4-red); padding: 2px 0 2px 16px; margin: 0;
}
.tax-product_cat .s4cat-desc-inner h2 {
  font: 700 23px/1.3 var(--s4-f-head); color: var(--s4-steel);
  margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--s4-line);
}
.tax-product_cat .s4cat-desc-inner h2:first-child { margin-top: 4px; }
.tax-product_cat .s4cat-desc-inner h3 {
  font: 700 18px/1.35 var(--s4-f-head); color: var(--s4-ink); margin: 20px 0 10px;
}
.tax-product_cat .s4cat-desc-inner p { margin: 0 0 14px; font: 400 16px/1.75 var(--s4-f-body); color: var(--s4-ink); }
.tax-product_cat .s4cat-inimg { margin: 18px 0; }
.tax-product_cat .s4cat-inimg img { width: 100%; height: auto; display: block; border: 1px solid var(--s4-line); border-radius: 12px; }
.tax-product_cat .s4cat-inimg figcaption { font: 400 13px/1.5 var(--s4-f-body); color: var(--s4-muted); margin-top: 8px; text-align: center; }
@media (max-width: 849px) {
  .tax-product_cat .s4cat-desc-inner h2 { font-size: 20px; }
  .tax-product_cat .s4cat-sapo { font-size: 16px; }
}
