/* =========================================================
   Nhựa Kinh Bắc — Stropipe | main.css
   Thiết kế: WebSEO.com.vn
   ========================================================= */

:root {
  --primary: #359138;
  --primary-dark: #334da1;
  --primary-light: #57b95a;
  /* Kênh RGB của 2 màu chính — dùng cho rgba(). Đổi màu ở trên thì đổi luôn ở đây. */
  --primary-rgb: 53, 145, 56;
  --primary-dark-rgb: 51, 77, 161;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --ink: #0f2027;
  --body: #33474f;
  --muted: #6b8089;
  --line: #e2ecec;
  --surface: #f4fbfa;
  --surface-2: #eef7f6;
  --white: #ffffff;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 14px rgba(var(--primary-rgb), .08);
  --shadow: 0 16px 40px rgba(var(--primary-rgb), .12);
  --shadow-lg: 0 30px 70px rgba(var(--primary-dark-rgb), .18);
  --container: 1350px;
  --header-h: 74px;
}

/* ---------- Reset nhẹ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Segoe UI", Roboto, sans-serif;
  color: var(--body);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 700; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 68px 0; }
.section--tint { background: var(--surface); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .18s, box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(245,158,11,.28); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-white { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: #fff; color: var(--primary-dark); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Eyebrow / section head ---------- */
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(var(--primary-rgb),.1); color: var(--primary);
  font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
.section-head p { color: var(--muted); font-size: 1.02rem; }
.section-head--left { margin-left: 0; text-align: left; }

/* =========================================================
   TOP BAR + HEADER
   ========================================================= */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,.9); font-size: 13.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: rgba(255,255,255,.9); }
.topbar a:hover { color: #fff; }
.topbar-left { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-left span, .topbar-left a { display: inline-flex; align-items: center; gap: 6px; }
.topbar-social { display: flex; gap: 12px; align-items: center; }

.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 26px; min-height: var(--header-h); }
.site-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.site-brand .brand-mark {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px;
}
.site-brand .brand-text b { display: block; color: var(--primary-dark); font-size: 18px; line-height: 1.1; font-weight: 800; letter-spacing: .02em; }
.site-brand .brand-text small { color: var(--muted); font-size: 11.5px; }
.site-brand img { max-height: 52px; width: auto; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.main-nav a { display: block; padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: 15px; border-radius: 8px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--primary); background: var(--surface-2); }
.main-nav .menu-item-has-children { position: relative; }

/* Mũi tên nhỏ báo hiệu mục có menu con */
.main-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: .5; transition: transform .2s, opacity .2s;
}
.main-nav .menu-item-has-children:hover > a::after { transform: translateY(1px) rotate(225deg); opacity: 1; }

.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0;
  display: flex; flex-direction: column; align-items: stretch;
  min-width: 250px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 10px; list-style: none; margin-top: 14px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 20;
}

/* Cầu nối trong suốt: chuột đi từ mục cha xuống menu con không bị mất hover
   (thay cho cách chèn padding-top lớn — không tạo vùng trắng thừa). */
.main-nav .sub-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px;
}

/* Mũi nhọn nối lên mục cha (chỉ ở dropdown thường, cấp 1) */
.main-nav > ul > li:not(.mega-parent) > .sub-menu::after {
  content: ""; position: absolute; left: 26px; top: -7px; width: 12px; height: 12px;
  background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg); border-radius: 3px 0 0 0;
}

.main-nav .menu-item-has-children:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.main-nav .sub-menu li { width: 100%; }
.main-nav .sub-menu a {
  display: flex; align-items: center; width: 100%;
  padding: 10px 14px; font-size: 14.5px; font-weight: 600; color: var(--body);
  border-radius: 9px; transition: background .16s, color .16s, transform .16s;
}
.main-nav .sub-menu a:hover,
.main-nav .sub-menu .current-menu-item > a {
  background: var(--surface); color: var(--primary); transform: translateX(3px);
}

/* Cấp 3 trong dropdown thường — mở sang phải, có cầu nối riêng */
.main-nav .sub-menu .sub-menu {
  top: -10px; left: 100%; margin-top: 0; margin-left: 12px;
}
.main-nav .sub-menu .sub-menu::before {
  left: -16px; top: 0; bottom: 0; right: auto; width: 16px; height: auto;
}

