/* ==========================================================================
   Shared Components: Silo Bars, Product/Brand/Solution/Service Cards,
   Spec Tables, FAQ Accordions, Forms, Toasts, CTA
   ========================================================================== */

.page-header {
  background-color: var(--bg-light);
  padding: 44px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-main);
}

.page-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.65;
}

/* 1. Brand Hub Grid (san-pham.html) */
.brand-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 56px;
  margin-bottom: 64px;
}

.brand-list-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 44px 32px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  gap: 12px;
}

.brand-list-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  transition: var(--transition);
}

.brand-list-card:hover {
  border-color: var(--primary-red);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.brand-list-card:hover::before {
  background: var(--primary-red);
}

.brand-list-card:nth-child(even):hover {
  border-color: var(--premium-gold);
}

.brand-list-card:nth-child(even):hover::before {
  background: var(--premium-gold);
}

.brand-list-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.brand-list-name {
  font-size: 1.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-main);
  margin: 0;
  transition: var(--transition);
}

.brand-list-card:hover .brand-list-name {
  color: var(--primary-red);
}

.brand-list-card:nth-child(even):hover .brand-list-name {
  color: var(--premium-gold-hover);
}

.cross-sell {
  background-color: var(--bg-dark);
  color: var(--white);
  padding: 64px 24px;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 80px;
}

/* 2. Silo Bars (danh-muc-san-pham.html, thang-may-fuji.html, danh-muc-san-pham-con.html) */
.silo-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
  margin-bottom: 64px;
  padding: 36px 28px;
  background: var(--white);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  border: 1px solid #F1F5F9;
}

.silo-bar--red {
  border: 1px solid var(--primary-red);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: none;
  gap: 44px;
}

.silo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 156px;
  cursor: pointer;
  transition: var(--transition);
}

.silo-img {
  height: 64px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.silo-img img {
  max-width: 100%;
  max-height: 100%;
  transition: var(--transition);
  filter: grayscale(100%);
  opacity: 0.45;
  object-fit: contain;
}

.silo-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.silo-item:hover,
.silo-item.active {
  transform: translateY(-4px);
}

.silo-item:hover .silo-img img,
.silo-item.active .silo-img img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.06);
}

.silo-item:hover .silo-name,
.silo-item.active .silo-name {
  color: var(--primary-red);
}

/* 3. Product Grid & Card */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(200, 16, 46, 0.3);
}

.product-img {
  height: 240px;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-brand-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

.product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.product-specs {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-spec span {
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

/* SEO Intro Box on Catalog Pages */
.catalog-seo-box {
  background: var(--bg-light);
  padding: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 72px;
}

.catalog-seo-box h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.catalog-seo-box p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

.catalog-seo-box p:last-child {
  margin-bottom: 0;
}

/* Subcategory Filter Bar (non-exploding SEO-safe links or JS filter) */
.subcat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.subcat-pill {
  padding: 8px 18px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.subcat-pill:hover,
.subcat-pill.active {
  border-color: var(--primary-red);
  background: var(--primary-red);
  color: var(--white);
}

.filter-empty-state[hidden] {
  display: none;
}

.filter-empty-state {
  text-align: center;
  padding: 28px 24px;
  border-radius: 12px;
  background: var(--bg-light);
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Shared Bottom CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-red), #8E0B20);
  color: var(--white);
  text-align: center;
  padding: 80px 24px;
}

.cta-title {
  font-size: 2.35rem;
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.25;
}

.cta-desc {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 36px;
  opacity: 0.92;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Forms & Status Feedback */
.form-group {
  margin-bottom: 18px;
}

.form-label,
.vh-lead-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-light);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 104px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.vh-lead-form .btn[type="submit"],
.btn-block {
  width: 100%;
}

.vh-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-status-msg {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  display: none;
}

.form-status-msg.is-success {
  display: block;
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

.form-status-msg.is-error {
  display: block;
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* Toast Notification */
.vh-toast {
  position: fixed;
  bottom: 84px;
  right: 24px;
  background: var(--bg-dark);
  color: var(--white);
  padding: 14px 20px;
  border-radius: 10px;
  border-left: 4px solid var(--premium-gold);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.vh-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyboard accessible FAQ indicator */
.faq-question,
.faq-trigger {
  cursor: pointer;
}

/* Rich Content & Article Body (shared across single post, project, page, product & catalog SEO) */
.article-body,
.product-rich-content,
.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2,
.product-rich-content h2,
.entry-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.article-body h3,
.product-rich-content h3,
.entry-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 24px 0 10px;
}

.article-body p,
.product-rich-content p,
.entry-content p {
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol,
.product-rich-content ul,
.product-rich-content ol,
.entry-content ul,
.entry-content ol {
  margin: 14px 0 20px 22px;
}

.article-body ul,
.product-rich-content ul,
.entry-content ul {
  list-style: disc;
}

.article-body ol,
.product-rich-content ol,
.entry-content ol {
  list-style: decimal;
}

.article-body li,
.product-rich-content li,
.entry-content li {
  margin-bottom: 8px;
}

.article-body img,
.product-rich-content img,
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.article-body blockquote,
.product-rich-content blockquote,
.entry-content blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--primary-red);
  background: var(--bg-light);
  border-radius: 0 8px 8px 0;
}

.wp-block-table {
  margin: 20px 0;
  overflow-x: auto;
}

/* Unified CMS Tables (overrides TinyMCE/pasted inline widths & borders cleanly) */
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) table,
.article-estimate-table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  margin: 20px 0;
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--white);
  border: 1px solid var(--border-color);
}

:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) :is(th, td),
.article-estimate-table :is(th, td) {
  border: 1px solid var(--border-color) !important;
  padding: 12px 16px !important;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: break-word;
}

:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) :is(th, td) p,
.article-estimate-table :is(th, td) p {
  margin: 0;
}

:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) :is(th, td) p + p,
.article-estimate-table :is(th, td) p + p {
  margin-top: 6px;
}

:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) col,
.article-estimate-table col {
  width: auto !important;
}

/* Standard table header & row-1 merged section titles (e.g. TinyMCE pasted spec groups) */
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) :is(thead th, thead td, tbody tr:first-child > th, tr:first-child > :is(th, td):is([colspan], :only-child)),
.article-estimate-table :is(thead th, thead td, tbody tr:first-child > th, tr:first-child > :is(th, td):is([colspan], :only-child)) {
  background: #0F172A !important;
  color: var(--white) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tr:first-child > :is(th, td):is([colspan], :only-child) :is(strong, b, span),
.article-estimate-table tr:first-child > :is(th, td):is([colspan], :only-child) :is(strong, b, span) {
  color: inherit !important;
}

/* Mid-table sub-header merged rows (including first tbody row when thead is present) */
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) thead ~ tbody > tr:first-child > :is(th, td):is([colspan], :only-child),
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) thead ~ tbody > tr > :is(th, td):is([colspan], :only-child),
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tr:not(:first-child) > :is(th, td):is([colspan], :only-child),
.article-estimate-table thead ~ tbody > tr:first-child > :is(th, td):is([colspan], :only-child),
.article-estimate-table thead ~ tbody > tr > :is(th, td):is([colspan], :only-child),
.article-estimate-table tr:not(:first-child) > :is(th, td):is([colspan], :only-child) {
  background: #F1F5F9 !important;
  color: var(--text-main) !important;
  font-weight: 700;
}

/* 2-column specification tables: consistent label/value vertical alignment */
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tr > :is(th, td):first-child:nth-last-child(2),
.article-estimate-table tr > :is(th, td):first-child:nth-last-child(2) {
  width: 34% !important;
  min-width: 145px;
}

:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tr > :is(th, td):last-child:nth-child(2),
.article-estimate-table tr > :is(th, td):last-child:nth-child(2) {
  width: 66% !important;
}

:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tbody tr > td:first-child:nth-last-child(2),
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tbody tr:not(:first-child) > th:not([colspan]):not(:only-child),
.article-estimate-table tbody tr > td:first-child:nth-last-child(2),
.article-estimate-table tbody tr:not(:first-child) > th:not([colspan]):not(:only-child) {
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-light);
}

/* Subtle zebra striping for 3+ column comparison/pricing tables */
:is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tbody tr:nth-child(even) > td:not(:first-child:nth-last-child(2)):not(:last-child:nth-child(2)):not([colspan]):not(:only-child),
.article-estimate-table tbody tr:nth-child(even) > td:not(:first-child:nth-last-child(2)):not(:last-child:nth-child(2)):not([colspan]):not(:only-child) {
  background: var(--bg-light);
}

@media (max-width: 768px) {
  .brand-list-grid {
    grid-template-columns: 1fr;
  }
  .page-title {
    font-size: 1.9rem;
  }
  .catalog-seo-box {
    padding: 28px 20px;
  }
  .cta-title {
    font-size: 1.75rem;
  }
  :is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) :is(th, td),
  .article-estimate-table :is(th, td) {
    padding: 10px 12px !important;
    font-size: 0.88rem;
  }
  :is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tr > :is(th, td):first-child:nth-last-child(2),
  .article-estimate-table tr > :is(th, td):first-child:nth-last-child(2) {
    width: 38% !important;
    min-width: 110px;
  }
  :is(.article-body, .product-rich-content, .catalog-seo-box, .entry-content, .wp-block-table) tr > :is(th, td):last-child:nth-child(2),
  .article-estimate-table tr > :is(th, td):last-child:nth-child(2) {
    width: 62% !important;
  }
}

