/*
Theme Name: Tiệm Điện
Theme URI: http://localhost/tiemdien
Author: Tiệm Điện
Description: Giao diện website vật tư điện chuyên nghiệp - Đủ vật tư · Mọi công trình
Version: 2.0.0
Requires at least: 5.0
License: GNU General Public License v2 or later
Text Domain: tiemdien
*/

/* ================================================================
   RESET & BASE
================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #075FEA;
  --blue-dk:    #054cc0;
  --blue-md:    #3a7ff0;
  --blue-lt:    #EBF3FF;
  --blue-xlt:   #F4F8FF;
  --navy:       #0A1833;
  --navy-lt:    #1a2d55;
  --yellow:     #FACC15;
  --yellow-dk:  #eab308;
  --green:      #16a34a;
  --red:        #dc2626;
  --text:       #111D35;
  --text-md:    #344054;
  --muted:      #667085;
  --muted-lt:   #98a2b3;
  --bg:         #F7FBFF;
  --bg-card:    #FFFFFF;
  --border:     #E4ECF7;
  --border-lt:  #F0F6FF;
  --shadow:     0 1px 4px rgba(28,70,140,.06);
  --shadow-md:  0 4px 16px rgba(28,70,140,.09);
  --shadow-lg:  0 16px 44px rgba(28,70,140,.10);
  --shadow-xl:  0 24px 60px rgba(28,70,140,.14);
  --r6:   6px;  --r8:  8px;  --r10: 10px; --r12: 12px;
  --r16: 16px;  --r20: 20px; --r24: 24px;
  --r32: 32px;  --r36: 36px;
  /* Alias tokens — đồng bộ tên biến đã dùng rải rác trong stylesheet */
  --dark:       #0A1833; /* = navy: dùng cho heading/text đậm */
  --text-light: #667085; /* = muted: text phụ */
  --bg-soft:    #F2F6FC; /* nền section nhạt */
  --header-h:   80px;    /* chiều cao header — dùng cho drawer & sticky */
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Accessibility ────────────────────────────────────────────── */
/* Focus ring rõ ràng cho điều hướng bàn phím (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip-link: nhảy thẳng tới nội dung chính */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--blue);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* Tôn trọng người dùng tắt hiệu ứng chuyển động (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.td-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}
.td-section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--blue);
  background: var(--blue-lt); border-radius: 30px;
  padding: 5px 14px; letter-spacing: .3px; text-transform: uppercase;
  margin-bottom: 12px;
}

/* ================================================================
   TOP BAR
================================================================ */
#td-topbar {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  font-size: 12.5px;
  padding: 6px 0;
}
#td-topbar .td-wrap {
  display: flex; justify-content: space-between; align-items: center;
}
.td-tb-left, .td-tb-right {
  display: flex; align-items: center; gap: 16px;
}
#td-topbar a { color: rgba(255,255,255,.75); transition: color .15s; }
#td-topbar a:hover { color: #fff; }
.td-tb-sep { opacity: .3; }
.td-tb-right .td-social-sm {
  display: flex; align-items: center; gap: 10px;
}
.td-tb-right .td-social-sm a {
  width: 22px; height: 22px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  transition: background .15s;
}
.td-tb-right .td-social-sm a:hover { background: rgba(255,255,255,.25); }

/* ================================================================
   HEADER
================================================================ */
#td-header {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 900;
  transition: box-shadow .3s;
}
#td-header.scrolled {
  box-shadow: var(--shadow-md);
}
.td-header-inner {
  display: flex; align-items: center; gap: 8px;
  height: 80px;
  max-width: 1320px; margin: 0 auto; padding: 0 24px;
}

/* Logo */
.td-logo {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0; text-decoration: none;
  height: 100%;
}

/* Bolt mark — đứng riêng bên trái, cách chữ cân đối */
.td-logo-mark {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 36px; line-height: 1;
  color: var(--yellow);
  transform: rotate(-8deg);
  filter: drop-shadow(0 3px 4px rgba(234,179,8,.45));
}

/* Wordmark TIỆM ĐIỆN — in nghiêng, đậm, cao gần bằng header */
.td-logo-word {
  display: flex; align-items: baseline; gap: .28em;
  font-style: italic; font-weight: 900;
  font-size: 34px; line-height: 1;
  letter-spacing: -.5px; white-space: nowrap;
}
.td-logo-word .lw-a { color: var(--navy); }
.td-logo-word .lw-b { color: var(--blue); }

.td-logo:hover .td-logo-mark { transform: rotate(-8deg) scale(1.08); }

/* Logo ảnh upload */
.td-logo-img {
  display: block; height: 64px; width: auto;
  max-width: 340px; object-fit: contain;
}

/* Primary Nav */
#td-nav {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
}
.td-nav-item { position: relative; }
.td-nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 9px 13px;
  font-size: 14px; font-weight: 500; color: var(--text-md);
  border-radius: var(--r8); text-transform: capitalize;
  transition: all .2s; white-space: nowrap; position: relative;
}
.td-nav-link:hover { color: var(--blue); background: var(--blue-lt); }
.td-nav-link.active { color: var(--blue); font-weight: 700; }
.td-nav-link.active::after {
  content: '';
  position: absolute; bottom: -26px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 3px;
  background: var(--blue); border-radius: 2px;
}
.td-caret { font-size: 9px; opacity: .55; transition: transform .2s; }
.td-nav-item:hover .td-caret { transform: rotate(180deg); }

/* Dropdown */
.td-nav-item:hover .td-dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.td-dropdown {
  position: absolute; top: calc(100% + 14px); left: 0; z-index: 1000;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r16); box-shadow: var(--shadow-xl);
  min-width: 230px; padding: 10px;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
}
.td-dropdown::before {
  content: ''; position: absolute;
  top: -16px; left: 0; right: 0; height: 16px;
}
.td-dropdown a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border-radius: var(--r8);
  font-size: 13.5px; color: var(--text-md); transition: all .15s;
}
.td-dropdown a i {
  width: 18px; height: 18px;
  background: var(--blue-lt); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); font-size: 11px; flex-shrink: 0;
}
.td-dropdown a:hover { background: var(--blue-lt); color: var(--blue); padding-left: 18px; }

/* Header Right */
.td-header-actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; margin-left: 16px;
}
.td-btn-icon {
  width: 38px; height: 38px; border-radius: var(--r8);
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all .2s; cursor: pointer;
}
.td-btn-icon:hover { background: var(--blue-lt); color: var(--blue); border-color: var(--blue); }
.td-btn-login {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--r8); color: var(--text-md);
  font-size: 13.5px; font-weight: 600; transition: all .2s;
  background: transparent;
}
.td-btn-login:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-lt); }
.td-btn-cart {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  background: var(--navy); color: #fff;
  border-radius: var(--r8); font-size: 13.5px; font-weight: 700;
  transition: all .2s; position: relative;
  text-decoration: none;
}
.td-btn-cart:hover { background: var(--navy-lt); color: #fff; transform: translateY(-1px); }
.td-cart-badge {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; background: var(--blue);
  border: 2.5px solid #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff;
}
.td-hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: var(--r8); background: var(--bg);
  border: 1.5px solid var(--border); cursor: pointer;
}
.td-hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .3s;
}
.td-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.td-hamburger.open span:nth-child(2) { opacity: 0; }
.td-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search Bar */
.td-searchbar {
  border-top: 1px solid var(--border);
  background: var(--bg-card); padding: 12px 0;
  display: none;
}
.td-searchbar.open { display: block; }
.td-searchbar-inner {
  max-width: 880px; margin: 0 auto; position: relative;
  padding: 0 24px; display: flex; gap: 10px; flex-wrap: wrap;
}
.td-searchbar-inner input {
  flex: 1; border: 1.5px solid var(--border); border-radius: var(--r8);
  padding: 11px 16px; font-size: 14px; outline: none; background: #fff;
  color: var(--text); transition: border-color .2s;
}
.td-searchbar-inner input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,95,234,.1); }
.td-sbtn-go {
  padding: 11px 22px; background: var(--blue); color: #fff;
  border-radius: var(--r8); font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  transition: background .2s; cursor: pointer;
}
.td-sbtn-go:hover { background: var(--blue-dk); }
.td-sbtn-close {
  width: 42px; border-radius: var(--r8);
  background: #f3f4f6; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; cursor: pointer;
}
.td-sbtn-close:hover { background: #e5e7eb; color: var(--text); }

/* Search: scope select + nút nâng cao */
#td-search-scope {
  border: 1.5px solid var(--border); border-radius: var(--r8);
  padding: 0 12px; font-size: 13.5px; background: #fff; color: var(--text);
  outline: none; cursor: pointer; transition: border-color .2s;
}
#td-search-scope:focus { border-color: var(--blue); }
.td-sbtn-adv {
  width: 44px; border-radius: var(--r8); border: 1.5px solid var(--border);
  background: #fff; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .18s;
}
.td-sbtn-adv:hover, .td-sbtn-adv.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Panel nâng cao */
.td-search-adv-panel {
  flex-basis: 100%; margin: 4px 24px 0; padding: 14px 16px;
  background: var(--bg-soft, #f5f7fb); border: 1px solid var(--border); border-radius: var(--r12, 12px);
}
.td-sap-row { display: flex; flex-wrap: wrap; gap: 12px; }
.td-sap-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); flex: 1; min-width: 150px; }
.td-sap-field select, .td-sap-field input {
  border: 1.5px solid var(--border); border-radius: var(--r8); padding: 9px 12px;
  font-size: 13.5px; background: #fff; color: var(--text); outline: none; font-weight: 400;
}
.td-sap-field select:focus, .td-sap-field input:focus { border-color: var(--blue); }
.td-sap-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.td-sap-note i { color: var(--blue); margin-right: 4px; }

/* Dropdown gợi ý trực tiếp */
.td-search-suggest {
  position: absolute; top: calc(100% + 6px); left: 24px; right: 24px; z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r12, 12px);
  box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 8px; max-height: 64vh; overflow-y: auto;
}
.td-ss-group + .td-ss-group { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 4px; }
.td-ss-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-lt); padding: 8px 10px 4px; }
.td-ss-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px;
  text-decoration: none; color: var(--text); transition: background .12s;
}
.td-ss-item:hover { background: rgba(7,95,234,.07); }
.td-ss-thumb { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.td-ss-ico { width: 38px; height: 38px; border-radius: 7px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(7,95,234,.08); color: var(--blue); font-size: 17px; }
.td-ss-t { flex: 1; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-ss-price { font-size: 13px; font-weight: 800; color: var(--blue); flex-shrink: 0; }
.td-ss-all {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px;
  padding: 10px; border-radius: 9px; background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.td-ss-all:hover { background: var(--blue-dk); }
.td-ss-empty { padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }

@media (max-width: 700px) {
  .td-searchbar-inner { padding: 0 16px; }
  #td-search-scope { flex: 1; }
  .td-sbtn-go span { display: none; }
  .td-search-suggest, .td-search-adv-panel { left: 16px; right: 16px; margin-left: 16px; margin-right: 16px; }
  .td-search-adv-panel { margin-left: 16px; margin-right: 16px; }
}

/* Mobile Nav Drawer */
.td-mobile-nav {
  display: none;
  position: fixed; inset: 80px 0 0 0;
  background: #fff; z-index: 800;
  overflow-y: auto; padding: 16px 20px 40px;
  border-top: 1px solid var(--border);
  flex-direction: column; gap: 4px;
}
.td-mobile-nav.open { display: flex; }
.td-mobile-nav a {
  display: flex; align-items: center;
  padding: 13px 16px; border-radius: var(--r8);
  font-size: 15px; font-weight: 500; color: var(--text-md);
  transition: all .15s; text-transform: capitalize;
}
.td-mobile-nav a:hover { background: var(--blue-lt); color: var(--blue); }
.td-mobile-nav .td-mobile-sub {
  padding-left: 16px; border-left: 2px solid var(--border);
  margin: 4px 0 4px 28px;
  display: flex; flex-direction: column; gap: 2px;
}
.td-mobile-nav .td-mobile-sub a {
  font-size: 13.5px; padding: 9px 12px;
}

/* ================================================================
   HERO
================================================================ */
#td-hero {
  background: linear-gradient(155deg, #F0F7FF 0%, #EBF3FF 45%, #F4F9FF 100%);
  padding: 64px 0 60px;
  min-height: 620px;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
#td-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(7,95,234,.07) 0%, transparent 65%);
  pointer-events: none;
}
#td-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(250,204,21,.06) 0%, transparent 65%);
  pointer-events: none;
}
.td-hero-grid {
  display: grid; grid-template-columns: 1fr 380px;
  gap: 52px; align-items: start;
  position: relative; z-index: 1;
}

/* Badge */
.td-ai-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid #D0E4FF;
  border-radius: 40px; padding: 7px 16px;
  font-size: 12.5px; font-weight: 700; color: var(--blue);
  margin-bottom: 24px;
  box-shadow: 0 2px 14px rgba(7,95,234,.12);
}
.td-pulse {
  width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
  animation: tdPulse 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes tdPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.75); }
}