/* ===== MEGA MENU (khi menu có 3 cấp) ===== */
.main-nav .mega-parent { position: static; }
.main-nav .mega-parent > .sub-menu {
  position: absolute; left: 0; right: 0; width: 100%; min-width: 0; top: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 24px;
  padding: 24px clamp(20px, 5vw, 60px); border-radius: 0 0 16px 16px;
  margin-top: 0; /* mega bám sát header, không cần khoảng hở */
}
.main-nav .mega-parent > .sub-menu::before { display: none; }
.main-nav .mega-parent > .sub-menu > .menu-item-has-children > a {
  font-weight: 700; color: var(--primary-dark); border-bottom: 2px solid var(--surface-2);
  padding: 6px 0; margin-bottom: 4px; pointer-events: none;
}
.main-nav .mega-parent > .sub-menu > .menu-item { position: static; }
/* Trong mega: cấp 3 hiển thị dạng danh sách dọc ngay dưới nhóm, không bung ngang */
.main-nav .mega-parent .sub-menu .sub-menu {
  position: static; opacity: 1; visibility: visible; transform: none;
  box-shadow: none; border: 0; padding: 0; min-width: 0; display: block;
}
.main-nav .mega-parent .sub-menu .sub-menu a { padding: 6px 0; color: var(--body); font-weight: 500; }
.main-nav .mega-parent .sub-menu .sub-menu a:hover { color: var(--primary); background: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-search { position: relative; }
.header-search input {
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 40px 9px 16px;
  font-size: 14px; width: 180px; transition: width .25s, border-color .2s;
}
.header-search input:focus { outline: none; width: 220px; border-color: var(--primary); }
.header-search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; }
.header-cta { display: inline-flex; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
/* Chỉ dùng cho menu trượt trên di động — desktop ẩn hoàn toàn */
.nav-close, .main-nav .submenu-toggle, .main-nav .nav-search { display: none; }
/* Đang sửa nội dung thì giấu nút gọi nổi đi cho khỏi che thanh công cụ */
body.nkb-editing .float-contact { display: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; padding: 64px 0 76px;
  background:
    radial-gradient(circle at 88% 12%, rgba(var(--primary-rgb),.16), transparent 42%),
    linear-gradient(160deg, #fbfdfb 0%, var(--surface) 58%, var(--surface-2) 100%);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.hero-copy h1 { font-size: clamp(2rem, 4.2vw, 3.15rem); color: var(--primary-dark); margin-bottom: 18px; }
.hero-copy h1 span { color: var(--accent-dark); }
.hero-copy .lead { font-size: 1.1rem; color: var(--body); max-width: 560px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.hero-badges li {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  background: rgba(255,255,255,.75); border: 1px solid var(--line); color: var(--primary-dark);
  font-size: 14px; font-weight: 600;
}
.hero-badges li::before { content: "✓"; color: var(--primary); font-weight: 800; }

.hero-visual { position: relative; }
.hero-visual .hero-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--surface-2); }
.hero-figure { position: relative; }
.hero-exp {
  position: absolute; left: -18px; bottom: -18px; background: #fff; border-radius: 18px;
  padding: 16px 22px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
}
.hero-exp b { font-size: 2rem; color: var(--primary); line-height: 1; }
.hero-exp span { font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 8px; }
.stat-strip .stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-strip .stat b { display: block; font-size: 2rem; color: var(--primary-dark); }
.stat-strip .stat span { color: var(--muted); font-size: 14px; font-weight: 600; }

/* =========================================================
   CATEGORY CARDS
   ========================================================= */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.cat-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 260px;
  display: flex; align-items: flex-end; box-shadow: var(--shadow-sm); color: #fff;
  background: var(--primary-dark);
}
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(var(--primary-dark-rgb),.88) 100%); }
.cat-card:hover img { transform: scale(1.06); }
.cat-card .cat-body { position: relative; z-index: 2; padding: 26px; }
.cat-card h3 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.cat-card p { color: rgba(255,255,255,.85); font-size: 14.5px; margin-bottom: 12px; }
.cat-card .cat-link { color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.cat-card .cat-link::after { content: "→"; transition: transform .2s; }
.cat-card:hover .cat-link::after { transform: translateX(4px); }

/* =========================================================
   PRODUCT CARDS
   ========================================================= */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-grid--3 { grid-template-columns: repeat(3, 1fr); }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.product-card .pc-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-2); }
