/*
Theme Name: Titan Audio V1.03
Theme URI: https://example.com/titan-audio
Author: Titan Professional Audio
Description: Theme WordPress cho website thiết bị âm thanh Titan — sản phẩm quản lý qua Custom Post Type "San pham", bài viết dùng Post/Category chuẩn của WordPress.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: titan-audio
*/
/* ============================================================
   Titan clone — dựng lại theo bố cục web mẫu (Flatsome/Titan)
   Bảng màu: vàng gold (theo logo) + đen (đổi 5 biến đầu là đổi màu cả site)
   ============================================================ */

:root {
  --brand: #c9971c;         /* màu chủ đạo: nút, giá, tab active */
  --brand-dark: #a67816;    /* hover */
  --brand-light: #e8b93a;
  --dark: #14100f;          /* "secondary" của theme: chữ tiêu đề, footer */
  --accent: #f4c430;

  --body: #5b5651;          /* chữ nội dung */
  --line: rgba(0, 0, 0, .1);
  --grey: #f8f8f8;          /* nền tab, nền section xen kẽ */
  --container: 1200px;
  --radius: 8px;            /* bo góc nhẹ cho thẻ sản phẩm, ảnh */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 { color: var(--dark); font-weight: 700; margin: 0 0 .5em; line-height: 1.2; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
}

.is-divider {
  height: 3px;
  width: 50px;
  background: rgba(0, 0, 0, .1);
  margin: 12px 0;
}
.is-divider.small { width: 30px; margin: 10px 0 14px; }

/* ---------------- Nút ---------------- */
.button {
  display: inline-block;
  padding: 10px 24px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  border: 2px solid var(--brand);
  border-radius: 0;
  transition: .25s;
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.button.is-outline { background: transparent; color: var(--brand); }
.button.is-outline:hover { background: var(--brand); color: #fff; }
.button.white { background: #fff; border-color: #fff; color: var(--dark); }
.button.white:hover { background: transparent; color: #fff; }
.button.is-link {
  background: transparent;
  border: 0;
  color: var(--dark);
  padding: 0;
  border-bottom: 2px solid var(--brand);
  border-radius: 0;
}
.button.is-link:hover { background: transparent; color: var(--brand); }

/* ============================================================
   HEADER
   ============================================================ */
.header-top {
  background: var(--dark);
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
}
.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
}
.header-top a:hover { color: #fff; }
.header-top .ht-phone { color: #fff; font-weight: 500; }
.header-top .ht-right { display: flex; align-items: center; gap: 18px; }
.lang a + a { margin-left: 8px; }
.lang a.active { color: #fff; font-weight: 600; }

.header-main-wrap {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-main {
  display: flex;
  align-items: center;
  height: 90px;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo-mark {
  width: 42px; height: 42px;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 900; font-size: 22px;
  letter-spacing: -1px;
}
.logo-text strong {
  display: block;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--dark);
  line-height: 1;
}
.logo-text small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--body);
  margin-top: 3px;
}

.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; align-items: center; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 34px 16px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--dark);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: var(--brand); }
.main-nav .has-sub > a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .2s;
}
.main-nav li:hover > .nav-dropdown { opacity: 1; visibility: visible; transform: none; }
.nav-dropdown li a {
  display: block;
  padding: 8px 22px;
  font-size: 14px;
  color: var(--dark);
}
.nav-dropdown li a:hover { color: var(--brand); }
.nav-dropdown .sub { display: block; font-size: 12px; color: var(--body); font-weight: 400; }

.header-tools { display: flex; align-items: center; gap: 18px; margin-left: 22px; }
.icon-btn {
  width: 22px; height: 22px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--dark);
}
.icon-btn:hover { color: var(--brand); }
.header-phone { display: flex; align-items: center; gap: 8px; color: var(--dark); font-weight: 700; }
.header-phone span { font-size: 15px; }

.nav-toggle { display: none; background: none; border: 0; padding: 6px; margin-left: auto; color: var(--dark); }

/* Lớp tìm kiếm xổ xuống */
.search-drop {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 18px 0;
}
.search-drop.open { display: block; }
.search-drop form { display: flex; max-width: 640px; margin: 0 auto; }
.search-drop input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-right: 0;
  font-size: 15px;
  outline: none;
}
.search-drop input:focus { border-color: var(--brand); }
.search-drop button { padding: 12px 26px; }

/* ============================================================
   HERO BANNER (web mẫu dùng 1 banner video full-width)
   ============================================================ */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: linear-gradient(115deg, var(--dark) 0%, #3a2b08 45%, var(--brand) 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 1;
}
.hero-art {
  position: absolute;
  right: 4%;
  bottom: -40px;
  width: 42%;
  max-width: 520px;
  opacity: .9;
}
.hero .container { position: relative; z-index: 2; color: #fff; }

/* --- Carousel --- */
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide .container > * {
  opacity: 0;
  transform: translateY(14px);
}
.hero-slide.active .container > * {
  animation: heroIn .5s ease forwards;
}
.hero-slide.active .container > *:nth-child(1) { animation-delay: .05s; }
.hero-slide.active .container > *:nth-child(2) { animation-delay: .12s; }
.hero-slide.active .container > *:nth-child(3) { animation-delay: .19s; }
.hero-slide.active .container > *:nth-child(4) { animation-delay: .26s; }
.hero-slide.active .container > *:nth-child(5) { animation-delay: .33s; }

@keyframes heroIn { to { opacity: 1; transform: none; } }

.hero-price {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
}
.hero-price del {
  font-size: 17px;
  font-weight: 400;
  opacity: .6;
  margin-left: 8px;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  transition: background .2s;
}
.hero-nav:hover { background: var(--brand); }
.hero-nav.prev { left: 16px; }
.hero-nav.next { right: 16px; }

.hero-dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 22px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dot {
  width: 34px; height: 4px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, .4);
  transition: background .2s;
}
.hero-dot.active { background: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide.active .container > * { transition: none; animation: none; }
  .hero-slide .container > * { opacity: 1; transform: none; }
}
.hero-label {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 14px;
}
.hero h1 {
  color: #fff;
  font-size: 56px;
  font-weight: 900;
  text-transform: uppercase;
  max-width: 640px;
  margin-bottom: 18px;
}
.hero p { max-width: 500px; font-size: 17px; color: rgba(255, 255, 255, .85); margin: 0 0 30px; }

/* ============================================================
   SECTION chung
   ============================================================ */
.section { padding: 60px 0; }
.section.grey { background: var(--grey); }

.section-title {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
}
.section-title span {
  font-size: 40px;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  line-height: 1.15;
}

/* ---------------- Tab danh mục ---------------- */
.tab-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 34px;
}
.tab-nav button {
  background: var(--grey);
  border: 0;
  padding: 18px 8px 14px;
  text-align: center;
  color: var(--dark);
  font-size: 13px;
  line-height: 1.2;
  transition: .25s;
}
.tab-nav button svg { width: 60px; height: 60px; margin: 0 auto; display: block; color: var(--dark); }
.tab-nav button span { display: block; margin-top: 10px; }
.tab-nav button:hover { background: #efe9e7; }
.tab-nav button.active { background: var(--brand); color: #fff; }
.tab-nav button.active svg { color: #fff; }

/* ---------------- Lưới sản phẩm ---------------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.products.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tab-panel { display: none; }
.tab-panel.active { display: contents; }

.product-small {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-small .box-image {
  position: relative;
  display: block;
  padding-top: 86%;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #fff;
}
.product-small .box-image svg,
.product-small .box-image img {
  position: absolute;
  top: 50%; left: 50%;
  max-width: 85%;
  max-height: 90%;
  width: auto;
  transform: translate(-50%, -50%) scale3d(1, 1, 1);
  transition: transform .5s;
}
.product-small:hover .box-image svg,
.product-small:hover .box-image img { transform: translate(-50%, -50%) scale3d(1.1, 1.1, 1.1); }

.badge-container {
  position: absolute;
  top: 5px; left: 5px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.badge-inner {
  min-width: 45px; height: 45px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: var(--brand);
  padding: 0 4px;
  text-align: center;
  line-height: 1.1;
}
.badge-inner.new-bubble { background: var(--dark); }

.box-text { padding: 10px 15px 0; flex: 1; display: flex; flex-direction: column; }
.product-title { margin: 0 0 6px; }
.product-title a {
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-title a:hover { color: var(--brand); }

.star-rating { color: var(--accent); font-size: 13px; letter-spacing: 2px; height: 20px; }
.star-rating .off { color: rgba(0, 0, 0, .18); }

.box-excerpt {
  list-style: disc;
  padding-left: 18px;
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--body);
}
.box-excerpt li { margin-bottom: 2px; }

.price {
  margin: 15px 0;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  column-gap: 10px;
  align-items: center;
}
.price .amount { color: var(--brand); font-size: 20px; font-weight: 700; }
.price del .amount { color: var(--body); font-size: 16px; font-weight: 400; text-decoration: line-through; }
.box-text .button { margin-top: auto; align-self: flex-start; }

/* ---------------- Banner "Sản phẩm mới" ---------------- */
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.promo-box {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  border-radius: var(--radius);
}
.promo-box.wide { grid-column: 1 / -1; min-height: 420px; align-items: center; }
.promo-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .65));
}
.promo-inner { position: relative; z-index: 2; padding: 40px; max-width: 560px; }
.promo-box h4 { font-size: 45px; line-height: 1; margin-bottom: 20px; color: #fff; font-weight: 700; }
.promo-box.wide h4 { font-size: 60px; }
.promo-box p { font-size: 20px; line-height: 1.2; margin: 0; color: rgba(255, 255, 255, .9); }
.promo-box .button { margin-top: 35px; font-weight: 400; }

/* ---------------- Giới thiệu ---------------- */
.about-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.about-text h1 { font-size: 40px; margin-bottom: 18px; }
.about-text p { margin: 0 0 16px; }
.about-media {
  position: relative;
  min-height: 360px;
  background: linear-gradient(135deg, #3a2b08, var(--dark));
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  overflow: hidden;
}
.play-btn {
  width: 84px; height: 84px;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: grid; place-items: center;
  font-size: 22px;
  transition: .25s;
}
.play-btn:hover { background: rgba(255, 255, 255, .18); }

.gallery {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 40px;
}
.gallery div {
  padding-top: 100%;
  background: linear-gradient(135deg, #3a2b08, var(--dark));
  border-radius: calc(var(--radius) - 2px);
  transition: .3s;
}
.gallery div:hover { transform: translateY(-4px); }

/* ---------------- Khám phá (tin tức) ---------------- */
.news-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.post-item .post-cover {
  padding-top: 60%;
  background: linear-gradient(135deg, var(--brand-dark), var(--dark));
}
.post-title { font-size: 20px; margin: 14px 0 0; }
.post-title a:hover { color: var(--brand); }
.post-meta { font-size: 13px; opacity: .8; }
.post-excerpt { font-size: 14px; margin: 0; }

.news-list .post-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.news-list .post-item:last-child { border: 0; margin-bottom: 0; padding-bottom: 0; }
.news-list .post-cover { padding-top: 70%; }
.news-list .post-title { font-size: 16px; margin-top: 0; }
.news-list .post-excerpt { display: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--dark); color: rgba(255, 255, 255, .72); font-size: 16px; padding: 55px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  padding-bottom: 40px;
}
.site-footer h4 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer li { padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.footer-contact strong { color: #fff; font-weight: 500; }
.absolute-footer {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
}
.social-icons { display: flex; align-items: center; gap: 10px; }
.social-icons a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .8);
}
.social-icons a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ============================================================
   TRANG DANH MỤC
   ============================================================ */
.breadcrumbs {
  font-size: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--body);
}
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { margin: 0 8px; opacity: .5; }

.category-page-row {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 30px;
  padding: 30px 0 60px;
  align-items: start;
}
.shop-sidebar { position: sticky; top: 110px; }
.widget { margin-bottom: 32px; }
.widget-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark);
  letter-spacing: .02em;
}
.product-categories li a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  font-size: 15px;
  color: var(--body);
}
.product-categories li a:hover { color: var(--brand); }
.product-categories li.current-cat > a { color: var(--brand); font-weight: 700; }
.product-categories .count { opacity: .6; font-size: 13px; }

