:root {
  --color-background: #482d2d;
  --color-slogan: #4f9a46;
  --color-subslogan: #808000;
  --color-nav: rgb(126, 39, 39);
  --color-buy: #4caf50;
  --color-hotline: #01fd7f;
}

html,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  /* padding: 0 1rem;  */
  /* color: rgb(126, 39, 39); */
}

.slogan {
  color: #ffd700; /* Màu vàng nhạt cho tiêu đề chính */
  font-weight: bold;
  font-size: 28px;
  font-family: 'Merriweather', serif;
  margin: 0.5rem 0;
}

.sub-slogan {
  margin-top: 8px;
  color: var(--color-subslogan);
}

header {
  background-color: #333333;
  color: #ffffff;
  padding: 20px 0;

  width: 100%;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav {
  /* Gradient nền cho menu điều hướng */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 30px;
  border-radius: 0 0 20px 20px; /* Bo góc dưới với độ cong lớn hơn */
}

nav a {
  color: #e0e0e0; /* Màu chữ trung tính sáng */
  text-decoration: none;
  margin: 0 18px;
  font-size: 18px;
  padding: 12px 20px;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
  border-radius: 30px; /* Bo góc lớn cho các liên kết */
  background: rgba(255, 255, 255, 0.1); /* Nền mờ cho liên kết */
  backdrop-filter: blur(5px); /* Hiệu ứng mờ nền */
}
.dropdown-content a {
  margin: 0;
  border-radius: 0;
}

nav a:hover {
  color: #fff; /* Màu chữ khi hover */
  transform: translateY(-5px); /* Hiệu ứng nổi lên khi hover */
  background: rgba(255, 255, 255, 0.2); /* Nền mờ hơn khi hover */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* Đổ bóng khi hover */
}

nav a.active {
  color: #ffcc00; /* Màu chữ cho liên kết đang chọn */
  font-weight: bold;
  background: rgba(255, 255, 255, 0.2); /* Nền mờ hơn cho active */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* Đổ bóng cho active */
}

nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    45deg,
    #ffcc00,
    #ff9900
  ); /* Gradient cho đường gạch chân */
  border-radius: 5px;
  transition: transform 0.4s ease;
}

nav a:hover::after,
nav a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.menu li {
  display: inline-block;
  position: relative;
}

/* Style cho dropdown menu */
.dropdown-content {
  display: none;
  position: absolute;
  background: linear-gradient(135deg, #1e1e1e, #444);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); /* Đổ bóng lớn hơn */
  z-index: 1;
  min-width: 334px;
  padding: 0 0; /* Khoảng cách phía trên và dưới rộng hơn */
  top: 35px;
  border-radius: 25px;
  overflow: hidden; /* Đảm bảo không có phần tử nào tràn ra ngoài */
}
.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown {
  padding: 3px 0;
}

.dropdown-content li {
  display: block;
}

.dropdown-content li a {
  color: #ffffff; /* Màu chữ trắng */
  font-size: 17px; /* Kích thước phông chữ lớn hơn */
  font-weight: 500; /* Độ đậm phông chữ vừa phải */
  padding: 14px 25px; /* Khoảng cách rộng rãi */
  display: block; /* Đặt mỗi mục là một block element */
  text-decoration: none; /* Loại bỏ gạch chân */
  transition: all 0.3s ease-in-out; /* Hiệu ứng chuyển mượt mà */
  position: relative; /* Định vị cho các phần tử con */
  z-index: 1; /* Đảm bảo menu luôn hiển thị trên các phần tử khác */
}

.dropdown-content li a:hover {
  color: #fff; /* Màu chữ trắng khi di chuột */
  background: #ffb800; /* Nền xanh lá đậm khi di chuột */
  border-radius: 5px; /* Góc bo tròn */
  padding-left: 30px; /* Tăng khoảng cách trái khi di chuột */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Thêm đổ bóng */
}
.navbar-dropdown a:hover:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 5px; /* Dải màu ở cạnh trái */
  background: linear-gradient(
    180deg,
    #00c6ff,
    #0072ff
  ); /* Gradient xanh dương */
  border-radius: 5px 0 0 5px; /* Bo góc dải màu */
  z-index: -1; /* Đặt dải màu phía sau văn bản */
}
.dropdown-content li a:active {
  background: linear-gradient(
    135deg,
    #0072ff,
    #00c6ff
  ); /* Gradient xanh dương */
  color: #ffffff; /* Màu chữ trắng */
  border-radius: 5px; /* Góc bo tròn */
  padding-left: 30px; /* Tăng khoảng cách trái */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Thêm đổ bóng */
}

