/* =====================================
   BOOK CARD COMPONENT
   For use with Carousel
   ===================================== */
.book-card {
  background: var(--color-surface-bg, #FFFFFF);
  border-radius: var(--border-radius, 8px);
  overflow: hidden;
  box-shadow: var(--shadow, 0 4px 12px rgba(44, 40, 37, 0.08));
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover, 0 8px 24px rgba(44, 40, 37, 0.12));
}
.book-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
/* Image Container */
.book-card-image {
  position: relative;
  width: 100%;
  padding-top: 140%;
  /* 10:14 aspect ratio for book covers */
  overflow: hidden;
  background: var(--color-background, #F5F3F0);
}
.book-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.book-card:hover .book-card-image img {
  transform: scale(1.05);
}
/* Badge */
.book-card-image .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.badge-new {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  color: white;
}
.badge-hot {
  background: linear-gradient(135deg, #FFD93D 0%, #FFB800 100%);
  color: #2C2825;
}
.badge-recommend {
  background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
  color: white;
}
/* Body */
.book-card-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.book-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-primary, #2C2825);
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
  /* 2 lines minimum */
}
/* Meta Information */
.book-meta {
  font-size: 14px;
  color: var(--color-text-secondary, #6B645D);
  margin-bottom: 12px;
}
.book-pages {
  display: inline-block;
}
/* Footer */
.book-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--color-border, #EAE7E2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.book-price-wrapper {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.book-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary-main, #29336B);
}
/* Add to Cart Button */
.btn-add-cart {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary-main, #29336B);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn-add-cart::before {
  transition: transform 0.3s ease;
}
.btn-add-cart:hover {
  background: var(--color-primary-light, #4B558C);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(41, 51, 107, 0.3);
}
.btn-add-cart:active {
  transform: scale(0.95);
}
.btn-add-cart.added {
  animation: cart-bounce 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes cart-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
/* Responsive */
@media (max-width: 768px) {
  .book-card-body {
    padding: 12px;
  }
  .book-title {
    font-size: 14px;
    min-height: 40px;
  }
  .book-meta {
    font-size: 13px;
  }
  .book-price {
    font-size: 16px;
  }
}