.woof-list li { padding: 4px 0; }
.woof-list label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 15px; }
.woof-list input { accent-color: var(--brand); width: 15px; height: 15px; }
.woof-list .count { margin-left: auto; opacity: .6; font-size: 13px; }
.widget .button { width: 100%; text-align: center; margin-top: 14px; }

.price-inputs { display: flex; gap: 8px; margin-top: 4px; }
.price-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  outline: none;
}
.price-inputs input:focus { border-color: var(--brand); }

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.result-count { margin: 0; font-size: 14px; }
.woocommerce-ordering select {
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  outline: none;
  color: var(--body);
}
.shop-empty {
  border: 1px dashed var(--line);
  padding: 60px 20px;
  text-align: center;
}
.filter-toggle { display: none; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination button {
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--dark);
  font-weight: 600;
}
.pagination button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pagination button.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: default; }

/* ============================================================
   TRANG CHI TIẾT SẢN PHẨM
   ============================================================ */
.product-main {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  padding: 30px 0 50px;
  align-items: start;
}

/* --- Gallery --- */
.product-gallery { position: relative; }
.gallery-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  padding-top: 70%;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
}
.gallery-slide.active { display: grid; }
.gallery-slide svg,
.gallery-slide img { max-height: 82%; max-width: 92%; width: auto; object-fit: contain; }
.badge-container.is-larger .badge-inner { min-width: 58px; height: 58px; font-size: 14px; }

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}
/* Ảnh nhỏ: đặt absolute trong khung cố định thay vì dựa vào max-height %,
   vì trong <button> chiều cao phần trăm không resolve được nên ảnh bị tràn/lệch. */
