* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial;
  background: #f5f5f5;
  font-size: 23px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 40px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo img {
  height: 50px;
}
/* ===================== */
    h1 {
      width: 100%;
      text-align: center;
      font-size: 40px;
      font-weight: 750;
      margin: 10px 0 20px;
      color: red;
      font-family: Arial, Helvetica, sans-serif;
    }
    /* Thêm CSS cơ bản cho bộ lọc/sắp xếp */
    .filter-controls {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 20px;
      margin-bottom: 20px;
      padding: 10px;
      background-color: #f8f8f8;
      border-radius: 5px;
    }

    .filter-controls label,
    .filter-controls select {
      font-size: 16px;
    }

    .filter-controls select {
      padding: 5px 10px;
      border-radius: 5px;
      border: 1px solid #ccc;
    }

    #all-products-list {
      display: flex;
      flex-wrap: wrap; /* Cho phép xuống dòng */
      gap: 20px 1%; /* Khoảng cách giữa các sản phẩm */
      margin-top: 20px;
    }
    
    /* Đảm bảo sản phẩm vẫn chiếm 25% chiều rộng trừ khoảng cách */
    #all-products-list .col25 {
      flex-basis: 24.25%; 
    }
/* ====================thanh tìm kiếm */
/* Thêm vào thẻ <style> trong SanPham.html hoặc file CSS của bạn */
/* Cập nhật hoặc thêm mới */

/* Đảm bảo suggestion-item hiển thị ảnh và chữ cạnh nhau */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px; /* Khoảng cách giữa ảnh và chữ */
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333; /* Đảm bảo chữ dễ nhìn */
    text-decoration: none; /* Bỏ gạch chân link */
}
.suggestion-item:hover {
    background-color: #f0f0f0;
}
.suggestion-item:last-child {
    border-bottom: none;
}

/* Định dạng hình ảnh */
.suggestion-image {
    width: 40px; /* Kích thước nhỏ cho hình ảnh */
    height: 40px;
    object-fit: cover; /* Đảm bảo hình ảnh không bị méo */
    border-radius: 3px;
}

/* Định dạng thông tin */
.suggestion-info {
    flex-grow: 1;
}

.suggestion-name {
    font-weight: bold;
    color: #007bff; /* Màu xanh cho tên sản phẩm (giống link) */
    white-space: nowrap; /* Ngăn tên bị ngắt dòng */
    overflow: hidden;
    text-overflow: ellipsis; /* Thêm dấu ba chấm nếu quá dài */
}

.suggestion-price {
    color: red;
    font-size: 13px;
}
/* Thêm/Cập nhật vào thẻ <style> hoặc file CSS của bạn */

/* 1. Đảm bảo phần tử cha (right-box) có position: relative */
.right-box {
    position: relative; /* Thêm dòng này nếu chưa có */
    /* ... các style khác của right-box ... */
}

/* 2. Định vị tuyệt đối cho khung gợi ý và đặt z-index cao */
.search-suggestions {
    position: absolute;
    top: 100%; /* Đặt ngay dưới input (100% chiều cao của cha) */
    left: 0;
    width: 250px; /* Điều chỉnh lại chiều rộng phù hợp với input */
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Rất quan trọng: Đảm bảo nó nằm trên các phần tử khác */
    display: none; 
}

/* Thêm/Điều chỉnh style cho ảnh và chữ trong suggestion-item (đã làm ở bước trước) */

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px; 
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333; 
    text-decoration: none; 
}
/* ... (các style khác của suggestion-item, suggestion-image, suggestion-info) ... */
/* menu chính */
.menu {
  list-style: none;
  display: flex;
  gap: 40px;
  margin-left: 0;
  align-items: center;
}

.menu>li {
  position: relative;
}

.menu a {
  white-space: nowrap;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 8px;
  font-size: 15px;
}

.menu a:hover {
  color: #ff9900;
}

/* submenu */
.submenu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  padding: 10px 0;
  min-width: 150px;
  display: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);

}

.submenu li a {
  display: block;
  padding: 8px 15px;
  color: #333;
}

.submenu li a:hover {
  background: #f1f1f1;
  color: #ff9900;
}

.menu li:hover .submenu {
  display: block;
}

/* khối bên phải */
.right-box {
  display: flex;
  align-items: center;
}

.right-box input {
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 5px 10px;
  outline: none;
}

.right-box i {
  font-size: 18px;
  color: #333;
  margin-left: 10px;
}

.right-box i:hover {
  color: #ff9900;
}

/* top right */
.top-right a {
  color: #000;
  text-decoration: none;
  margin: 0 5px;
  font-size: 16px;
  font-weight: 500;
}

.top-right a:hover {
  color: #74C0FC;
}

/* -------------------------------------banner------------- */
nav {
  width: 100%;
  position: relative;
  overflow: hidden; 
  padding: 0; 
  margin-top: 10px; 

  /* ✨ Thay đổi chiều cao tại đây ✨ */
  height: 500px; /* Tăng từ 350px lên 420px */
  border-radius: 10px; 
}

