/* =========================================
   HERO SẢN PHẨM (CHUẨN BẢN GỐC)
   ========================================= */
.products-hero {
  position: relative;
  height: 480px;
  margin-top: 80px;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.page-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  /* Nếu ảnh hơi sáng, có thể làm tối nhẹ để chữ dễ đọc */
  /* filter: brightness(0.9); */
}

/* Tinh chỉnh lại góc cắt xéo rộng hơn một chút */
.page-hero__shape-left {
  position: absolute;
  top: 0; 
  left: 0; 
  bottom: 0;
  width: 58%;
  background-color: var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
  z-index: 2;
}

.page-hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* === CỘT TRÁI === */
.page-hero__content-left {
  width: 52%; /* Mở rộng xíu cho badge vừa vặn */
  max-width: 600px;
  color: var(--color-white);
}

.page-hero__subtitle { 
  font-size: 13px; 
  text-transform: uppercase; 
  letter-spacing: 1px; 
  margin-bottom: 12px; 
  opacity: 0.9; 
}

.page-hero__title { 
  font-size: clamp(36px, 4vw, 44px); 
  font-weight: 700; 
  line-height: 1.15; 
  margin-bottom: 16px; 
  text-transform: uppercase;
}

.page-hero__desc { 
  font-size: 15px; 
  line-height: 1.5; 
  opacity: 0.85; 
  margin-bottom: 32px; 
  max-width: 90%;
}

.page-hero__badges { 
  display: flex; 
  gap: 32px; 
}

.page-hero__badges .badge-item { 
  display: flex; 
  align-items: flex-start; 
  gap: 12px; 
  /* TĂNG MẠNH SIZE CHỮ ĐỂ CÁC CON SỐ TO RÕ (Ví dụ: 26px) */
  font-size: 26px; 
  font-weight: 700; 
  line-height: 1.1;
}

.page-hero__badges .icon { 
  /* Tăng size icon lên cho cân xứng với số to */
  width: 45px; 
  height: 45px; 
  flex-shrink: 0; 
}

.page-hero__badges small { 
  display: block;
  /* Chữ mô tả vẫn giữ nguyên size nhỏ gọn */
  font-size: 12px; 
  opacity: 0.8; 
  font-weight: 400; 
  margin-top: 6px;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

/* === CỘT PHẢI === */
.page-hero__content-right {
  width: 32%;
  /* Đổi từ căn phải sang căn trái theo cụm của nó */
  text-align: left; 
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  color: var(--color-white);
}

.page-hero__layers-title { 
  font-size: 20px; 
  font-weight: 700; 
  line-height: 1.4;
  margin-bottom: 16px;
  text-transform: uppercase;
}

/* Thêm vạch ngang */
.page-hero__separator {
  width: 48px;
  height: 2px;
  background-color: var(--color-white);
  margin-bottom: 20px;
  opacity: 0.8;
}

.page-hero__layers-desc { 
  font-size: 14px; 
  opacity: 0.9; 
  line-height: 1.6;
}

.page-hero__slogan {
  font-family: 'Playfair Display', serif; /* Font chữ ký */
  font-size: 32px; 
  font-style: italic; 
  color: var(--color-white); 
  opacity: 0.9;
  margin-top: 40px;
  line-height: 1.2;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1199px) {
  .page-hero__shape-left { width: 62%; clip-path: polygon(0 0, 100% 0, 80% 100%, 0% 100%); }
  .page-hero__content-left { width: 55%; }
  .page-hero__badges { flex-wrap: wrap; gap: 20px; }
}

@media (max-width: 991px) {
  .products-hero { height: auto; padding: 60px 0; }
  .page-hero__shape-left { width: 100%; clip-path: none; background: linear-gradient(to right, rgba(17,27,87,1) 50%, rgba(17,27,87,0.7) 100%); }
  .page-hero__inner { flex-direction: column; gap: 40px; }
  .page-hero__content-left, .page-hero__content-right { width: 100%; max-width: 100%; }
}

/* =========================================
   LAYOUT DANH SÁCH SẢN PHẨM
   ========================================= */
.products-layout-section { padding: 60px 0; }
.products-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
}

/* --- Sidebar Filter --- */
.products-sidebar {
  background: var(--color-white);
}
.sidebar-title {
  font-size: 15px; font-weight: 700; color: var(--color-primary);
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--color-primary);
}