.gallery-thumb {
  position: relative;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
  padding: 0;
  height: 92px;
  overflow: hidden;
}
.gallery-thumb svg,
.gallery-thumb img {
  position: absolute;
  top: 8px;
  left: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  max-width: none;
  object-fit: contain;
  object-position: center;
}
.gallery-thumb.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* --- Cột thông tin --- */
.product-info .product_title {
  font-size: 32px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.product-rating .rate-text a { color: var(--brand); text-decoration: underline; }
.product-rating .sold { color: var(--body); }

.price-wrapper { margin: 18px 0 4px; }
.product-page-price {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
}
.product-page-price .amount { font-size: 34px; font-weight: 700; color: var(--brand); }
.product-page-price del .amount { font-size: 18px; font-weight: 400; color: var(--body); text-decoration: line-through; }
.product-page-price .save {
  font-size: 13px;
  background: rgba(179, 18, 27, .08);
  color: var(--brand);
  padding: 3px 10px;
  font-weight: 600;
}

.product-short-description {
  list-style: disc;
  padding-left: 20px;
  margin: 18px 0 24px;
  font-size: 15px;
}
.product-short-description li { padding: 2px 0; }
.product-short-description strong { color: var(--dark); }

.buy-row { display: flex; gap: 10px; flex-wrap: wrap; }
/* căn chữ vào giữa nút: các nút bị kéo cao bằng nhau nên phải dùng flex, không dùng inline-block */
.buy-row .button {
  flex: 1;
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 10px 20px;
}
.buy-row .buy-now { font-size: 17px; font-weight: 700; letter-spacing: .04em; }

.nt-loi-ich {
  margin-top: 26px;
  border: 1px solid var(--line);
  padding: 18px 20px;
  background: var(--grey);
}
.nt-loi-ich h4 { font-size: 16px; text-transform: uppercase; margin-bottom: 12px; }
.nt-loi-ich ul { display: grid; gap: 10px; }
.nt-loi-ich li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.nt-loi-ich .ic { width: 22px; height: 22px; color: var(--brand); flex: 0 0 22px; }

/* --- Thanh tab dính --- */
.product-page-nav {
  position: sticky;
  top: 90px;
  z-index: 50;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.product-page-nav ul { display: flex; overflow-x: auto; }
.product-page-nav a {
  display: block;
  padding: 16px 22px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--dark);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.product-page-nav a:hover { color: var(--brand); }
.product-page-nav a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* --- Các mục nội dung --- */
.product-section { padding: 45px 0; border-bottom: 1px solid var(--line); }
.product-section:last-child { border-bottom: 0; }
.product-section-title {
  font-size: 22px;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.characteristics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.characteristic {
  background: var(--grey);
  padding: 24px 12px;
  text-align: center;
}
.characteristic .ic { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--brand); }
.characteristic-text { font-size: 15px; color: var(--dark); }

.desc-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
  margin-bottom: 34px;
}
.desc-block:last-child { margin-bottom: 0; }
.desc-block.reverse .desc-text { order: 2; }
.desc-text h3 { font-size: 22px; text-transform: uppercase; margin-bottom: 12px; }
.desc-text p { margin: 0; }
.desc-media { min-height: 260px; display: grid; place-items: center; padding: 16px; }
.desc-media svg,
.desc-media img { max-height: 300px; max-width: 100%; width: auto; object-fit: contain; }

.video-frame {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
}
.video-frame .play-btn { width: 84px; height: 84px; }
.video-frame .play-btn .ic { width: 46px; height: 46px; }
.video-caption { color: rgba(255, 255, 255, .85); font-size: 14px; }

/* khi bấm play: nạp iframe/video đè kín khung */
.video-frame.playing .play-btn,
.video-frame.playing .video-caption { display: none; }
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.nt-field-title {
  font-size: 16px;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand);
  margin-bottom: 0;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 45%; font-weight: 500; color: var(--dark); background: var(--grey); }