/* Hero Heading */
.td-hero-h1 {
  font-size: 48px; font-weight: 800; line-height: 1.15;
  color: var(--navy); margin-bottom: 18px;
  letter-spacing: -.5px;
}
.td-hero-h1 em {
  font-style: normal; color: var(--blue);
  background: linear-gradient(135deg, var(--blue), #3a7ff0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.td-hero-p {
  font-size: 16px; color: var(--muted);
  margin-bottom: 32px; max-width: 500px; line-height: 1.75;
}

/* AI Search */
.td-ai-search {
  display: flex; align-items: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--r16); overflow: hidden;
  margin-bottom: 22px;
  box-shadow: 0 4px 24px rgba(7,95,234,.10);
  transition: border-color .2s, box-shadow .2s;
}
.td-ai-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 4px 24px rgba(7,95,234,.20);
}
.td-ai-search-icon {
  padding: 0 12px 0 18px; color: var(--muted); font-size: 16px; flex-shrink: 0;
}
.td-ai-search input {
  flex: 1; border: none; outline: none;
  padding: 15px 8px; font-size: 14.5px; color: var(--text);
  background: transparent;
}
.td-ai-search input::placeholder { color: var(--muted-lt); }
.td-btn-magic {
  display: flex; align-items: center; gap: 9px;
  padding: 15px 24px;
  background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  border-radius: 0 14px 14px 0;
  transition: background .2s; cursor: pointer;
}
.td-btn-magic:hover { background: var(--blue-dk); }

/* Quick Chips */
.td-ql { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.td-chips {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
}
.td-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r12);
  font-size: 13px; color: var(--text-md); font-weight: 500;
  cursor: pointer; transition: all .2s; user-select: none;
}
.td-chip:hover {
  border-color: var(--blue); color: var(--blue);
  background: var(--blue-lt); transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(7,95,234,.12);
}
.td-chip.on {
  border-color: var(--blue); color: var(--blue);
  background: var(--blue-lt); font-weight: 700;
  box-shadow: 0 0 0 3px rgba(7,95,234,.12);
}
.td-chip i { font-size: 13px; }

/* Hero Right Panel */
.td-hero-right {
  display: flex; flex-direction: column;
  min-height: 0; /* allows grid row to be driven by the left column */
}
.td-hero-panel {
  flex: 1; min-height: 0;
  background: #fff; border-radius: var(--r24);
  box-shadow: var(--shadow-xl);
  border: 1.5px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.td-ph {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border-lt);
  background: linear-gradient(135deg, var(--blue-xlt), #fff);
  flex-shrink: 0;
}
.td-ph-title { font-size: 13.5px; font-weight: 800; color: var(--navy); }
.td-ph-link {
  font-size: 12px; color: var(--blue); font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.td-ph-link:hover { text-decoration: underline; }

/* Scrollable product list fills remaining space */
.td-plist { flex: 1; min-height: 0; overflow-y: auto; }
.td-plist::-webkit-scrollbar { width: 4px; }
.td-plist::-webkit-scrollbar-track { background: transparent; }
.td-plist::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.td-pitem {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; transition: background .15s; cursor: pointer;
  border-bottom: 1px solid var(--border-lt);
}
.td-pitem:last-child { border-bottom: none; }
.td-pitem:hover { background: var(--bg); }
.td-pthumb {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: var(--r10);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.td-pinfo { flex: 1; min-width: 0; }
.td-pname {
  font-size: 13px; font-weight: 700; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.td-pbrand { font-size: 11px; color: var(--muted); margin-top: 1px; }
.td-pprice {
  font-size: 12.5px; font-weight: 800; color: var(--blue); white-space: nowrap;
}

/* Footer buttons — pinned to bottom */
.td-pf {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 16px 20px;
  border-top: 1px solid var(--border-lt);
  background: linear-gradient(135deg, var(--blue-xlt), #fff);
  flex-shrink: 0;
}
.td-pf-btn1 {
  padding: 12px 10px; border: 2px solid var(--blue);
  border-radius: var(--r10); text-align: center;
  font-size: 13px; font-weight: 700; color: var(--blue);
  transition: all .2s; display: block;
}
.td-pf-btn1:hover { background: var(--blue-lt); }
.td-pf-btn2 {
  padding: 12px 10px; background: var(--blue);
  border-radius: var(--r10);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: #fff;
  transition: all .2s; text-decoration: none;
}
.td-pf-btn2:hover { background: var(--blue-dk); color: #fff; }

/* ================================================================
   FEATURES BAR
================================================================ */
#td-features {
  background: #fff;
  border-top: 1px solid var(--border-lt);
  border-bottom: 1px solid var(--border-lt);
}
.td-feat-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
}
.td-feat-item {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 28px;
  border-right: 1px solid var(--border-lt);
  transition: background .2s;
}
.td-feat-item:last-child { border-right: none; }
.td-feat-item:hover { background: var(--bg); }
.td-feat-ico {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--blue-lt); border-radius: var(--r12);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); font-size: 20px;
}
.td-feat-title { font-size: 13.5px; font-weight: 800; color: var(--navy); margin-bottom: 3px; }
.td-feat-sub { font-size: 12px; color: var(--muted); }

/* ================================================================
   STATS BAR
================================================================ */
#td-stats {
  background: linear-gradient(135deg, #0a1628 0%, #0c2461 100%);
}
.td-stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  border-left: 1px solid rgba(255,255,255,.08);
}
.td-stat-item {
  text-align: center; padding: 32px 20px;
  border-right: 1px solid rgba(255,255,255,.08);
  transition: background .2s;
}
.td-stat-item:hover { background: rgba(255,255,255,.04); }
.td-stat-num {
  font-size: 34px; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg,#60a5fa,#a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -1px;
}
.td-stat-lbl {
  font-size: 13px; color: rgba(255,255,255,.65);
  font-weight: 500; margin-top: 6px; letter-spacing: .3px;
}
@media(max-width:768px){
  .td-stats-grid { grid-template-columns: repeat(2,1fr); }
  .td-stat-num { font-size: 26px; }
}

/* ================================================================
   SOLUTIONS
================================================================ */
#td-solutions { padding: 80px 0; background: var(--bg); }
.td-sec-hd {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 32px;
}
.td-sec-pre { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px; }
.td-sec-title { font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -.3px; margin-bottom: 6px; }
.td-sec-sub { font-size: 14px; color: var(--muted); }
.td-sec-link {
  display: flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 700; color: var(--blue); white-space: nowrap;
  padding: 9px 18px; border: 2px solid var(--border); border-radius: var(--r8);
  transition: all .2s;
}
.td-sec-link:hover { border-color: var(--blue); background: var(--blue-lt); }

/* Solutions Grid */
.td-sol-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.td-sol-card {
  background: #fff; border-radius: var(--r20); overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex; flex-direction: column;
}
.td-sol-card:hover { transform: translateY(-8px); box-shadow: 0 24px 52px rgba(0,0,0,.13); border-color: transparent; }

/* Colored header area */
.td-sol-head {
  height: 148px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.td-sol-head--image {
  overflow: hidden;
  background: #0f172a;
}
.td-sol-head--image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, .1), rgba(2, 6, 23, .34));
  pointer-events: none;
}
.td-sol-head--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.td-sol-card:hover .td-sol-head--image img { transform: scale(1.05); }
.td-sol-icon-wrap {
  width: 68px; height: 68px;
  background: rgba(255,255,255,.22);
  border-radius: 20px; border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  transition: transform .3s;
}
.td-sol-card:hover .td-sol-icon-wrap { transform: scale(1.1) rotate(-4deg); }
.td-sol-tag {
  position: absolute; top: 14px; right: 14px;
  z-index: 1;
  background: rgba(255,255,255,.22); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; letter-spacing: .3px;
}

/* Card body */
.td-sol-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.td-sol-name { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.td-sol-desc { font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 16px; }
.td-sol-items {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.td-sol-items li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--text-md); line-height: 1.45;
}
.td-sol-items li i { color: var(--blue); font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.td-sol-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--blue);
  padding: 10px 18px; border-radius: var(--r10);
  border: 1.5px solid var(--blue); align-self: flex-start;
  transition: all .2s;
}
.td-sol-cta:hover { background: var(--blue); color: #fff; }

/* Gradient backgrounds */
.td-sg-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.td-sg-2 { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.td-sg-3 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.td-sg-4 { background: linear-gradient(135deg, #0c2461 0%, #1e3799 100%); }
.td-sg-5 { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.td-sg-6 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

/* ================================================================
   MID SECTION (PRICE + FAQ)
================================================================ */
#td-mid { padding: 80px 0; background: #fff; }
.td-mid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

/* Price Panel */
.td-price-box {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r24); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.td-price-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border-lt);
}
.td-price-t { font-size: 17px; font-weight: 800; color: var(--navy); }
.td-price-upd { font-size: 11.5px; color: var(--muted); }
.td-chart-wrap { padding: 16px 24px 4px; }

.td-pr {
  display: grid; grid-template-columns: 36px 1fr auto auto;
  align-items: center; gap: 12px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--border-lt);
  cursor: pointer; transition: background .15s;
}
.td-pr:last-child { border-bottom: none; }
.td-pr:hover { background: var(--bg); }
.td-pr-ico {
  width: 36px; height: 36px; border-radius: var(--r10);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.td-pr-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.td-pr-val { font-size: 13.5px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.td-pr-chg {
  font-size: 11.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 30px;
  display: flex; align-items: center; gap: 3px; white-space: nowrap;
}
.cg-up   { background: #DCFCE7; color: #15803D; }
.cg-down { background: #FEE2E2; color: #B91C1C; }
.cg-flat { background: var(--bg); color: var(--muted); }
.td-price-ft {
  padding: 16px 24px; border-top: 1px solid var(--border-lt); text-align: center;
}
.td-price-ft a {
  font-size: 13.5px; font-weight: 700; color: var(--blue);
  display: inline-flex; align-items: center; gap: 5px;
}
.td-price-ft a:hover { text-decoration: underline; }

/* FAQ Panel */
.td-faq-box {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r24); overflow: hidden;
  box-shadow: var(--shadow-md); position: relative;
}
.td-faq-hd { padding: 20px 24px; border-bottom: 1px solid var(--border-lt); }
.td-faq-t { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 3px; }
.td-faq-s { font-size: 12.5px; color: var(--muted); }

.td-faq { border-bottom: 1px solid var(--border-lt); }
.td-faq:last-child { border-bottom: none; }
.td-faq-q {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 24px; gap: 14px;
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text);
  transition: color .2s; line-height: 1.5;
}
.td-faq-q:hover { color: var(--blue); }
.td-faq-q i {
  font-size: 12px; color: var(--muted-lt);
  transition: transform .25s, color .2s; flex-shrink: 0; margin-top: 3px;
}
.td-faq.on .td-faq-q { color: var(--blue); }
.td-faq.on .td-faq-q i { transform: rotate(90deg); color: var(--blue); }
.td-faq-a {
  max-height: 0; overflow: hidden;
  font-size: 13.5px; color: var(--muted); line-height: 1.75;
  padding: 0 24px;
  transition: max-height .35s ease, padding .35s;
}
.td-faq.on .td-faq-a { max-height: 240px; padding: 0 24px 18px; }
.td-faq-ft { padding: 20px 24px; border-top: 1px solid var(--border-lt); }
.td-btn-ask {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px; background: var(--blue); color: #fff;
  border-radius: var(--r10); font-size: 14px; font-weight: 700;
  transition: all .2s; text-decoration: none;
}
.td-btn-ask:hover { background: var(--blue-dk); color: #fff; transform: translateY(-1px); }

/* FAQ Mascot */
.td-faq-mascot {
  position: absolute; bottom: 72px; right: -10px;
  width: 110px; pointer-events: none; opacity: .88;
}

/* ================================================================
   LEAD MODAL
================================================================ */
.td-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(10,24,51,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: tdFadeIn .2s ease;
}
.td-modal-overlay[hidden] { display: none; }
@keyframes tdFadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes tdSlideUp { from { transform:translateY(24px); opacity:0 } to { transform:translateY(0); opacity:1 } }

.td-modal {
  background: #fff; border-radius: 24px;
  width: 100%; max-width: 560px; max-height: 92vh;
  overflow-y: auto; position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,.28);
  animation: tdSlideUp .28s cubic-bezier(.4,0,.2,1);
}
.td-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.22); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.td-modal-close:hover { background: rgba(255,255,255,.4); }

/* Header */
.td-modal-head {
  height: 120px; display: flex; align-items: center;
  padding: 0 28px; gap: 16px; border-radius: 24px 24px 0 0;
  overflow: hidden;
}
.td-modal-head-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
}
.td-modal-head-pre {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.75);
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 5px;
}
.td-modal-head-title { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.25; }

/* Body */
.td-modal-body { padding: 24px 28px 28px; }

/* Package items */
.td-modal-pkg { background: var(--bg); border-radius: 14px; padding: 16px 20px; margin-bottom: 20px; }
.td-modal-pkg-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px;
}
.td-modal-pkg ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.td-modal-pkg li { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: var(--text-md); line-height: 1.4; }
.td-modal-pkg li i { color: var(--blue); font-size: 11px; flex-shrink: 0; margin-top: 2px; }

/* Form */
.td-modal-intro { font-size: 14px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.td-modal-intro strong { color: var(--navy); }
.td-mf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.td-mf-field { display: flex; flex-direction: column; }
.td-mf-mb { margin-bottom: 14px; }
.td-mf-field label {
  font-size: 12.5px; font-weight: 700; color: var(--navy);
  margin-bottom: 6px;
}
.td-mf-field label em { color: var(--blue); font-style: normal; }
.td-mf-field input,
.td-mf-field textarea {
  padding: 11px 14px; font-family: inherit;
  font-size: 14px; color: var(--navy);
  border: 1.5px solid var(--border); border-radius: var(--r10);
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.td-mf-field input:focus,
.td-mf-field textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7,95,234,.10);
}
.td-mf-field textarea { resize: vertical; min-height: 80px; }
.td-modal-submit {
  width: 100%; padding: 15px;
  background: var(--blue); color: #fff;
  border: none; border-radius: var(--r10);
  font-size: 15px; font-weight: 700; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer; transition: background .2s; margin-top: 6px;
}
.td-modal-submit:hover:not(:disabled) { background: var(--blue-dk); }
.td-modal-submit:disabled { opacity: .75; cursor: default; }

