/* ==========================================================================
   Module: Header — Mitsubishi Đồng Nai (Dark Tech + Pulsing Honeycomb Glass)
   BEM: .header__*
   Phụ thuộc: variables.css, base.css
   ========================================================================== */

:root {
  --header-bg-gray: rgba(34, 34, 34, 0.9);
  --topbar-bg-dark: #0F0F0F;
  --honeycomb-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='26.25' viewBox='0 0 40 70'%3E%3Cpath d='M20 46L0 35V11L20 0L40 11V35L20 46V70' fill='none' stroke='%23FFDAB9' stroke-width='0.5' stroke-opacity='0.3'/%3E%3C/svg%3E");
}

/* ===== BASE ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000; /* Nâng cao tuyệt đối để không bị Banner hay Slider che khuất */
  background-color: var(--header-bg-gray);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none; /* Quan trọng: Cho phép click xuyên thấu */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              background 0.3s ease, 
              box-shadow 0.3s ease;
  will-change: transform;
  /* overflow: hidden; -- Đã loại bỏ để hiển thị Dropdown Menu */
}

/* Lớp Glass hiệu ứng tổ ong */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--honeycomb-pattern);
  animation: honeycomb-pulse 1.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes honeycomb-pulse {
  0% { 
    opacity: 0.1; 
    transform: scale(1);
  }
  100% { 
    opacity: 0.5; 
    transform: scale(1.05); /* Hiệu ứng thở nhẹ */
  }
}

.header--scrolled {
  transform: translateY(-36px); 
  background-color: rgba(34, 34, 34, 0.98);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Reset transform on mobile */
@media (max-width: 1023px) {
  .header--scrolled {
    transform: none;
  }
}

/* ===== TOPBAR ===== */
.header__topbar {
  background-color: var(--topbar-bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  height: 36px;
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.header--scrolled .header__topbar {
  opacity: 0;
  pointer-events: none;
}

.header__topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header__topbar-left,
.header__topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__topbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  transition: all 0.2s ease;
  text-decoration: none;
}

.header__topbar-item:hover {
  color: var(--color-primary);
}

.header__topbar-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.header__topbar-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.header__topbar-social {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header__topbar-social-link {
  color: rgba(255, 255, 255, 0.45);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.header__topbar-social-link:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* ===== MAIN HEADER INNER ===== */
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-8);
  position: relative;
  z-index: 1; /* Nổi trên lớp pattern */
  pointer-events: auto; /* Kích hoạt lại cảm ứng cho nội dung bên trong */
}

/* ===== LOGO ===== */
.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  position: relative;
  overflow: hidden; /* Trả lại overflow để hiệu ứng flare không tràn ra ngoài */
  padding: 0 40px;
  background: linear-gradient(135deg, #444444 0%, #7a7a7a 50%, #333333 100%);
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.header__logo img {
  height: 70px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation: logo-glow-pulse 3s infinite ease-in-out;
}

@media (max-width: 1023px) {
  .header__logo {
    padding: 0 15px;
  }
  .header__logo img {
    height: 58px !important;
  }
}

/* Hiệu ứng Phản xạ Khúc xạ Hiện đại */
.header__logo::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    to right, 
    transparent 0%, 
    rgba(255,255,255,0.01) 30%, 
    rgba(255,255,255,0.3) 50%, 
    rgba(255,255,255,0.01) 70%, 
    transparent 100%
  );
  transform: skewX(-35deg);
  animation: logo-refractive-flare 3.5s infinite cubic-bezier(0.445, 0.05, 0.55, 0.95);
  pointer-events: none;
}

@keyframes logo-refractive-flare {
  0% { left: -150%; filter: blur(2px); }
  60% { left: 150%; filter: blur(5px); }
  100% { left: 150%; }
}

@keyframes logo-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)); transform: scale(1.02); }
}

.header__logo:hover img {
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 1));
  transform: scale(1.08) translateY(-1px);
}

.header__logo-badge {
  display: none;
}

/* ===== NAV DESKTOP ===== */
.header__nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__nav-item {
  /* position: relative; -- Loại bỏ để Dropdown căn giữa theo Header tổng thể */
  height: 100%;
  display: flex;
  align-items: center;
}

.header__nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: capitalize;
  letter-spacing: 0.05em; /* Nới rộng khoảng cách chữ một chút cho sang trọng */
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.header__nav-link .icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px; /* Giảm nhẹ khoảng cách so với text */
  background: none !important;
  border: none !important;
  padding: 0;
  width: 26px; /* ĐẶT KÍCH THƯỚC RIÊNG Ở ĐÂY */
  height: 26px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Chuẩn hóa thị giác Phân cấp (Hierarchy V15) */
