/* nibasa-theme/assets/css/cards.css */
/* Book Card styles for WP template */

.nibasa-book-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(26,77,46,0.13);
    border: 1px solid #e8f2ec;
    transition: transform 0.28s cubic-bezier(.34,1.56,.64,1), box-shadow 0.28s;
    display: flex; flex-direction: column;
    position: relative;
}
.nibasa-book-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 48px rgba(26,77,46,0.18);
}
.book-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--green-dark); color: white;
    font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 40px; z-index: 2;
}
.book-badge.new  { background: #2d7a4f; }
.book-badge.sale { background: #e74c3c; }
.book-badge.hot  { background: #e67e22; }

.nibasa-book-thumb {
    height: 210px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--green-pale);
}
.nibasa-book-thumb img {
    width: 100%; height: 210px; object-fit: cover;
    transition: transform 0.3s;
}
.nibasa-book-card:hover .nibasa-book-thumb img {
    transform: scale(1.05);
}
.nibasa-book-placeholder {
    font-size: 72px;
    background: linear-gradient(135deg, #e8f5ed, #c5e0cf);
}

.book-body { padding: 18px 16px 20px; flex: 1; display: flex; flex-direction: column; }
.book-cat {
    font-size: 11px; font-weight: 600;
    color: var(--green-mid); text-transform: uppercase;
    letter-spacing: 1.2px; margin-bottom: 6px;
}
.book-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px; font-weight: 700;
    color: var(--text-dark); margin-bottom: 10px;
    line-height: 1.35; display: block;
}
.book-title:hover { color: var(--green-mid); }

.book-price-row { margin-bottom: 8px; margin-top: auto; }
.book-price-row .price { font-size: 18px; font-weight: 800; color: var(--green-dark); }
.book-price-row .price del { font-size: 13px; color: #aaa; font-weight: 400; }
.book-price-row .price ins { text-decoration: none; }

.book-rating { margin-bottom: 14px; }
.book-rating .star-rating { font-size: 13px; }

.card-actions { display: flex; gap: 10px; margin-top: 12px; }

/* Animated Cart Button */
.nibasa-btn-cart {
    flex: 1;
    background: var(--cart-color); color: white;
    border: none; padding: 11px 0; border-radius: 8px;
    font-size: 14px; font-weight: 700; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    transition: transform 0.18s, box-shadow 0.18s, background 0.2s;
    cursor: pointer; text-decoration: none;
    animation: cartBtnAnim 2s infinite;
}
.nibasa-btn-cart:hover {
    background: #e05520 !important; color: white !important;
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 6px 18px rgba(255,107,53,0.5) !important;
    animation: none !important;
}
.nibasa-btn-cart i { animation: cartIconBounce 1.8s ease-in-out infinite; }
@keyframes cartBtnAnim {
    0%,100% { box-shadow: 0 3px 12px rgba(255,107,53,0.3); }
    50%      { box-shadow: 0 3px 20px rgba(255,107,53,0.55); }
}

/* Animated Buy Button */
.nibasa-btn-buy {
    flex: 1.2;
    background: var(--buy-color); color: var(--green-dark);
    border: none; padding: 11px 0; border-radius: 8px;
    font-size: 14px; font-weight: 800; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    transition: transform 0.18s, box-shadow 0.18s, background 0.2s;
    cursor: pointer; text-decoration: none;
    position: relative; overflow: hidden;
    animation: buyBtnAnim 2.5s infinite;
}
.nibasa-btn-buy::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left 0.5s;
}
.nibasa-btn-buy:hover::before { left: 150%; }
.nibasa-btn-buy:hover {
    background: var(--buy-dark) !important; color: var(--green-dark) !important;
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 6px 20px rgba(232,184,0,0.5) !important;
    animation: none !important;
}
.nibasa-btn-buy i { animation: buyIconSpin 3s linear infinite; }
@keyframes buyBtnAnim {
    0%,100% { box-shadow: 0 3px 12px rgba(232,184,0,0.3); }
    50%      { box-shadow: 0 3px 22px rgba(232,184,0,0.6); }
}
