/* Reset some default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  line-height: 1.6;
}

#top {
  color: #fff;
  background-color: #417505;
  width: 100%;
  height: 48px;
}

#top-content {
  width: 80%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  line-height: 48px;
}

#top-left span {
  margin-right: 20px;
  display: inline-flex;
  align-items: center;
}

#top-left img {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

#top-right a {
  color: white;
  text-decoration: none;
  margin-left: 10px;
}

/* ------------------ Banner ------------------ */
#banner {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#banner-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#logo img {
  height: 90px;
  cursor: pointer;
}

.search-box {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 5px;
  overflow: hidden;
  height: 40px;
  flex: 1;
  margin: 0 30px;
}

.search-box input {
  flex: 1;
  padding: 0 10px;
  border: none;
  outline: none;
  font-size: 14px;
}

.search-box button {
  background-color: black;
  color: white;
  border: none;
  padding: 0 20px;
  cursor: pointer;
  font-weight: bold;
}

#cart a {
  background-color: orange;
  padding: 8px 16px;
  border-radius: 14px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.cart-icon {
  height: 20px;
  width: 20px;
  object-fit: contain;
}

/* ------------------ Menu ------------------ */
#menu {
  width: 100%;
  height: 48px;
  background-color: #7f886a;
}

#menu-content {
  width: 80%;
  margin: auto;
  height: 100%;
  display: block;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul li {
  float: left;
  line-height: 48px;
  position: relative;
}

ul li a {
  color: white;
  text-decoration: none;
  padding: 0 15px;
  display: block;
  line-height: 48px;
}

ul li ul {
  display: none;
  position: absolute;
  top: 48px;
  left: 0;
  background-color: white;
  width: 180px;
  z-index: 999;
}

ul li:hover ul {
  display: block;
}

ul li ul li {
  float: none;
}

ul li ul li a {
  color: #000;
  border: 1px solid #ccc;
}

ul li a:hover {
  background-color: rgb(161, 158, 153);
  color: white;
}

/* ------------------ Product Section ------------------ */
#product-section {
  width: 80%;
  margin: 20px auto;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Sidebar bên trái */
.sidebar {
  width: 25%;
  border: 1px solid #ccc;
  background-color: white;
}

.sidebar h4 {
  background-color: #b64533;
  color: white;
  text-align: center;
  margin: 0;
  padding: 12px;
  font-size: 18pt;
}
/* CHỈ menu mới float */
#menu-content > li {
  float: left;
}

/* Sidebar reset */
.sidebar li {
  float: none;
}

.arrow-icon {
  height: 12px;
  margin-right: 6px;
  vertical-align: middle;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  border-bottom: 1px solid #ddd;
}

.sidebar li a {
  display: block;
  color: #000;
  text-decoration: none;
  font-size: 16px;
  padding-left: 10px;
  box-sizing: border-box;
}

.sidebar li a:hover,
.sidebar li a.active {
  background-color: rgb(142, 139, 135);
  color: white;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 20px auto;
  display: flex;
  justify-content: space-between;
}

/* Left Column */
.left-column {
  flex: 0 0 70%;
}

.news-item {
  display: flex;
  margin-bottom: 20px;
}

.news-item img {
  width: 150px;
  height: 150px;
  margin-right: 20px;
  object-fit: cover;
}

.news-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.news-content p {
  font-size: 14px;
  margin-bottom: 10px;
}

.news-content a {
  color: #e57200;
  text-decoration: none;
  font-weight: bold;
}

.news-item:hover {
  background-color: #f1f1f1;
}

/* Right Column */
.right-column {
  flex: 0 0 28%;
}

.latest-posts h3,
.new-books h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.latest-posts ul,
.new-books ul {
  list-style: none;
}

.latest-posts li,
.new-books li {
  margin-bottom: 10px;
}

.latest-posts li a,
.new-books li a {
  font-size: 16px;
  text-decoration: none;
  color: #333;
}

.latest-posts li a:hover,
.new-books li a:hover {
  color: #ffffff;
}

.latest-posts img,
.new-books img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  margin-left: 10px;
}

/* Vùng top: Đăng ký email */
.footer-top {
  background-color: #f7941e;
  color: white;
  padding: 20px;
  text-align: center;
}

.footer-top h3 {
  margin: 0;
  font-size: 20px;
}

.footer-top p {
  margin: 5px 0 15px;
}

.subscribe {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subscribe input {
  width: 300px;
  padding: 8px;
  border: none;
  border-radius: 4px;
}

.subscribe button {
  background-color: white;
  color: #f7941e;
  font-weight: bold;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}
/* Toàn bộ vùng footer */
#footer {
  background-color: white; /* màu be trắng */
  font-family: "Montserrat", sans-serif;
  color: #333;
  font-size: 14px;
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
/* Container giữa để căn giữa nội dung footer */
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  box-sizing: border-box;
}

/* Footer middle: các cột */
.footer-middle {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 30px 0;
}

.footer-col {
  flex: 1;
  min-width: 160px;
  line-height: 1.8;
}

.footer-col h4 {
  font-size: 15px;
  margin-bottom: 10px;
  color: black;
}

.footer-col p {
  margin: 5px 0;
  color: #666;
  cursor: pointer;
}

.footer-col img {
  height: 30px;
  margin: 5px 5px 0 0;
  vertical-align: middle;
}

/* Bottom: các từ khóa tìm kiếm */
.footer-bottom {
  padding-top: 20px;
  line-height: 1.8;
}

.footer-bottom h4 {
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: bold;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: #666;
}

/* Mobile: max-width 768px */
@media (max-width: 768px) {
  #top-left {
    display: none;
  }

  /* Giữ lại top-right */
  #top-content {
    justify-content: flex-end;
    padding: 0 10px;
  }

  /* Ẩn ô tìm kiếm */
  .search-box {
    display: none;
  }

  /* Căn chỉnh logo và cart gần nhau */
  #banner-content {
    justify-content: space-between;
  }

  #logo img {
    height: 70px; /* Thu nhỏ logo cho mobile */
  }
  #top-content,
  #banner-content,
  #menu-content {
    flex-direction: column;
  }
  #top-content {
    height: auto;
    line-height: 1.6;
  }

  .search-box {
    flex-direction: column;
    height: auto;
    margin: 10px 0;
  }

  .search-box input,
  .search-box button {
    width: 100%;
    margin-top: 5px;
  }

  #cart a {
    justify-content: center;
  }

  #menu-content ul {
    flex-direction: column;
  }
  .container {
    flex-direction: column;
    padding: 30px;
  }

  .left-column,
  .right-column {
    flex: 0 0 100%;
  }

  .news-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-item img {
    margin-bottom: 10px;
  }

  .footer-container {
    flex-direction: column;
  }

  .footer-col {
    margin-bottom: 20px;
  }

  .subscribe input {
    width: 100%;
  }

  .subscribe button {
    width: 100%;
  }
}