.accordion__item { margin-bottom: 16px; border: none; border-bottom: 1px solid var(--color-border); border-radius: 0; padding-bottom: 16px; }
.accordion__header {
  padding: 0 0 12px 0; font-size: 14px; font-weight: 700; color: var(--color-text);
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.accordion__header .icon { width: 16px; height: 16px; transition: 0.3s; }
.accordion__item.is-active .accordion__header .icon { transform: rotate(180deg); }

/* Custom Checkbox */
.custom-checkbox {
  display: block; position: relative; padding-left: 28px; margin-bottom: 12px;
  cursor: pointer; font-size: 14px; color: #555; user-select: none; line-height: 20px;
}
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark {
  position: absolute; top: 0; left: 0; height: 20px; width: 20px;
  background-color: var(--color-white); border: 1px solid #CCC; border-radius: 3px; transition: 0.2s;
}
.custom-checkbox:hover input ~ .checkmark { border-color: var(--color-primary); }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--color-primary); border-color: var(--color-primary); }
.checkmark:after { content: ""; position: absolute; display: none; }
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
.custom-checkbox .checkmark:after {
  left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.btn-clear-filter {
  display: flex; align-items: center; gap: 8px; background: none; border: none;
  color: #666; font-size: 14px; cursor: pointer; padding: 12px 0; margin-top: 10px; transition: 0.2s;
}
.btn-clear-filter:hover { color: var(--color-cta); }
.btn-clear-filter .icon { width: 16px; height: 16px; }

/* --- Main Content --- */
.products-header {
  display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px;
}
.products-title { font-size: 24px; font-weight: 700; color: var(--color-primary); margin-bottom: 8px; }
.products-desc { font-size: 14px; color: #666; margin: 0; }
.products-count { font-size: 13px; font-weight: 600; color: #444; }

/* Tabs */
.products-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px;
}
.tab-btn {
  padding: 8px 16px; background: var(--color-bg-light); border: 1px solid transparent;
  border-radius: 4px; font-size: 13.5px; font-weight: 500; color: var(--color-text);
  cursor: pointer; transition: 0.2s;
}
.tab-btn:hover { border-color: var(--color-border); }
.tab-btn.is-active { background: var(--color-cta); color: var(--color-white); }

/* Product Grid override for 3 columns */
/* =========================================
   LƯỚI SẢN PHẨM (PRODUCT GRID)
   ========================================= */
.product-grid {
  display: grid; /* Kích hoạt chế độ lưới */
  gap: 24px;     /* Khoảng cách đều giữa các thẻ sản phẩm */
}

/* Ép hiển thị 3 cột bằng nhau */
.product-grid--3cols {
  grid-template-columns: repeat(3, 1fr);
}

/* =========================================
   RESPONSIVE LƯỚI SẢN PHẨM
   ========================================= */
/* Tablet & Laptop nhỏ: Chuyển về 2 cột cho đỡ chật */
@media (max-width: 1199px) {
  .product-grid--3cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: Trở về 1 cột dọc */
@media (max-width: 767px) {
  .product-grid--3cols {
    grid-template-columns: 1fr;
  }
}



/* =========================================
   SO SÁNH CÔNG NGHỆ
   ========================================= */
.tech-compare {
  background-image: url('../../images/home-6.png');
  background-size: cover; background-blend-mode: overlay; padding: 80px 0;
}
.tech-compare__inner {
  display: grid; grid-template-columns: 4fr 6fr; gap: 60px; align-items: center;
}
.tech-compare__cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.compare-card {
  background: var(--color-white); border-radius: 8px; overflow: hidden; padding: 24px;
}
.compare-card__title { font-size: 16px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.compare-card--normal .compare-card__title { color: #666; }
.compare-card--pro .compare-card__title { color: var(--color-primary); }
.compare-card__img-wrap img { width: 100%; height: 120px; object-fit: cover; border-radius: 4px; margin-bottom: 20px; }
.compare-card__list { list-style: none; padding: 0; margin: 0; }
.compare-card__list li { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 12px; color: #444; }
.compare-card--normal .icon { color: #999; }
.compare-card--pro .icon { color: var(--color-primary); }
/* 1. Mặc định ẨN HOÀN TOÀN các thành phần Mobile trên màn hình Desktop */
.d-lg-none {
  display: none !important;
}
/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1199px) {
  .product-grid--3cols { grid-template-columns: repeat(2, 1fr); }
  .page-hero__shape-left { width: 65%; }
}

@media (max-width: 991px) {
  .products-layout { grid-template-columns: 1fr; }
  .products-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tech-compare__inner { grid-template-columns: 1fr; }
  
  /* Off-canvas Filter Mobile */
  .products-sidebar {
    position: fixed; top: 0; left: -100%; width: 300px; height: 100vh;
    background: var(--color-white); z-index: 2000; padding: 20px;
    overflow-y: auto; transition: left 0.3s ease; box-shadow: 4px 0 24px rgba(0,0,0,0.1);
  }
  .products-sidebar.is-open { left: 0; }
  .sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border); }
  .d-lg-none { display: block; }
  .d-lg-none {
    display: block !important;
  }
  
  /* Ép nút "Lọc Sản Phẩm" dàn hàng ngang để icon và chữ cân đối */
  .btn-mobile-filter.d-lg-none {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 24px;
    padding: 12px;
  }

  /* Ép Header của thanh trượt Sidebar (chứa chữ Bộ lọc và nút X) dàn 2 bên */
  .sidebar-header.d-lg-none {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 767px) {
  .page-hero__shape-left { clip-path: none; width: 100%; background: linear-gradient(to bottom, var(--color-primary) 65%, transparent 100%); }
  .products-hero { height: auto; padding: 40px 0; }
  .page-hero__inner { flex-direction: column; text-align: center; }
  .page-hero__content-left { width: 100%; margin-bottom: 40px; }
  .page-hero__content-right { width: 100%; text-align: center; }
  .page-hero__badges { flex-direction: column; align-items: center; gap: 16px; }
  .tech-compare__cards { grid-template-columns: 1fr; }
  .product-grid--3cols { grid-template-columns: 1fr; }
}
/* Fix style cho thẻ A đóng vai trò như Button tab danh mục */
.products-tabs .tab-btn {
    display: inline-block;
    text-decoration: none !important; /* Xóa gạch chân mặc định của link */
    cursor: pointer;
}

.products-tabs a.tab-btn:hover,
.products-tabs a.tab-btn:focus {
    text-decoration: none !important;
}

/* Fix lỗi chữ đen bị chìm vào nền trong khối Tech Compare */
.tech-compare__text .heading-primary,
.tech-compare__text .tech-compare__subtitle,
.color-white {
    color: #ffffff !important;
}