.spec-list { list-style: disc; padding: 14px 0 0 22px; font-size: 15px; }
.spec-list li { padding: 3px 0; }

.review-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  background: var(--grey);
  margin-bottom: 20px;
}
.review-score { text-align: center; }
.review-score strong { display: block; font-size: 40px; color: var(--brand); line-height: 1; }
.review-score span { font-size: 13px; }
.review-count { margin: 4px 0 0; font-size: 14px; }
.review-item { border: 1px solid var(--line); padding: 18px 20px; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.review-item p { margin: 0; }
.no-review { color: var(--body); }

.related-title { font-size: 24px; text-transform: uppercase; margin-bottom: 24px; }
#tuong-tu .products { grid-template-columns: repeat(4, 1fr); }

#backToTop {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 44px; height: 44px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  display: none;
  z-index: 90;
}

/* ============================================================
   TRANG BÀI VIẾT (danh sách)
   ============================================================ */
.blog-page { padding: 30px 0 70px; }

.blog-page-title {
  text-align: center;
  text-transform: uppercase;
  font-size: 34px;
  letter-spacing: .5px;
  margin: 10px 0 34px;
  color: var(--dark);
}

.blog-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}

.post-sidebar { position: sticky; top: 110px; }
.post-sidebar .widget-title {
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: .5px;
  padding-bottom: 10px;
  margin: 0 0 10px;
  border-bottom: 2px solid var(--brand);
  color: var(--dark);
}

