.books-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 32px;
  background: linear-gradient(135deg, #f8f4f0 0%, #ffffff 100%);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(180, 136, 42, 0.12);
  margin-top: 140px;
  position: relative;
  overflow: hidden;
}

.books-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e2c275 0%, #b4882a 50%, #e2c275 100%);
}

.books-title {
  text-align: center;
  font-size: 2.5rem;
  color: #8b6914;
  font-family: 'Cinzel', serif;
  margin-bottom: 40px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(180, 136, 42, 0.1);
  position: relative;
}

.books-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #e2c275 0%, #b4882a 100%);
  border-radius: 2px;
}

.books-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

/* Enhanced Book Card */
.book-card {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 4px 16px rgba(180, 136, 42, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  min-width: 280px;
  max-width: 320px;
  min-height: 380px;
}

.book-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(226, 194, 117, 0.1) 0%, rgba(180, 136, 42, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(180, 136, 42, 0.2);
  border-color: #e2c275;
}

.book-card:hover::before {
  opacity: 1;
}

.book-image-wrap {
  background: linear-gradient(135deg, #faf7f1 0%, #f8f4f0 100%);
  padding: 24px 0 16px 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.book-image {
  width: auto;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #e2c275;
  box-shadow: 0 8px 24px rgba(180, 136, 42, 0.15);
  transition: transform 0.3s ease;
}

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

.book-info {
  padding: 24px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;
  justify-content: space-between;
}

.book-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #6b4e1a;
  margin-bottom: 12px;
  text-align: left;
  font-family: 'Cinzel', serif;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-price {
  font-size: 1.5rem;
  color: #2e7d32;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(46, 125, 50, 0.1);
}

.book-card-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.add-to-cart-form {
  flex-shrink: 0;
}

.add-to-cart-btn {
  background: linear-gradient(135deg, #e2c275 0%, #b4882a 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(180, 136, 42, 0.3);
  padding: 12px 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #b4882a 0%, #8b6914 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(180, 136, 42, 0.4);
}

.add-to-cart-btn:hover::before {
  width: 100%;
  height: 100%;
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.view-details-btn {
  background: #fff;
  color: #b4882a;
  border: 2px solid #e2c275;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  padding: 12px 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(180, 136, 42, 0.1);
  flex-grow: 1;
  text-align: center;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.view-details-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(180, 136, 42, 0.1), transparent);
  transition: left 0.5s ease;
}

.view-details-btn:hover {
  background: #b4882a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(180, 136, 42, 0.25);
}

.view-details-btn:hover::before {
  left: 100%;
}

/* Cart Section Enhancement */
.cart-section {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.cart-section a {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, #b4882a 0%, #8b6914 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(180, 136, 42, 0.3);
  position: relative;
  overflow: hidden;
}

.cart-section a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cart-section a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(180, 136, 42, 0.4);
}

.cart-section a:hover::before {
  left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .books-container {
    padding: 20px;
    margin: 20px 16px;
    margin-top: 140px;
  }
  
  .books-title {
    font-size: 2rem;
    margin-bottom: 32px;
  }
  
  .books-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
  }
  
  .book-card {
    min-width: 260px;
    max-width: 280px;
    min-height: 350px;
  }
  
  .book-image {
    width: 110px;
    height: 150px;
  }
  
  .book-info {
    padding: 20px 16px 16px 16px;
  }
  
  .book-title {
    font-size: 1.2rem;
  }
  
  .book-price {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .books-container {
    padding: 16px;
    margin: 16px 12px;
    margin-top: 140px;
  }
  
  .books-title {
    font-size: 1.8rem;
  }
  
  .books-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .book-card {
    min-width: auto;
    max-width: none;
  }
  
  .book-card-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .add-to-cart-btn {
    width: 100%;
  }
  
  .view-details-btn {
    width: 100%;
  }
  
  .cart-section a {
    padding: 14px 32px;
    font-size: 1.1rem;
  }
}