.book-section {
  padding: 30px 15px;
  background-color: #f9f9f9;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.section-title {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #343a40;
  border-bottom: 2px solid #28a745;
  display: inline-block;
  padding-bottom: 8px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* Updated book-card */
.book-card {
  background: #fff;
  border: 1px solid #28a745;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 128, 0, 0.1);
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-5px);
}

/* Image section */
.book-image {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff; /* remove any gray background */
}

.book-image img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Info section */
.book-info {
  padding: 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-title {
  font-size: 15px;
  font-weight: 600;
  color: #212529;
  margin: 5px 0;
  height: 38px;
  overflow: hidden;
  text-align: center;
}

.book-title-link {
  text-decoration: none;
}

.book-title-link:hover h3 {
  color: #28a745;
}

/* Price line */
.book-price-line {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.book-price-line .original-price {
  text-decoration: line-through;
  color: #dc3545;
  font-size: 13px;
}

.book-price-line .discounted-price {
  font-weight: bold;
  color: #28a745;
  font-size: 13px;
}

/* Author & Publisher */
.book-author,
.book-publisher {
  font-size: 13px;
  color: #6c757d;
  margin: 3px 0;
  text-align: center;
}

/* Action buttons */
.book-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.book-actions a {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn-cart {
  background-color: #fff;
  color: #28a745;
  border: 1px solid #28a745;
}

.btn-cart:hover {
  background-color: #28a745;
  color: #fff;
}

.btn-order {
  background-color: #28a745;
  color: #fff;
  border: 1px solid transparent;
}

.btn-order:hover {
  background-color: #218838;
}

/* Responsive Grid */
@media (min-width: 769px) and (max-width: 1024px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .book-grid {
    grid-template-columns: 1fr;
  }
}
#cart-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: rgba(25, 135, 84, 0.95);
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 4px;
  max-width: 250px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: none;
  z-index: 9999;
  transition: all 0.3s ease;
  word-wrap: break-word;
}