/* Book Card Component Styles - Dùng chung cho tất cả các trang */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s;
    cursor: pointer;
    border: 1px solid #f1f5f9;
    position: relative;
    height: 100%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border-color: #f59e0b;
}

.book-image {
    width: 100%;
    height: 350px;
    min-height: 350px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

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

.book-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
}

.book-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.badge-sale {
    background: #ef4444;
}

.badge-new {
    background: #10b981;
}

.badge-hot {
    background: #f59e0b;
}

.book-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.book-title {
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-weight: 700;
    min-height: 3rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-title a {
    color: #0f172a;
    text-decoration: none;
}

.book-title a:hover {
    color: #f59e0b;
}

.book-author {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    min-height: 1.5rem;
}

.book-meta {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.book-meta small {
    color: #94a3b8;
}

.rating {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.star {
    color: #fbbf24;
    font-size: 0.9rem;
}

.book-price {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
    align-items: flex-start;
    text-align: left;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.5rem;
    color: #ef4444;
    font-weight: 800;
    line-height: 1.2;
}

.price-old {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.2;
}

.discount-tag {
    background: #fee2e2;
    color: #ef4444;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
}

.add-to-cart-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.add-to-cart-icon:hover:not(:disabled) {
    background: #f59e0b;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.add-to-cart-icon:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-to-cart-icon:active:not(:disabled) {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 1200px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .book-image {
        height: 280px;
    }
    
    .book-card {
        min-height: 550px;
    }
}

