/**
 * XADT Web Revamp — Design System
 * Xuyên Á Đại Thành · xuyenadaithanh.com
 * 
 * Dùng cho flatsome-child theme.
 * Enqueue trong functions-xadt.php
 * 
 * Cấu trúc:
 *   0. Reset & Tokens
 *   1. Typography
 *   2. Common Components (buttons, cards, badges, pills, breadcrumb, section heading)
 *   3. Template 2 — Blog / Tin tức
 *   4. Template 3 — Chi tiết Sản phẩm
 *   5. Template 1 — Lọc Sản phẩm (filter)
 *   6. Floating Contacts & Sticky Bar
 *   7. Responsive
 */

/* ========================================================================
   0. RESET & DESIGN TOKENS
   ======================================================================== */

:root {
  /* Brand */
  --xadt-brand: #b8651e;
  --xadt-brand-dark: #9a541a;
  --xadt-brand-light: #fff4ea;
  --xadt-brand-gradient: linear-gradient(135deg, #b8651e, #d98a3e);

  /* Semantic */
  --xadt-ink: #1f2328;
  --xadt-grey: #6b7280;
  --xadt-grey-light: #9ca3af;
  --xadt-line: #e7e7e9;
  --xadt-bg: #f3f4f6;
  --xadt-bg-card: #fff;

  /* Accents */
  --xadt-red: #c0392b;
  --xadt-green: #2e8b57;
  --xadt-blue: #1d6fb8;
  --xadt-zalo: #0068ff;
  --xadt-messenger: #9b59b6;
  --xadt-star: #f5a623;

  /* Category pills */
  --xadt-cat1: #b8651e;
  --xadt-cat2: #1d6fb8;
  --xadt-cat3: #2e8b57;
  --xadt-cat4: #c0392b;
  --xadt-cat5: #7c3aed;

  /* Shadows */
  --xadt-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(0, 0, 0, 0.06);
  --xadt-shadow-hover: 0 6px 14px rgba(0, 0, 0, 0.10), 0 18px 40px rgba(0, 0, 0, 0.12);
  --xadt-shadow-sticky: 0 -4px 16px rgba(0, 0, 0, 0.08);

  /* Radius */
  --xadt-radius-sm: 8px;
  --xadt-radius-md: 12px;
  --xadt-radius-lg: 14px;
  --xadt-radius-pill: 24px;
  --xadt-radius-round: 50%;

  /* Spacing */
  --xadt-gap: 16px;
  --xadt-wrap-max: 1180px;
  --xadt-wrap-pad: 16px;

  /* Transition */
  --xadt-transition: 0.18s ease;

  /* Note (guide blocks) */
  --xadt-note-bg: #fff7ed;
  --xadt-note-border: #f0c08a;
}

/* ========================================================================
   1. TYPOGRAPHY
   ======================================================================== */

.xadt-wrap {
  max-width: var(--xadt-wrap-max);
  margin: 0 auto;
  padding: 0 var(--xadt-wrap-pad);
}

/* ========================================================================
   2. COMMON COMPONENTS
   ======================================================================== */

/* --- Breadcrumb --- */
.xadt-breadcrumb {
  color: var(--xadt-grey);
  font-size: 13px;
  padding: 14px 0 6px;
}

.xadt-breadcrumb a {
  color: var(--xadt-grey);
  text-decoration: none;
}

.xadt-breadcrumb a:hover {
  color: var(--xadt-brand);
}

.xadt-breadcrumb .current {
  color: var(--xadt-ink);
  font-weight: 700;
}

/* --- Section Heading (bar + title) --- */
.xadt-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 14px;
}

.xadt-section::before {
  content: "";
  width: 5px;
  height: 22px;
  background: var(--xadt-brand);
  border-radius: 3px;
  flex-shrink: 0;
}

.xadt-section h2,
.xadt-section h5 {
  font-size: 19px;
  margin: 0;
  line-height: 1.3;
}

