body {
  overflow-x: hidden;
  margin: 0;
  font-family: 'Roboto', sans-serif;
}

.banner {
  position: relative;
  width: 100%;
  height: 124vh;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 60%;
  object-fit: cover;
  display: block;
}

/* Vùng caption phủ lên banner */
.caption {
  position: absolute;
  bottom: -1%;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Ảnh parabol */
.parabol-img {
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 400px;
  z-index: 1;
}

/* Nội dung nằm trên parabol */
.caption-content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  padding: 0 10px 20px;
  pointer-events: auto;
  overflow: hidden;
}

.caption-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.logo-img {
  width: 400px;
  max-width: 90%;
  margin-bottom: 20px;
}

.caption-list-wrapper {
  overflow-x: auto;
  max-width: 100%;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Danh sách sản phẩm có thể vuốt ngang */
.caption-list {
  display: flex;
  gap: 250px;
  padding: 5px 0;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  width: max-content;
  margin: 0 auto;
  /* 👉 Giúp căn giữa nếu danh sách ngắn */
}


.caption-list::-webkit-scrollbar {
  display: none;
}

.caption-list a {
  flex: 0 0 auto;
  width: 140px;
  text-align: center;
  color: white;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Căn từ trên xuống để giảm khoảng cách */
  scroll-snap-align: center;
  min-height: 300px; /* Tăng chiều cao tối thiểu để chứa ảnh lớn hơn */
}

.caption-list img {
  width: 200%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  transition: 0.3s;
  display: block;
  margin-bottom: 0; /* Không có khoảng cách dưới ảnh */
}

/* Đảm bảo ảnh NC900 (đã xóa phông) có kích cỡ bằng các ảnh khác và thẳng hàng */
.caption-list a[href*="nc900"] img {
  width: 450px; /* Tăng chiều rộng để ảnh lớn hơn */
  height: 240px; /* Tăng chiều cao để ảnh lớn hơn */
  object-fit: contain;
  background-color: transparent;
  margin-bottom: 0; /* Đảm bảo khoảng cách từ ảnh đến chữ giống nhau */
}

/* Đảm bảo chữ MODEL thẳng hàng */
.caption-list a strong {
  margin-top: -5px; /* Thu nhỏ khoảng cách giữa ảnh và chữ (âm để sát hơn) */
  display: block;
  margin-bottom: 0;
  line-height: 1.2; /* Giảm line-height để chữ sát hơn */
}

.caption-list a:hover img {
  transform: scale(1.05);
}

.caption-list a:hover {
  color: yellow;
}


.contact {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px;
  flex-wrap: wrap;
  background-color: #ff0000;
}

.office {
  flex: 1;
  min-width: 220px;
  border-radius: 8px;
  padding: 15px;
}

.office h3 {
  color: white;
  margin-bottom: 10px;
}

.office p {
  margin: 4px 0;
  font-size: 16px;
  color: white;
}

/* ĐẢM BẢO phần sản phẩm co giãn */
.product-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 1vw;
  padding: 2rem;
}

.product-container-wrapper {
  width: 90%;
  margin: 0 auto;
}

.product-container h3 {
  color: #ff0000;
}

.product {
  flex: 1;
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  background-color: white;
}

.product img {
  width: 100%;       /* Chiều ngang chiếm toàn bộ khung */
  height: auto;      /* Chiều cao tự động theo tỉ lệ ảnh gốc */
  aspect-ratio: 16 / 9; /* Khung hình chữ nhật tỷ lệ 4:3 */
  object-fit: cover; /* Cắt ảnh để vừa khung nếu cần */
  display: block;
}

/* CSS cho ảnh có background trong suốt (PNG đã xóa phông) */
.product-img-transparent {
  background-color: transparent !important;
  object-fit: contain !important; /* Giữ nguyên tỷ lệ và không cắt ảnh */
  background: transparent !important;
  aspect-ratio: auto !important; /* Bỏ tỷ lệ cố định để ảnh tự nhiên */
  padding: 10px; /* Thêm khoảng trống xung quanh để ảnh không bị cắt */
}