/* Hiện menu khi hover vào phần tử cha */

.category-menu {
  width: 250px;
  /* Màu nền đỏ sậm cho tiêu đề */
  border-radius: 10px; /* Bo góc cho toàn bộ menu */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Đổ bóng nhẹ */
  overflow: hidden; /* Đảm bảo không có phần tử nào tràn ra ngoài */
  margin-bottom: 20px; /* Tạo khoảng cách phía dưới */
}

.category-menu h2 {
  text-transform: uppercase; /* Chữ in hoa */
  background-color: #c29a5e;
  color: #fff;
  padding: 10px;
  margin: 0;
  text-align: center;
  font-size: 1rem;
}

.category-menu ul {
  list-style: none; /* Loại bỏ ký hiệu danh sách */
  padding: 0; /* Loại bỏ padding */
  margin: 0; /* Loại bỏ margin */
}

.category-menu ul li {
  border-bottom: 1px solid #eee; /* Đường viền dưới nhẹ cho từng mục */
}
.category-menu ul li:last-child {
  border-bottom: none; /* Loại bỏ viền dưới cho mục cuối */
}

.category-menu ul li a {
  display: block; /* Đặt mỗi mục là một block element */
  color: #333; /* Màu chữ xám đậm */
  font-size: 16px; /* Kích thước phông chữ */
  padding: 12px 20px; /* Khoảng cách xung quanh từng mục */
  text-decoration: none; /* Loại bỏ gạch chân */
  transition: all 0.3s ease; /* Hiệu ứng chuyển mượt mà */
}
.category-menu ul li a:hover {
  background-color: #f5f5f5; /* Nền xám nhạt khi di chuột */
  padding-left: 25px; /* Tăng khoảng cách trái khi di chuột */
  color: #8b0000; /* Màu chữ đỏ sậm khi di chuột */
  border-left: 4px solid #8b0000; /* Đường viền trái khi di chuột */
}
.category-menu ul li a.active {
  background-color: #ddd; /* Nền xám sáng cho mục đang chọn */
  color: #8b0000; /* Màu chữ đỏ sậm cho mục đang chọn */
  font-weight: bold; /* Chữ đậm hơn */
  padding-left: 25px; /* Tăng khoảng cách trái */
  border-left: 4px solid #8b0000; /* Đường viền trái cho mục đang chọn */
}

.products,
.categories,
.news {
  padding: 2rem 0;
}

.products .container,
.categories .container,
.news .container {
  text-align: center;
}

.product-list,
.category-list,
.news-list {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
}

.product,
.category,
.news-item {
  border: 1px solid #ccc;
  padding: 1rem;
  flex: 1 1 30%;
  box-sizing: border-box;
}

.product img,
.category img,
.news-item img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: blue;
}

.m-w {
  display: flex;
  max-width: 1200px;
  justify-content: flex-start;
  margin: 10px auto;
}

.main-content {
  width: 75%;
  padding: 0 20px 20px 20px;
}

.hotline img {
  width: 75px;
  background-color: #ffffff00;
}
.main-content .title-item {
  margin-top: 0px;
  border-bottom: 2px solid var(--color-slogan);
  padding-bottom: 10px;
  color: var(--color-slogan);
}
.main-content h1 {
  margin-top: 8px;
}

.content-item {
  margin-bottom: 30px;
}
.news-article {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
}

.news-article img {
  max-width: 150px;
  height: auto;
  margin-right: 20px;
}

/* .article-content {
    max-width: calc(100% - 220px);
} */

.article-content h2 {
  margin-top: 8px;
  font-size: 1.5em;
  color: #333;
}

.article-content p {
  margin-top: 0;
  color: #555;
}
.article-content a {
  text-decoration: none;
  color: #000;
}
.menu-icon {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  margin-top: 10px;
}

.description {
  display: inline-block;
  padding-left: 10px;
}
.description p {
  margin: 0;
  opacity: 0.8;
}
.description .br {
  font-weight: bold;
  opacity: 1;
}
.container .logo img {
  width: 8rem;
  border-radius: 50%;
}
.banner-menu {
  width: 900px;
  height: 350px;
}
.google-map {
  width: 350px;
  height: 200px;
  border-radius: 8%;
}
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: fixed;
  right: 10px;
  bottom: 30px;
  color: #fff;
  align-items: end;
}
.hotline,
.zalo {
  display: flex;
  align-items: center;
}
.contact .zalo {
  margin-right: 8px;
  margin-top: 10px;
}
.hotline img {
  width: 75px;
  background-color: #ffffff00;
}
.zalo img {
  width: 60px;
  transition: transform 0.3s ease-in-out;
  margin-left: 10px;
}