/* Mobile modal */
@media (max-width: 600px) {
  .td-modal { border-radius: 20px 20px 0 0; max-height: 96vh; }
  .td-modal-overlay { align-items: flex-end; padding: 0; }
  .td-mf-row { grid-template-columns: 1fr; gap: 12px; }
  .td-modal-pkg ul { grid-template-columns: 1fr; }
  .td-modal-head-title { font-size: 18px; }
  .td-modal-body { padding: 20px 20px 28px; }
}

/* ================================================================
   NEWS / BLOG
================================================================ */
#td-news { padding: 80px 0; background: #fff; border-top: 1px solid var(--border-lt); }

.td-news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}

/* Card */
.td-news-card {
  background: #fff; border-radius: var(--r20); overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  display: flex; flex-direction: column;
}
.td-news-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(0,0,0,.11); border-color: #D0E4FF; }

/* Image area */
.td-news-img-wrap {
  position: relative; display: block; overflow: hidden;
  height: 210px; flex-shrink: 0;
}
.td-news-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
}
.td-news-card:hover .td-news-img-wrap img { transform: scale(1.06); }
.td-news-img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}
.td-news-cat {
  position: absolute; top: 14px; left: 14px;
  background: var(--blue-xlt); color: var(--blue);
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 5px 12px; border-radius: 20px;
}

/* Body */
.td-news-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.td-news-title {
  font-size: 15px; font-weight: 800; color: var(--navy);
  line-height: 1.5; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.td-news-title a { color: inherit; }
.td-news-title a:hover { color: var(--blue); }
.td-news-excerpt {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  flex: 1; margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.td-news-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 14px;
  border-top: 1px solid var(--border-lt);
  font-size: 12px; color: var(--muted);
}
.td-news-meta span { display: flex; align-items: center; gap: 5px; }
.td-news-meta i { font-size: 11px; color: var(--blue); }
.td-news-time { color: var(--muted); }
.td-news-read {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; color: var(--blue);
  transition: gap .2s;
}
.td-news-read:hover { gap: 8px; }

/* ================================================================
   BRANDS
================================================================ */
#td-brands {
  padding: 56px 0 60px;
  background: var(--bg);
  border-top: 1px solid var(--border-lt);
  overflow: hidden;
}
.td-brands-note {
  text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 36px;
}
.td-brands-note strong { color: var(--navy); font-weight: 800; }

/* Ticker — scrolls horizontally, fade edges */
.td-brands-ticker {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.td-brands-track {
  display: flex; align-items: center; gap: 14px;
  width: max-content;
  animation: tdBrandScroll 28s linear infinite;
}
.td-brands-track:hover { animation-play-state: paused; }
@keyframes tdBrandScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Individual brand pill */
.td-brand {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0 26px;
  height: 62px; min-width: 148px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: default; white-space: nowrap;
}
.td-brand:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  border-color: #D0E4FF;
}
.td-brand-t { font-size: 17px; font-weight: 900; letter-spacing: -.3px; }

/* ================================================================
   QUOTE FORM
================================================================ */
#td-quote {
  padding: 80px 0;
  background: linear-gradient(155deg, #EBF3FF 0%, #F0F7FF 50%, #EDF5FF 100%);
  border-top: 1px solid var(--border);
}
.td-quote-grid {
  display: grid; grid-template-columns: 380px 1fr; gap: 60px; align-items: center;
}
.td-q-icon {
  position: relative;
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #075FEA 0%, #4C96FF 100%);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px;
  margin-bottom: 28px;
  box-shadow: 0 10px 32px rgba(7,95,234,.38), 0 0 0 10px rgba(7,95,234,.10), 0 0 0 20px rgba(7,95,234,.04);
  transform: rotate(-6deg);
}
.td-q-icon i { transform: rotate(6deg); }
.td-q-icon-ring {
  position: absolute; inset: -14px;
  border-radius: 28px;
  border: 1.5px dashed rgba(7,95,234,.20);
  animation: tdRingSpin 12s linear infinite;
  pointer-events: none;
}
@keyframes tdRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.td-q-title {
  font-size: 26px; font-weight: 800; color: var(--navy);
  margin-bottom: 18px; line-height: 1.3;
}
.td-q-feats { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.td-q-feat {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-md);
}
.td-q-feat i { color: var(--blue); font-size: 15px; flex-shrink: 0; }
.td-btn-nbg {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; background: linear-gradient(135deg, #2b7bff 0%, #075FEA 100%); color: #fff;
  border-radius: 12px; font-size: 14.5px; font-weight: 700;
  transition: all .22s; text-decoration: none;
  box-shadow: 0 6px 18px rgba(7,95,234,.28);
}
.td-btn-nbg:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(7,95,234,.42); filter: brightness(1.05); }

.td-qform {
  background: #fff; border-radius: var(--r24);
  padding: 32px; box-shadow: var(--shadow-xl);
  border: 1.5px solid var(--border);
}
.td-form-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.td-field label {
  display: block; font-size: 12.5px; font-weight: 700; color: var(--text-md);
  margin-bottom: 6px;
}
.td-field label em { color: var(--red); font-style: normal; }
.td-field input, .td-field select, .td-field textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--r10);
  padding: 11px 14px; font-size: 13.5px; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  outline: none; background: #fff;
}
.td-field input:focus, .td-field select:focus, .td-field textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,95,234,.12);
}
.td-field textarea { min-height: 96px; resize: vertical; }
.td-field-mb { margin-bottom: 16px; }
.td-btn-send {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: fit-content; margin: 12px auto 0; padding: 14px 34px;
  background: linear-gradient(135deg, #2b7bff 0%, #075FEA 100%); color: #fff;
  border-radius: 12px; font-size: 15px; font-weight: 700; letter-spacing: .2px;
  transition: all .22s; cursor: pointer; border: none; font-family: inherit;
  box-shadow: 0 6px 18px rgba(7,95,234,.28);
}
.td-btn-send:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(7,95,234,.42); filter: brightness(1.05); }
.td-btn-send:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }
@media (max-width: 540px) { .td-btn-send { width: 100%; } }