.product h3 {
  margin: 10px 0 5px;
}

.product .price {
  color: red;
  font-weight: bold;
  margin-bottom: 10px;
}

.product .description {
  font-size: 14px;
  color: #555;
}

.product-link {
  flex: 0 1 calc(30% - 20px);
  max-width: calc(30% - 20px);
  min-width: 200px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.product-link * {
  width: 100% !important;
  background-color: #F0F0F0;
}

.reason {
  width: 84%;
  margin: 0 auto;
  margin-top: 1%;
  padding: 20px;
  text-align: center;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: 16px;
}

.reason-box {
  background: #f8f8f8;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.reason-box img {
  max-width: 100px;
  height: auto;
  margin-bottom: 8px;
}

.reason-box p {
  font-size: 16px;
  line-height: 1.4;
}

.pride-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px;
  background-color: #f4f4f4;
  flex-wrap: wrap;
  font-family: Arial, sans-serif;
}

.pride-text {
  flex: 1;
  min-width: 300px;
}

.pride-text h1 {
  color: #ff0000;
  font-size: 28px;
  margin-bottom: 20px;
}

.pride-text p {
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  color: #333;
}

.pride-image {
  flex: 1;
  min-width: 300px;
  text-align: right;
}

.pride-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
}

.baohanh {
  margin: 60px auto;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Saira', sans-serif;
}

.baohanh-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
}

.baohanh-overlay {
  flex: 1;
  text-align: left;
}

.baohanh-overlay h1 {
  font-size: 24px;
  color: #ff0000;
  margin-bottom: 20px;
}

.baohanh-overlay p {
  font-size: 16px;
  color: #333;
  margin-bottom: 30px;
  line-height: 1.5;
}

.baohanh-overlay strong {
  color: #000;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.baohanh-overlay span {
  color: #666;
  font-size: 14px;
}

.baohanh-search {
  display: flex;
  margin-top: 16px;
}

.baohanh-search input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #ccc;
  border-radius: 6px 0 0 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}

.baohanh-search input[type="text"]:focus {
  border-color: #ff0000;
}

.baohanh-search button {
  padding: 10px 16px;
  background-color: #ff0000;
  color: white;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.baohanh-search button:hover {
  background-color: #ff0000;
}

.baohanh-search i.fas.fa-search {
  pointer-events: none;
}

.baohanh-image {
  flex: 1;
  text-align: center;
}

.baohanh-image img {
  max-width: 100%;
  height: auto;
}

.news {
  margin: 60px auto;
  padding: 0 20px;
}

.news-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
  padding: 20px;
  cursor: grab;
  user-select: none; /* Ngăn chọn văn bản khi kéo */
}

.news-container:active {
  cursor: grabbing;
}

.news-container::-webkit-scrollbar {
  display: none;
}

.news-item {
  flex: 0 0 auto;
  width: 300px; /* hoặc 80% nếu bạn muốn to hơn */
  scroll-snap-align: start;
  background: #f0f0f0;
  padding: 20px;
  border-radius: 10px;
  min-height: 200px;
}


.news-box {
  background-color: #fff;
  width: 300px;
  height: 300px;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.news-box img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.news-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-content h3 {
  color: #ff0000;
  font-size: 16px;
  margin-bottom: 8px;
}

.news-content p {
  font-size: 14px;
  color: #555;
  flex-grow: 1;
}

.news-button {
  background-color: #ff0000;
  color: white;
  padding: 6px 12px;
  font-size: 13px;
  text-decoration: none;
  border-radius: 5px;
  align-self: start;
  margin-top: 10px;
}

.news-button:hover {
  background-color: #b30e0e;
}

.dot-nav {
  display: flex;
  justify-content: center;
  margin-top: 25px;
  gap: 12px;
}

.dot {
  height: 14px;
  width: 14px;
  background-color: #ccc;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #ff0000;
}

.arrow {
  background-color: transparent;
  border: none;
  font-size: 28px;
  color: #ff0000;
  cursor: pointer;
  padding: 0 15px;
  transition: color 0.3s;
}

.arrow:hover {
  color: #b30e0e;
}

#backToTopBtn {
  display: none;
  /* Ẩn ban đầu */
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #ff0000;
  color: white;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

#backToTopBtn:hover {
  background-color: #b30e0e;
}