.nt-cat-child { list-style: none; margin: 0; padding: 0; }
.nt-cat-child li { border-bottom: 1px solid var(--line); }
.nt-cat-child a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 14px;
  color: var(--body);
}
.nt-cat-child a:hover { color: var(--brand); }
.nt-cat-child .count { font-size: 12px; opacity: .6; }
.nt-cat-child li.active > a { color: var(--brand); font-weight: 700; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.post-grid .post-item { display: block; }
.post-grid .post-cover { padding-top: 66%; }
.post-grid .post-title { font-size: 18px; }

/* nhãn chuyên mục nằm trên ảnh bìa */
.post-cover {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-cover-cat {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 4px 9px;
}
.news-list .post-cover-cat { display: none; }

.section-more { text-align: center; margin: 34px 0 0; }

/* ============================================================
   TRANG CHI TIẾT BÀI VIẾT
   ============================================================ */
.single-post { padding: 24px 0 70px; }
.single-post .container { max-width: 900px; }

.entry-title {
  font-size: 34px;
  line-height: 1.3;
  margin: 12px 0 0;
  color: var(--dark);
}
.entry-divider { background: var(--brand); }

.entry-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.entry-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--body);
}
.entry-meta .sep { margin: 0 8px; opacity: .4; }
.entry-meta .cat-link { color: var(--brand); font-weight: 700; }