.call-button {
  background-color: #008cba;
  color: white;
  border: none;
  padding: 10px 20px;
  text-align: center;
  display: none;
  font-size: 16px;
  margin: 4px 2px;
  height: 38px;
  border-radius: 8px;
}
.hotline .call-button {
  background-color: #06e25e;
}

.zalo:hover img {
  animation: heartbeat 1s infinite;
}
.zalo:hover .call-button {
  display: inline-block;
}
.hotline:hover .call-button {
  display: inline-block;
}
.hotline:hover img {
  animation: heartbeat 1s infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
/* .hotline {
    font-size:20px;
    padding:5px;
    font-weight: bold;
    text-align:center;
    text-decoration: none; 
    background-color:var(--color-hotline);
    border-radius: 5%;
    
    
} */
.zalo img {
  width: 60px;
  transition: transform 0.3s ease-in-out;
}

.hotline:hover {
  color: #ff6600;
}

.zalo:hover img {
  animation: heartbeat 1s infinite;
}

.socal-media {
  padding: 0;
}
.socal-media li {
  display: inline-block;
}
.socal-media li:hover {
  opacity: 0.8;
}
.socal-media li i {
  padding: 0.1rem;
}
.fa-youtube {
  color: red;
  opacity: 0.8;
  font-size: 1.5rem;
}
.fa-facebook {
  color: rgb(0, 136, 255);
  margin-left: 0.5rem;
  font-size: 1.5rem;
}
.bold {
  font-weight: bold;
}
.copyright {
  text-align: center;
  margin-bottom: 15px;
}
footer {
  background-color: #333333;
  color: #ffffff;
  padding-top: 50px 0;
  font-family: 'Roboto', sans-serif;
  position: relative;
  overflow: hidden;
}

footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
footer h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
  letter-spacing: 1px;
}
footer p,
footer ul {
  font-size: 16px;
  line-height: 1.8;
  color: #f2f2f2;
}
footer ul {
  list-style-type: none;
  padding: 0;
}
footer ul li {
  margin-bottom: 12px;
}
footer ul li a {
  color: #f2f2f2;
  text-decoration: none;
  transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
  position: relative;
  display: inline-block;
}
footer ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: #ffffff;
  transition: width 0.3s ease-in-out;
}

footer ul li a:hover {
  color: #ffffff;
  transform: scale(1.05);
}