.xadt-section .xadt-more {
  margin-left: auto;
  font-size: 13px;
  color: var(--xadt-brand-dark);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.xadt-section .xadt-more:hover {
  text-decoration: underline;
}

/* --- Buttons --- */
.xadt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--xadt-shadow);
  transition: var(--xadt-transition);
  line-height: 1.3;
}

.xadt-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--xadt-shadow-hover);
}

.xadt-btn--quote {
  background: var(--xadt-brand);
  color: #fff;
}
.xadt-btn--quote:hover {
  color: #fff;
}

.xadt-btn--call {
  background: var(--xadt-green);
  color: #fff;
}
.xadt-btn--call:hover {
  color: #fff;
}

.xadt-btn--zalo {
  background: var(--xadt-zalo);
  color: #fff;
}
.xadt-btn--zalo:hover {
  color: #fff;
}

.xadt-btn--outline {
  background: #fff;
  color: var(--xadt-brand-dark);
  border: 1px solid var(--xadt-line);
}

.xadt-btn--sm {
  padding: 8px 14px;
  font-size: 12.5px;
  border-radius: var(--xadt-radius-sm);
}

/* --- Cards --- */
.xadt-card {
  background: var(--xadt-bg-card);
  border-radius: var(--xadt-radius-lg);
  box-shadow: var(--xadt-shadow);
  overflow: hidden;
  transition: var(--xadt-transition);
}

.xadt-card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--xadt-shadow-hover);
}

/* --- Pills (category badges) --- */
.xadt-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-radius: 6px;
  padding: 3px 9px;
  line-height: 1.4;
}

.xadt-pill--cat1 { background: var(--xadt-cat1); }
.xadt-pill--cat2 { background: var(--xadt-cat2); }
.xadt-pill--cat3 { background: var(--xadt-cat3); }
.xadt-pill--cat4 { background: var(--xadt-cat4); }
.xadt-pill--cat5 { background: var(--xadt-cat5); }

/* --- Meta line (date, author, read time) --- */
.xadt-meta {
  color: var(--xadt-grey);
  font-size: 12.5px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* --- Trust badges --- */
.xadt-trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.xadt-trust-item {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: #444;
  background: #f7f7f8;
  border-radius: var(--xadt-radius-sm);
  padding: 8px 10px;
}

.xadt-trust-item .xadt-trust-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* --- Price display --- */
.xadt-price {
  color: var(--xadt-red);
  font-weight: 800;
  font-size: 26px;
}

.xadt-price--old {
  color: #aaa;
  font-weight: 400;
  text-decoration: line-through;
  font-size: 15px;
  margin-left: 8px;
}

.xadt-price--contact {
  color: var(--xadt-brand-dark);
  font-weight: 700;
  font-size: 17px;
}

/* --- Spec table --- */
.xadt-spec-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--xadt-radius-md);
  overflow: hidden;
  box-shadow: var(--xadt-shadow);
}

.xadt-spec-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--xadt-line);
  font-size: 14px;
}

.xadt-spec-table tr td:first-child {
  width: 38%;
  color: var(--xadt-grey);
  background: #fafafa;
  font-weight: 600;
}

.xadt-spec-table tr:last-child td {
  border-bottom: 0;
}

/* --- Pagination --- */
.xadt-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 6px;
}

.xadt-pager a,
.xadt-pager span {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-sm);
  font-size: 13.5px;
  text-decoration: none;
  color: var(--xadt-ink);
  transition: var(--xadt-transition);
}

.xadt-pager a:hover {
  border-color: var(--xadt-brand);
  color: var(--xadt-brand);
}

.xadt-pager .current,
.xadt-pager a.active {
  background: var(--xadt-brand);
  color: #fff;
  border-color: var(--xadt-brand);
  font-weight: 700;
}


/* ========================================================================
   3. TEMPLATE 2 — BLOG / TIN TỨC
   ======================================================================== */

/* --- Category Nav Tabs --- */
.xadt-blog-catnav {
  background: #fff;
  border-bottom: 1px solid var(--xadt-line);
  box-shadow: var(--xadt-shadow);
  position: relative;
  z-index: 4;
}

