/* Phan dau trang */
.header {
  height: 120px;
  background-color: #2C2C2C;
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: white;
  flex-wrap: nowrap;
}

/* Logo */
.header_nav {
  padding-left: 0;
}

/* Lien ket dang nhap/dang ky */
.top-right-auth {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 12px;
  display: flex;
  gap: 10px;
}
.auth-link {
  color: white;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.auth-link:hover {
  background-color: red;
  font-weight: bold;
}

/* Cac muc dieu huong */
.item {
  display: inline-block;
  margin: 0 8px;
  padding: 8px 10px;
  font-size: 20px;
  white-space: nowrap;
}
.item a {
  text-decoration: none;
  color: white;
}

/* Danh sach dieu huong chinh */
.nav_list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 20px;
  padding-right: 20px;
  flex-wrap: nowrap;
}

/* Danh sach menu chinh */
.list1 {
  list-style: none;
  display: flex;
  gap: 5px;
}

/* Danh sach menu phu (gio hang) */
.list2 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  margin-left: -10px;
  padding: 0 20px;
  padding-top: 15px;
  height: 100%;
}
.list2 .item {
  padding-top: 45px;
  padding-right: 10px;
}

/* Icon tim kiem */
.search-icon {
  margin-left: 10px;
  height: 20px;
  width: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Thanh tim kiem */
.search-bar-box {
  flex: 1;
  height: 100%;
  position: relative;
}
.search {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 5px;
  padding: 5px 15px;
  margin-left: 20px;
  width: 250px;
}
.search-bar {
  width: 100%;
  border: none;
  outline: none;
  background-color: transparent;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 0;
}

/* Lich su tim kiem */
.search-bar:focus ~ .search-bar-history {
  display: block;
}
.search-bar-history {
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 5px;
  background-color: rgb(212, 207, 207);
  border-radius: 5px;
  display: none;
  z-index: 9999;
}
.search-bar-histor-list {
  list-style: none;
  padding-left: 10px;
}
.search-bar-histor-head {
  color: rgb(237, 231, 231);
  padding-left: 10px;
}
.search-bar-histor-item {
  margin-top: 7px;
  font-size: 20px;
}
.search-bar-histor-item a {
  text-decoration: none;
  color: black;
}
.search-bar-histor-item:hover {
  background-color: #fafafa;
}
.search-bar-histor-item:last-child {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

/* Hover va trang thai duoc chon cua menu */
.nav_list .list1 .item:hover {
  background-color: red;
  color: black;
  font-weight: bold;
  border-radius: 5px;
}
.nav_list .list1 .item.selected,
.nav_list .list2 .item.selected {
  background-color: red;
  color: white;
  font-weight: bold;
  border-radius: 5px;
}

/* Container chinh */
.container {
  padding: 0;
  background-color: #e0e0e0;
}

/* Banner slideshow */
.slideshow-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  margin: 0 auto;
  position: relative;
  width: 100%;
  max-width: 1300px;
}
.hinh {
  width: 100%;  
  height: auto;
  max-height: 350px;
  object-fit: cover;
}

/* Nut dieu huong banner */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 12px;
  color: white;
  font-weight: bold;
  font-size: 16px;
  transition: 0.6s ease;
  user-select: none;
  background-color: red;
  z-index: 10;
  border-radius: 20px;
}
.prev {
  left: 0;
}
.next {
  right: 0;
}
.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Cham dieu huong banner */
.dot {
  display: inline-block;
  border-radius: 100%;
  width: 15px;
  height: 15px;
  background-color: #999;
  cursor: pointer;
  margin: 0 5px;
}
.dot:hover {
  background-color: #555;
}
.dot.active {
  background-color: #555;
}