.product-card .pc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .pc-thumb img { transform: scale(1.05); }
.product-card .pc-cat { position: absolute; top: 12px; left: 12px; background: rgba(var(--primary-rgb),.92); color: #fff; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.product-card .pc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.product-card h3 a { color: var(--ink); }
.product-card h3 a:hover { color: var(--primary); }
.product-card .pc-specs { list-style: none; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.product-card .pc-specs li { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.product-card .pc-specs li b { color: var(--body); font-weight: 600; }
.product-card .pc-foot { margin-top: auto; display: flex; gap: 8px; }
.product-card .pc-price { color: var(--accent-dark); font-weight: 700; font-size: 15px; align-self: center; }

/* =========================================================
   WHY / FEATURES
   ========================================================= */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .f-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--surface); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; font-size: 26px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* Steps */
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: linear-gradient(180deg,#fff, var(--surface)); border: 1px solid var(--line); }
.step .step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; font-size: 18px; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* =========================================================
   LETTER / ABOUT SPLIT
   ========================================================= */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split-copy blockquote { border-left: 4px solid var(--primary); padding-left: 18px; margin: 0 0 18px; color: var(--body); font-style: italic; font-size: 1.05rem; }
.split-copy .sign { font-weight: 700; color: var(--primary-dark); }
.split-copy .sign small { display: block; color: var(--muted); font-weight: 500; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-grid a { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; display: block; box-shadow: var(--shadow-sm); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.08); }

/* Thư viện trang chủ: 6 ảnh, 2 hàng x 3 cột, khung ảnh 4:3 */
.gallery-grid--6 { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-grid--6 .gallery-item { position: relative; cursor: zoom-in; aspect-ratio: 4/3; }
/* Lớp phủ + kính lúp báo hiệu ảnh bấm xem được.
   pointer-events:none để lớp phủ không nuốt chuột — nếu không, khi bật chế độ
   sửa nó che mất nút "Đổi ảnh" và không thay được ảnh. */
.gallery-grid--6 .gallery-item::after {
  content: "🔍"; position: absolute; inset: 0; pointer-events: none;
  display: grid; place-items: center; font-size: 30px;
  background: rgba(var(--primary-dark-rgb), .45);
  opacity: 0; transition: opacity .25s;
}
.gallery-grid--6 .gallery-item:hover::after { opacity: 1; }
/* Đang sửa nội dung thì tắt hẳn lớp phủ để nhìn rõ nút "Đổi ảnh" */
body.nkb-editing .gallery-grid--6 .gallery-item::after { content: none; }
body.nkb-editing .gallery-grid--6 .gallery-item { cursor: default; }
/* Ô chưa có ảnh — chỉ quản trị viên thấy */
.gallery-grid--6 .gallery-item.is-empty { cursor: default; background: var(--surface-2); border: 2px dashed var(--line); }
.gallery-grid--6 .gallery-item.is-empty::after { content: none; }
.gallery-grid--6 .gallery-item.is-empty img { object-fit: contain; padding: 22%; opacity: .45; }
.gallery-empty-hint {
  position: absolute; left: 0; right: 0; bottom: 12px; text-align: center;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}

/* =========================================================
   CHẾ ĐỘ XEM ẢNH (lightbox)
   ========================================================= */
body.nkb-lb-open { overflow: hidden; }

.nkb-lightbox {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 20, 24, .93); animation: nkbFade .2s ease;
}
.nkb-lightbox[hidden] { display: none; }

.nkb-lb-figure {
  max-width: min(1100px, 92vw); max-height: 86vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.nkb-lb-img {
  max-width: 100%; max-height: 78vh; width: auto; height: auto;
  border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: nkbPop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.nkb-lb-count { color: rgba(255, 255, 255, .75); font-size: 14px; font-weight: 600; letter-spacing: .04em; }

.nkb-lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1;
  display: grid; place-items: center; transition: background .16s, transform .16s;
}
.nkb-lb-btn:hover { background: var(--primary); transform: translateY(-50%) scale(1.06); }
.nkb-lb-prev { left: max(16px, 3vw); }
.nkb-lb-next { right: max(16px, 3vw); }
.nkb-lb-close {
  position: absolute; top: 18px; right: max(16px, 3vw);
  width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; line-height: 1;
  display: grid; place-items: center; transition: background .16s;
}
.nkb-lb-close:hover { background: #e11d48; }

@media (max-width: 700px) {
  .nkb-lb-btn { width: 42px; height: 42px; font-size: 20px; }
  .nkb-lb-prev { left: 8px; }
  .nkb-lb-next { right: 8px; }
  .nkb-lb-close { top: 10px; right: 10px; width: 42px; height: 42px; font-size: 24px; }
  .nkb-lb-img { max-height: 70vh; }
}

/* =========================================================
   NEWS
   ========================================================= */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card .nc-thumb { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.news-card .nc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .nc-thumb img { transform: scale(1.05); }
.news-card .nc-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.news-card .nc-date { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.news-card h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.news-card h3 a { color: var(--ink); }
.news-card h3 a:hover { color: var(--primary); }
.news-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* =========================================================
   CTA STRIP
   ========================================================= */
.cta-strip {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-lg); padding: 44px; color: #fff; text-align: center; position: relative; overflow: hidden;
}
.cta-strip::before { content: ""; position: absolute; top: -60px; right: -40px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); }
.cta-strip h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-strip p { color: rgba(255,255,255,.9); max-width: 600px; margin: 0 auto 24px; }
.cta-strip .cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* =========================================================
   BREADCRUMB + PAGE HEADER
   ========================================================= */
.page-hero { background: linear-gradient(160deg,#fbfdfb,var(--surface)); padding: 44px 0 30px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--primary-dark); margin: 0; }
.page-hero p { color: var(--muted); margin-top: 8px; max-width: 720px; }
.breadcrumb { font-size: 13.5px; padding: 12px 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--line); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* =========================================================
   ARCHIVE LAYOUT (products / news)
   ========================================================= */
.archive-layout { display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: start; }
/* Single post: nội dung rộng, sidebar hẹp bên phải */
.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.single-main { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.widget h3 { font-size: 1.05rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--surface-2); }
.widget .cat-list { list-style: none; }
.widget .cat-list li a { display: flex; justify-content: space-between; padding: 8px 0; color: var(--body); border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.widget .cat-list li a:hover, .widget .cat-list li.active a { color: var(--primary); font-weight: 600; }
.widget .cat-list li a span { color: var(--muted); font-size: 12.5px; }
.widget .mini-post { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.widget .mini-post img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.widget .mini-post a { font-size: 13.5px; color: var(--ink); font-weight: 600; line-height: 1.35; }
.widget .mini-post a:hover { color: var(--primary); }

.archive-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.archive-toolbar .count { color: var(--muted); font-size: 14px; }

/* Pagination */
.nkb-pagination { margin-top: 34px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.nkb-pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--body); font-weight: 600; }
.nkb-pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.nkb-pagination a.page-numbers:hover { border-color: var(--primary); color: var(--primary); }

/* =========================================================
   SINGLE PRODUCT
   ========================================================= */
.product-single { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-gallery .pg-main { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--surface-2); }
.product-gallery .pg-main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery .pg-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery .pg-thumbs img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; }
.product-gallery .pg-thumbs img.active { border-color: var(--primary); }
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.product-info .p-code { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.product-info .p-price { font-size: 1.4rem; color: var(--accent-dark); font-weight: 800; margin-bottom: 18px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { padding: 11px 16px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.spec-table th { background: var(--surface); color: var(--ink); font-weight: 600; width: 42%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
/* Product option chips */
.product-options { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; background: var(--surface); }
.product-options .opt-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.product-options .opt-row:last-child { margin-bottom: 0; }
.product-options .opt-row > label { width: 110px; flex-shrink: 0; font-weight: 600; color: var(--ink); font-size: 14px; }
.product-options .opt-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-chip { padding: 7px 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--body); cursor: pointer; transition: .15s; }
.opt-chip:hover { border-color: var(--primary); color: var(--primary); }
.opt-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.product-options .opt-qty { flex: 1; min-width: 180px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; }
.product-options .opt-qty:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12); }

.product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.product-tabs { margin-top: 46px; }
.product-tabs .tabs-nav { display: flex; gap: 6px; border-bottom: 2px solid var(--surface-2); margin-bottom: 22px; flex-wrap: wrap; }
.product-tabs .tabs-nav button { background: none; border: 0; padding: 12px 18px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; font-family: inherit; font-size: 15px; }
.product-tabs .tabs-nav button.active { color: var(--primary); border-color: var(--primary); }
.product-tabs .tab-panel { display: none; }
.product-tabs .tab-panel.active { display: block; }
.prose { color: var(--body); }
.prose h2, .prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 1em; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; }

/* =========================================================
   FORMS (quote / contact)
   ========================================================= */
.nkb-form { display: grid; gap: 16px; }
.nkb-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nkb-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.nkb-form label .req { color: #dc2626; }
.nkb-form input, .nkb-form textarea, .nkb-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 15px; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.nkb-form input:focus, .nkb-form textarea:focus, .nkb-form select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12);
}
.nkb-form textarea { min-height: 120px; resize: vertical; }
.nkb-form .hp-field { position: absolute; left: -9999px; opacity: 0; }
.nkb-form-note { font-size: 13px; color: var(--muted); }
.form-feedback { padding: 13px 16px; border-radius: 10px; font-size: 14.5px; font-weight: 600; display: none; }
.form-feedback.ok { display: block; background: #d1fae5; color: #065f46; }
.form-feedback.err { display: block; background: #fee2e2; color: #b91c1c; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 18px; }
.contact-info .ci-item { display: flex; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.contact-info .ci-item .ci-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--surface); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; font-size: 20px; }
.contact-info .ci-item b { display: block; color: var(--ink); margin-bottom: 3px; }
.contact-info .ci-item span { color: var(--muted); font-size: 14.5px; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 320px; border: 0; display: block; }

.card-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); }

/* =========================================================
   CERTIFICATIONS
   ========================================================= */
.cert-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cert-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 14px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .2s, box-shadow .2s;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cert-card .cert-seal {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: radial-gradient(circle at 30% 30%, var(--primary-light), var(--primary));
  color: #fff; font-weight: 800; font-size: 22px;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb),.35); border: 3px solid #fff; outline: 2px solid var(--primary);
}
.cert-card b { color: var(--primary-dark); font-size: 15px; }
.cert-card span { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
@media (max-width: 900px) { .cert-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } }

/* Ảnh chứng nhận (thay được trong Customizer) */
.cert-img-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cert-img-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; transition: transform .2s, box-shadow .2s; }
.cert-img-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cert-img-card img { width: 100%; height: 240px; object-fit: contain; background: #fff; border-radius: 8px; }
.cert-img-card figcaption { margin-top: 10px; font-weight: 600; color: var(--primary-dark); font-size: 14px; }
@media (max-width: 900px) { .cert-img-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cert-img-grid { grid-template-columns: 1fr; } }

/* Logo image in header */
.site-brand.has-logo img { max-height: 56px; width: auto; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding-top: 56px; margin-top: 0; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer h4, .footer-heading { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: var(--primary-light); }
.footer-brand .brand-text b { color: #fff; }
/* Logo ở footer: nền tối nên cho khung trắng nhẹ để logo nền trong vẫn đọc được */
.footer-brand .site-brand.has-logo img {
  max-height: 62px; width: auto;
  background: #fff; padding: 8px 12px; border-radius: 10px;
}
.footer-brand p { font-size: 14px; margin: 14px 0; }
.footer-contact { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.footer-contact li { display: flex; gap: 10px; }
.footer-contact li strong { color: #fff; }
.footer-links { list-style: none; display: grid; gap: 9px; font-size: 14.5px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.footer-social a:hover { background: var(--primary); }
.footer-bottom { padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.footer-bottom .credit b { color: var(--primary-light); }

/* =========================================================
   FLOATING CONTACT
   ========================================================= */
.float-contact { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 12px; }
.float-contact a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); font-size: 22px; position: relative; }
.float-contact a.fc-phone { background: var(--primary); animation: nkb-pulse 2s infinite; }
.float-contact a.fc-zalo { background: #0068ff; }
@keyframes nkb-pulse { 0%{box-shadow:0 0 0 0 rgba(var(--primary-rgb),.5)} 70%{box-shadow:0 0 0 14px rgba(var(--primary-rgb),0)} 100%{box-shadow:0 0 0 0 rgba(var(--primary-rgb),0)} }

/* =========================================================
   RESPONSIVE
   ========================================================= */
/* --- Thiết bị cảm ứng: bỏ hiệu ứng hover ---
   Trên điện thoại, :hover bị "dính" sau khi chạm: thẻ nhấc lên rồi đứng nguyên
   ở trạng thái đó cho tới khi chạm chỗ khác. Tắt hẳn cho máy không có chuột. */
@media (hover: none) {
  .btn:hover,
  .product-card:hover, .news-card:hover, .feature:hover,
  .cert-card:hover, .cert-img-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .product-card:hover .pc-thumb img,
  .news-card:hover .nc-thumb img,
  .cat-card:hover img,
  .gallery-grid a:hover img { transform: none; }
  .cat-card:hover .cat-link::after { transform: none; }
  .main-nav .sub-menu a:hover { transform: none; }
  .gallery-grid--6 .gallery-item:hover::after { opacity: 0; }
}

/* --- Tôn trọng thiết lập "giảm chuyển động" của hệ điều hành --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  /* Header thấp lại để chừa màn hình cho nội dung */
  :root { --header-h: 62px; }

  .hero-inner, .split, .contact-grid, .product-single { grid-template-columns: 1fr; }
  .feature-grid, .step-grid, .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .single-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  /* Trang danh mục: đưa sản phẩm lên trước, bộ lọc xuống dưới —
     nếu không khách phải cuộn qua 3 khối widget mới thấy sản phẩm. */
  .archive-layout { display: flex; flex-direction: column; }
  .archive-layout .archive-main { order: 1; }
  .archive-layout .sidebar { order: 2; }

  /* Ô tìm kiếm ở header nhường chỗ; bản trong menu trượt sẽ thay thế */
  .header-search { display: none; }
  .header-cta { padding: 9px 14px; font-size: 13.5px; }

  /* ---------- MENU TRƯỢT ---------- */
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 86vw);
    background: #fff; box-shadow: var(--shadow-lg);
    padding: 66px 16px 32px; transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; z-index: 200;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }

  /* Nút đóng menu (JS chèn vào) */
  .nav-close {
    display: grid; place-items: center;
    position: absolute; top: 12px; right: 14px; width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff;
    font-size: 26px; line-height: 1; color: var(--ink); cursor: pointer;
  }
  .nav-close:active { background: var(--surface); }

  /* Ô tìm kiếm trong menu — trước đây di động không tìm kiếm được */
  .main-nav .nav-search { display: block; position: relative; margin-bottom: 16px; }
  .main-nav .nav-search input {
    width: 100%; padding: 12px 44px 12px 14px; border: 1px solid var(--line);
    border-radius: 12px; font-family: inherit; font-size: 16px; background: var(--surface);
  }
  .main-nav .nav-search input:focus { outline: none; border-color: var(--primary); background: #fff; }
  .main-nav .nav-search button {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; font-size: 17px; padding: 10px; cursor: pointer;
  }

  /* Vùng chạm đủ lớn cho ngón tay (tối thiểu 44px) */
  .main-nav > ul > li > a {
    padding: 13px 48px 13px 12px; font-size: 15.5px; border-radius: 10px;
    min-height: 46px; display: flex; align-items: center;
  }

  /* Menu con: thu gọn, bấm mũi tên mới xổ ra (dạng accordion).
     Trước đây mọi cấp đều bung sẵn khiến danh sách dài lê thê. */
  .main-nav .sub-menu,
  .main-nav .sub-menu .sub-menu,
  .main-nav .mega-parent > .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0; display: none;
    margin: 2px 0 6px 8px; padding: 0 0 0 10px; min-width: 0;
    border-left: 2px solid var(--surface-2);
  }
  .main-nav .submenu-open > .sub-menu { display: block; }
  .main-nav .sub-menu::before, .main-nav .sub-menu::after { display: none; }
  .main-nav .sub-menu a {
    padding: 11px 12px; font-weight: 500; min-height: 44px;
    display: flex; align-items: center;
  }
  /* Mục cha trong mega menu ở desktop bị khoá bấm — mở lại cho di động */
  .main-nav .mega-parent > .sub-menu > .menu-item-has-children > a {
    pointer-events: auto; border-bottom: 0; margin-bottom: 0;
  }

  /* Mũi tên desktop thay bằng nút bấm riêng (JS chèn) cho dễ chạm */
  .main-nav .menu-item-has-children > a::after { display: none; }
  .main-nav .submenu-toggle {
    display: grid; place-items: center; position: absolute; top: 1px; right: 0;
    width: 46px; height: 46px; background: none; border: 0; padding: 0;
    cursor: pointer; z-index: 2;
  }
  .main-nav .submenu-toggle span {
    width: 8px; height: 8px; display: block;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
  }
  .main-nav .submenu-open > .submenu-toggle span {
    transform: rotate(225deg) translate(-2px, -2px); border-color: var(--primary);
  }
  /* Nút xổ của menu con nằm sát hơn */
  .main-nav .sub-menu .submenu-toggle { width: 42px; height: 42px; }

  .nav-toggle { display: flex; }
  .nav-open-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 150;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .nav-open-overlay.show { opacity: 1; visibility: visible; }

  /* Huy hiệu "16+ năm" bỏ định vị đè lên ảnh, tránh chồng lên khối bên dưới */
  .hero-exp { position: static; margin-top: 16px; display: inline-flex; }
  .hero { padding: 40px 0 48px; }

  /* iOS tự phóng to trang khi chạm vào ô nhập có cỡ chữ dưới 16px */
  .nkb-form input, .nkb-form textarea, .nkb-form select,
  .product-options .opt-qty, .header-search input { font-size: 16px; }
}

@media (max-width: 700px) {
  .section { padding: 44px 0; }
  .cat-grid, .news-grid, .product-grid, .product-grid--3 { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .nkb-form .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-strip { padding: 30px 20px; }

  /* Topbar: chỉ giữ hotline & email, bỏ giờ làm việc và dòng giới thiệu dài */
  .topbar-left { gap: 12px; font-size: 12.5px; }
  .topbar-left > span { display: none; }
  .topbar-social { display: none; }

  /* Bảng thông số rộng hơn màn hình: cho cuộn ngang trong khung riêng.
     Trước đây body có overflow-x:hidden nên phần thừa bị cắt mất, không xem được. */
  .spec-table, .prose table, .term-seo table {
    display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }

  /* Thanh tab sản phẩm: cuộn ngang thay vì xuống dòng lộn xộn */
  .product-tabs .tabs-nav {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .product-tabs .tabs-nav::-webkit-scrollbar { display: none; }
  .product-tabs .tabs-nav button { white-space: nowrap; padding: 12px 14px; font-size: 14.5px; }

  /* Chọn thông số: nhãn nằm trên, lựa chọn xuống dòng dưới cho rộng chỗ */
  .product-options .opt-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .product-options .opt-row > label { width: auto; }
  .opt-chip { padding: 10px 16px; font-size: 14px; }

  .card-panel { padding: 22px 18px; }
  .map-embed iframe { height: 260px; }

  /* Nút gọi/Zalo nổi nhỏ lại, chừa chỗ cho nội dung */
  .float-contact { right: 12px; bottom: 12px; gap: 10px; }
  .float-contact a { width: 46px; height: 46px; font-size: 19px; }

  /* Hiệu ứng mờ nền nặng máy trên điện thoại — tắt đi cho mượt */
  .nkb-modal-backdrop, .nkb-ed-bar { backdrop-filter: none; }
}

@media (max-width: 480px) {
  /* Sản phẩm giữ 2 cột: 1 cột làm thẻ quá to, phải cuộn rất nhiều */
  .product-grid, .product-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gallery-grid, .gallery-grid--6 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid, .news-grid, .feature-grid, .step-grid { grid-template-columns: 1fr; }

  /* Thẻ sản phẩm gọn lại cho vừa 2 cột trên màn hình nhỏ */
  .product-card .pc-body { padding: 12px 12px 14px; }
  .product-card h3 { font-size: .95rem; }
  .product-card .pc-specs { display: none; }
  .product-card .pc-foot { flex-direction: column; gap: 6px; }
  .product-card .pc-foot .btn { width: 100%; padding: 9px 10px; font-size: 13px; }

  .stat-strip .stat { padding: 16px 12px; }
  .stat-strip .stat b { font-size: 1.6rem; }
  .container { padding: 0 16px; }
  .cta-strip { padding: 26px 16px; }
  .hero-badges li { font-size: 13px; padding: 8px 12px; }
  .topbar-left > a:nth-child(2) { display: none; } /* ẩn email, giữ hotline */
}

@media (max-width: 380px) {
  .header-cta { display: none; } /* quá chật, đã có nút gọi nổi và menu */
  .site-brand.has-logo img { max-height: 42px; }
}

/* =========================================================
   POPUP YÊU CẦU BÁO GIÁ (trang chi tiết sản phẩm)
   ========================================================= */
body.nkb-modal-open { overflow: hidden; }

.nkb-modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.nkb-modal[hidden] { display: none; }
.nkb-modal-backdrop { position: absolute; inset: 0; background: rgba(11, 32, 39, .58); backdrop-filter: blur(3px); animation: nkbFade .2s ease; }

.nkb-modal-panel {
  position: relative; width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 30px clamp(20px, 4vw, 38px) 32px; animation: nkbPop .24s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes nkbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nkbPop { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }

.nkb-modal-x {
  position: absolute; top: 14px; right: 16px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--body);
  font-size: 24px; line-height: 1; cursor: pointer; transition: background .16s, color .16s;
}
.nkb-modal-x:hover { background: var(--primary); color: #fff; }

.qm-head h2 { font-size: 1.5rem; margin-bottom: 6px; padding-right: 40px; }
.qm-head p { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }

/* Bảng liệt kê thông tin khách đã chọn */
.qm-summary {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 22px;
}
.qm-summary-head { font-weight: 700; color: var(--primary-dark); font-size: 14px; margin-bottom: 10px; }
.qm-list { list-style: none; margin: 0; padding: 0; }
.qm-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.qm-list li:last-child { border-bottom: 0; }
.qm-list span { color: var(--muted); flex-shrink: 0; }
.qm-list b { color: var(--ink); text-align: right; font-weight: 700; }
.qm-hint { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* Sản phẩm & số lượng đã hiện ở bảng trên nên ẩn ô nhập trùng trong popup */
.nkb-modal .f-product, .nkb-modal .f-qty { display: none; }

@media (max-width: 600px) {
  .nkb-modal { padding: 0; align-items: flex-end; }
  .nkb-modal-panel { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 26px 20px 28px; }
  .qm-list li { flex-direction: column; gap: 2px; }
  .qm-list b { text-align: left; }
}

/* =========================================================
   BÀI VIẾT LIÊN QUAN + BÀI VIẾT SEO CỦA DANH MỤC
   ========================================================= */
.related-posts { margin-top: 44px; }
.related-heading {
  font-size: 1.3rem; margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--surface-2); position: relative;
}
.related-heading::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px;
  background: var(--primary);
}
.related-posts .news-grid { grid-template-columns: repeat(3, 1fr); }

/* Bài viết SEO hiển thị dưới danh sách bài viết / sản phẩm của danh mục */
.term-seo {
  margin-top: 46px; padding: 30px clamp(20px, 3vw, 36px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.term-seo > :first-child { margin-top: 0; }
.term-seo > :last-child { margin-bottom: 0; }
.term-seo h2 { font-size: 1.45rem; margin-top: 1.4em; }
.term-seo h3 { font-size: 1.15rem; margin-top: 1.3em; }
.term-seo img { border-radius: var(--radius); margin: 18px 0; }

@media (max-width: 980px) {
  .related-posts .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .related-posts .news-grid { grid-template-columns: 1fr; }
  .term-seo { padding: 22px 18px; }
}

/* =========================================================
   DỰ ÁN TIÊU BIỂU
   ========================================================= */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.project-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }

.project-card .pj-thumb { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-2); }
.project-card .pj-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .pj-thumb img { transform: scale(1.06); }
/* Lớp phủ nhẹ để nhãn hạng mục luôn đọc được trên mọi ảnh */
.project-card .pj-thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--primary-dark-rgb),.35) 0%, transparent 42%);
}
.project-card .pj-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(var(--primary-rgb), .94); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  letter-spacing: .02em;
}
/* Nhãn cảnh báo dự án mẫu — chỉ quản trị viên thấy */
.project-card .pj-demo-flag {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: #ea580c; color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
}

.project-card .pj-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.project-card h3 { font-size: 1.08rem; line-height: 1.35; margin-bottom: 12px; }
.project-card h3 a { color: var(--ink); }
.project-card h3 a:hover { color: var(--primary); }

.project-card .pj-meta { list-style: none; margin: 0 0 16px; display: grid; gap: 7px; font-size: 13.5px; color: var(--muted); }
.project-card .pj-meta li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.project-card .pj-meta li span { flex-shrink: 0; }

.project-card .pj-link {
  margin-top: auto; font-weight: 700; font-size: 14px; color: var(--primary);
  display: inline-flex; align-items: center; gap: 6px;
}
.project-card .pj-link::after { content: "→"; transition: transform .2s; }
.project-card:hover .pj-link::after { transform: translateX(4px); }

/* --- Chi tiết dự án --- */
.project-single { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: start; }
.project-single .pjs-media img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.project-single .pjs-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.project-single .pjs-lead { color: var(--body); font-size: 1.05rem; margin-bottom: 20px; }
.project-body { margin-top: 44px; max-width: 900px; }

@media (max-width: 980px) {
  .project-single { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 700px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .project-card .pj-body { padding: 15px; }
  .project-card h3 { font-size: 1rem; }
}
@media (max-width: 480px) {
  .project-grid, .project-grid--3 { grid-template-columns: 1fr; }
}