.xadt-blog-catnav__inner {
  max-width: var(--xadt-wrap-max);
  margin: 0 auto;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 var(--xadt-wrap-pad);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.xadt-blog-catnav__inner::-webkit-scrollbar {
  display: none;
}

.xadt-blog-catnav__link {
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--xadt-transition);
}

.xadt-blog-catnav__link:hover,
.xadt-blog-catnav__link--active {
  color: var(--xadt-brand-dark);
  border-bottom-color: var(--xadt-brand);
}

/* --- Blog Intro --- */
.xadt-blog-intro h1 {
  font-size: 27px;
  margin: 6px 0 6px;
  line-height: 1.3;
}

.xadt-blog-intro__desc {
  color: var(--xadt-grey);
  font-size: 14px;
  max-width: 760px;
  margin-bottom: 18px;
  line-height: 1.6;
}

/* --- Featured Block --- */
.xadt-blog-featured {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--xadt-gap);
}

.xadt-blog-featured__main {
  position: relative;
  border-radius: var(--xadt-radius-lg);
  overflow: hidden;
  box-shadow: var(--xadt-shadow);
  min-height: 340px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
}

.xadt-blog-featured__main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.xadt-blog-featured__main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.78));
  z-index: 1;
}

.xadt-blog-featured__main-content {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.xadt-blog-featured__main h3 {
  font-size: 23px;
  margin: 8px 0;
  line-height: 1.25;
  color: #fff;
}

.xadt-blog-featured__main p {
  margin: 0 0 8px;
  font-size: 13.5px;
  opacity: 0.92;
}

.xadt-blog-featured__sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Mini card (featured sidebar) */
.xadt-mini-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px;
  background: #fff;
  border-radius: var(--xadt-radius-md);
  box-shadow: var(--xadt-shadow);
  overflow: hidden;
  transition: var(--xadt-transition);
  text-decoration: none;
  color: var(--xadt-ink);
}

.xadt-mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--xadt-shadow-hover);
}

.xadt-mini-card__thumb {
  width: 104px;
  min-height: 90px;
  object-fit: cover;
  display: block;
}

.xadt-mini-card__body {
  padding: 9px 10px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.xadt-mini-card__body h4 {
  font-size: 13.5px;
  margin: 0;
  line-height: 1.3;
}

/* --- Blog Feed Grid + Sidebar Layout --- */
.xadt-blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  margin-top: 8px;
}

/* Feed grid */
.xadt-blog-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--xadt-gap);
}

/* Article card */
.xadt-article-card {
  background: #fff;
  border-radius: var(--xadt-radius-md);
  box-shadow: var(--xadt-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--xadt-transition);
  text-decoration: none;
  color: var(--xadt-ink);
}

.xadt-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--xadt-shadow-hover);
}

.xadt-article-card__thumb {
  height: 158px;
  position: relative;
  overflow: hidden;
}

.xadt-article-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xadt-article-card__thumb .xadt-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.xadt-article-card__body {
  padding: 12px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.xadt-article-card__body h3 {
  font-size: 15.5px;
  margin: 0;
  line-height: 1.34;
}

.xadt-article-card__body p {
  margin: 0;
  color: var(--xadt-grey);
  font-size: 13px;
  flex: 1;
}

/* --- Blog Sidebar --- */
.xadt-blog-sidebar .xadt-sidebar-widget {
  background: #fff;
  border-radius: var(--xadt-radius-md);
  box-shadow: var(--xadt-shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.xadt-sidebar-widget__title {
  font-size: 14px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--xadt-line);
  background: #fafafa;
}

/* Popular posts */
.xadt-popular-item {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--xadt-line);
  align-items: flex-start;
  text-decoration: none;
  color: var(--xadt-ink);
  transition: var(--xadt-transition);
}

.xadt-popular-item:last-child {
  border-bottom: 0;
}

.xadt-popular-item:hover h4 {
  color: var(--xadt-brand);
}

.xadt-popular-item__num {
  font-size: 20px;
  font-weight: 800;
  color: var(--xadt-brand);
  opacity: 0.4;
  min-width: 22px;
  line-height: 1.1;
  flex-shrink: 0;
}

.xadt-popular-item h4 {
  font-size: 13px;
  margin: 0;
  line-height: 1.34;
  transition: var(--xadt-transition);
}

/* Category list */
.xadt-catlist a {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--xadt-line);
  font-size: 13.5px;
  text-decoration: none;
  color: var(--xadt-ink);
  transition: var(--xadt-transition);
}

