/* book-carousel.css - Carousel-specific styles */

.book-carousel-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
}

/* Header Styles */
.carousel-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.carousel-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    text-align: center;
    color: #666;
    margin-bottom: 2.5rem;
}

/* Carousel Wrapper */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Track Container */
.carousel-track-container {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 25px;
    transition: opacity 0.3s ease;
    padding: 10px 0;
}

/* Carousel Items - Match bookshelf sizing exactly */
.carousel-item {
    flex: 0 0 auto;
    width: 180px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Ensure book covers inside carousel match bookshelf */
.carousel-item .book-cover-3d {
    width: 100%;
    height: 240px;
}

.carousel-item:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

/* Navigation Arrows */
.carousel-nav {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover:not(:disabled) {
    background: #2563EB;
    border-color: #2563EB;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f5f5f5;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

/* Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: #2563EB;
    width: 24px;
    border-radius: 4px;
}

.carousel-indicator:hover:not(.active) {
    background: #999;
    transform: scale(1.2);
}

/* Button */
.carousel-button-container {
    text-align: center;
}

.carousel-button {
    display: inline-block;
    padding: 14px 32px;
    background: #2563EB;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.carousel-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Responsive Breakpoints - Match bookshelf exactly */
@media (max-width: 1024px) {
    .carousel-item {
        width: 160px;
    }
}

@media (max-width: 768px) {
    .book-carousel-container {
        padding: 2rem 1rem;
    }

    .carousel-track {
        gap: 15px;
    }

    .carousel-item {
        width: 160px;
    }

    .carousel-title {
        font-size: 1.75rem;
    }

    .carousel-subtitle {
        font-size: 1rem;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
    }

    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        gap: 0.5rem;
    }

    .carousel-track {
        gap: 10px;
    }

    .carousel-item {
        width: 140px;
    }

    .carousel-title {
        font-size: 1.5rem;
    }

    .carousel-subtitle {
        font-size: 0.875rem;
    }

    .carousel-nav {
        width: 32px;
        height: 32px;
    }

    .carousel-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Fade transition for page changes */
.carousel-track {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}