/* ================================================================
   FOOTER
================================================================ */
#td-footer { background: var(--navy); color: #fff; padding: 64px 0 0; }
.td-foot-grid {
  display: grid; grid-template-columns: 230px repeat(4,1fr); gap: 32px;
  padding-bottom: 52px;
}
.td-foot-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; text-decoration: none; }
.td-foot-logo-mark {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 31px; line-height: 1; color: var(--yellow);
  transform: rotate(-8deg);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.3));
}
.td-foot-logo-word {
  display: flex; align-items: baseline; gap: .28em;
  font-style: italic; font-weight: 900; font-size: 29px; line-height: 1;
  letter-spacing: -.5px; white-space: nowrap;
}
.td-foot-logo-word .lw-a { color: #fff; }
.td-foot-logo-word .lw-b { color: var(--blue-md); }
.td-foot-logo:hover .td-foot-logo-mark { transform: rotate(-8deg) scale(1.08); }
.td-foot-desc { font-size: 13px; color: rgba(255,255,255,.50); line-height: 1.8; margin-bottom: 20px; }
.td-socials { display: flex; gap: 8px; }
.td-soc {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.08); border-radius: var(--r8);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); font-size: 12.5px;
  transition: all .2s; text-decoration: none;
}
.td-soc:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.td-foot-col h4 {
  font-size: 11px; font-weight: 800; color: rgba(255,255,255,.9);
  margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1.2px;
}
.td-foot-links { display: flex; flex-direction: column; gap: 10px; }
.td-foot-links a {
  font-size: 13px; color: rgba(255,255,255,.5);
  transition: all .2s; text-decoration: none;
}
.td-foot-links a:hover { color: #fff; padding-left: 4px; }
.td-foot-contacts { display: flex; flex-direction: column; gap: 12px; }
.td-fci { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: rgba(255,255,255,.5); }
.td-fci i { color: var(--blue); margin-top: 2px; flex-shrink: 0; width: 14px; text-align: center; }
.td-fci a { color: rgba(255,255,255,.7); text-decoration: none; }
.td-fci a:hover { color: #fff; }
.td-apps { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.td-app {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r10); padding: 10px 14px;
  transition: all .2s; cursor: pointer; text-decoration: none;
}
.td-app:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.12); }
.td-app i { font-size: 20px; color: #fff; }
.td-app-t small { display: block; font-size: 9.5px; color: rgba(255,255,255,.45); }
.td-app-t strong { display: block; font-size: 12.5px; color: #fff; }
.td-foot-bot {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0; text-align: center;
  font-size: 12.5px; color: rgba(255,255,255,.4);
}
.td-foot-bot .td-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; }
.td-foot-policy { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.td-foot-policy a { color: rgba(255,255,255,.5); text-decoration: none; transition: color .15s; }
.td-foot-policy a:hover { color: #fff; }
@media (max-width: 700px) { .td-foot-bot .td-wrap { justify-content: center; text-align: center; } }

/* Trang chính sách (page.php .td-prose) */
.td-policy-updated { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.td-policy-lead { font-size: 16px; line-height: 1.7; color: var(--text); font-weight: 500; padding: 14px 18px; background: var(--bg-soft, #f5f7fb); border-left: 3px solid var(--blue); border-radius: 8px; margin-bottom: 8px; }
.td-policy-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 20px; }

/* ================================================================
   FLOATING CALL BUTTON
================================================================ */
/* Cụm nút liên hệ nổi (Zalo + Gọi) */
.td-float-stack {
  position: fixed; left: 20px; right: auto; bottom: 22px; z-index: 1100;
  display: flex; flex-direction: column; gap: 12px;
}
.td-float-btn {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  box-shadow: 0 8px 22px rgba(0,0,0,.22); transition: transform .2s;
}
.td-float-btn:hover { transform: scale(1.08); color: #fff; }
.td-float-btn i { font-size: 22px; }
.td-float-btn--zalo { background: #0068FF; font-size: 14px; font-weight: 800; letter-spacing: .3px; }
.td-float-btn--call { background: linear-gradient(135deg, #22c55e, #16a34a); }
/* vòng pulse thu hút */
.td-float-btn::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: inherit; z-index: -1; opacity: .45;
  animation: tdFloatPulse 2.2s ease-out infinite;
}
.td-float-btn:hover::before { animation-play-state: paused; }
@keyframes tdFloatPulse { 0% { transform: scale(1); opacity: .45; } 70% { transform: scale(1.65); opacity: 0; } 100% { opacity: 0; } }
/* tooltip */
.td-float-tip {
  position: absolute; left: 66px; right: auto; top: 50%; transform: translateY(-50%) translateX(-6px);
  background: #1f2937; color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 9px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.td-float-tip::after { content: ''; position: absolute; left: -5px; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-right-color: #1f2937; }
.td-float-btn:hover .td-float-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 540px) {
  .td-float-stack { left: 14px; right: auto; bottom: 16px; gap: 10px; }
  .td-float-btn { width: 50px; height: 50px; }
  .td-float-btn i { font-size: 20px; }
  .td-float-btn--zalo { font-size: 12.5px; }
}

/* ================================================================
   SCROLL ANIMATIONS
================================================================ */
.td-fade { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.td-fade.visible { opacity: 1; transform: translateY(0); }
.td-d1 { transition-delay: .1s; }
.td-d2 { transition-delay: .2s; }
.td-d3 { transition-delay: .3s; }
.td-d4 { transition-delay: .4s; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1200px) {
  .td-hero-grid { grid-template-columns: 1fr 340px; gap: 36px; }
  .td-hero-h1 { font-size: 40px; }
  .td-chips { grid-template-columns: repeat(2,1fr); }
  .td-foot-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 1024px) {
  #td-nav { display: none; }
  .td-hamburger { display: flex; }
  #td-topbar { display: none; }              /* bỏ top bar trên mobile/tablet */
  .td-hero-grid { grid-template-columns: 1fr; }
  /* Hiện panel "Vật tư gợi ý" xuống dưới hero (không ẩn — giữ nội dung giá trị cho mobile) */
  .td-hero-right { display: flex; margin-top: 28px; }
  .td-hero-panel { flex: none; }             /* bỏ stretch chiều cao theo cột trái */
  .td-hero-h1 { font-size: 36px; }
  #td-hero { padding: 48px 0 44px; min-height: auto; }
  .td-quote-grid { grid-template-columns: 1fr; gap: 36px; }
  .td-sol-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .td-tb-right { display: none; }
  .td-feat-grid { grid-template-columns: repeat(2,1fr); }
  .td-feat-item { padding: 18px 20px; }
  .td-mid-grid { grid-template-columns: 1fr; }
  .td-form-3 { grid-template-columns: 1fr 1fr; }
  .td-sec-hd { flex-direction: column; align-items: flex-start; gap: 12px; }
  .td-sol-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .td-news-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .td-brands-ticker { -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%); mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%); }
  #td-solutions, #td-mid, #td-brands, #td-news, #td-quote { padding: 56px 0; }
}

@media (max-width: 540px) {
  .td-wrap { padding: 0 16px; }
  .td-header-inner { padding: 0 16px; height: 68px; gap: 6px; }
  .td-mobile-nav { top: 68px; }              /* khớp chiều cao header nhỏ hơn */
  /* Thu gọn cụm nút header để hamburger không bị đẩy khuất */
  .td-header-actions { margin-left: auto; gap: 6px; }
  .td-btn-cart { padding: 0; width: 38px; height: 38px; gap: 0; justify-content: center; }
  .td-btn-cart > span:not(.td-cart-badge) { display: none; }  /* ẩn chữ "Báo giá", giữ icon + badge */
  .td-logo { gap: 10px; }                    /* gọn logo trên màn hẹp */
  .td-logo-mark { font-size: 27px; }
  .td-logo-word { font-size: 25px; }
  .td-logo-img { height: 50px; max-width: 220px; }
  .td-hero-h1 { font-size: 28px; }
  .td-hero-p { font-size: 14px; }
  .td-chips { grid-template-columns: repeat(2,1fr); }
  .td-btn-magic { padding: 14px 14px; }
  .td-btn-magic span { display: none; }
  .td-form-3 { grid-template-columns: 1fr; }
  .td-foot-grid { grid-template-columns: 1fr; }
  .td-sol-grid { grid-template-columns: 1fr; }
  .td-feat-grid { grid-template-columns: 1fr 1fr; }
  .td-news-grid { grid-template-columns: 1fr; }
  #td-solutions, #td-mid, #td-brands, #td-news, #td-quote { padding: 44px 0; }
  .td-faq-mascot { display: none; }
}

/* ================================================================
   BREADCRUMB
================================================================ */
.td-breadcrumb { margin: 20px 0 16px; }
.td-breadcrumb ol {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 2px 4px; list-style: none; padding: 0; margin: 0;
  font-size: 13px; line-height: 1.6;
}
.td-breadcrumb li { display: flex; align-items: center; color: var(--muted); }
.td-breadcrumb li span,
.td-breadcrumb li a { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.td-breadcrumb li[aria-current] span { max-width: 300px; color: var(--text); font-weight: 600; white-space: nowrap; }
.td-breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.td-breadcrumb a:hover { color: var(--blue); }
/* Separator bằng CSS — không nằm trong BreadcrumbList */
.td-breadcrumb li + li::before {
  content: '›'; margin: 0 7px; color: var(--muted-lt);
  font-size: 15px; line-height: 1; flex-shrink: 0; font-weight: 400;
}
.td-breadcrumb li .fa-home { margin-right: 5px; }

/* Breadcrumb trên hero nền tối (page hero, taxonomy hero) — tăng tương phản */
.td-page-hero .td-breadcrumb a,
.td-page-hero .td-breadcrumb li,
.td-tax-hero .td-breadcrumb a,
.td-tax-hero .td-breadcrumb li { color: rgba(255,255,255,.72); }
.td-page-hero .td-breadcrumb a:hover,
.td-tax-hero .td-breadcrumb a:hover { color: #fff; }
.td-page-hero .td-breadcrumb li[aria-current] span,
.td-tax-hero .td-breadcrumb li[aria-current] span { color: #fff; }
.td-page-hero .td-breadcrumb li + li::before,
.td-tax-hero .td-breadcrumb li + li::before { color: rgba(255,255,255,.45); }
.td-page-hero .td-breadcrumb { position: relative; z-index: 2; }

/* ================================================================
   PRODUCT CARD
================================================================ */
.td-product-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--r16); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.td-product-card:hover { box-shadow: var(--shadow-lg); border-color: var(--blue); transform: translateY(-2px); }
.td-pc-thumb-wrap {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 1; background: var(--bg);
}
.td-pc-img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .3s; }
.td-product-card:hover .td-pc-img { transform: scale(1.04); }
.td-pc-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--blue); background: var(--blue-xlt);
}
.td-badge-sale {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r6);
}
.td-pc-cat-badge {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(7,95,234,.10); color: var(--blue);
  font-size: 11px; font-weight: 500;
  padding: 3px 8px; border-radius: var(--r6);
}
.td-pc-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: var(--r6);
  display: flex; align-items: center; gap: 4px;
}
.td-pc-badge-hot { background: #dc2626; color: #fff; }
.td-pc-badge-bestsell { background: #d97706; color: #fff; }
.td-pc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.td-pc-brand { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
.td-pc-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; flex: 1; }
.td-pc-name a { color: inherit; text-decoration: none; }
.td-pc-name a:hover { color: var(--blue); }
.td-pc-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.td-pc-price { font-size: 16px; font-weight: 700; color: var(--blue); }
.td-pc-price--ask { font-size: 14px; font-weight: 600; color: var(--muted); font-style: italic; }
.td-pc-orig { font-size: 12px; color: var(--muted-lt); text-decoration: line-through; }
.td-pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.td-pc-stock { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.td-pc-stock i { font-size: 8px; }
.td-stock-ok  { color: var(--green); }
.td-stock-out { color: var(--red); }
.td-stock-ask { color: #d97706; }
.td-stock-pre { color: #7c3aed; }
.td-pc-btn {
  display: inline-flex; align-items: center;
  background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--r8);
  text-decoration: none; transition: background .15s; white-space: nowrap;
}
.td-pc-btn:hover { background: var(--blue-dk); color: #fff; }
.td-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ================================================================
   ARCHIVE PAGE
================================================================ */
.td-page-archive { padding: 20px 0 64px; }
.td-arc-hd {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.td-arc-title { font-size: 26px; font-weight: 800; color: var(--text); margin: 0; }
.td-arc-sub { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.td-arc-sort { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-md); }
.td-arc-sort select, .td-arc-sort-inline select {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--r8);
  font-size: 13px; color: var(--text-md); background: #fff; cursor: pointer;
}
.td-arc-count { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.td-arc-count span { font-weight: 600; color: var(--text-md); }
.td-arc-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }

/* ================================================================
   FILTER SIDEBAR
================================================================ */
.td-arc-sidebar { position: sticky; top: 80px; }
.td-filter-box {
  background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--r16); overflow: hidden;
}
.td-filter-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700; color: var(--text);
}
.td-filter-reset {
  font-size: 12px; color: var(--muted); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 0; transition: color .15s;
}
.td-filter-reset:hover { color: var(--red); }
.td-filter-group { padding: 14px 16px; border-bottom: 1px solid var(--border-lt); }
.td-filter-group:last-of-type { border-bottom: none; }
.td-filter-group-title {
  font-size: 12px; font-weight: 700; color: var(--text-md);
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.td-filter-group-title i { color: var(--blue); font-size: 11px; }
.td-filter-check {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: var(--r6); cursor: pointer;
  font-size: 13.5px; color: var(--text-md);
  transition: background .15s; margin-bottom: 2px;
}
.td-filter-check:hover { background: var(--blue-xlt); color: var(--blue); }
.td-filter-check.active { color: var(--blue); font-weight: 600; }
.td-filter-check input { accent-color: var(--blue); flex-shrink: 0; width: 15px; height: 15px; }
.td-filter-child { padding-left: 24px; font-size: 13px; }
.td-fc-count {
  margin-left: auto; font-size: 11px; color: var(--muted-lt);
  background: var(--border-lt); padding: 1px 7px; border-radius: 99px;
}
.td-price-range { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.td-price-range input {
  flex: 1; padding: 7px 10px; border: 1.5px solid var(--border);
  border-radius: var(--r8); font-size: 13px; min-width: 0;
}
.td-price-range input:focus { outline: none; border-color: var(--blue); }
.td-price-range span { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.td-price-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.td-price-presets button {
  font-size: 11.5px; padding: 4px 10px; border-radius: var(--r6);
  border: 1.5px solid var(--border); background: #fff; color: var(--text-md);
  cursor: pointer; transition: all .15s;
}
.td-price-presets button:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-xlt); }
.td-filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; background: var(--blue); color: #fff;
  border-radius: 50%; font-size: 10px; font-weight: 700; margin-left: 4px;
}
.td-arc-mobile-bar {
  display: none; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.td-filter-toggle-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r8);
  border: 1.5px solid var(--border); background: #fff;
  font-size: 13.5px; font-weight: 600; color: var(--text-md);
  cursor: pointer; transition: all .15s;
}
.td-filter-toggle-btn:hover { border-color: var(--blue); color: var(--blue); }
.td-filter-apply-btn {
  display: none; width: 100%; padding: 12px; border: none;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
}

/* ================================================================
   NO PRODUCTS / PAGINATION
================================================================ */
.td-no-products { grid-column: 1 / -1; text-align: center; padding: 60px 20px; }
.td-nop-icon { font-size: 56px; color: var(--muted-lt); margin-bottom: 16px; }
.td-no-products h3 { font-size: 20px; color: var(--text-md); margin-bottom: 8px; }
.td-no-products p { color: var(--muted); font-size: 14px; }
.td-no-products a { color: var(--blue); }
.td-pagination {
  display: flex; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap;
}
.td-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r8);
  border: 1.5px solid var(--border); color: var(--text-md);
  font-size: 14px; font-weight: 500; text-decoration: none; transition: all .15s;
}
.td-pagination .page-numbers:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-xlt); }
.td-pagination .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.td-pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ================================================================
   CATEGORY HERO
================================================================ */
.td-tax-hero {
  background: linear-gradient(135deg, var(--blue-xlt) 0%, var(--bg) 100%);
  padding: 32px 0;
}
.td-tax-hero--img {
  background-size: cover; background-position: center; position: relative;
}
.td-tax-hero--img::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(7,26,78,.65);
}
.td-tax-hero--img .td-wrap { position: relative; }
.td-tax-hero--img .td-tax-title { color: #fff; }
.td-tax-hero--img .td-tax-desc { color: rgba(255,255,255,.8); }
.td-tax-hero--img .td-tax-count-badge { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }
.td-tax-hero--img .td-breadcrumb a,
.td-tax-hero--img .td-breadcrumb li { color: rgba(255,255,255,.6); }
.td-tax-hero-inner { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.td-tax-hero-icon {
  width: 72px; height: 72px; border-radius: var(--r16); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.td-tax-title { font-size: 30px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.td-tax-desc { font-size: 14.5px; color: var(--muted); margin: 0 0 10px; }
.td-tax-count-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; background: var(--blue-lt);
  color: var(--blue); font-size: 13px; font-weight: 600;
  border-radius: 99px; border: 1px solid var(--border);
}
.td-subcats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.td-subcat-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--bg-card);
  border: 1.5px solid var(--border); border-radius: var(--r12);
  text-decoration: none; color: var(--text-md); font-size: 13.5px; font-weight: 500;
  transition: all .15s;
}
.td-subcat-card:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-xlt); }
.td-subcat-icon {
  width: 34px; height: 34px; border-radius: var(--r8); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.td-subcat-name { font-weight: 600; }
.td-subcat-count { font-size: 11px; color: var(--muted); }

/* ================================================================
   SINGLE PRODUCT
================================================================ */
.td-single-wrap { padding: 24px 0 64px; }
.td-sp-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 40px; align-items: start; margin-bottom: 52px;
}

/* ── Gallery ─────────────────────────────────────────────────── */
.td-sp-gallery { position: sticky; top: 80px; }
.td-sp-main-img {
  position: relative; background: #f8fafc;
  border: 1.5px solid var(--border); border-radius: 20px;
  overflow: hidden; aspect-ratio: 1; cursor: zoom-in;
}
.td-sp-main-img img {
  width: 100%; height: 100%; object-fit: contain; padding: 20px;
  display: block; transition: transform .09s linear; will-change: transform;
}
.td-sp-no-img { display: flex; flex-direction: column; gap: 10px; align-items: center; color: var(--muted-lt); }
.td-sp-no-img i { font-size: 64px; color: var(--blue); opacity: .25; }
.td-sp-overlay-out {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.55); color: #fff; pointer-events: none;
  font-size: 18px; font-weight: 800; padding: 10px 24px; border-radius: var(--r8);
}
.td-sp-zoom-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.48); color: rgba(255,255,255,.92); backdrop-filter: blur(4px);
  font-size: 11.5px; font-weight: 500; padding: 5px 14px; border-radius: 99px;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  pointer-events: none; transition: opacity .2s;
}
.td-sp-main-img:hover .td-sp-zoom-hint { opacity: 0; }

.td-sp-thumbs {
  display: flex; gap: 10px; margin-top: 12px;
  overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.td-sp-thumbs::-webkit-scrollbar { height: 4px; }
.td-sp-thumbs::-webkit-scrollbar-track { background: transparent; }
.td-sp-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.td-sp-thumb {
  flex-shrink: 0; width: 80px; height: 80px; border-radius: 12px;
  border: 2px solid var(--border); overflow: hidden; cursor: pointer;
  background: #f8fafc; transition: border-color .15s, box-shadow .15s;
}
.td-sp-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.td-sp-thumb.active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-lt); }
.td-sp-thumb:hover:not(.active) { border-color: var(--blue); }