.xadt-catlist a:last-child {
  border-bottom: 0;
}

.xadt-catlist a:hover {
  color: var(--xadt-brand);
  background: #fafafa;
}

.xadt-catlist__count {
  color: #bbb;
}

/* Tags */
.xadt-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 13px 14px;
}

.xadt-tagcloud a {
  background: #f1f1f1;
  border-radius: 16px;
  font-size: 12px;
  padding: 5px 11px;
  color: #555;
  text-decoration: none;
  transition: var(--xadt-transition);
}

.xadt-tagcloud a:hover {
  background: var(--xadt-brand-light);
  color: var(--xadt-brand-dark);
}

/* CTA widget */
.xadt-sidebar-cta {
  background: var(--xadt-brand-gradient);
  color: #fff;
  border-radius: var(--xadt-radius-md);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--xadt-shadow);
}

.xadt-sidebar-cta h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.xadt-sidebar-cta p {
  margin: 0 0 12px;
  font-size: 13px;
  opacity: 0.95;
}

.xadt-sidebar-cta a {
  display: inline-block;
  background: #fff;
  color: var(--xadt-brand-dark);
  font-weight: 700;
  border-radius: var(--xadt-radius-pill);
  padding: 9px 20px;
  font-size: 13.5px;
  text-decoration: none;
  transition: var(--xadt-transition);
}

.xadt-sidebar-cta a:hover {
  transform: translateY(-1px);
  box-shadow: var(--xadt-shadow);
}


/* ========================================================================
   4. TEMPLATE 3 — CHI TIẾT SẢN PHẨM
   ======================================================================== */

/* --- Top: Gallery + Info 2 columns --- */
.xadt-product-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 18px;
}

/* Gallery */
.xadt-gallery__main {
  border-radius: var(--xadt-radius-lg);
  overflow: hidden;
  box-shadow: var(--xadt-shadow);
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
}

.xadt-gallery__main img,
.xadt-gallery__main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.xadt-gallery__video-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
}

.xadt-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.xadt-gallery__thumb {
  flex: 1;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--xadt-transition);
}

.xadt-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xadt-gallery__thumb--active,
.xadt-gallery__thumb:hover {
  border-color: var(--xadt-brand);
}

/* Product Info */
.xadt-product-info h1 {
  font-size: 24px;
  margin: 2px 0 8px;
  line-height: 1.3;
}

.xadt-product-subline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--xadt-grey);
  margin-bottom: 10px;
  align-items: center;
}

.xadt-product-subline .xadt-stars {
  color: var(--xadt-star);
}

.xadt-product-subline .xadt-instock {
  color: var(--xadt-green);
  font-weight: 700;
}

/* Highlights box */
.xadt-highlights {
  background: #faf6f1;
  border: 1px solid #eadbc8;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 12px 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--xadt-ink);
}

.xadt-highlights p {
  margin: 0 0 8px;
}
.xadt-highlights p:last-child {
  margin-bottom: 0;
}

.xadt-highlights ul,
.xadt-highlights ol {
  margin: 6px 0 10px;
  padding-left: 22px;
}

.xadt-highlights ul:last-child,
.xadt-highlights ol:last-child {
  margin-bottom: 0;
}

.xadt-highlights li {
  margin: 4px 0;
}

