* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  background: #f0f0f0;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}


.img-book {
  width: 100%;
  height: 140px;
  margin-bottom: 8px;
}

.img-sale {
  width: 100%;
  height: 150px;
  margin-bottom: 8px;
}

.img-ads {
  width: 100%;
  height: 180px;
}

/* ===========================
   HEADER
=========================== */
#header {
  background: #fff;
}

#header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  height: auto;
  overflow: hidden;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}
#wrapper {
    max-width: 1000px;
    margin: 20px auto;
    border: 3px solid #333;
}

/* ===========================
   NAVBAR
=========================== */
#navbar {
  background: #444;
  max-width: 1000px;
  margin: 0 auto;
}

#navbar ul {
  display: flex;
  justify-content: space-around;
}

#navbar ul li a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

#navbar ul li a:hover,
#navbar ul li:last-child a {
  background: #c0713a;
}

/* ===========================
   MAIN LAYOUT (3 cột)
=========================== */
#main {
  display: flex;
  gap: 10px;
  max-width: 1000px;
  margin: 10px auto;
  align-items: flex-start;
}

/* CỘT TRÁI */
#col-left {
  width: 170px;
  flex-shrink: 0;
}

/* CỘT GIỮA */
#col-center {
  flex: 1;
}

/* CỘT PHẢI */
#col-right {
  width: 170px;
  flex-shrink: 0;
}

/* ===========================
   BOX CHUNG (Loại SP, Hãng, SP KM)
=========================== */
.box {
  background: #fff;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  border-radius: 3px;
  overflow: hidden;
}

.box-title {
  background: #555;
  color: #fff;
  font-weight: bold;
  padding: 8px 10px;
  font-size: 13px;
}

.check-list {
  padding: 8px 10px;
}

.check-list li {
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.check-list li:hover {
  background: #e8e8e8;         
  color: #c0392b;              
  padding-left: 15px;          
  font-weight: bold;   
}

.check-list li:last-child {
  border-bottom: none;

}

/* ===========================
   SP KHUYẾN MÃI (cột trái)
=========================== */
#box-sale .sale-product {
  padding: 8px;
  text-align: center;
}


.sale-price {
  margin: 5px 0;
}

.price-new {
  color: #e00;
  font-weight: bold;
  font-size: 15px;
}

.price-old {
  color: #999;
  text-decoration: line-through;
  font-size: 12px;
  margin-left: 5px;
}

.sale-name {
  font-weight: bold;
  font-size: 12px;
  color: #c0392b;
  text-align: center;
}

/* ===========================
   SECTION SẢN PHẨM (cột giữa)
=========================== */
.product-section {
  background: #fff;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  border-radius: 3px;
  overflow: hidden;
}

.section-title {
  background: #f5f5f5;
  border-bottom: 2px solid #ddd;
  padding: 8px 12px;
  font-weight: bold;
  color: #444;
  font-size: 13px;
}

.product-grid {
  display: flex;
  gap: 10px;
  padding: 12px;
}

.product-card {
  flex: 1;
  text-align: center;
  border: 1px solid #eee;
  border-radius: 3px;
  padding: 8px;
  background: #fafafa;
}

.book-name {
  font-weight: bold;
  color: #c0392b;
  font-size: 13px;
  margin-bottom: 6px;
  min-height: 36px;
}

.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.book-price {
  font-weight: bold;
  color: #333;
  font-size: 13px;
}

.btn-buy {
  background: none;
  color: #555;
  font-size: 12px;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-buy:hover {
  color: #c0392b;
}

/* ===========================
   QUẢNG CÁO (cột phải)
=========================== */
#box-ads .img-ads {
  margin: 8px;
  width: calc(100% - 16px);
}

/* ===========================
   FOOTER
=========================== */
#footer {
  background: #fff;
  border-top: 2px solid #ddd;
  text-align: center;
  padding: 15px;
  color: #555;
  font-size: 13px;
  line-height: 1.8;
  margin-top: 10px;
  clear: both;        
  position: relative; 
  z-index: 1; 
}
/* ===========================
   THANH TÌM KIẾM + GIỎ HÀNG
=========================== */
#search-cart {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  background: #f0f0f0;
  min-height: 90px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* Tìm kiếm */
#search-box {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  overflow: hidden;
  background: #fff;
  flex-direction: row;
  flex-shrink: 0;
}

#search-box input {
  width: 140px;       
  padding: 5px 8px;
  border: none;
  outline: none;
  font-size: 13px;
}

#search-box button {
  background: #504b4b;  
  border: none;
  padding: 5px 8px;     
  color: #fff;
  cursor: pointer;
}

#search-box button:hover {
  background: #333;
}

/* Giỏ hàng */
#cart-box {
  width: 195px;         
  height: 84px;         
  background-image: url('cart_bg.gif');  
  background-size: cover;
  background-color: #e0dada; 
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid #ccc;
  flex-direction: row;
  flex-shrink: 0;
}

#cart-info {
  line-height: 1.6;
}

#cart-title {
  color: #847676;       
  font-weight: bold;
  font-size: 13px;
}

#cart-count {
  color: #847676;
  font-size: 12px;
}

#cart-divider {
  color: #847676;
  font-size: 11px;
}

#cart-total {
  color: #F00;          
  font-weight: bold;
  font-size: 13px;
}

#cart-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}