/* ── Info panel ──────────────────────────────────────────────── */
.td-sp-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.td-sp-cat-tag {
  display: inline-flex; align-items: center;
  padding: 4px 12px; background: var(--blue-lt); color: var(--blue);
  font-size: 12px; font-weight: 600; border-radius: 99px; text-decoration: none;
  transition: all .15s;
}
.td-sp-cat-tag:hover { background: var(--blue); color: #fff; }

.td-sp-title { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.35; margin: 0 0 10px; }
.td-sp-short-desc { font-size: 14px; color: var(--muted); line-height: 1.75; margin-bottom: 0; }
.td-sp-divider { height: 1px; background: var(--border); margin: 18px 0; }

.td-sp-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.td-sp-meta-item { display: flex; flex-direction: column; gap: 4px; }
.td-sp-meta-lbl { font-size: 14px; color: var(--text-md); font-weight: 700; line-height: 1.75; }
.td-sp-meta-val { font-size: 14px; color: var(--muted); font-weight: 400; line-height: 1.75; }
.td-sp-meta-link { color: var(--blue); text-decoration: none; font-weight: 400; }
.td-sp-meta-link:hover { text-decoration: underline; }

.td-sp-price-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1.5px solid #bfdbfe; border-radius: 16px;
  padding: 16px 20px; margin: 18px 0 16px;
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
}
.td-sp-price-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.td-sp-stock--inline { margin-left: auto; }
.td-sp-price-main { font-size: 25px; font-weight: 800; color: var(--blue); letter-spacing: -.3px; }
.td-sp-price--ask { font-size: 20px; font-weight: 700; color: #64748b; font-style: italic; }
.td-sp-price-orig { font-size: 15px; color: var(--muted-lt); text-decoration: line-through; }
.td-sp-price-box .td-badge-sale {
  position: static; top: auto; left: auto;
  background: #dc2626; color: #fff;
  font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px;
}
.td-sp-price-note { font-size: 12px; color: var(--muted); width: 100%; }

.td-sp-stock-row { margin-bottom: 18px; }
.td-sp-stock {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: var(--r8);
}
.td-sp-stock.td-stock-ok  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.td-sp-stock.td-stock-out { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.td-sp-stock.td-stock-ask { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.td-sp-stock.td-stock-pre { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }

.td-sp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.td-sp-btn-call {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px; background: var(--blue); color: #fff;
  border-radius: 14px; text-decoration: none; flex: 1; min-width: 180px;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(7,95,234,.28);
}
.td-sp-btn-call:hover { background: var(--blue-dk); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(7,95,234,.38); }
.td-sp-btn-call i { font-size: 20px; flex-shrink: 0; }
.td-sp-btn-call small { display: block; font-size: 11px; opacity: .75; line-height: 1.2; }
.td-sp-btn-call strong { display: block; font-size: 15px; line-height: 1.3; }
.td-sp-btn-quote {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 22px; border: 2px solid var(--blue); color: var(--blue);
  background: #fff; border-radius: 14px; text-decoration: none;
  font-size: 14px; font-weight: 700; transition: all .15s; flex-shrink: 0;
}
.td-sp-btn-quote:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }

.td-sp-guarantees {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 16px; background: #f8fafc; border: 1px solid var(--border); border-radius: 14px;
}
.td-sp-gu {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-md); font-weight: 500; line-height: 1.3;
}
.td-sp-gu-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.td-sp-gu:nth-child(1) .td-sp-gu-icon { background: #dbeafe; color: #1d4ed8; }
.td-sp-gu:nth-child(2) .td-sp-gu-icon { background: #d1fae5; color: #15803d; }
.td-sp-gu:nth-child(3) .td-sp-gu-icon { background: #fef3c7; color: #d97706; }
.td-sp-gu:nth-child(4) .td-sp-gu-icon { background: #fce7f3; color: #be185d; }

/* ── Tabs ────────────────────────────────────────────────────── */
.td-sp-tabs { margin-bottom: 48px; }
.td-sp-tab-nav {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border);
  margin-bottom: 28px; flex-wrap: wrap;
}
.td-tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border: none; background: none;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .15s;
}
.td-tab-btn:hover { color: var(--text-md); }
.td-tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

.td-prose { font-size: 15px; color: var(--text-md); line-height: 1.8; max-width: 820px; }
.td-prose p { margin-bottom: 14px; }
.td-prose ul, .td-prose ol { padding-left: 20px; margin-bottom: 14px; }
.td-prose img { max-width: 100%; border-radius: var(--r12); margin: 12px 0; }
.td-prose h2,.td-prose h3,.td-prose h4 { font-weight: 700; color: var(--text); margin: 24px 0 10px; }

.td-spec-wrap { overflow-x: auto; }
.td-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.td-spec-table th, .td-spec-table td { padding: 11px 16px; text-align: left; vertical-align: top; }
.td-spec-table tr { border-bottom: 1px solid var(--border); }
.td-spec-table tr:first-child { border-top: 1px solid var(--border); }
.td-spec-table th { width: 36%; font-weight: 600; color: var(--text-md); border-right: 1px solid var(--border); }
.td-spec-table tr:nth-child(odd)  { background: #f8fafc; }
.td-spec-table tr:nth-child(even) { background: #fff; }

/* ── Related ─────────────────────────────────────────────────── */
.td-sp-related { margin-top: 16px; }

/* ── Lightbox ────────────────────────────────────────────────── */
.td-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(3,7,18,.93); backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.td-lightbox[hidden] { display: none !important; }
.td-lb-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2); color: #fff;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.td-lb-close:hover { background: rgba(255,255,255,.26); }
.td-lb-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.td-lb-img { max-width: 88vw; max-height: 76vh; object-fit: contain; border-radius: 10px; display: block; }
.td-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 17px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.td-lb-nav:hover { background: rgba(255,255,255,.28); }
.td-lb-prev { left: -62px; }
.td-lb-next { right: -62px; }
.td-lb-nav.td-hidden { visibility: hidden; pointer-events: none; }
.td-lb-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; }
.td-lb-counter { color: rgba(255,255,255,.5); font-size: 12.5px; font-weight: 500; }
.td-lb-thumbs { display: flex; gap: 8px; max-width: 90vw; overflow-x: auto; padding: 4px; }
.td-lb-thumb {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 8px;
  overflow: hidden; cursor: pointer; opacity: .45; background: #111;
  border: 2px solid transparent; transition: all .15s;
}
.td-lb-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.td-lb-thumb.active, .td-lb-thumb:hover { opacity: 1; border-color: rgba(255,255,255,.6); }

/* ================================================================
   RESPONSIVE — PRODUCT PAGES
================================================================ */
@media (max-width: 1100px) {
  .td-arc-layout { grid-template-columns: 1fr; }
  .td-arc-sidebar {
    position: fixed; top: 0; left: -300px; bottom: 0; z-index: 999;
    width: 280px; overflow-y: auto;
    background: var(--bg-card); border-right: 1.5px solid var(--border);
    box-shadow: var(--shadow-xl); transition: left .3s;
  }
  .td-arc-sidebar.open { left: 0; }
  .td-arc-mobile-bar { display: flex; }
  .td-filter-apply-btn { display: block; }
  .td-arc-sort { display: none; }
  .td-sp-layout { grid-template-columns: 1fr; gap: 28px; }
  .td-sp-gallery { position: static; }
  .td-lb-prev { left: -48px; }
  .td-lb-next { right: -48px; }
}
@media (max-width: 768px) {
  .td-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .td-sp-cta { flex-direction: column; }
  .td-sp-btn-call, .td-sp-btn-quote { width: 100%; justify-content: center; }
  .td-sp-guarantees { grid-template-columns: 1fr; }
  .td-sp-title { font-size: 22px; }
  .td-sp-meta-grid { grid-template-columns: 1fr; }
  .td-lb-prev { left: -44px; }
  .td-lb-next { right: -44px; }
  .td-lb-nav { width: 40px; height: 40px; font-size: 14px; }
  .td-tax-hero-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .td-tax-title { font-size: 22px; }
  .td-arc-title { font-size: 22px; }
}
@media (max-width: 480px) {
  .td-product-grid { grid-template-columns: 1fr; }
  .td-pagination .page-numbers { width: 34px; height: 34px; font-size: 13px; }
}


/* ── 4-column forced grid (homepage sections) ───────────────── */
.td-grid-4 { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 1024px) { .td-grid-4 { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px)  { .td-grid-4 { grid-template-columns: 1fr !important; } }

/* ================================================================
   FEATURED PRODUCTS (HOT & BÁN CHẠY)
================================================================ */
#td-featured { padding: 60px 0; background: #fff; }
.td-ft-tabs {
  display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
}
.td-ft-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 99px; cursor: pointer;
  font-size: 14px; font-weight: 600; border: 2px solid var(--border);
  background: #fff; color: var(--muted); transition: all .18s;
}
.td-ft-btn:hover { border-color: var(--blue); color: var(--blue); }
.td-ft-btn.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.td-ft-panel { display: none; }
.td-ft-panel.active { display: block; }

/* ================================================================
   ALL PRODUCTS (HOMEPAGE)
================================================================ */
#td-products { padding: 60px 0; background: var(--bg); }
.td-products-more {
  display: flex; justify-content: center; margin-top: 36px;
}
.td-btn-more {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 32px; border: 2px solid var(--blue); color: var(--blue);
  background: #fff; border-radius: 99px; text-decoration: none;
  font-size: 15px; font-weight: 700; transition: all .18s;
  box-shadow: 0 2px 12px rgba(7,95,234,.1);
}
.td-btn-more:hover { background: var(--blue); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 18px rgba(7,95,234,.25); }

/* Load more ("Xem thêm") — thay thế phân trang trên mọi danh sách */
.td-loadmore-wrap { display: flex; justify-content: center; margin-top: 36px; }
.td-load-more {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 13px 32px; border: 2px solid var(--blue); color: var(--blue);
  background: #fff; border-radius: 99px;
  font-size: 15px; font-weight: 700; font-family: inherit; transition: all .18s;
  box-shadow: 0 2px 12px rgba(7,95,234,.1);
}
.td-load-more:hover { background: var(--blue); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 18px rgba(7,95,234,.25); }
.td-load-more:disabled { opacity: .7; cursor: default; transform: none; }

/* ═══════════════════════════════════════════════════════════════════════
   SEO CONTENT + FAQ SECTIONS
   ══════════════════════════════════════════════════════════════════════ */

/* Outer wrapper */
.td-content-extra {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── SEO Content Block ──────────────────────────────────────────────── */
.td-seo-block {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 16px;
  padding: 32px 36px 28px;
  position: relative;
}

.td-seo-block-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}
.td-seo-block-title i { color: var(--blue); font-size: 15px; flex-shrink: 0; }

.td-seo-prose {
  font-size: 14.5px;
  line-height: 1.82;
  color: #475467;
  max-height: 130px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
  transition: max-height 0.4s ease;
}
.td-seo-prose.expanded {
  max-height: 3000px;
  -webkit-mask-image: none;
  mask-image: none;
}
.td-seo-prose h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dark);
  margin: 18px 0 8px;
}
.td-seo-prose ul, .td-seo-prose ol { padding-left: 22px; margin: 8px 0 12px; }
.td-seo-prose li { margin-bottom: 5px; }
.td-seo-prose strong { color: var(--dark); }
.td-seo-prose p { margin: 0 0 12px; }

.td-seo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 8px 20px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  transition: all .2s;
}
.td-seo-toggle:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── FAQ Section ──────────────────────────────────────────────────── */
.td-faq {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 36px;
}


/* ================================================================
   AI ASSISTANT SECTION
================================================================ */
#td-ai-assistant {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F4FF 50%, #EFF6FF 100%);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
#td-ai-assistant::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(7,95,234,.06) 0%, transparent 60%),
                    radial-gradient(circle at 80% 20%, rgba(99,102,241,.05) 0%, transparent 50%);
  pointer-events: none;
}
.td-sec-hd--ai { margin-bottom: 40px; }

.td-ai-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* LEFT panel */
.td-ai-panel-left {}

.td-ai-search-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 6px 6px 6px 16px;
  gap: 8px;
  box-shadow: 0 4px 24px rgba(7,95,234,.08);
  transition: border-color .2s, box-shadow .2s;
}
.td-ai-search-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(7,95,234,.1), 0 4px 24px rgba(7,95,234,.12);
}
.td-ai-search-ico { color: var(--muted); font-size: 16px; flex-shrink: 0; }
.td-ai-search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
}
.td-ai-search-wrap input::placeholder { color: var(--muted); }
.td-ai-search-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.td-ai-search-btn:hover { background: #054fd4; transform: translateY(-1px); }

.td-ai-chips-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin: 20px 0 10px;
}

.td-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.td-ai-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.td-ai-chip i { font-size: 12px; color: var(--muted); transition: color .2s; }
.td-ai-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #EFF6FF;
}
.td-ai-chip:hover i { color: var(--blue); }
.td-ai-chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(7,95,234,.25);
}
.td-ai-chip.active i { color: rgba(255,255,255,.8); }

.td-ai-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.7);
  border-radius: 10px;
  padding: 10px 14px;
  line-height: 1.5;
  border-left: 3px solid var(--blue);
}
.td-ai-note i { color: var(--blue); margin-right: 4px; }
.td-ai-note strong { color: var(--text); }

/* Gợi ý tìm kiếm phổ biến (lấp cột trái) */
.td-ai-examples { margin-top: 18px; }
.td-ai-examples-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.td-ai-examples-label i { color: var(--blue); margin-right: 4px; }
.td-ai-example-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.td-ai-example-chip {
  font-size: 12.5px; font-weight: 500; color: var(--blue);
  background: rgba(7,95,234,.07); border: 1px solid rgba(7,95,234,.18);
  border-radius: 99px; padding: 7px 14px; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.td-ai-example-chip:hover { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-1px); }