.blog-share { display: flex; align-items: center; gap: 8px; }
.blog-share .share-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--body);
}
.blog-share a {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grey);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--dark);
}
.blog-share a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.entry-cover {
  margin: 26px 0 0;
  padding-top: 46%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.entry-cover svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  height: 78%;
}
.entry-cover.has-photo { background-size: cover; background-position: center; }

/* ảnh bìa bài viết dùng background-image */
.post-cover { background-size: cover; background-position: center; }

/* ảnh nền của mỗi slide banner */
.hero-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
/* lớp phủ tối để chữ luôn đọc được trên ảnh */
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, .15) 100%);
}
.hero-art { z-index: 0; }

.entry-content { font-size: 16px; line-height: 1.8; }
.entry-content p { margin: 0 0 18px; }
.entry-content p.lead { font-size: 17px; font-weight: 500; color: var(--dark); }
.entry-content h2 {
  font-size: 24px;
  margin: 34px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
  color: var(--dark);
}
.entry-content h3 { font-size: 19px; margin: 26px 0 10px; color: var(--dark); }
.entry-list { margin: 0 0 20px; padding-left: 20px; }
.entry-list li { margin-bottom: 8px; }
.entry-content blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--grey);
  border-left: 4px solid var(--brand);
  font-style: italic;
  color: var(--dark);
}
.entry-content blockquote p { margin: 0; }

.wp-caption { margin: 26px 0; }
.wp-caption .figure-media {
  padding-top: 45%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.wp-caption .figure-media svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  height: 80%;
}
.wp-caption figcaption {
  font-size: 13px;
  text-align: center;
  padding-top: 10px;
  color: var(--body);
  font-style: italic;
}