/* Price box */
.xadt-price-box {
  background: #fff;
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

/* CTA row */
.xadt-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.xadt-cta-row .xadt-btn {
  flex: 1;
  min-width: 130px;
}

/* --- Description with TOC --- */
.xadt-product-desc {
  background: #fff;
  border-radius: var(--xadt-radius-lg);
  box-shadow: var(--xadt-shadow);
  padding: 20px 22px;
}

.xadt-toc {
  background: #f7f7f8;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.xadt-toc__label {
  font-size: 13px;
  color: var(--xadt-grey);
  font-weight: 700;
  margin-bottom: 4px;
}

.xadt-toc a {
  display: block;
  font-size: 13.5px;
  color: var(--xadt-blue);
  padding: 3px 0;
  text-decoration: none;
}

.xadt-toc a:hover {
  text-decoration: underline;
}

.xadt-product-desc h3 {
  font-size: 16.5px;
  margin: 18px 0 8px;
  color: var(--xadt-brand-dark);
}

.xadt-product-desc p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
}

/* Pros / Cons boxes */
.xadt-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0;
}

.xadt-pros {
  background: #eafaf0;
  border: 1px solid #bfe6cf;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
}

.xadt-cons {
  background: #fdeeee;
  border: 1px solid #f2c9c9;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
}

/* --- Product Grid (related, cross-sell) --- */
.xadt-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.xadt-product-card {
  background: #fff;
  border-radius: var(--xadt-radius-md);
  box-shadow: var(--xadt-shadow);
  overflow: hidden;
  transition: var(--xadt-transition);
  text-decoration: none;
  color: var(--xadt-ink);
}

.xadt-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--xadt-shadow-hover);
}

.xadt-product-card__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
}

.xadt-product-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.xadt-product-card__body {
  padding: 10px 11px;
}

.xadt-product-card__body h4 {
  font-size: 13.5px;
  margin: 0 0 6px;
  line-height: 1.3;
}

.xadt-product-card__price {
  color: var(--xadt-red);
  font-weight: 800;
  font-size: 14px;
}

.xadt-product-card__quote {
  color: var(--xadt-brand-dark);
  font-weight: 700;
  font-size: 13px;
}

/* --- Related Articles Grid --- */
.xadt-related-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.xadt-related-article {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  background: #fff;
  border-radius: var(--xadt-radius-md);
  box-shadow: var(--xadt-shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--xadt-ink);
  transition: var(--xadt-transition);
}

.xadt-related-article:hover {
  transform: translateY(-2px);
  box-shadow: var(--xadt-shadow-hover);
}

.xadt-related-article__thumb {
  width: 96px;
  min-height: 80px;
  overflow: hidden;
}

.xadt-related-article__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xadt-related-article__body {
  padding: 9px 8px 9px 0;
}

.xadt-related-article__body h4 {
  font-size: 13px;
  margin: 0;
  line-height: 1.32;
}

/* --- Reviews --- */
.xadt-reviews {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  background: #fff;
  border-radius: var(--xadt-radius-lg);
  box-shadow: var(--xadt-shadow);
  padding: 18px 20px;
}

.xadt-reviews__score {
  text-align: center;
}

.xadt-reviews__score-big {
  font-size: 42px;
  font-weight: 800;
  color: var(--xadt-brand);
  line-height: 1.1;
}

.xadt-reviews__score .xadt-stars {
  color: var(--xadt-star);
  font-size: 18px;
}

.xadt-reviews__bars div {
  font-size: 12.5px;
  color: var(--xadt-grey);
  margin: 3px 0;
}


/* ========================================================================
   5. TEMPLATE 1 — LỌC SẢN PHẨM (FILTER)
   ======================================================================== */

/* --- Brand Logo Row --- */
.xadt-filter-brands {
  background: #fff;
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.xadt-filter-brands__title,
.xadt-filter-criteria__title {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--xadt-grey);
  text-transform: uppercase;
}

.xadt-brand-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xadt-brand-logo {
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-sm);
  padding: 9px 14px;
  font-weight: 700;
  font-size: 13px;
  color: #444;
  background: #fafafa;
  min-width: 88px;
  text-align: center;
  cursor: pointer;
  transition: var(--xadt-transition);
  text-decoration: none;
}