.td-ai-trust {
  list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 9px;
}
.td-ai-trust li { font-size: 13px; color: var(--text); display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.td-ai-trust i { color: #16a34a; margin-top: 2px; flex-shrink: 0; }

/* Ước tính theo diện tích trong card kết quả */
.td-ai-estimate {
  grid-column: 1 / -1;
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: rgba(7,95,234,.06); border: 1px dashed rgba(7,95,234,.25);
}
.td-ai-est-label { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 9px; }
.td-ai-est-label i { color: var(--blue); margin-right: 5px; }
.td-ai-est-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.td-ai-est-item {
  font-size: 12.5px; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.td-ai-est-item i { color: var(--blue); font-size: 12px; }
.td-ai-est-item b { color: var(--navy); font-weight: 800; }

/* RIGHT panel — Result card */
.td-ai-panel-right {}
.td-ai-result {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(7,95,234,.10);
  transition: opacity .2s;
}
.td-ai-result--loading { opacity: .5; }

.td-ai-result-head {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--bg);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
}
.td-ai-result-icon {
  width: 40px;
  height: 40px;
  background: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  grid-row: span 2;        /* icon nằm ngang với tiêu đề + mô tả */
  align-self: center;
}
.td-ai-result-title {
  grid-column: 2;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}
.td-ai-result-desc {
  grid-column: 2;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.td-ai-materials {
  list-style: none;
  margin: 0;
  padding: 16px 0;
}
.td-ai-materials li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--bg);
  transition: background .15s;
}
.td-ai-materials li:last-child { border-bottom: none; }
.td-ai-materials li:hover { background: #F8FAFF; }
.td-ai-mat-ico {
  width: 32px;
  height: 32px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}
.td-ai-mat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.td-ai-mat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.td-ai-mat-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.td-ai-actions {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  flex-wrap: wrap;
}
.td-ai-btn-primary,
.td-ai-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  flex: 1;
  justify-content: center;
  white-space: nowrap;
}
.td-ai-btn-primary {
  background: var(--blue);
  color: #fff;
}
.td-ai-btn-primary:hover { background: #054fd4; transform: translateY(-1px); color: #fff; text-decoration: none; }
.td-ai-btn-secondary {
  background: var(--bg);
  color: var(--blue);
  border: 1.5px solid rgba(7,95,234,.2);
}
.td-ai-btn-secondary:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 900px) {
  .td-ai-layout { grid-template-columns: 1fr; gap: 28px; }
  #td-ai-assistant { padding: 48px 0; }
}
@media (max-width: 480px) {
  .td-ai-search-wrap { flex-wrap: wrap; }
  .td-ai-search-btn { width: 100%; justify-content: center; }
  .td-ai-actions { flex-direction: column; }
  .td-ai-btn-primary, .td-ai-btn-secondary { flex: unset; width: 100%; }
}


/* ================================================================
   KNOWLEDGE SECTION — Trang chủ + Archive
================================================================ */
#td-knowledge {
  padding: 72px 0;
  background: #fff;
}
.td-sec-hd--knowledge {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.td-kn-search-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 240px;
  transition: border-color .2s;
}
.td-kn-search-mini:focus-within { border-color: var(--blue); }
.td-kn-search-mini i { color: var(--muted); font-size: 14px; }
.td-kn-search-mini input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  width: 200px;
}
.td-kn-search-mini input::placeholder { color: var(--muted); }

/* Knowledge card grid */
.td-kn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.td-kn-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  position: relative;
  overflow: hidden;
}
.td-kn-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue), #6366f1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.td-kn-card:hover { border-color: var(--blue); box-shadow: 0 8px 24px rgba(7,95,234,.12); transform: translateY(-3px); color: var(--text); text-decoration: none; }
.td-kn-card:hover::before { transform: scaleX(1); }