/* Phan san pham */
.product-section {
  padding: 0 110px;
}
.product-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: red;
}
.product-list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.product-title {
  height: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card {
  width: 270px;
  background-color: white;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.product-img {
  width: 100%;
  height: 200px;
  margin-bottom: 10px;
  object-fit: cover;
}

/* Phan san pham giam gia */
.discount-section {
  margin-top: 40px;
  padding: 0 110px;
}
.discount-section h2 {
  font-size: 24px;
  color: red;
  margin-bottom: 20px;
}
.product-card del {
  color: #888;
  margin-right: 10px;
}
.product-card strong {
  color: #e74c3c;
}

/* Trang dang nhap/dang ky */
.auth-container {
  max-width: 500px;
  margin: 60px auto;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.auth-container h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #333;
}
.auth-container p {
  font-size: 16px;
  color: #666;
}
.auth-container input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.auth-container button {
  width: 100%;
  padding: 12px;
  background-color: #2C2C2C;
  color: white;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  border-radius: 4px;
  font-weight: bold;
}
.auth-container button:hover {
  background-color: #444;
}
.auth-container .back-home {
  text-align: center;
  margin-top: 20px;
}
.auth-container .back-home a {
  color: #2C2C2C;
  text-decoration: none;
  font-weight: bold;
}
.auth-container .back-home a:hover {
  text-decoration: underline;
}

/* Chi tiet san pham */
.product-detail-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  font-family: 'Arial', sans-serif;
}
.product-title a {
  text-decoration: none;
  color: black;
}
.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}
.product-image {
  position: relative;
}
.product-image img {
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
}
.discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: orange;
  color: white;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
}
.product-info h1 {
  font-size: 28px;
  margin-bottom: 10px;
}
.product-info p {
  font-size: 20px;
  margin: 10px 0;
}
.product-info del {
  color: #888;
  margin-right: 10px;
}
.product-info ul {
  padding-left: 20px;
  margin: 15px 0;
}
.product-info ul li {
  margin-bottom: 8px;
  line-height: 1.5;
}
.buy-section {
  margin-top: 20px;
}
.buy-section label {
  font-weight: bold;
  margin-right: 10px;
}
.buy-section img {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-right: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.buy-section img:hover {
  transform: scale(1.1);
}
.quantity {
  margin: 20px 0;
  display: flex;
  align-items: center;
}
.quantity button {
  padding: 8px 12px;
  font-size: 18px;
  background-color: #eee;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: background 0.2s ease;
}
.quantity button:hover {
  background-color: #ddd;
}
.quantity input {
  width: 60px;
  text-align: center;
  font-size: 16px;
  margin: 0 10px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.buy-button {
  padding: 12px 30px;
  background-color: #fbd024;
  color: #000;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.buy-button:hover {
  background-color: #f9c700;
}

/* Phan uu dai */
h1 {
  text-align: center;
  color: #d42e2e;
  margin-bottom: 30px;
}
.discount-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.discount-card {
  background: #fff8f0;
  border: 2px dashed #f7a500;
  border-radius: 10px;
  padding: 20px;
  width: 280px;
  text-align: center;
  transition: transform 0.3s ease;
}
.discount-card:hover {
  transform: scale(1.05);
}
.discount-card h3 {
  margin: 0;
  font-size: 24px;
  color: #f57c00;
}
.discount-card p {
  margin: 10px 0;
}
.code {
  font-weight: bold;
  color: #d32f2f;
}
.special {
  background: #ffe4ec;
  border-color: #e91e63;
}
.special h3 {
  color: #e91e63;
}
.note {
  font-size: 0.9em;
  color: #666;
}
.container2 {
  max-width: 960px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Wrapper chinh */
.main-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Nut menu di dong */
.mobile-menu-toggle {
  display: none;
  font-size: 28px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
}

/* Chan trang */
.footer {
  background-color: #2C2C2C;
  color: white;
  padding: 40px 30px 20px;
  font-size: 14px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-section {
  flex: 1;
  min-width: 200px;
}
.footer-section h3,
.footer-section h4 {
  margin-bottom: 10px;
  color: #FFD700;
}
.footer-section p,
.footer-section ul,
.footer-section a {
  margin: 5px 0;
  color: white;
  text-decoration: none;
}
.footer-section a:hover {
  text-decoration: underline;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid #555;
  padding-top: 10px;
  margin-top: 20px;
}
.social-icons a {
  margin-right: 10px;
  display: inline-block;
}

/* Responsive cho man hinh nho */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    height: auto;
    padding: 10px 15px;
    position: relative;
  }
  .mobile-menu-toggle {
    display: block;
    align-self: flex-end;
  }
  .nav_list {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #2C2C2C;
    padding: 15px 0;
    border-radius: 0 0 8px 8px;
    margin-top: 10px;
  }
  .nav_list.active {
    display: flex;
  }
  .list1 {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .list1 .item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  .list1 .item:hover {
    background-color: red;
    color: black;
    font-weight: bold;
    border-radius: 0;
  }
  .list2 {
    display: none;
  }
  .search-bar-history {
    display: none !important;
  }
  .search {
    width: 100%;
    margin: 10px 0 0 0;
    padding: 5px 15px;
  }
  .top-right-auth {
    position: static;
    justify-content: center;
    margin-top: 10px;
    gap: 15px;
  }
  .slideshow-container {
    width: 100%;
    padding: 0 10px;
  }
  .hinh {
    max-height: 200px;
  }
  .prev,
  .next {
    padding: 8px;
    font-size: 14px;
  }
  .dot {
    width: 12px;
    height: 12px;
    margin: 0 4px;
  }
  .product-section,
  .discount-section {
    padding: 0 20px;
  }
  .product-card {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hinh {
    max-height: 150px;
  }
  .prev,
  .next {
    padding: 6px;
    font-size: 12px;
  }
  .dot {
    width: 10px;
    height: 10px;
    margin: 0 3px;
  }
  .product-section h2,
  .discount-section h2 {
    font-size: 20px;
  }
}