/* ========================================
   ADVANCED UI FEATURES FOR BOOKS PAGE
   ======================================== */

/* 1. Category Badge */
.book-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 2. Availability Indicator */
.book-availability {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.availability-dot.available {
    background: #28a745;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.6);
}

.availability-dot.rented {
    background: #dc3545;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
}

.availability-text {
    font-weight: 600;
    color: #6c757d;
}

.availability-text.available {
    color: #28a745;
}

.availability-text.rented {
    color: #dc3545;
}

/* 3. Quick View on Hover */
.book-quick-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%);
    color: white;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-product-card:hover .book-quick-view {
    opacity: 1;
    visibility: visible;
}

.quick-view-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.quick-view-description {
    font-size: 0.85rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 4. Smooth Page Transitions - Fade In */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-product-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

/* Stagger animation for cards */
.book-product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.book-product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.book-product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.book-product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.book-product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.book-product-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* 5. Loading Skeleton */
.book-skeleton-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 0 0 calc(25% - 30px);
    margin: 0 10px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 15px;
}

.skeleton-title {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-rating {
    height: 15px;
    width: 60%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-buttons {
    display: flex;
    gap: 8px;
}

.skeleton-button {
    flex: 1;
    height: 35px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* 6. Empty State Design */
.books-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.empty-state-icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state-message {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-state-suggestion {
    font-size: 0.9rem;
    color: #007bff;
    font-weight: 500;
}

/* Responsive adjustments for advanced features */
@media (max-width: 768px) {
    .book-quick-view {
        padding: 15px;
    }

    .quick-view-title {
        font-size: 1rem;
    }

    .quick-view-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .empty-state-icon {
        font-size: 3rem;
    }

    .empty-state-title {
        font-size: 1.2rem;
    }
}