/* Các phần còn lại giữ nguyên để ảnh vẫn hiển thị đúng */
.slider {
  display: flex;
  width: 400%; 
  height: 100%; /* Giữ nguyên 100% để thích ứng với chiều cao mới của nav */
  transition: transform 1s ease; 
}

.slider img {
  width: 25%; 
  height: 100%; /* Giữ nguyên 100% */
  object-fit: cover; 
  border-radius: 10px;
  padding: 10px 20px 20px 20px;
}

/* Nút điều hướng vẫn căn giữa theo chiều cao mới */
.slider-btn {
    top: 50%;
    transform: translateY(-50%);
    /* ... */
}
/* --------------------------------phần dấu <  > */
/* index.css (Thêm vào cuối file) */

/* Đảm bảo nav có position relative để định vị các nút */
nav {
    position: relative;
    overflow: hidden; /* Quan trọng để chỉ hiển thị 1 ảnh */
    /* Các thuộc tính khác của nav nếu có */
}

/* Định vị và tạo kiểu cho các nút */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5); /* Nền tối mờ */
    color: white; /* Màu chữ/icon trắng */
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10; /* Đảm bảo nút nằm trên ảnh */
    opacity: 0.7; /* Làm mờ một chút */
    transition: opacity 0.2s ease, background-color 0.2s ease;
    border-radius: 5px;
}

.slider-btn:hover {
    opacity: 1; /* Sáng hơn khi hover */
    background: rgba(0, 0, 0, 0.7);
}

.prev-btn {
    left: 10px; /* Cách lề trái */
}

.next-btn {
    right: 10px; /* Cách lề phải */
}

/* Kiểu cho icon */
.slider-btn i {
    font-size: 1.5rem;
}

/* Nếu bạn muốn ẩn các nút khi không hover qua nav */
/* nav:hover .slider-btn {
    opacity: 1;
}

.slider-btn {
    opacity: 0;
} */
/* -----------------aside -----------------*/
aside {
  padding: 20px 0;
  align-items: center;
  justify-content: center;
}

main {
  display: flex;
  padding: 20px;

}

/* sidebar bên trái */
.left-menu {
  width: 220px;
  background: #fff;
  padding: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-right: 20px;
  height: fit-content;
  position: sticky;
  top: 100px;
  font-size: medium;
}

.left-menu ul {
  list-style: none;
}

.left-menu li {
  border-bottom: 1px solid #eee;
  padding: 10px 20px;
}

.left-menu li:last-child {
  border-bottom: none;
}

.left-menu input[type="checkbox"] {
  margin-right: 10px;
  vertical-align: middle;
  /* Căn giữa checkbox với nhãn */
}

.left-menu label {
  font-weight: 600;
  color: #333;
  cursor: pointer;
  vertical-align: middle;
  /* Căn giữa nhãn với checkbox */
}

.left-menu label:hover {
  color: #ff9900;
  /* Thêm hiệu ứng hover nếu muốn */
}

/* sản phẩm */
.content {
  flex: 1;
}

article {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Thay đổi thành 4 cột */
  gap: 24px;
}

.product {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.product .image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
  border: 1.5px solid black;
}
.product .image:hover{
  transform: scale(1.1);
}

.product .name {
  margin-top: 12px;
  min-height: 44px;
  font-weight: 700;
  text-align: center;
  font-size: medium;
  font-family: Arial, Helvetica, sans-serif;
}
.product .name:hover{
  color: orangered;
  text-decoration: underline ;
}

.product .price {
  margin-top: 8px;
  font-weight: 700;
  color: #e74c3c;
  text-align: center;
}
.product .price:hover{
  color: red;
}


.product .icon {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.product>.price>del {
  color: grey;
}
button{
  background: #ff6600;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;

}
button:hover{
  background:  #e65c00;
}

/* responsive */
@media (max-width: 1000px) {
  main {
    flex-direction: column;
  }

  .left-menu {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    top: auto;
  }

  article {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  article {
    grid-template-columns: 1fr;
  }

  .product .image {
    height: 200px;
  }
}

/* ================= FOOTER ================= */
.site-footer {
  clear: both;
  background: #222;
  /* nền xám đậm */
  color: #ddd;
  /* chữ xám nhạt */
  padding: 40px 20px 20px;
  font-size: 14px;
  margin-top: 40px;
  width: 100%;
}

.site-footer .footer-container {
  max-width: 1200px;
  /* căn giữa nội dung */
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.footer-column h3 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 16px;
  border-bottom: 2px solid #e63946;
  /* gạch đỏ dưới tiêu đề */
  display: inline-block;
  padding-bottom: 5px;
}

.footer-column p,
.footer-column li,
.footer-column a {
  color: #ddd;
  line-height: 1.6;
  text-decoration: none;
}

.footer-column a:hover {
  color: #e63946;
  /* đỏ khi hover */
}

.footer-logo {
  max-width: 120px;
  margin-bottom: 10px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin: 6px 0;
}

.social-icons a {
  display: inline-block;
  margin-right: 10px;
}

.social-icons img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  transition: 0.3s;
}

.social-icons img:hover {
  background: #e63946;
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 30px;
  border-top: 1px solid #444;
  font-size: 13px;
  color: #aaa;
}