/* Layout 3 cột chính */
.book-container {
  width: 90%;
  margin: 30px auto;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.book-col {
  background: #fff;
  display: flex;
  flex-direction: column;
}

.book-col.left {
  flex: 1;
  min-width: 280px;
}

.book-col.left img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid #eee;
}

.book-col.center {
  flex: 2;
  min-width: 300px;
  justify-content: flex-start;
  line-height: 1.8;
}

.book-col.center h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.book-col.center p {
  margin: 4px 0;
  font-size: 15px;
}

.book-col.center .price {
  font-size: 22px;
  color: red;
  font-weight: bold;
}

.book-col.center .price del {
  color: #888;
  margin-left: 10px;
  font-size: 15px;
}

.quantity {
  display: flex;
  align-items: center;
  margin: 15px 0;
  gap: 5px;
}

.quantity button {
  padding: 5px 12px;
  font-size: 16px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  cursor: pointer;
}

.quantity input {
  width: 50px;
  text-align: center;
  font-size: 16px;
  padding: 4px;
  border: 1px solid #ccc;
}

.book-buttons {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.btn-cart,
.btn-buy {
  padding: 10px 20px;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

.btn-cart {
  background-color: orange;
  color: white;
}

.btn-buy {
  background-color: #333;
  color: white;
}

.book-col.right {
  flex: 1;
  min-width: 250px;
  background: #f8f8f8;
  padding: 15px;
  border-radius: 6px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: flex-start;
}

.book-col.right h4 {
  font-size: 16px;
  margin-bottom: 10px;
  border-bottom: 2px solid orange;
  padding-bottom: 6px;
}

.book-col.right ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.book-col.right li {
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.book-col.right li img.icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.featured .item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.featured .item img {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border: 1px solid #ccc;
}

.featured .item p {
  margin: 0;
  font-size: 14px;
}

.featured .item .price {
  color: red;
  font-weight: bold;
}

.featured .item del {
  color: #888;
  font-size: 13px;
}

/* Mô tả + sidebar nổi bật */
.book-detail-bottom {
  width: 90%;
  margin: 40px auto;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.book-description {
  flex: 7;
  min-width: 300px;
  line-height: 1.8;
}

/* Sản phẩm liên quan */
.related-products {
  width: 90%;
  margin: 40px auto;
}

.related-products h2 {
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
}

.related-products .list-product {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-left: 30px;
}

.related-products .item {
  width: 150px;
  text-align: center;
}

.related-products .item img {
  width: 130px;
  height: 196.06px;
  object-fit: cover;
  border-radius: 4px;
}
/* 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;
}

/* 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;
}

/* 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-content,
  #banner-content,
  .book-container,
  .book-detail-bottom,
  .related-products .list-product,
  .book-buttons,
  .subscribe,
  .keywords {
    flex-direction: column;
    align-items: center;
  }

  .book-col.left,
  .book-col.center,
  .book-col.right,
  .book-description,
  .related-products .item,
  .subscribe input,
  .subscribe button,
  .btn-cart,
  .btn-buy {
    width: 100%;
  }

  .search-box {
    width: 100%;
    margin: 10px 0;
  }

  .featured .item {
    flex-direction: row;
  }

  .related-products .item img {
    width: 100%;
    height: auto;
  }
}

/* Tablet: min-width 768px and max-width 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .book-container,
  .book-detail-bottom,
  .footer-middle,
  .related-products .list-product {
    flex-direction: column;
    gap: 25px;
  }

  .book-col.left,
  .book-col.center,
  .book-col.right,
  .book-description,
  .footer-col,
  .related-products .item {
    width: 100%;
  }

  .featured .item {
    flex-direction: row;
  }

  .subscribe {
    flex-direction: column;
    align-items: center;
  }

  .subscribe input,
  .subscribe button {
    width: 100%;
  }

  .footer-bottom {
    padding-top: 15px;
  }
}

/* Desktop: min-width 1024px */
@media (min-width: 1024px) {
  .book-container,
  .book-detail-bottom,
  .related-products .list-product,
  .footer-middle {
    flex-direction: row;
    gap: 30px;
  }

  .book-col.left,
  .book-col.center,
  .book-col.right,
  .book-description,
  .footer-col,
  .related-products .item {
    width: auto;
  }

  .featured .item {
    flex-direction: column;
  }

  .footer-bottom {
    padding-top: 20px;
  }
}
