<style>
/* ===== Sidebar ===== */
/* ===== Sidebar ===== */
.sidebar {
  background: #f0f4f8;
  border-radius: 0.5rem;
  padding: 1rem;
}

.sidebar-title {
  font-weight: bold;
  margin-bottom: 1rem;
  color: #007bff;
}

.sidebar-list li a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  color: #333;
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar-list li:hover a,
.sidebar-list li.active a {
  background-color: #007bff;
  color: #fff;
  font-weight: 600;
}

.sidebar-list {
  list-style: none; /* ✅ bỏ dấu chấm đầu dòng */
  padding-left: 0;
  margin: 0;
}

/* ===== Book Grid ===== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.book-item {
  position: relative;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.book-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ===== Book Image ===== */
.book-img {
  position: relative;
  width: 100%;
  padding-top: 140%;
  overflow: hidden;
  border-bottom: 1px solid #e0e0e0;
  background: #fefefe;
}

.book-img img {
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.book-img:hover img {
  transform: scale(1.05);
}

/* Overlay + nút xem chi tiết */
.overlay {
  position: absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s;
}

.book-img:hover .overlay {
  opacity: 1;
}

.btn-view {
  background: #ffca28;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-view:hover {
  background: #ffc107;
  transform: translateY(-2px);
}

/* ===== Book Info ===== */
.book-info {
  padding: 0.5rem 0.75rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-info h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.book-info .author {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0.2rem;
}

.book-info .category {
  font-size: 0.8rem;
  font-style: italic;
  color: #17a2b8;
  margin-bottom: 0.3rem;
}

.book-info .price {
  font-weight: bold;
  color: #dc3545;
  margin-top: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    top:0;
    margin-bottom: 1.5rem;
  }
  .book-img {
    padding-top: 150%;
  }
}


</style>
