/* =====================================================================
   Book card — used in sliders, grids, related books and wishlist
   ===================================================================== */
.book-card { position: relative; display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid #eeeef3; border-radius: 18px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(17, 17, 44, .28); border-color: #ffd9d3; }

/* Cover area */
.book-card-media { position: relative; padding: 26px 22px 18px; background: linear-gradient(160deg, #fff5f3 0%, #fdeceb 55%, #f8e4e2 100%); }
.book-card-cover { display: block; width: 62%; max-width: 170px; margin: 0 auto; perspective: 800px; }
.book-card-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 8px 8px 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, -3px 0 0 rgba(0,0,0,.08) inset, 0 14px 24px -10px rgba(17, 17, 44, .45), 0 4px 8px -4px rgba(17, 17, 44, .25);
  transition: transform .35s ease; transform-origin: left center; }
.book-card:hover .book-card-cover img { transform: rotateY(-8deg) scale(1.03); }
.book-card.is-soldout .book-card-cover img { filter: grayscale(.65); opacity: .8; }

/* Badges */
.book-card-badges { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 2; }
.bc-badge { font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 1; padding: 6px 9px; border-radius: 8px; color: #fff; }
.bc-badge.sale { background: var(--theme); }
.bc-badge.hot { background: var(--header); }
.bc-badge.new { background: #1f8a5b; }
.bc-badge.soldout { background: #6b6b78; }

/* Wishlist + quick view */
.bc-wish { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--header);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(17, 17, 44, .12); transition: transform .2s, color .2s, background .2s; }
.bc-wish:hover { transform: scale(1.08); color: var(--theme); }
.bc-wish.active { color: #fff; background: var(--theme); }
.bc-wish.active i { color: #fff !important; }
.bc-quick { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 8px); opacity: 0; z-index: 2; white-space: nowrap; background: rgba(17, 17, 44, .88); color: #fff; font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 100px; transition: opacity .2s, transform .2s; }
.bc-quick:hover { color: #fff; background: var(--header); }
.book-card:hover .bc-quick, .bc-quick:focus { opacity: 1; transform: translate(-50%, 0); }

/* Body */
.book-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.bc-cat { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c6493a; margin-bottom: 6px; }
.bc-cat:hover { color: var(--theme); }
.bc-title { font-size: 17px; line-height: 1.35; font-weight: 700; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.bc-title a { color: var(--header); }
.bc-title a:hover { color: var(--theme); }
.bc-author { font-size: 13px; color: var(--text); margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-author a { color: var(--header); font-weight: 500; }
.bc-author a:hover { color: var(--theme); }
.bc-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.bc-stars { display: inline-flex; gap: 1px; }
.bc-stars i { font-size: 12px; color: #FFB800; }
.bc-stars i.fa-regular { color: #d9d9e0; }
.bc-reviews { font-size: 12px; color: var(--text); }

.bc-bottom { margin-top: auto; }
.bc-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 4px; }
.bc-price strong { font-size: 20px; font-weight: 800; color: var(--header); letter-spacing: -.01em; }
.bc-price del { font-size: 14px; color: #9a9aa6; }
.bc-save { font-size: 11px; font-weight: 700; color: #1d7a45; background: #e5f5ec; padding: 3px 7px; border-radius: 6px; }
.bc-stock { font-size: 12px; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.bc-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.bc-stock.in { color: #1d7a45; }
.bc-stock.low { color: #b26a00; }
.bc-stock.out { color: #9a9aa6; }

.book-card form { margin: 0; }
.bc-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 1.5px solid var(--theme); background: #fff; color: #c6493a;
  font-size: 14px; font-weight: 700; padding: 11px 14px; border-radius: 12px; transition: background .2s, color .2s, box-shadow .2s; cursor: pointer; }
.bc-btn:hover, .book-card:hover .bc-btn:not(.ghost) { background: var(--theme); color: #fff; box-shadow: 0 8px 18px -8px rgba(255, 123, 107, .8); }
.bc-btn.ghost { border-color: var(--border); color: var(--header); }
.bc-btn.ghost:hover { border-color: var(--header); background: var(--header); color: #fff; }
.bc-btn.is-loading { opacity: .7; pointer-events: none; }

/* Layout helpers */
.swiper-slide:has(> .book-card) { height: auto; }
.book-slider .swiper-slide { height: auto; padding-bottom: 6px; }
.book-shop-wrapper { align-items: stretch; }
.book-grid > [class*="col-"] { margin-bottom: 24px; }

@media (max-width: 575px) {
  .book-card-media { padding: 20px 16px 14px; }
  .book-card-body { padding: 14px; }
  .bc-title { font-size: 15px; }
  .bc-price strong { font-size: 18px; }
  .bc-quick { display: none; }
}
@media (hover: none) { .bc-quick { display: none; } }