.xadt-brand-logo:hover,
.xadt-brand-logo--active {
  border-color: var(--xadt-brand);
  background: var(--xadt-brand-light);
  color: var(--xadt-brand-dark);
}

/* --- Filter Criteria Chips --- */
.xadt-filter-criteria {
  background: #fff;
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.xadt-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.xadt-filter-chip {
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-pill);
  padding: 9px 16px;
  font-size: 13.5px;
  background: #f1f1f1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--xadt-transition);
}

.xadt-filter-chip:hover {
  border-color: var(--xadt-brand);
}

.xadt-filter-chip--active {
  border-color: var(--xadt-brand);
  color: var(--xadt-brand-dark);
  background: var(--xadt-brand-light);
  font-weight: 700;
}

.xadt-filter-chip__caret {
  font-size: 11px;
  opacity: 0.6;
}

/* Quick capacity chips */
.xadt-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.xadt-quick-chip {
  background: var(--xadt-brand-light);
  border: 1px solid #e6c39c;
  color: var(--xadt-brand-dark);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--xadt-transition);
  text-decoration: none;
}

.xadt-quick-chip:hover,
.xadt-quick-chip--active {
  background: var(--xadt-brand);
  color: #fff;
  border-color: var(--xadt-brand);
}

/* --- Sort Bar --- */
.xadt-sortbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-md);
}

.xadt-sortbar__label {
  color: var(--xadt-grey);
  font-size: 13px;
}

.xadt-sortbar a {
  font-size: 13.5px;
  color: #444;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 16px;
  transition: var(--xadt-transition);
}

.xadt-sortbar a:hover {
  background: #f0f0f0;
}

.xadt-sortbar a.active {
  background: var(--xadt-brand);
  color: #fff;
  font-weight: 700;
}

.xadt-sortbar__count {
  margin-left: auto;
  color: var(--xadt-grey);
  font-size: 13px;
}

/* --- Active filter chips --- */
.xadt-active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-md);
  margin-bottom: 14px;
}

.xadt-active-filter {
  background: #eef4ff;
  border: 1px solid #cdddf7;
  border-radius: 18px;
  padding: 4px 10px;
  font-size: 12.5px;
  color: #2b5dab;
  display: flex;
  align-items: center;
  gap: 4px;
}

.xadt-active-filter__remove {
  cursor: pointer;
  font-weight: 700;
  margin-left: 2px;
}

.xadt-active-filter--clear {
  background: var(--xadt-brand-light);
  border-color: #e6c39c;
  color: var(--xadt-brand-dark);
  cursor: pointer;
}

/* --- Product List Grid (filter page) --- */
.xadt-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.xadt-pcard {
  background: #fff;
  border: 1px solid var(--xadt-line);
  border-radius: var(--xadt-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--xadt-transition);
}

.xadt-pcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--xadt-shadow-hover);
  border-color: transparent;
}

.xadt-pcard__img {
  height: 150px;
  overflow: hidden;
  position: relative;
}

.xadt-pcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xadt-pcard__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--xadt-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 7px;
}

.xadt-pcard__body {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.xadt-pcard__name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 36px;
}

.xadt-pcard__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.xadt-pcard__spec {
  background: #f3f3f3;
  border-radius: 5px;
  font-size: 11.5px;
  padding: 2px 7px;
  color: #555;
}

.xadt-pcard__spec--capacity {
  background: var(--xadt-brand-light);
  color: var(--xadt-brand-dark);
  font-weight: 700;
}

.xadt-pcard__price {
  color: var(--xadt-red);
  font-weight: 800;
  font-size: 15px;
  margin-top: 2px;
}

.xadt-pcard__price-old {
  color: #aaa;
  font-weight: 400;
  text-decoration: line-through;
  font-size: 12px;
  margin-left: 6px;
}

.xadt-pcard__quote {
  color: var(--xadt-brand-dark);
  font-weight: 700;
  font-size: 14px;
}

.xadt-pcard__btns {
  display: flex;
  gap: 7px;
  margin-top: auto;
}