.td-kn-card-icon {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--blue);
  flex-shrink: 0;
}
.td-kn-card-body { flex: 1; }
.td-kn-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.td-kn-card:hover .td-kn-card-title { color: var(--blue); }
.td-kn-card-ans {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.td-kn-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.td-kn-cat {
  font-size: 11px;
  background: var(--bg);
  color: var(--blue);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.td-kn-lvl {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.td-kn-lvl--bas { background: #DCFCE7; color: #16a34a; }
.td-kn-lvl--mid { background: #FEF3C7; color: #d97706; }
.td-kn-lvl--adv { background: #EDE9FE; color: #7c3aed; }

.td-kn-card-arr {
  font-size: 12px;
  color: var(--muted);
  align-self: flex-end;
  margin-top: 12px;
  transition: color .2s, transform .2s;
}
.td-kn-card:hover .td-kn-card-arr { color: var(--blue); transform: translateX(4px); }

.td-kn-footer { text-align: center; margin-top: 36px; }
.td-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 2px solid var(--blue);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: all .2s;
}
.td-btn-outline:hover { background: var(--blue); color: #fff; text-decoration: none; }

.td-kn-no-result {
  text-align: center;
  color: var(--muted);
  padding: 40px;
  font-size: 14px;
}


/* ================================================================
   KNOWLEDGE ARCHIVE
================================================================ */
.td-archive-kn {
  min-height: 60vh;
  padding: 48px 0 72px;
}
.td-arc-kn-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.td-arc-kn-head__icon {
  width: 56px; height: 56px;
  background: var(--blue);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  flex-shrink: 0;
}
.td-arc-kn-title { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.td-arc-kn-sub { color: var(--muted); font-size: 14px; }

.td-arc-kn-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
  max-width: 480px;
  transition: border-color .2s;
}
.td-arc-kn-search:focus-within { border-color: var(--blue); }
.td-arc-kn-search i { color: var(--muted); }
.td-arc-kn-search input {
  border: none; outline: none; background: transparent;
  font-size: 15px; font-family: inherit; color: var(--text); flex: 1;
}

.td-arc-kn-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.td-arc-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
}
.td-arc-cat-chip:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.td-arc-cat-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.td-arc-cat-chip span { font-size: 11px; opacity: .7; }

.td-arc-kn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.td-arc-kn-pag {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}
.td-arc-kn-pag .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  transition: all .2s;
}
.td-arc-kn-pag .page-numbers:hover { background: var(--blue); color: #fff; }
.td-arc-kn-pag .page-numbers.current { background: var(--blue); color: #fff; }

.td-arc-kn-empty {
  text-align: center;
  padding: 72px 0;
  color: var(--muted);
}
.td-arc-kn-empty span { font-size: 48px; display: block; margin-bottom: 12px; }


/* ================================================================
   SINGLE KNOWLEDGE v2
================================================================ */

/* Hero header */
.td-single-kn { padding: 0 0 80px; }
.td-kn-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
  border-bottom: 1px solid rgba(7,95,234,.12);
  padding: 28px 0 44px;
  position: relative;
  overflow: hidden;
}
.td-kn-hero::after {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(7,95,234,.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Article header (in hero) */
.td-kn-art-head { margin: 20px 0 0; position: relative; z-index: 1; }
.td-kn-art-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.td-kn-art-head-row { display: flex; align-items: flex-start; gap: 22px; }
.td-kn-art-icon {
  width: 76px; height: 76px; flex-shrink: 0;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(7,95,234,.18), 0 1px 4px rgba(0,0,0,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; color: var(--blue);
}
.td-kn-art-head-text { flex: 1; min-width: 0; }
.td-kn-art-title {
  font-size: 34px; font-weight: 800; line-height: 1.25;
  margin: 0 0 12px; color: var(--text);
}
.td-kn-art-info {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.td-kn-art-info span { display: flex; align-items: center; gap: 5px; }

/* Category / level chips */
.td-kn-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 5px 12px; border-radius: 6px;
  background: rgba(7,95,234,.1); color: var(--blue);
  text-decoration: none; transition: all .2s;
}
.td-kn-cat:hover { background: var(--blue); color: #fff; text-decoration: none; }
.td-kn-lvl {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 5px 10px; border-radius: 6px;
}
.td-kn-lvl--bas { background: #DCFCE7; color: #15803d; }
.td-kn-lvl--mid { background: #FEF3C7; color: #b45309; }
.td-kn-lvl--adv { background: #EDE9FE; color: #6d28d9; }

/* 2-column layout */
.td-kn-body {
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 48px;
  padding-top: 44px;
  align-items: start;
}
.td-kn-main { min-width: 0; }
.td-kn-sidebar { position: sticky; top: 90px; }

/* Short answer box */
.td-kn-short-box {
  display: flex; gap: 16px;
  background: #fff;
  border: 1.5px solid rgba(7,95,234,.18);
  border-left: 4px solid var(--blue);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 40px;
  box-shadow: 0 2px 14px rgba(7,95,234,.07);
}
.td-kn-short-box__icon {
  width: 40px; height: 40px;
  background: var(--blue); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0; margin-top: 1px;
}
.td-kn-short-box__label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--blue); margin-bottom: 6px;
}
.td-kn-short-box__text { font-size: 15px; color: var(--text); line-height: 1.65; margin: 0; }

/* Prose */
.td-prose {
  font-size: 16px; line-height: 1.78; color: var(--text);
  margin-bottom: 48px; overflow-x: hidden;
}
.td-prose h2 {
  font-size: 20px; font-weight: 700; margin: 40px 0 14px;
  color: var(--text); padding-left: 14px; border-left: 4px solid var(--blue);
}
.td-prose h2:first-child { margin-top: 8px; }
.td-prose h3 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; color: var(--text); }
.td-prose p { margin-bottom: 18px; }
.td-prose ul, .td-prose ol { padding-left: 22px; margin-bottom: 18px; }
.td-prose li { margin-bottom: 8px; }
.td-prose strong { font-weight: 700; color: var(--text); }
.td-prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.td-prose blockquote {
  margin: 24px 0; padding: 16px 20px;
  border-left: 4px solid var(--blue);
  background: #EFF6FF; border-radius: 0 10px 10px 0;
  color: var(--text-md); font-style: italic;
}
.td-prose code {
  background: #F1F5F9; color: #be185d;
  padding: 2px 6px; border-radius: 4px; font-size: .88em; font-family: 'Consolas', monospace;
}
.td-prose .td-table-scroll {
  overflow-x: auto; margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px; border: 1px solid var(--border);
}
.td-prose table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: 14px; }
.td-prose th, .td-prose td { padding: 10px 16px; border: 1px solid var(--border); text-align: left; }
.td-prose th { background: #F0F6FF; font-weight: 600; color: var(--text); }
.td-prose tr:nth-child(even) td { background: #FAFBFF; }
.td-prose img { max-width: 100%; border-radius: 12px; }
.td-prose ol { list-style: decimal; }
.td-prose ul { list-style: disc; }

/* FAQ accordion */
.td-kn-faq { margin-bottom: 48px; }
.td-kn-faq__title {
  font-size: 18px; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px; color: var(--text);
}
.td-kn-faq__title i { color: var(--blue); font-size: 16px; }
.td-kn-faq__item {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.td-kn-faq__item:hover { border-color: rgba(7,95,234,.4); box-shadow: 0 2px 10px rgba(7,95,234,.07); }
.td-kn-faq__item.open { border-color: var(--blue); box-shadow: 0 4px 20px rgba(7,95,234,.1); }
.td-kn-faq__q {
  display: flex; align-items: center;
  padding: 14px 18px; gap: 12px;
  user-select: none;
}
.td-kn-faq__item.open .td-kn-faq__q { background: rgba(7,95,234,.03); }
.td-kn-faq__q-num {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: #EEF4FF; color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; font-family: 'Consolas', monospace;
  transition: background .2s, color .2s;
}
.td-kn-faq__item.open .td-kn-faq__q-num { background: var(--blue); color: #fff; }
.td-kn-faq__q-text { flex: 1; font-weight: 600; font-size: 14px; color: var(--text); line-height: 1.45; }
.td-kn-faq__item.open .td-kn-faq__q-text { color: var(--blue); }
.td-kn-faq__q > i { font-size: 11px; color: var(--muted); transition: transform .25s; flex-shrink: 0; }
.td-kn-faq__item.open .td-kn-faq__q > i { transform: rotate(180deg); color: var(--blue); }
.td-kn-faq__a {
  padding: 14px 18px 18px 58px;
  font-size: 14px; color: var(--text-md); line-height: 1.65;
  border-top: 1px dashed rgba(7,95,234,.15);
  background: rgba(7,95,234,.02);
}
.td-kn-faq__a p { margin: 0; }

/* TOC sidebar */
.td-kn-toc {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}
.td-kn-toc__head {
  padding: 13px 18px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--blue);
  background: linear-gradient(135deg, #EFF6FF, #F0EDFF);
  border-bottom: 1px solid rgba(7,95,234,.1);
  display: flex; align-items: center; gap: 8px;
}
.td-toc-list { list-style: none; margin: 0; padding: 6px 0 10px; }
.td-toc-link {
  display: block; padding: 7px 18px;
  font-size: 13px; color: var(--text-md); line-height: 1.4;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.td-toc-link:hover { color: var(--blue); background: #F5F8FF; text-decoration: none; border-left-color: rgba(7,95,234,.3); }
.td-toc-link.active { color: var(--blue); font-weight: 600; border-left-color: var(--blue); background: #EFF6FF; }
.td-toc-item--sub .td-toc-link { padding-left: 30px; font-size: 12px; color: var(--muted); }
.td-toc-item--sub .td-toc-link.active { color: var(--blue); }

/* Related terms */
.td-kn-terms { margin-bottom: 48px; }
.td-kn-terms__title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.td-kn-terms__title i { color: var(--blue); }
.td-kn-terms__list { display: flex; flex-wrap: wrap; gap: 8px; }
.td-kn-term-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  background: #F0F5FF; border: 1.5px solid #D8E7FF;
  border-radius: 8px; font-size: 13px; font-weight: 500;
  color: #2563EB; text-decoration: none; transition: all .2s;
}
.td-kn-term-chip::after { content: '→'; font-size: 11px; opacity: .5; transition: opacity .2s, transform .2s; }
.td-kn-term-chip:hover {
  background: var(--blue); color: #fff; border-color: var(--blue);
  text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(7,95,234,.22);
}
.td-kn-term-chip:hover::after { opacity: 1; transform: translateX(3px); }
.td-kn-term-chip--plain { color: var(--muted); border-color: var(--border); background: var(--bg); cursor: default; }
.td-kn-term-chip--plain::after { display: none; }
.td-kn-term-chip--plain:hover { background: var(--bg); color: var(--muted); border-color: var(--border); transform: none; box-shadow: none; }

/* Related products */
.td-kn-rel-prods { margin-bottom: 48px; }
.td-kn-rel-prods__title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.td-kn-rel-prods__title i { color: var(--blue); }
.td-kn-rel-prods__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.td-kn-prod-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: 12px;
  overflow: hidden; text-decoration: none; color: var(--text); display: block;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.td-kn-prod-card:hover { border-color: var(--blue); box-shadow: 0 4px 20px rgba(7,95,234,.12); text-decoration: none; transform: translateY(-2px); }
.td-kn-prod-card__img { aspect-ratio: 1; overflow: hidden; background: var(--bg); }
.td-kn-prod-card__img img { width: 100%; height: 100%; object-fit: contain; }
.td-kn-prod-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 32px; }
.td-kn-prod-card__body { padding: 10px 12px; }
.td-kn-prod-card__name { font-size: 12px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.td-kn-prod-card__price { font-size: 13px; font-weight: 700; color: var(--blue); }

/* Article nav */
.td-kn-art-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px;
  padding: 28px 0 0; border-top: 1px solid var(--border); margin-top: 48px;
}
.td-kn-art-nav a {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-md); text-decoration: none;
  padding: 12px 16px; background: #fff; border-radius: 12px;
  border: 1.5px solid var(--border); transition: all .2s;
}
.td-kn-art-nav a:hover { border-color: var(--blue); color: var(--blue); background: #EFF6FF; text-decoration: none; }
.td-kn-art-nav__prev a { justify-content: flex-start; }
.td-kn-art-nav__next a { justify-content: flex-end; text-align: right; }
.td-kn-art-nav__archive a { justify-content: center; font-size: 12px; background: var(--bg); }

/* Responsive */
@media (max-width: 1024px) {
  .td-kn-grid { grid-template-columns: repeat(2, 1fr); }
  .td-arc-kn-grid { grid-template-columns: repeat(2, 1fr); }
  .td-kn-body { grid-template-columns: 1fr 240px; gap: 32px; }
}
@media (max-width: 900px) {
  .td-kn-body { grid-template-columns: 1fr; }
  .td-kn-sidebar { position: static; display: none; }
  .td-kn-art-title { font-size: 26px; }
  .td-kn-art-icon { width: 60px; height: 60px; font-size: 30px; }
}
@media (max-width: 768px) {
  #td-knowledge { padding: 48px 0; }
  .td-sec-hd--knowledge { flex-direction: column; }
  .td-kn-search-mini { width: 100%; }
  .td-kn-search-mini input { width: 100%; }
}
@media (max-width: 600px) {
  .td-kn-art-head-row { gap: 14px; }
  .td-kn-art-icon { width: 52px; height: 52px; font-size: 26px; border-radius: 14px; }
  .td-kn-art-title { font-size: 22px; }
  .td-kn-art-nav { grid-template-columns: 1fr; }
  .td-kn-art-nav__archive { order: -1; }
  .td-kn-rel-prods__grid { grid-template-columns: repeat(2, 1fr); }
  .td-kn-faq__a { padding-left: 20px; }
}

.td-faq-hd { margin-bottom: 24px; }

.td-faq-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.td-faq-title i { color: var(--blue); }

.td-faq-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.td-faq-list { display: flex; flex-direction: column; gap: 10px; }

.td-faq-item {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.td-faq-item:has(.td-faq-q[aria-expanded="true"]) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7,95,234,.08);
}

.td-faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 17px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition: background .15s, color .15s;
}
.td-faq-q:hover { background: #f8fbff; color: var(--blue); }
.td-faq-q[aria-expanded="true"] { background: #f0f6ff; color: var(--blue); }

.td-faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--blue);
  transition: background .2s, border-color .2s, transform .3s;
}
.td-faq-q[aria-expanded="true"] .td-faq-icon {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: rotate(45deg);
}

.td-faq-a { overflow: hidden; }
.td-faq-a[hidden] { display: none; }

.td-faq-a-inner {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.82;
  color: #475467;
}
.td-faq-a-inner p { margin: 0 0 10px; }
.td-faq-a-inner p:last-child { margin-bottom: 0; }
.td-faq-a-inner strong { color: var(--dark); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .td-seo-block, .td-faq { padding: 28px 28px; }
}
@media (max-width: 768px) {
  .td-content-extra { padding: 28px 0 40px; gap: 20px; }
  .td-seo-block, .td-faq { padding: 22px 18px; border-radius: 12px; }
  .td-seo-block { border-left-width: 3px; }
  .td-seo-block-title { font-size: 15px; }
  .td-faq-title { font-size: 17px; }
  .td-faq-q { font-size: 14px; padding: 14px 16px; }
  .td-faq-a-inner { padding: 14px 16px 16px; font-size: 13.5px; }
}

/* ===== PAGE TEMPLATE (page.php) ================================================ */
.td-page-wrap { min-height: 60vh; }

.td-page-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0c2461 100%);
  padding: 48px 0 40px;
  position: relative;
  overflow: hidden;
}
.td-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(59,130,246,.15) 0%, transparent 70%);
  pointer-events: none;
}
.td-page-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin: 8px 0 0;
  letter-spacing: -.5px;
}
.td-page-body {
  padding: 48px 0 72px;
}
.td-page-content { max-width: 860px; }

.td-prose h2 { font-size: 22px; font-weight: 800; color: var(--navy); margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--bg); }
.td-prose h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin: 28px 0 10px; }
.td-prose p  { color: var(--text); line-height: 1.75; margin: 0 0 16px; font-size: 15.5px; }
.td-prose ul, .td-prose ol { color: var(--text); padding-left: 22px; margin: 0 0 16px; line-height: 1.75; }
.td-prose li { margin-bottom: 6px; }
.td-prose strong { color: var(--navy); font-weight: 700; }
.td-prose a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(59,130,246,.3); }
.td-prose a:hover { text-decoration-color: var(--blue); }
.td-prose blockquote { border-left: 4px solid var(--blue); background: var(--bg); border-radius: 0 8px 8px 0; padding: 14px 20px; margin: 20px 0; color: var(--text-light); font-style: italic; }
.td-prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.td-prose th { background: var(--navy); color: #fff; font-weight: 700; padding: 10px 14px; text-align: left; }
.td-prose td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
.td-prose tr:hover td { background: var(--bg); }
.td-prose img { max-width: 100%; border-radius: 10px; margin: 16px 0; }
.td-prose hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

@media(max-width:768px) {
  .td-page-hero { padding: 32px 0 28px; }
  .td-page-body { padding: 32px 0 48px; }
  .td-prose h2 { font-size: 19px; }
  .td-prose h3 { font-size: 16px; }
  .td-prose p, .td-prose li { font-size: 14.5px; }
}

/* ════════════════════════════════════════════════════════════════
   CÔNG CỤ DỰ TOÁN VẬT TƯ (/goi-y-vat-tu/)
════════════════════════════════════════════════════════════════ */
.td-page-hero-sub { color: rgba(255,255,255,.8); font-size: 15px; margin-top: 8px; max-width: 760px; position: relative; z-index: 2; }
.td-page-title i { margin-right: 8px; opacity: .9; }
.td-est-layout { display: grid; grid-template-columns: 380px 1fr; gap: 28px; padding: 32px 0 56px; align-items: start; }
.td-est-input { background: var(--bg-card,#fff); border: 1px solid var(--border); border-radius: 16px; padding: 22px; position: sticky; top: 96px; }
.td-est-prose { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.td-est-field-label { font-size: 13px; font-weight: 800; color: var(--navy); margin: 16px 0 10px; }
.td-est-types { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.td-est-type { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 11px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); font-family: inherit; transition: all .15s; text-align: left; }
.td-est-type i { color: var(--blue); font-size: 15px; }
.td-est-type:hover { border-color: var(--blue); }
.td-est-type.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.td-est-type.active i { color: #fff; }
.td-est-area-row { display: flex; align-items: center; gap: 8px; }
.td-est-area-row input { flex: 1; border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 14px; font-size: 15px; font-weight: 700; color: var(--navy); outline: none; }
.td-est-area-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(7,95,234,.1); }
.td-est-area-row span { font-weight: 700; color: var(--muted); }
.td-est-calc { background: var(--blue); color: #fff; border: none; border-radius: 10px; padding: 11px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 7px; white-space: nowrap; transition: background .15s; }
.td-est-calc:hover { background: var(--blue-dk); }
.td-est-area-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.td-est-area-presets button { font-size: 12.5px; border: 1px solid var(--border); background: #fff; color: var(--muted); border-radius: 99px; padding: 5px 13px; cursor: pointer; font-family: inherit; transition: all .15s; }
.td-est-area-presets button:hover { background: rgba(7,95,234,.08); color: var(--blue); border-color: var(--blue); }
.td-est-cta { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 10px; }
.td-est-cta-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg,#075FEA,#0c2461); color: #fff; padding: 13px; border-radius: 11px; font-size: 14px; font-weight: 700; text-decoration: none; }
.td-est-cta-btn:hover { filter: brightness(1.08); }
.td-est-cta-link { text-align: center; font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; }

.td-est-output { min-width: 0; }
.td-est-output.td-est-loading, #tdEstResult.td-est-loading { opacity: .5; transition: opacity .15s; }
.td-est-summary { background: linear-gradient(135deg,#eef4ff,#f7faff); border: 1px solid rgba(7,95,234,.18); border-radius: 16px; padding: 20px 22px; margin-bottom: 18px; }
.td-est-sum-label { font-size: 13.5px; color: var(--muted); }
.td-est-sum-total { font-size: clamp(26px,4vw,36px); font-weight: 900; color: var(--blue); line-height: 1.2; margin: 4px 0; }
.td-est-sum-note { font-size: 12px; color: var(--muted); }
.td-est-sum-note i { color: var(--blue); }
.td-est-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.td-est-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 460px; }
.td-est-table th { background: #f5f7fb; text-align: left; padding: 12px 14px; font-weight: 700; color: var(--navy); font-size: 12.5px; }
.td-est-table th:nth-child(n+2), .td-est-table td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.td-est-table td { padding: 12px 14px; border-top: 1px solid var(--border); color: var(--text); }
.td-est-table td i { color: var(--blue); margin-right: 7px; width: 16px; text-align: center; }
.td-est-table td a { color: var(--text); text-decoration: none; }
.td-est-table td a:hover { color: var(--blue); }
.td-est-table tfoot td { font-weight: 800; color: var(--navy); background: #f5f7fb; font-size: 14.5px; border-top: 2px solid var(--border); }
.td-est-na { color: var(--muted-lt); font-style: italic; }

.td-est-h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin: 28px 0 4px; display: flex; align-items: center; gap: 8px; }
.td-est-h2 i { color: var(--blue); }
.td-est-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.td-est-brands-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 12px; }
.td-est-brand-card { position: relative; border: 1.5px solid var(--border); border-radius: 14px; padding: 18px 16px; background: #fff; text-align: center; }
.td-est-brand-card.is-best { border-color: var(--blue); box-shadow: 0 6px 22px rgba(7,95,234,.12); }
.td-est-brand-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.td-est-brand-name { font-size: 14.5px; font-weight: 800; color: var(--navy); }
.td-est-brand-total { font-size: 19px; font-weight: 900; color: var(--blue); margin: 6px 0 4px; }
.td-est-brand-meta { font-size: 11.5px; color: var(--muted); }
.td-est-note { font-size: 12px; color: var(--muted); margin-top: 12px; background: var(--bg-soft,#f5f7fb); padding: 10px 13px; border-radius: 9px; }
.td-est-note i { color: var(--blue); margin-right: 4px; }

.td-est-links { margin-top: 30px; }
.td-est-links-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 9px; }
.td-est-links-grid a { display: block; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 600; transition: all .15s; }
.td-est-links-grid a:hover { border-color: var(--blue); color: var(--blue); background: rgba(7,95,234,.04); }

@media (max-width: 900px) {
  .td-est-layout { grid-template-columns: 1fr; gap: 20px; }
  .td-est-input { position: static; }
}

/* CTA mở công cụ dự toán đầy đủ (teaser trang chủ) */
.td-ai-tool-cta {
  display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 13px 16px;
  border: 1.5px dashed rgba(7,95,234,.35); border-radius: 12px; background: rgba(7,95,234,.05);
  text-decoration: none; color: var(--navy); font-size: 13px; transition: all .15s;
}
.td-ai-tool-cta:hover { background: rgba(7,95,234,.1); border-color: var(--blue); }
.td-ai-tool-cta > i:first-child { color: var(--blue); font-size: 18px; flex-shrink: 0; }
.td-ai-tool-cta > i:last-child { margin-left: auto; color: var(--blue); }
.td-ai-tool-cta strong { color: var(--blue); }

/* Công cụ dự toán — chế độ số phòng / combo */
.td-est-sum-sub { font-size: 13px; color: var(--navy); font-weight: 600; margin: 2px 0 4px; }
.td-est-sum-sub i { color: var(--blue); margin-right: 4px; }
.td-est-sum-sub span { font-weight: 400; color: var(--muted); }
.td-est-tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--blue); background: rgba(7,95,234,.08); border-radius: 99px; padding: 2px 8px; margin-left: 6px; white-space: nowrap; }
.td-est-tag--common { color: #854f0b; background: #faeeda; }
.td-est-combo-label { font-size: 12.5px; font-weight: 700; color: var(--muted); align-self: center; margin-right: 2px; }
.td-est-roomarea { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.td-est-roomarea input { width: 80px; border: 1.5px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 14px; font-weight: 700; color: var(--navy); outline: none; }
.td-est-roomarea input:focus { border-color: var(--blue); }
.td-est-calc { margin-top: 14px; width: 100%; justify-content: center; }

/* ════════════════════════════════════════════════════════════════
   GIỎ BÁO GIÁ (Quote cart)
════════════════════════════════════════════════════════════════ */
/* Badge đếm thật trên nút Báo giá */
.td-cart-badge[hidden] { display: none !important; }
/* Nút thêm báo giá trên card sản phẩm */
.td-pc-actions { display: flex; align-items: center; gap: 8px; }
.td-pc-quote {
  width: 38px; height: 34px; flex-shrink: 0; border: 1.5px solid var(--blue);
  background: rgba(7,95,234,.06); color: var(--blue); border-radius: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px; transition: all .15s;
}
.td-pc-quote:hover { background: var(--blue); color: #fff; }

/* Drawer */
.td-quote-overlay { position: fixed; inset: 0; background: rgba(8,15,30,.5); z-index: 1200; }
.td-quote-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 92vw; z-index: 1210;
  background: #fff; box-shadow: -10px 0 40px rgba(0,0,0,.2); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.td-quote-drawer.open { transform: translateX(0); }
.td-qd-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.td-qd-head h3 { font-size: 16px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 9px; margin: 0; }
.td-qd-head h3 i { color: var(--blue); }
.td-qd-close { width: 34px; height: 34px; border: none; background: #f3f4f6; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 15px; }
.td-qd-close:hover { background: #e5e7eb; color: var(--text); }
.td-qd-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.td-qd-empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.td-qd-empty i { font-size: 42px; opacity: .25; display: block; margin-bottom: 14px; }
.td-qd-empty p { font-size: 14px; line-height: 1.6; }
.td-qd-success { text-align: center; padding: 44px 20px; color: #166534; }
.td-qd-success i { font-size: 46px; display: block; margin-bottom: 12px; }
.td-qd-success p { font-size: 15px; line-height: 1.6; color: var(--text); }
.td-qi { display: flex; align-items: center; gap: 10px; padding: 11px 6px; border-bottom: 1px solid var(--border); }
.td-qi-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.td-qi-ico { width: 46px; height: 46px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(7,95,234,.08); color: var(--blue); }
.td-qi-info { flex: 1; min-width: 0; }
.td-qi-info a { display: block; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.35; max-height: 2.7em; overflow: hidden; }
.td-qi-info a:hover { color: var(--blue); }
.td-qi-price { font-size: 13px; font-weight: 800; color: var(--blue); }
.td-qi-qty { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.td-qi-qty button { width: 26px; height: 26px; border: 1px solid var(--border); background: #fff; border-radius: 7px; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1; }
.td-qi-qty button:hover { border-color: var(--blue); color: var(--blue); }
.td-qi-qty span { min-width: 22px; text-align: center; font-size: 13px; font-weight: 700; }
.td-qi-rm { border: none; background: none; color: var(--muted-lt); cursor: pointer; font-size: 14px; padding: 4px; flex-shrink: 0; }
.td-qi-rm:hover { color: #dc2626; }
.td-qd-foot { border-top: 1px solid var(--border); padding: 16px 18px; background: var(--bg-soft,#f8fafc); }
.td-qd-total { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.td-qd-total b { font-size: 18px; color: var(--navy); font-weight: 900; }
.td-qd-form { display: flex; flex-direction: column; gap: 8px; }
.td-qd-form input, .td-qd-form textarea { border: 1.5px solid var(--border); border-radius: 9px; padding: 10px 13px; font-size: 14px; font-family: inherit; outline: none; }
.td-qd-form input:focus, .td-qd-form textarea:focus { border-color: var(--blue); }
.td-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.td-qd-submit { background: var(--blue); color: #fff; border: none; border-radius: 9px; padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.td-qd-submit:hover { background: var(--blue-dk); }
.td-qd-submit:disabled { opacity: .7; cursor: default; }
.td-qd-note { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.td-qd-note i { color: #16a34a; margin-right: 3px; }

/* Toast */
.td-toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%,20px); z-index: 1300; background: #16a34a; color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 28px rgba(0,0,0,.22); opacity: 0; transition: all .3s; pointer-events: none; }
.td-toast.show { opacity: 1; transform: translate(-50%,0); }
.td-toast i { margin-right: 5px; }

@media (max-width: 600px) {
  .td-pc-actions { flex-direction: column-reverse; align-items: stretch; gap: 6px; }
  .td-pc-quote { width: 100%; height: 36px; }
}

/* ════════════════════════════════════════════════════════════════
   TRANG BẢNG GIÁ VẬT TƯ (/gia-vat-tu-dien/)
════════════════════════════════════════════════════════════════ */
.td-price-page { padding: 32px 0 56px; }
.td-price-h2 { font-size: 19px; font-weight: 800; color: var(--navy); margin: 0 0 4px; display: flex; align-items: center; gap: 9px; }
.td-price-h2 i { color: var(--blue); }
.td-price-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.td-price-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; background: var(--bg-soft,#f5f7fb); padding: 10px 14px; border-radius: 9px; }
.td-price-note i { color: var(--blue); margin-right: 5px; }

/* Biểu đồ */
.td-price-chart-box { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 28px; box-shadow: 0 2px 14px rgba(0,0,0,.04); }
.td-price-chart-wrap { position: relative; height: 320px; margin-top: 8px; }

/* Bảng giá */
.td-price-table-sec { margin-bottom: 36px; }
.td-price-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.td-price-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.td-price-table th { background: #f5f7fb; text-align: left; padding: 13px 16px; font-size: 12.5px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.td-price-table td { padding: 13px 16px; border-top: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.td-pt-name i { color: var(--blue); width: 18px; text-align: center; margin-right: 8px; }
.td-pt-name a { color: var(--text); text-decoration: none; font-weight: 600; }
.td-pt-name a:hover { color: var(--blue); }
.td-pt-avg { display: inline-block; margin-left: 8px; font-size: 11.5px; color: var(--muted); background: var(--bg-soft,#f5f7fb); padding: 2px 8px; border-radius: 99px; }
.td-pt-range { font-weight: 700; color: var(--navy); white-space: nowrap; }
.td-pt-unit { color: var(--muted); white-space: nowrap; }
.td-pt-trend { font-size: 13px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.td-pt-cta { text-align: right; white-space: nowrap; }
.td-pt-cta a { color: var(--blue); font-weight: 700; font-size: 13px; text-decoration: none; }
.td-pt-cta a:hover { text-decoration: underline; }

/* CTA */
.td-price-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.td-price-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 12px; font-weight: 700; font-size: 14px; text-decoration: none; background: linear-gradient(135deg, #2b7bff 0%, #075FEA 100%); color: #fff; box-shadow: 0 6px 18px rgba(7,95,234,.28); transition: all .2s; }
.td-price-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(7,95,234,.42); filter: brightness(1.05); }
.td-price-btn--ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); box-shadow: none; }
.td-price-btn--ghost:hover { background: var(--blue-lt); color: var(--blue); box-shadow: none; }

/* SEO + links */
.td-price-seo { margin: 12px 0 36px; }
.td-price-seo h2 { font-size: 19px; margin-top: 26px; }
.td-price-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 9px; margin-top: 14px; }
.td-price-links-grid a { display: block; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 600; transition: all .15s; }
.td-price-links-grid a:hover { border-color: var(--blue); color: var(--blue); background: rgba(7,95,234,.04); }

@media (max-width: 600px) {
  .td-price-chart-wrap { height: 260px; }
  .td-price-cta { flex-direction: column; }
  .td-price-btn { justify-content: center; }
}

/* Footer: dòng disclaimer website demo — lấp băng trống bên phải cột thương hiệu */
.td-foot-grid > div:first-child { grid-row: 1 / span 2; }   /* cột thương hiệu trải 2 hàng */
.td-foot-disclaimer {
  grid-column: 2 / -1; grid-row: 2; align-self: start;
  padding: 16px 20px; border-radius: 12px;
  background: rgba(250,204,21,.08); border: 1px dashed rgba(250,204,21,.38);
  color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.55;
  display: flex; align-items: center; gap: 11px;
}
.td-foot-disclaimer i { color: #facc15; font-size: 17px; flex-shrink: 0; }
@media (max-width: 768px) {
  .td-foot-grid > div:first-child { grid-row: auto; }
  .td-foot-disclaimer { grid-column: 1 / -1; grid-row: auto; }
}

/* ── Skeleton loading (Load More) ─────────────────────────────── */
.td-skel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  padding: 12px;
  overflow: hidden;
}
.td-skel {
  position: relative;
  background: #eef2f7;
  border-radius: var(--r8);
  overflow: hidden;
}
.td-skel::after {
  content: "";
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: tdShimmer 1.3s infinite;
}
.td-skel-thumb { aspect-ratio: 1 / 1; width: 100%; margin-bottom: 12px; }
.td-skel-line  { height: 13px; margin-bottom: 9px; }
.td-skel-short { width: 55%; }
@keyframes tdShimmer { 100% { transform: translateX(100%); } }

.td-loadmore-err {
  width: 100%;
  text-align: center;
  margin-top: 12px;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
}
.td-loadmore-err i { margin-right: 6px; }

/* ── Trợ lý AI (chat widget nổi) ──────────────────────────────── */
.td-aichat { position: fixed; right: 22px; bottom: 22px; z-index: 9000; font-family: inherit; }

.td-aichat-fab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dk));
  color: #fff; font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--yellow);
  box-shadow: 0 10px 30px rgba(7,95,234,.35);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.td-aichat-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(10,24,51,.45); }
.td-aichat-fab i { color: var(--yellow); font-size: 17px; }
.td-aichat-fab.is-open { display: none; }

.td-aichat-teaser {
  position: absolute; right: 0; bottom: 64px; width: 248px;
  background: #fff; color: var(--text); font-size: 13.5px; line-height: 1.5;
  padding: 12px 32px 12px 14px; border-radius: var(--r12);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.td-aichat-teaser b { color: var(--blue); }
.td-aichat-teaser-x {
  position: absolute; top: 6px; right: 8px; border: none; background: none;
  font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer;
}

.td-aichat-panel {
  position: absolute; right: 0; bottom: 0;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 18px; border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(10,24,51,.4);
}
/* Thu gọn: chỉ rộng vừa nội dung tiêu đề (không chiếm 380px) */
/* Mặc định ĐÓNG: thuộc tính [hidden] phải thắng display:flex ở trên */
.td-aichat-panel[hidden],
.td-aichat-teaser[hidden] { display: none !important; }
.td-aichat-panel.is-min { height: auto; width: auto; }
.td-aichat-panel.is-min .td-aichat-body { display: none; }

.td-aichat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--blue-dk)); color: #fff;
  font-weight: 700; font-size: 14.5px;
  white-space: nowrap;
}
.td-aichat-head i { color: var(--yellow); }
.td-aichat-head-actions { display: flex; gap: 4px; }
.td-aichat-icon-btn, .td-aichat-x {
  border: none; background: rgba(255,255,255,.12); color: #fff;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.td-aichat-icon-btn:hover, .td-aichat-x:hover { background: rgba(255,255,255,.24); }
.td-aichat-max-ic { display: none; }
.td-aichat-panel.is-min .td-aichat-min-ic { display: none; }
.td-aichat-panel.is-min .td-aichat-max-ic { display: inline; }

.td-aichat-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.td-aichat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.td-aichat-bubble {
  max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55;
  white-space: normal; word-wrap: break-word;
}
.td-aichat-bubble--bot { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.td-aichat-bubble--me  { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.td-aichat-bubble a { color: var(--blue); text-decoration: underline; }
.td-aichat-bubble--me a { color: #fff; }
.td-aichat-bubble.is-typing { display: inline-flex; gap: 4px; }
.td-aichat-bubble.is-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted-lt);
  animation: tdAiTyping 1s infinite ease-in-out;
}
.td-aichat-bubble.is-typing span:nth-child(2) { animation-delay: .15s; }
.td-aichat-bubble.is-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes tdAiTyping { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.td-aichat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.td-aichat-chip {
  display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px;
  background: var(--blue-lt); color: var(--blue); font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--blue-md); text-decoration: none;
}
.td-aichat-chip:hover { background: var(--blue); color: #fff; }

.td-aichat-form { display: flex; gap: 8px; padding: 10px 12px 4px; align-items: flex-end; }
.td-aichat-form textarea {
  flex: 1; resize: none; max-height: 110px; padding: 10px 12px; font-size: 14px;
  border: 1.5px solid var(--border); border-radius: 12px; line-height: 1.4;
}
.td-aichat-form textarea:focus { outline: none; border-color: var(--blue); }
.td-aichat-send {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; border: none;
  background: var(--blue); color: #fff; cursor: pointer; font-size: 15px;
}
.td-aichat-send:hover { background: var(--blue-dk); }
.td-aichat-note { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 12px 10px; margin: 0; }

@media (max-width: 540px) {
  .td-aichat { right: 14px; bottom: 14px; }
  .td-aichat-fab span { display: none; }
  .td-aichat-fab { padding: 14px; }
  .td-aichat-panel { height: min(72vh, calc(100vh - 90px)); }
}

/* ── Thanh loading khi chuyển trang lọc sản phẩm ──────────────── */
body.td-navigating::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 99999;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--blue));
  background-size: 200% 100%;
  animation: tdNavBar 1s linear infinite;
}
@keyframes tdNavBar { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }
