/* =========================================================
   RESET + CẤU HÌNH CHUNG
========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #111;
}

/* Ảnh/iframe/video không tràn */
img,
iframe,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Chạm dễ hơn */
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   CONTAINER DÙNG CHUNG
========================================================= */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Wrapper chung (body bọc: <div class="site-frame container">) */
.site-frame {
  padding-top: 6px;
}

/* (Tuỳ chọn) match spacing container */
.site-frame.container {
  padding-left: 12px;
  padding-right: 12px;
}

/* =========================================================
   TOPBAR (LOGO | INFO | HOTLINE)
========================================================= */
.topbar {
  display: grid;
  grid-template-columns: 340px minmax(520px, 1fr) 260px;
  align-items: center;
  gap: clamp(16px, 3vw, 50px);
  padding: 6px 0;
  background: #fff;
}

/* LOGO */
.brand {
  display: flex;
  align-items: center;
  min-width: 340px;
}
.brand img {
  max-height: 100px;
  width: auto;
  height: auto;
  display: block;
}

/* INFO */
.info {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.icons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.icon1,
.icon2 {
  width: 56px;
  height: 34px;
  background: rgb(17, 0, 250);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px 0 0 12px;
  font-size: 22px;
}

.panels {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Panel chung */
.panel1,
.panel2,
.panel3,
.panel4 {
  background: #8202fa;
  color: #fff;
  padding: 6px 12px;
  min-height: 34px;
  display: flex;
  align-items: center;
  line-height: 1.3;

  /* desktop: gọn 1 dòng + ... */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bo góc panel */
.panel1,
.panel3 {
  border-radius: 0 10px 0 0;
}
.panel2,
.panel4 {
  border-radius: 0 0 10px 0;
}

/* HOTLINE */
.hotline {
  display: flex;
  gap: 6px;
  align-items: stretch;
  justify-self: end;
}
.hotline .icon {
  width: 56px;
  background: rgb(17, 0, 250);
  border-radius: 10px 0 0 10px;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* =========================================================
   NAVBAR (MENU + SEARCH)
========================================================= */
.navbar {
  background: #3004f6;
  padding: 5px;
  border-radius: 5px;
  overflow: visible;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

/* MENU CẤP 1 */
.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
}
.menu > li {
  position: relative;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  white-space: nowrap;
}

/* CARET */
.caret {
  font-size: 11px;
  transform: translateY(-1px) rotate(0deg);
  transition: transform 0.2s ease;
}
.has-dropdown:hover .caret {
  transform: translateY(-1px) rotate(180deg);
}

/* DROPDOWN */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #3004f6;
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  z-index: 50;
  list-style: none;

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown li a {
  color: yellow;
  font-weight: 600;
  padding: 10px 14px;
  display: block;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    padding-left 0.2s ease;
}
.dropdown li a:hover {
  background: #f2f4ff;
  color: #071b8c;
  padding-left: 18px;
}

.has-dropdown:hover > a {
  color: yellow;
}

/* SEARCH */
.search {
  display: flex;
  align-items: center;
}
.search input {
  width: 260px;
  height: 32px;
  border: none;
  outline: none;
  padding: 0 12px;
  border-radius: 6px 0 0 6px;
}
.search button {
  height: 32px;
  width: 44px;
  border: none;
  cursor: pointer;
  background: #9ca5d4;
  color: #fff;
  border-radius: 0 6px 6px 0;
}

/* =========================================================
   QM HERO SLIDER (SWIPER)
========================================================= */
.qm-hero-section {
  width: 100%;
  position: relative;
  margin: 10px 0;
  overflow: visible;
  isolation: isolate;
  min-height: 1px;
}

/* container đã bọc ngoài nên wrap không cần max-width */
.qm-hero-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.qm-hero-slider {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
}

/* Swiper wrapper/slide */
.qm-hero-slider .swiper-wrapper {
  display: flex;
  height: auto;
}
.qm-hero-slider .swiper-slide {
  flex: 0 0 100%;
  width: 100%;
}

/* Slide chiều cao cố định */
.qm-hero-slide {
  position: relative;
  height: 570px !important;
  background: #ddd; /* fallback nếu ảnh không load */
}

/* Ảnh nền */
.qm-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #fff;
}

/* Connector */
.qm-hero-connector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.qm-hero-connector path {
  fill: none;
  stroke: #e53935;
  stroke-width: 6;
  stroke-linecap: round;
  opacity: 0.9;
}

/* Bubble */
.qm-bubble {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 6px solid #e53935;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}
.qm-bubble img {
  width: 80%;
  height: 80%;
  object-fit: cover;
  border-radius: 50%;
}

/* Vị trí bubble */
.qm-b1 {
  left: 6%;
  top: 32%;
}
.qm-b2 {
  left: 20%;
  top: 44%;
}
.qm-b3 {
  left: 34%;
  top: 30%;
}

/* Info box */
.qm-hero-info {
  position: absolute;
  right: 4%;
  top: 16%;
  width: 520px;
  max-width: 46%;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Swiper pagination */
.qm-hero-slider .swiper-pagination-bullet {
  opacity: 0.35;
}
.qm-hero-slider .swiper-pagination-bullet-active {
  opacity: 1;
}

/* NÚT NEXT/PREV */
.qm-hero-slider .swiper-button-prev,
.qm-hero-slider .swiper-button-next {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 20 !important;

  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  color: #e53935;

  left: auto !important;
  right: auto !important;

  transition: all 0.2s ease;
}
.qm-hero-slider .swiper-button-prev {
  left: 12px !important;
}
.qm-hero-slider .swiper-button-next {
  right: 12px !important;
}
.qm-hero-slider .swiper-button-prev::after,
.qm-hero-slider .swiper-button-next::after {
  font-size: 18px;
  font-weight: 700;
}
.qm-hero-slider .swiper-button-prev:hover,
.qm-hero-slider .swiper-button-next:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-50%) scale(1.08) !important;
}

/* ===============================================================
   QM MAIN LAYOUT: SIDEBAR + CONTENT
============================================================== */
.qm-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  padding: 18px 0 10px;
}

/* =============================
   SIDEBAR BOX
============================= */
.qm-sidebar .qm-box {
  background: #fff;
  border: 1px solid #eee;
  margin-bottom: 16px;
}

.qm-box-title {
  margin: 0;
  padding: 12px 14px;
  background: #e60000;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/* =============================
   SIDEBAR MENU: SUBMENU BUNG NGANG (DESKTOP)
============================= */
.qm-cat,
.qm-sub-cat {
  list-style: none;
  margin: 0;
  padding: 0;
}

.qm-cat {
  width: 300px;
  background: #fff;
  border-right: 1px solid #eee;
}

.qm-cat > li,
.qm-sub-cat > li {
  position: relative;
  border-top: 1px solid #f1f1f1;
}
.qm-cat > li:first-child {
  border-top: 0;
}

/* Link item */
.qm-link,
.qm-cat a,
.qm-sub-cat a {
  display: block;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  font-size: 14px;
}

/* Link chính */
.qm-cat > li > .qm-link,
.qm-cat > li > a {
  position: relative;
  padding: 12px 44px 12px 14px; /* chừa chỗ icon bên phải */
  white-space: nowrap;
}

/* Hover nền */
.qm-cat > li:hover > .qm-link,
.qm-cat > li:hover > a {
  background: #f7f7f7;
  color: #e60000;
}

/* Icon bên phải - chỉ hiện khi hover (mục có submenu) */
.qm-cat > li.has-sub > .qm-link::after,
.qm-cat > li.has-sub > a::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #999;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.qm-cat > li.has-sub:hover > .qm-link::after,
.qm-cat > li.has-sub:hover > a::after {
  opacity: 1;
}

/* SUBMENU cấp 2 bung sang phải */
.qm-cat > li.has-sub > .qm-sub-cat {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 360px;
  background: #fff;
  border-left: 1px solid #eee;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  z-index: 999;
}
.qm-cat > li.has-sub:hover > .qm-sub-cat {
  display: block;
}

/* Item trong submenu cấp 2 */
.qm-cat > li.has-sub > .qm-sub-cat > li > a,
.qm-cat > li.has-sub > .qm-sub-cat > li > .qm-link {
  padding: 12px 44px 12px 14px;
  white-space: nowrap;
  color: #111;
}
.qm-cat > li.has-sub > .qm-sub-cat > li:hover > a,
.qm-cat > li.has-sub > .qm-sub-cat > li:hover > .qm-link {
  background: #f7f7f7;
}

/* SUBMENU cấp 3 bung tiếp sang phải */
.qm-sub-cat > li.has-sub > .qm-sub-cat {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 360px;
  background: #fff;
  border-left: 1px solid #eee;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}
.qm-sub-cat > li.has-sub:hover > .qm-sub-cat {
  display: block;
}

/* Icon cho submenu cấp 2 có submenu */
.qm-sub-cat > li.has-sub > a::after,
.qm-sub-cat > li.has-sub > .qm-link::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #999;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.qm-sub-cat > li.has-sub:hover > a::after,
.qm-sub-cat > li.has-sub:hover > .qm-link::after {
  opacity: 1;
}

/* tránh “nháy” khi rê chuột */
.qm-cat > li.has-sub {
  padding-right: 6px;
}

/* =============================
   Support box
============================= */
.qm-support {
  padding: 12px 14px 14px;
  display: grid;
  gap: 12px;
}

.qm-support-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid #f0f0f0;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
}

.qm-support-badge {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e9f6ff;
  color: #0a66c2;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid #d7efff;
}

.qm-support-text {
  font-size: 14px;
  line-height: 1.35;
  color: #222;
}
.qm-support-text strong {
  font-weight: 800;
}

/* News mini */
.qm-news-mini {
  padding: 12px 14px 14px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
}
.qm-news-mini img {
  width: 80px;
  height: 80px;
  object-fit: contain; /* đổi từ cover → contain */
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fff; /* thêm để không bị nền xám */
}
.qm-news-mini a {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}
.qm-news-mini a:hover {
  color: #e60000;
}

/* =============================
   CONTENT HEADER
============================= */
.qm-content {
  min-width: 0;
}

.qm-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 14px;
}

.qm-section-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #111;
}

.qm-viewall {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
}
.qm-viewall:hover {
  color: #e60000;
}
.qm-mt {
  margin-top: 22px;
}

/* =========================================================
   PRODUCT SWIPER + CARD
========================================================= */
.qm-prod-swiper {
  position: relative;
  width: 100%;
  padding-bottom: 46px; /* chừa pagination */
}

.qm-prod-swiper .swiper-slide {
  height: auto;
}

.qm-card {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.qm-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1/1;
  margin-bottom: 10px;
}
.qm-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.qm-card-title {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
  flex-grow: 1;
}

.qm-card-title a {
  color: #0307fb;
}
.qm-card-title a:hover {
  color: #e60000;
}

.qm-btn {
  display: inline-block;
  text-align: center;
  padding: 8px 10px;
  background: #0066cc;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
}

.qm-card-note {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 10px;
  flex-grow: 1;
  color: #0307fb;
}

/* Arrows đè lên slider */
.qm-swiper-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(203, 15, 15, 0.45);
  z-index: 10;
  cursor: pointer;
  border: none;
  padding: 0;
  outline: none;
}
.qm-swiper-prev {
  left: 10px;
}
.qm-swiper-next {
  right: 10px;
}
.qm-swiper-btn::after {
  display: block;
  text-align: center;
  line-height: 44px;
  font-size: 20px;
  color: #fff;
}
.qm-swiper-prev::after {
  content: "‹";
}
.qm-swiper-next::after {
  content: "›";
}
.qm-swiper-btn:hover {
  background: rgba(0, 0, 0, 0.65);
}
.qm-swiper-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.4);
}

/* =========================================================
   BRAND SWIPER
========================================================= */
.qm-brand-swiper {
  padding: 6px 2px;
}
.qm-brand-swiper .swiper-slide {
  width: auto;
}

.qm-brand-card {
  width: 150px;
  height: 92px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.qm-brand-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* =========================================================
   ARROWS DÙNG CHUNG (SERVICE + TESTIMONIALS)
========================================================= */
.qm-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
}
.qm-arrow:hover {
  background: #0b2a82;
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}
.qm-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== SERVICE SWIPER ===== */
.qm-service-swiper {
  position: relative;
}
.qm-service-prev {
  left: -18px;
}
.qm-service-next {
  right: -18px;
}
.qm-service-dots {
  margin-top: 16px;
  text-align: center;
}
.qm-service-dots .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  opacity: 0.3;
}
.qm-service-dots .swiper-pagination-bullet-active {
  opacity: 1;
}

/* ===== TESTIMONIALS ===== */
.qm-testi-swiper {
  position: relative;
  padding: 6px 0 0;
}

/* mũi tên testimonials */
.qm-arrow.qm-testi-prev {
  left: 6px;
}

.qm-arrow.qm-testi-next {
  right: 6px;
}

.qm-testi-dots {
  margin-top: 16px;
  text-align: center;
}

.qm-testi {
  background: #faf7f2;
  padding: 44px 0;
}

.qm-testi__head h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  color: #111;
}
.qm-testi__head p {
  margin: 0 0 18px;
  color: #333;
}

.qm-tcard {
  background: #fff;
  border-radius: 22px;
  padding: 26px 26px 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  height: 100%;
  min-height: 240px;
}

.qm-tcard__top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.qm-tcard__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #f2f2f2;
  flex: 0 0 48px;
}
.qm-tcard__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qm-tcard__name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #111;
}
.qm-tcard__role {
  margin: 2px 0 0;
  color: #666;
  font-size: 14px;
}

.qm-tcard__quote {
  margin: 0 0 18px;
  color: #222;
  font-size: 15px;
  line-height: 1.7;
  font-style: italic;
}

.qm-tcard__stars {
  color: #f2b400;
  font-size: 16px;
  letter-spacing: 2px;
}

/* =========================================================
   CONTACT (2 CỘT)
========================================================= */
.contact {
  padding: 80px 20px;
  background: #f7f5f2;
}
.contact-container {
  max-width: 1140px;
  margin: 0 auto;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

/* LEFT – INFO + MAP */
.contact-info h3 {
  margin-bottom: 15px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.contact-list i {
  color: #6f4e37;
}

.map-wrapper {
  width: 100%;
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* FORM */
.contact-form {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;

  display: flex;
  flex-direction: column;
  gap: 15px;
}
.contact-form h3 {
  margin-bottom: 10px;
}
.contact-form button {
  margin-top: 10px;
}

/* =========================================================
   FOOTER
========================================================= */
.footer {
  background: #2b2b2b;
  color: #ddd;
  padding: 60px 20px 20px;
}
.footer-container {
  max-width: 1140px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.footer-col h3,
.footer-col h4 {
  color: #fff;
  margin-bottom: 15px;
}

.footer-logo {
  font-size: 14px;
  font-weight: bold;
}

.footer-col p {
  line-height: 1.6;
  color: #bbb;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-col a:hover {
  color: #fff;
}

/* Social */
.footer-social {
  display: flex;
  gap: 15px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  background: #444;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  transition: background 0.3s;
}
.footer-social a:hover {
  background: #6f4e37;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444;
  text-align: center;
  font-size: 14px;
  color: #aaa;
}

/* =========================================================
   STICKY HEADER
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);

  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 15px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}
.header-nav a:hover {
  color: #6f4e37;
}

/* =========================================================
   BACK TO TOP
========================================================= */
#backToTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  background: red;
  color: #fff;
  font-size: 24px;
  border: none;
  border-radius: 50%;
  z-index: 9999;

  opacity: 1;
  display: block;
  pointer-events: auto;
}

/* =========================================================
   ZALO FLOAT
========================================================= */
.zalo-float {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 56px;
  height: 56px;
  background: #0180ff;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(1, 128, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.zalo-float img {
  width: 28px;
  height: 28px;
}

.zalo-float:hover {
  transform: scale(1.08);
  box-shadow: 0 24px 56px rgba(1, 128, 255, 0.55);
}

/* Tooltip */
.zalo-tooltip {
  position: absolute;
  right: 70px;
  background: #0180ff;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.zalo-float:hover .zalo-tooltip {
  opacity: 1;
  right: 68px;
}

/* Pulse (desktop) */
.zalo-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(1, 128, 255, 0.4);
  animation: zalo-pulse 1.6s infinite;
  z-index: -1;
}

@keyframes zalo-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* =========================================================
   MOBILE FIX (<= 768px) – KHÔNG TRÙNG, KHÔNG ĐÈ
========================================================= */
@media (max-width: 768px) {
  #backToTop {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }

  .zalo-float {
    right: 16px;
    bottom: 88px; /* cách BackToTop đủ xa */
    width: 52px;
    height: 52px;
  }

  .zalo-tooltip {
    display: none;
  }

  /* tắt pulse trên mobile để không “đè thị giác” */
  .zalo-float::after {
    animation: none;
  }
}

/* =========================================================
   FORM GROUP (ICON + INPUT 1 HÀNG) + BUTTON
========================================================= */
.form-group {
  position: relative;
  display: flex;
  align-items: center;
  background: #f3f6f9;
  border: 1px solid #ccd5df;
  border-radius: 4px;
  height: 44px;
  margin-bottom: 12px;
}

.form-group .icon {
  width: 42px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #ccd5df;
  opacity: 0.7;
  font-size: 16px;
  line-height: 1;
  transform: translateY(1px);
}

.form-group input,
.form-group textarea {
  flex: 1;
  border: none;
  outline: none;
  height: 100%;
  padding: 0 12px;
  background: transparent;
  font-size: 14px;
}

/* textarea */
.form-group.textarea {
  align-items: flex-start;
  height: auto;
}
.form-group.textarea .icon {
  height: auto;
  padding-top: 10px;
}
.form-group.textarea textarea {
  min-height: 120px;
  padding-top: 10px;
  resize: vertical;
}

.btn-primary {
  width: 100%;
  height: 46px;
  border-radius: 4px;
  border: 1px solid rgba(30, 136, 229, 0.45);
  background: rgba(30, 136, 229, 0.08);
  color: #1565c0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  transition: all 0.25s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  color: #fff;
}
.btn-primary .btn-icon {
  font-size: 16px;
}

/* =========================================================
   RESPONSIVE (GIỮ DESKTOP, TỐI ƯU TABLET + MOBILE)
========================================================= */

/* NAVBAR nhỏ hơn (giữ logic cũ, không trùng) */
@media (max-width: 1100px) {
  .menu {
    gap: 14px;
  }
  .search input {
    width: 200px;
  }
}

/* Cho menu scroll ngang khi màn hẹp (giữ logic cũ, không trùng) */
@media (max-width: 900px) {
  .menu {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .menu::-webkit-scrollbar {
    height: 6px;
  }
  .menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
  }
}

/* HERO nhỏ */
@media (max-width: 720px) {
  .qm-hero-slide {
    height: 320px !important;
  }

  .qm-hero-slider .swiper-button-prev,
  .qm-hero-slider .swiper-button-next {
    width: 36px;
    height: 36px;
  }
  .qm-hero-slider .swiper-button-prev {
    left: 8px !important;
  }
  .qm-hero-slider .swiper-button-next {
    right: 8px !important;
  }
}

/* Testi nhỏ */
@media (max-width: 640px) {
  .qm-testi-prev {
    left: 6px;
  }
  .qm-testi-next {
    right: 6px;
  }
  .qm-testi__head h2 {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 100%;
    padding: 0 12px;
  }

  /* TOPBAR: 2 hàng */
  .topbar {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand brand"
      "info  hotline";
    gap: 12px;
    padding: 10px 0;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }
  .info {
    grid-area: info;
    min-width: 0;
  }
  .hotline {
    grid-area: hotline;
    justify-self: end;
    min-width: 0;
  }

  .brand img {
    max-height: 70px;
  }

  /* Tablet: cho phép xuống dòng (đừng ellipsis) */
  .panel1,
  .panel2,
  .panel3,
  .panel4 {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  /* NAVBAR: search xuống hàng */
  .nav-inner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .menu {
    flex: 1 1 100%;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .search {
    flex: 1 1 100%;
  }
  .search input {
    width: 100%;
    max-width: none;
  }

  /* MAIN: 1 cột */
  .qm-main {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Sidebar: từ bung ngang -> accordion */
  .qm-cat {
    width: 100%;
    border-right: 0;
  }

  .qm-cat > li.has-sub > .qm-sub-cat,
  .qm-sub-cat > li.has-sub > .qm-sub-cat {
    position: static;
    width: 100%;
    box-shadow: none;
    border-left: 0;
    display: none; /* mặc định đóng */
  }

  /* Icon chỉ báo luôn hiện trên tablet */
  .qm-cat > li.has-sub > .qm-link::after,
  .qm-cat > li.has-sub > a::after,
  .qm-sub-cat > li.has-sub > a::after,
  .qm-sub-cat > li.has-sub > .qm-link::after {
    opacity: 1;
  }

  /* JS sẽ add .is-open để mở */
  .qm-cat > li.has-sub.is-open > .qm-sub-cat,
  .qm-sub-cat > li.has-sub.is-open > .qm-sub-cat {
    display: block;
  }

  /* Cho text không bị cắt ngang trong menu */
  .qm-cat > li > .qm-link,
  .qm-cat > li > a,
  .qm-cat > li.has-sub > .qm-sub-cat > li > a,
  .qm-cat > li.has-sub > .qm-sub-cat > li > .qm-link {
    white-space: normal;
  }
}

/* SMARTPHONE (<= 576px) */
@media (max-width: 576px) {
  .container {
    padding: 0 10px;
  }

  /* TOPBAR: 1 cột */
  .topbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "info"
      "hotline";
    gap: 10px;
    padding: 10px 0;
  }

  .hotline {
    justify-self: start;
  }

  /* Thu nhỏ icon/panel cho gọn */
  .icon1,
  .icon2,
  .hotline .icon {
    width: 44px;
  }

  .panel1,
  .panel2,
  .panel3,
  .panel4 {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* NAVBAR */
  .navbar {
    padding: 6px;
  }
  .menu {
    gap: 12px;
  }
  .menu a {
    padding: 10px 0;
    font-size: 13px;
  }

  /* HERO info xuống dưới */
  .qm-hero-info {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
  }

  /* Nút bấm dễ chạm */
  button,
  .btn-primary,
  .qm-btn {
    min-height: 44px;
  }

  /* Input tránh iOS zoom */
  input,
  textarea,
  select {
    font-size: 16px;
  }

  /* Contact gọn hơn */
  .contact {
    padding: 40px 14px;
  }
}

@media (max-width: 768px) {
  #backToTop {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }

  .zalo-float {
    right: 16px;
    bottom: 88px;
    width: 52px;
    height: 52px;
  }

  .zalo-float::after {
    animation: none;
  }
}

@media (max-width: 768px) {
  /* Đồng bộ vị trí */
  #backToTop {
    right: 16px !important;
    bottom: 16px !important;
    width: 52px !important;
    height: 52px !important;
    z-index: 10000 !important;
  }

  .zalo-float {
    right: 16px !important;
    bottom: 96px !important; /* tăng xa hơn để chắc chắn */
    width: 52px !important;
    height: 52px !important;
    z-index: 9999 !important;
  }

  /* TẮT HOÀN TOÀN VÒNG PULSE để không “đè thị giác” */
  .zalo-float::after {
    content: none !important;
    animation: none !important;
  }

  /* Tắt tooltip */
  .zalo-tooltip {
    display: none !important;
  }
}

/* ===== FIX MOBILE: banner không bị cắt nội dung ===== */
@media (max-width: 768px) {
  /* bỏ chiều cao cố định */
  .qm-hero-slide {
    height: auto !important;
  }

  /* ảnh trở về dạng bình thường để tự co theo tỉ lệ */
  .qm-hero-bg {
    position: static !important; /* bỏ absolute */
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: contain !important; /* QUAN TRỌNG */
    object-position: center !important;
    background: #fff;
  }

  /* tránh Swiper/slide bị ép chiều cao */
  .qm-hero-slider .swiper-wrapper,
  .qm-hero-slider .swiper-slide {
    height: auto !important;
  }
}

@media (max-width: 768px) {
  .qm-card h4.qm-card-note,
  .qm-card .qm-card-note {
    color: #0307fb !important;
  }
}