.xadt-pcard__btns a {
  flex: 1;
  text-align: center;
  border-radius: var(--xadt-radius-sm);
  padding: 8px 0;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--xadt-transition);
}

.xadt-pcard__btn-quote {
  background: var(--xadt-brand);
  color: #fff;
}

.xadt-pcard__btn-quote:hover {
  background: var(--xadt-brand-dark);
}

.xadt-pcard__btn-zalo {
  background: var(--xadt-zalo);
  color: #fff;
}

.xadt-pcard__btn-zalo:hover {
  background: #0055cc;
}


/* ========================================================================
   6. FLOATING CONTACTS & STICKY BAR
   ======================================================================== */

/* --- Floating Contact Buttons --- */
.xadt-floating {
  position: fixed;
  right: 14px;
  bottom: 78px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 25;
}

.xadt-floating a {
  width: 48px;
  height: 48px;
  border-radius: var(--xadt-radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: var(--xadt-shadow-hover);
  transition: var(--xadt-transition);
  text-decoration: none;
}

.xadt-floating a:hover {
  transform: scale(1.1);
}

.xadt-floating__zalo {
  background: var(--xadt-zalo);
}

.xadt-floating__messenger {
  background: var(--xadt-messenger);
}

.xadt-floating__call {
  background: var(--xadt-green);
}

/* --- Sticky Bottom Bar (Product Detail) --- */
.xadt-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--xadt-line);
  box-shadow: var(--xadt-shadow-sticky);
  z-index: 20;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.xadt-sticky-bar--visible {
  transform: translateY(0);
}

.xadt-sticky-bar__inner {
  max-width: var(--xadt-wrap-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
}

.xadt-sticky-bar__name {
  font-weight: 700;
  font-size: 14px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xadt-sticky-bar__price {
  color: var(--xadt-red);
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}

.xadt-sticky-bar__price--contact {
  color: var(--xadt-brand-dark);
  font-size: 15px;
}

.xadt-sticky-bar__cta {
  background: var(--xadt-brand);
  color: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--xadt-transition);
}

.xadt-sticky-bar__cta:hover {
  background: var(--xadt-brand-dark);
}


/* ========================================================================
   7. RESPONSIVE
   ======================================================================== */

@media (max-width: 900px) {
  /* Blog */
  .xadt-blog-layout {
    grid-template-columns: 1fr;
  }

  .xadt-blog-featured {
    grid-template-columns: 1fr;
  }

  .xadt-blog-featured__main {
    min-height: 240px;
  }

  /* Product detail */
  .xadt-product-top {
    grid-template-columns: 1fr;
  }

  .xadt-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .xadt-related-articles {
    grid-template-columns: 1fr;
  }

  .xadt-reviews {
    grid-template-columns: 1fr;
  }

  /* Filter */
  .xadt-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .xadt-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  /* Blog */
  .xadt-blog-feed {
    grid-template-columns: 1fr;
  }

  /* Product detail */
  .xadt-proscons {
    grid-template-columns: 1fr;
  }

  .xadt-trust-grid {
    grid-template-columns: 1fr;
  }

  .xadt-cta-row {
    flex-direction: column;
  }

  .xadt-cta-row .xadt-btn {
    min-width: unset;
  }

  /* Sticky bar mobile */
  .xadt-sticky-bar__name {
    display: none;
  }
}

/* --- Mobile filter drawer (Template 1) --- */
@media (max-width: 760px) {
  .xadt-filter-mobile-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
  }

  .xadt-filter-mobile-toggle button {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--xadt-line);
    border-radius: var(--xadt-radius-sm);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }

  .xadt-filter-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 80vh;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px 16px;
  }

  .xadt-filter-drawer--open {
    transform: translateY(0);
  }

  .xadt-filter-drawer__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .xadt-filter-drawer__overlay--visible {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (min-width: 761px) {
  .xadt-filter-mobile-toggle {
    display: none;
  }
}

/* Ensure body padding for sticky bar on product pages */
.single-product {
  padding-bottom: 70px;
}
