/* Discovery Card Component Styles */
.discovery-card {
    flex: 0 0 180px;
    width: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
    position: relative;
}

.discovery-card:hover {
    transform: translateY(-4px);
}

.discovery-card:focus-visible {
    outline-offset: 2px;
}

/* Edge fade effect for partially visible cards */
.carousel-edge-fade {
    opacity: var(--fade-opacity, 0.5);
    transition: opacity 0.3s ease;
}

.carousel-edge-fade::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: var(--fade-opacity, 0.6);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.carousel-edge-fade:hover::after {
    opacity: 0;
}

.book-cover-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.discovery-card:hover .hover-overlay,
.discovery-card:focus-visible .hover-overlay,
.discovery-card:focus .hover-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 1rem;
}

.overlay-icon {
    margin-bottom: 0.5rem;
}

.overlay-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.overlay-author {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.overlay-cta {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-info {
    display: none;
}

@media (max-width: 768px) {
    .discovery-card {
        flex: none;
        width: auto;
    }

    .hover-overlay {
        display: none;
    }

    .mobile-info {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
        background: white;
    }

    .mobile-title {
        font-size: 0.9rem;
        font-weight: 700;
        color: #2c3e50;
        margin: 0;
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .discovery-card:active {
        transform: scale(0.98);
    }

    /* No edge fade on mobile */
    .carousel-edge-fade::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .mobile-info {
        padding: 0.5rem;
        gap: 0.4rem;
    }

    .mobile-title {
        font-size: 0.85rem;
    }
}