/* responsive */
@media (max-width: 1024px) {
  .banner {
    height: 100vh;
  }

  .banner-img {
    margin-top: 0 !important;
    width: 100%;
    height: 34%;
    object-fit: contain;
    display: block;
  }

  .caption {
    top: -290px
  }

  .parabol-img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
    /* Hoặc auto tùy theo chiều cao ảnh gốc */
    object-fit: cover;
    object-position: center bottom;
    z-index: 1;
    pointer-events: none;
    /* nếu bạn không muốn nó cản các nút khác */
  }

  .pride-section {
    flex-direction: column;
    text-align: center;
  }

  .pride-image {
    text-align: center;
  }

  .caption-list {
    justify-content: flex-start;
    /* Căn về trái để scroll mượt */
    padding-left: 15px;
    gap: 65px;
  }

  .caption-list img {
    width: 120%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s;
  }

  /* Đảm bảo ảnh NC900 (đã xóa phông) có kích cỡ bằng các ảnh khác trên mobile */
  .caption-list a[href*="nc900.png"] img {
    width: 280px; /* Tăng chiều rộng để ảnh lớn hơn trên mobile */
    height: 200px;
    object-fit: contain;
    background-color: transparent;
  }

  .caption-content {
    bottom: 8%;
    padding: 0;
  }

  .caption-content h2 {
    font-size: 20px;
  }

  .logo-img {
    background: #ff0000;
    border: 1px solid #ff0000;
    width: 250px;
    max-width: 90%;
    margin-bottom: 30px;
    border-radius: 8px;
  }

  /* Giới hạn vùng hiển thị đúng 3 mục */
  .caption-list-wrapper {
    overflow-x: auto;
    max-width: calc(140px * 3 + 60px * 2 + 16px);
    /* 3 mục + 2 khoảng cách + padding trái */
    margin: 0 auto;
    scroll-snap-type: x mandatory;
  }

  .baohanh-container {
    flex-direction: column;
  }

  .baohanh-overlay,
  .baohanh-image {
    width: 100%;
  }

  .baohanh-search input[type="text"] {
    width: 100%;
  }

  .reason {
    margin-top: -320px; /* Hoặc giá trị phù hợp với chiều cao ảnh parabol */
    position: relative;
    z-index: 2; /* Đảm bảo nằm trên ảnh parabol nếu cần */
  }

  .pride-image img {
    width: 500px;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
  }

  .reason-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    gap: 12px;
  }

  .reason-box {
    padding: 12px;
  }

  .reason h1 {
    font-size: 24px;
    text-align: center;
    padding: 8px;
  }

  .news-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }

  .news-box {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
  }

  #newsContainer {
    display: flex;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    will-change: transform;
  }

  .news-box {
    flex: 1 0 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  .product-container-wrapper {
    width: 93%;
    padding: 0 10px;
    box-sizing: border-box;
    margin: 0;
  }

  .product-container {
    padding: 1rem 0;
    gap: 16px;
  }

  .product-link {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }

  #backToTopBtn {
    display: none !important;
  }
}

@media (min-width: 1920px) {
  .logo-img {
  background: #ff0000;
  border: 1px solid #ff0000;
  width: 400px;
  max-width: 90%;
  margin-bottom: 50px;
  border-radius: 8px;
}
}

@media (max-height: 900px) {
  .banner {
    height: 900px; /* giữ cố định chiều cao banner */
    overflow: hidden; /* che phần nội dung phía dưới */
  }
}