footer ul li a:hover::after {
  width: 100%;
}
.footer-about,
.footer-links,
.footer-contact {
  flex: 1 1 30%;
}
footer .socal-media {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

footer .socal-media li a {
  color: #f2f2f2;
  font-size: 22px;
  transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}
footer .socal-media li a:hover {
  color: #ffffff;
  transform: scale(1.2);
}
.google-map-container {
  grid-column: span 4;
  text-align: center;
  margin-top: 20px;
}

.google-map {
  width: 100%;
  height: 180px;
  border: 2px solid #333;
  border-radius: 8px;
  overflow: hidden;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  max-width: 100px;
  transition: transform 0.3s ease-in-out;
}

.footer-logo img:hover {
  transform: scale(1.1);
}
.footer-links ul li {
  margin: 0.5rem 0;
}
.sub-item {
  text-align: center;
  margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .m-w {
    flex-direction: column;
  }
  .news-article {
    flex-direction: column;
    align-items: center;
    margin-bottom: 52px /* flex-wrap: wrap */;
  }
  .copyright {
    font-size: 15px;
  }
  .category-menu h2 {
    text-transform: uppercase; /* Chữ in hoa */
    background-color: #d9534f;
    color: #fff;
    padding: 10px;
    margin: 0;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
  }
  footer .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  footer .socal-media {
    justify-content: center;
  }
  .news-article img {
    max-width: 100%;
    margin: 0;
  }
  h1,
  h2 {
    margin-bottom: 0;
  }

  .title-item {
    font-size: 1.3em;
    margin-bottom: 30px;
  }
  .main-content {
    width: 100%;
    padding: 0;
    text-align: justify;
  }
  .container .logo {
    text-align: center;
  }
  .slogan {
    color: #2c3e50;
  }
  .sub-slogan {
    color: #7f8c8d;
  }
  .container .logo .slogan {
    font-size: 1rem;
    font-weight: bold;
  }
  header .container {
    flex-direction: column;
    gap: 1rem;
  }

  header nav ul {
    display: none;
  }

  .category-menu {
    width: 100%;
    margin-bottom: 1rem;
  }

  .product-list,
  .category-list,
  .news-list {
    flex-direction: column;
    gap: 1rem;
  }

  .menu-icon {
    flex-direction: column;
    align-items: center;
  }

  .banner-menu {
    width: 100%;
    height: auto;
  }

  footer .container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .footer-about {
    display: none;
  }
  .google-map {
    width: 100%;
    /* margin-left: 1rem; */
  }
  .menu-icon {
    display: none;
  }
  .hidden {
    display: none;
  }

  /* Đặt nền trắng cho khung chứa */
  header .container {
    background-color: #fff;
    border-radius: 12px; /* Góc bo tròn cho khung chứa */
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* Đổ bóng nhẹ */
  }

  /* Phong cách của nút bấm để ẩn/hiện danh mục sản phẩm */
  .category-toggle {
    background-color: #d9534f; /* Màu đỏ đậm */
    color: white; /* Màu chữ trắng */
    padding: 14px 20px;
    border: none;
    width: 100%;
    max-width: 300px; /* Độ rộng tối đa của nút */
    text-align: center; /* Căn giữa chữ */
    font-weight: bold; /* Chữ đậm */
    cursor: pointer; /* Con trỏ tay khi rê vào */
    display: flex;
    justify-content: center; /* Căn giữa biểu tượng mũi tên và chữ */
    align-items: center;
    border-radius: 30px; /* Góc bo tròn mềm mại */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Đổ bóng nhẹ */
    margin: 20px auto; /* Đặt nút ở giữa với khoảng cách bên trên và dưới */
  }

  /* Hiệu ứng khi hover */
  .category-toggle:hover {
    background-color: #c9302c; /* Màu nền khi hover */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); /* Đổ bóng sâu hơn khi hover */
  }

  /* Biểu tượng mũi tên */
  .category-toggle .arrow {
    font-size: 18px; /* Kích thước biểu tượng */
    transition: transform 0.3s ease, color 0.3s ease; /* Hiệu ứng xoay mũi tên và đổi màu */
    border: solid white; /* Màu mũi tên */
    border-width: 0 2px 2px 0; /* Tạo mũi tên */
    padding: 4px;
    transform: rotate(45deg); /* Xoay 45 độ tạo mũi tên */
    margin-left: 10px;
  }

  /* Mũi tên hướng xuống */
  .category-toggle .arrow.down {
    transform: rotate(45deg); /* Mũi tên xuống */
  }

  /* Mũi tên hướng lên */
  .category-toggle .arrow.up {
    transform: rotate(-135deg); /* Mũi tên lên */
  }

  /* Hiển thị danh mục sản phẩm khi được click trên mobile */
  #category-list.visible {
    display: block;
    max-height: 1000px; /* Chiều cao tối đa để hiển thị toàn bộ danh mục */
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out; /* Hiệu ứng mượt mà */
    opacity: 1;
  }

  /* Ẩn danh mục sản phẩm */
  #category-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out; /* Hiệu ứng mượt mà khi ẩn */
    opacity: 0;
  }

  /* Khi danh mục mở, mũi tên xoay lên */
  #category-list.visible + .category-toggle .arrow {
    transform: rotate(-135deg); /* Xoay mũi tên thành hướng lên */
  }

  /* Hiệu ứng cho nút khi được bấm */
  .category-toggle:active {
    background-color: #c9302c;
  }

  /* Phong cách danh sách sản phẩm */
  #category-list ul {
    list-style: none; /* Loại bỏ dấu chấm của danh sách */
    padding: 0;
    margin: 10px 0;
  }

  #category-list ul li {
    border-bottom: 1px solid #ddd; /* Đường viền dưới mỗi mục */
    padding: 10px 0;
  }

  #category-list ul li:last-child {
    border-bottom: none; /* Loại bỏ viền dưới mục cuối */
  }

  #category-list ul li a {
    color: #333; /* Màu chữ đen nhạt */
    text-decoration: none; /* Loại bỏ gạch chân */
    font-size: 16px;
    display: block;
    transition: color 0.3s ease;
  }

  /* Hiệu ứng khi hover mục sản phẩm */
  #category-list ul li a:hover {
    color: #d9534f; /* Đổi màu khi hover */
  }
}

@media (max-width: 480px) {
  header nav ul {
    display: none;
  }

  .product,
  .category,
  .news-item {
    flex: 1 1 100%;
  }
}