.header__nav-link .icon-box svg {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #fff;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

/* 1. Nhóm Icon Trọng Tâm (Kích thước lớn - Scale 1.15) */
.icon-box--car svg,
.icon-box--price svg,
.icon-box--promo svg {
  transform: scale(1.15);
}

/* 2. Nhóm Icon Thông tin (Kích thước Nano - Scale 0.7 theo yêu cầu) */
.icon-box--home svg,
.icon-box--delivery svg,
.icon-box--news svg,
.icon-box--contact svg {
  transform: scale(0.7); /* Đưa về mức Nano-icon cực kỳ tinh tế */
  opacity: 1;
}

.header__nav-link-arrow {
  width: 10px;
  height: 10px;
  margin-left: 6px;
  opacity: 1; /* Đảm bảo mũi tên cũng màu trắng rõ nét */
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.header__nav-link:hover .header__nav-link-arrow {
  opacity: 1;
  transform: translateY(1px);
}

/* HIỆU ỨNG KHI HOVER LINK */
.header__nav-link:hover .icon-box {
  transform: translateY(-2px); /* Nhấc nhẹ cả icon-box lên */
}

/* Kéo dài sự lật 3D cho toàn bộ SVG */
.header__nav-link:hover .icon-box svg {
  transform: rotateY(180deg) !important; /* Lật 3D mượt mà */
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1)) !important;
}

/* RIÊNG BIỆT: Giữ vững và tăng cường Scale khi Hover cho từng loại */
.header__nav-link:hover .icon-box--car svg,
.header__nav-link:hover .icon-box--price svg,
.header__nav-link:hover .icon-box--promo svg {
  transform: scale(1.3) rotateY(180deg) !important; /* Phóng to cực đại 1.3 và lật */
}

.header__nav-link:hover .icon-box--home svg,
.header__nav-link:hover .icon-box--delivery svg,
.header__nav-link:hover .icon-box--news svg,
.header__nav-link:hover .icon-box--contact svg {
  transform: scale(0.9) rotateY(180deg) !important; /* Phóng to nhẹ từ 0.7 lên 0.9 và lật */
}

.header__nav-link:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
}

.header__nav-link--active {
  color: var(--color-primary);
  background: rgba(200, 0, 26, 0.1);
}

/* Compact Showroom List Mega Menu (4-per-row) */
.header__nav-item:hover .header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.header__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  width: min(1200px, 98vw);
  background: rgba(15, 15, 15, 0.98);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  z-index: 2000;
}

.header__dropdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 20px;
}

.header__dropdown-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.01);
  border: 1px solid transparent;
}

.header__dropdown-item a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(200, 0, 26, 0.2);
  transform: translateX(5px);
}

.header__mega-img {
  width: 80px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.4));
}

.header__dropdown-item a:hover .header__mega-img {
  transform: scale(1.15);
}

.header__mega-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.header__mega-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.header__mega-pricing {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 2px;
}

.header__mega-price-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
}

.header__mega-price {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-primary);
}

.header__mega-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 6px;
}

.header__mega-v-item {
  font-size: 8.5px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.03);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Mega Menu Footer */
.header__mega-footer {
  margin-top: 25px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.header__mega-footer-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header__mega-footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.header__mega-lp-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.header__mega-lp-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(200, 0, 26, 0.3);
}

@media (max-width: 991px) {
  .header__mega-footer {
    flex-direction: column;
    gap: 10px;
  }
}

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

@media (max-width: 860px) {
  .header__dropdown-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .header__dropdown-list { grid-template-columns: 1fr; }
}

/* ===== ACTIONS ===== */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-shrink: 0;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(255,255,255,0);
}

.header__phone::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right, 
    transparent, 
    rgba(255,255,255,0.25), 
    transparent
  );
  transform: skewX(-30deg);
  transition: 0.6s ease-in-out;
}

.header__phone:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  color: #FFFFFF;
}

.header__phone:hover::before {
  left: 150%;
}

.header__phone img {
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
  transition: all 0.3s ease;
}

.header__phone:hover img {
  transform: rotate(15deg) scale(1.1);
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
}

.header__cta.btn {
  height: 42px;
  padding-inline: 20px;
  font-size: 12px;
}

/* ===== HAMBURGER ===== */
.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.header__hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
}

/* Hamburger → X */
.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(2) {
  opacity: 0;
}
.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== MOBILE MENU ===== */
.header__mobile {
  position: fixed;
  top: var(--header-height-mobile);
  left: 0;
  right: 0;
  bottom: 0;
  background: #222222;
  overflow-y: auto;
  padding: 30px 20px;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  visibility: hidden;
  pointer-events: none; /* Khóa cảm ứng khi đang ẩn */
  z-index: 2000;
}

.header__mobile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--honeycomb-pattern);
  animation: honeycomb-pulse 1.5s ease-in-out infinite alternate;
  opacity: 0.3;
  pointer-events: none; /* Quan trọng: Ngăn chặn việc che khuất cảm ứng của nội dung menu */
}

.header__mobile.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto; /* Mở lại cảm ứng khi hiện ra */
  height: calc(100vh - var(--header-height-mobile)); /* Giới hạn chiều cao menu bằng phần còn lại của màn hình */
}

/* ===== MOBILE ACTIONS (Right) ===== */
.header__mobile-actions {
  display: none;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2100; /* Nổi trên cả menu lật để nút X (Hamburger) luôn bấm được */
  pointer-events: auto; /* Nhận diện cảm ứng bình thường */
}

.header__mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(80, 80, 80, 0.25) 0%, rgba(30, 30, 30, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: mobile-btn-pulse 2.5s infinite ease-in-out;
}

.header__mobile-btn[aria-label="Hotline"] {
  animation-delay: 0.5s; 
}

@keyframes mobile-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 255, 255, 0); transform: scale(1); }
  50% { box-shadow: 0 0 12px rgba(255, 255, 255, 0.2); transform: scale(1.06); }
}

/* Ánh sáng chạy ngang (Shine) */
.header__mobile-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -200%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.25), 
    transparent
  );
  transform: skewX(-30deg);
  animation: mobile-btn-shine 3.5s infinite linear;
}

@keyframes mobile-btn-shine {
  0% { left: -200%; }
  33%, 100% { left: 200%; }
}

.header__mobile-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.2);
}

.header__mobile-btn img {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
  position: relative;
  z-index: 2;
}

.header__mobile-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header__mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 15px;
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: capitalize;
  flex: 1; /* Để menu link chiếm hết phần còn lại */
}

.header__mobile-item-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 2px;
  overflow: hidden;
}

.header__mobile-toggle {
  width: 50px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.header__mobile-toggle.is-active {
  background: rgba(200, 0, 26, 0.1);
}

.header__mobile-toggle.is-active svg {
  transform: rotate(180deg);
}

.header__mobile-link .icon-box {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(80, 80, 80, 0.25) 0%, rgba(30, 30, 30, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  perspective: 500px;
}

.header__mobile-link .icon-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: -200%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  transition: 0s;
}

.header__mobile-link:hover .icon-box::after,
.header__mobile-link:active .icon-box::after,
.header__mobile-link:focus .icon-box::after {
  left: 200%;
  transition: left 0.6s ease-in-out;
}

.header__mobile-link:hover .icon-box, 
.header__mobile-link:active .icon-box,
.header__mobile-link.is-touching .icon-box {
  background: linear-gradient(135deg, rgba(200, 0, 26, 0.35) 0%, rgba(40, 40, 40, 0.7) 100%) !important;
  transform: translateY(-3px) scale(1.15) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 10px 25px rgba(200, 0, 26, 0.4) !important;
}

.header__mobile-link:hover .icon-box::after,
.header__mobile-link:active .icon-box::after,
.header__mobile-link.is-touching .icon-box::after {
  left: 200%;
  transition: left 0.5s ease-in-out;
}

.header__mobile-link:hover svg,
.header__mobile-link:active svg,
.header__mobile-link.is-touching svg {
  transform: rotateY(180deg) !important;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)) !important;
}

.header__mobile-link svg {
  color: #fff; /* Chuyển sang màu trắng */
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.4));
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header__mobile-sub {
  margin-left: 15px;
  margin-bottom: 20px;
  list-style: none;
  display: none; /* Ẩn mặc định */
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: -5px;
  padding-bottom: 10px;
  animation: slide-down 0.3s ease-out;
}

.header__mobile-sub.is-open {
  display: grid !important;
}

/* Mobile Sub Footer Landing Page */
.header__mobile-sub-footer {
  grid-column: span 2;
  margin: 15px 15px 10px -5px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.header__mobile-lp-label {
  font-size: 10.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.header__mobile-lp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.header__mobile-lp-btn {
  padding: 3.5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  text-transform: uppercase;
}

.header__mobile-lp-btn:active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.header__mobile-sub a {
  display: block;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.header__mobile-sub a:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.03);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
  .header { 
    height: var(--header-height-mobile); 
    overflow: visible !important; 
  }
  .header__topbar { display: none; }
  .header__inner { 
    height: 100%; 
    padding-inline: 3px 12px; 
    gap: 0;
  }
  .header__mobile-actions { display: flex; }
  .header__logo {
    padding: 0 12px; 
    background: linear-gradient(135deg, #444444 0%, #7a7a7a 50%, #333333 100%);
    border-radius: 3px; /* Bo góc mỏng tối giản */
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 1px 10px rgba(0,0,0,0.4);
    height: 58px; /* Cách trên dưới 1px (Header 60px - 2x1px) */
    margin-top: 1px; /* Cách mép trên chính xác 1px */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .header__logo img {
    height: 46px !important; 
  }
  .header__logo::after { display: block; } 
  .header__nav, .header__actions { display: none; }
  .header__hamburger { display: flex; }
}

/* ===== BODY OFFSET ===== 
   Body padding-top cho nội dung không bị fixed header che.
   Trang có hero section sẽ override bằng negative margin.
   ========================================================= */
body {
  padding-top: calc(var(--header-height) + 36px);
}

@media (max-width: 1023px) {
  body {
    padding-top: var(--header-height-mobile);
  }
  /* Firefox Fix: Đảm bảo pointer-events hoạt động trên điện thoại */
  .header {
    pointer-events: auto !important;
  }
  .header__mobile-actions {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .header__hamburger {
    display: flex !important;
  }
}

/* To Top Firefox Fix */
@-moz-document url-prefix() {
  .back-to-top-wrapper {
    z-index: 10001 !important;
  }
}