/* --- bình luận --- */
.comments-area {
  margin-top: 50px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.comment-title { font-size: 22px; margin: 0 0 6px; color: var(--dark); }
.comment-notes { font-size: 13px; color: var(--body); margin: 0 0 20px; }
.req { color: var(--brand); }

.comment-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark);
}
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.comment-form textarea:focus,
.comment-form input:focus { outline: none; border-color: var(--brand); }
.comment-form p { margin: 0 0 16px; }
.comment-form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.comment-form-cookies label {
  font-weight: 400;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-note { color: var(--brand); font-size: 14px; font-weight: 600; }

/* --- bài viết liên quan --- */
.related-posts { margin-top: 50px; }
.related-posts-title {
  font-size: 20px;
  text-transform: uppercase;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand);
  color: var(--dark);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero h1 { font-size: 42px; }
  .section-title span { font-size: 30px; }
  .promo-box.wide h4 { font-size: 42px; }
  .promo-box h4 { font-size: 32px; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .category-page-row { grid-template-columns: 200px 1fr; }
  .blog-row { grid-template-columns: 180px 1fr; gap: 28px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-title { font-size: 28px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-tools { display: none; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .1);
    display: none;
    max-height: 75vh;
    overflow: auto;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { display: block; }
  .main-nav > ul > li > a { padding: 13px 18px; }
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
    display: none;
    background: var(--grey);
  }
  .main-nav li.open > .nav-dropdown { display: block; }

  .hero { min-height: 420px; }
  .hero-art { display: none; }
  .hero-nav { display: none; }
  .hero-price { font-size: 22px; }
  .tab-nav { grid-template-columns: repeat(3, 1fr); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .about-row, .news-row, .promo-grid { grid-template-columns: 1fr; }
  .promo-box.wide { grid-column: auto; }

  .category-page-row { grid-template-columns: 1fr; }
  .shop-sidebar { position: static; display: none; }
  .shop-sidebar.open { display: block; }
  .filter-toggle { display: inline-block; }

  .product-main { grid-template-columns: 1fr; gap: 26px; }
  .product-page-nav { top: 60px; }
  .characteristics { grid-template-columns: repeat(3, 1fr); }
  .desc-block { grid-template-columns: 1fr; gap: 18px; }
  .desc-block.reverse .desc-text { order: 0; }
  .spec-grid { grid-template-columns: 1fr; }
  #tuong-tu .products { grid-template-columns: repeat(2, 1fr); }

  .blog-row { grid-template-columns: 1fr; gap: 24px; }
  .post-sidebar { position: static; }
  .nt-cat-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .nt-cat-child li { border: 1px solid var(--line); }
  .nt-cat-child a { padding: 7px 12px; }
  .blog-page-title { font-size: 26px; }
  .comment-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .hero-price { font-size: 19px; margin-bottom: 14px; }
  .hero-dots { bottom: 14px; }
  .hero-dot { width: 24px; }
  .section { padding: 40px 0; }
  .section-title span { font-size: 24px; }
  .tab-nav { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tab-nav button svg { width: 42px; height: 42px; }
  .tab-nav button { font-size: 12px; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-title a { font-size: 15px; }
  .price .amount { font-size: 16px; }
  .box-excerpt { font-size: 12.5px; }
  .footer-grid, .gallery { grid-template-columns: repeat(2, 1fr); }
  .promo-inner { padding: 24px; }
  .promo-box h4, .promo-box.wide h4 { font-size: 28px; }
  .post-grid { grid-template-columns: 1fr; gap: 22px; }
  .entry-title { font-size: 23px; }
  .entry-header-row { flex-direction: column; align-items: flex-start; }
  .entry-content h2 { font-size: 20px; }
  .news-list .post-item { grid-template-columns: 110px 1fr; }

  .product-info .product_title { font-size: 22px; }
  .product-page-price .amount { font-size: 26px; }
  .characteristics { grid-template-columns: repeat(2, 1fr); }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .gallery-thumb { height: 64px; }
  .gallery-thumb svg,
  .gallery-thumb img { top: 4px; left: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
  .video-frame { min-height: 260px; }
  .product-section { padding: 32px 0; }
  .product-section-title { font-size: 18px; margin-bottom: 18px; }
  .buy-row .button { min-width: 100%; }
  .spec-table th { width: 50%; }
}

/* ============================================================
   BỔ SUNG CHO WORDPRESS (paginate_links, comment_form mặc định,
   gallery meta box trong admin) — không đổi các rule ở trên
   ============================================================ */
.pagination a.page-numbers,
.pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--dark);
  font-weight: 600;
}
.pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.pagination span.page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination span.page-numbers.dots { border: 0; background: none; }

/* form bình luận mặc định của WordPress dùng chung class .comment-form */
#respond .comment-reply-title { font-size: 22px; margin: 0 0 6px; color: var(--dark); }
.comment-form-comment textarea { min-height: 140px; }
.comment-form-author, .comment-form-email, .comment-form-url {
  display: inline-block; width: calc(33.33% - 11px); vertical-align: top; margin-right: 16px;
}
.comment-form-url { margin-right: 0; }
@media (max-width: 640px) {
  .comment-form-author, .comment-form-email, .comment-form-url { display: block; width: 100%; margin-right: 0; }
}
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list .comment-body {
  border: 1px solid var(--line);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.comment-list .comment-author { font-weight: 700; color: var(--dark); }
.comment-list .comment-metadata { font-size: 12px; color: var(--body); margin-bottom: 8px; }
.comment-list .comment-metadata a { color: inherit; }
.comment-list .reply a {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}
.comment-list .children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.no-comments { color: var(--body); }
