/* Base wrapper and cosmic background */
.fbs-carousel-wrapper {
    position: relative;
    padding: 60px 40px;
    background: url('https://martinfirestonechronicles.com/wp-content/uploads/2026/06/galaxy-bg-1.jpg') center/cover no-repeat, radial-gradient(circle at center, #1a0b2e 0%, #080312 100%);
    color: #e0e0e0;
    overflow: hidden;
    border-radius: 8px;
}

.fbs-galaxy-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 5, 25, 0.6);
    pointer-events: none;
    z-index: 0;
}

/* Category Selector (Dropdown) */
.fbs-category-selector-wrapper {
    position: relative;
    z-index: 10; /* Above carousel */
    text-align: center;
    margin-bottom: 40px;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.fbs-category-dropdown-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-family: 'Cinzel', serif, sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    justify-content: space-between;
}

.fbs-category-dropdown-btn:hover, .fbs-category-dropdown-btn.active {
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.fbs-category-dropdown-btn i {
    transition: transform 0.3s;
}
.fbs-category-dropdown-btn.active i {
    transform: rotate(180deg);
}

.fbs-tabs-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 5, 25, 0.95);
    border: 1px solid rgba(255,255,255,0.2);
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.fbs-tabs-dropdown.open {
    display: flex;
    animation: dropDownOpen 0.3s ease forwards;
}

@keyframes dropDownOpen {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fbs-tab-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #ccc;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-family: 'Cinzel', serif, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.fbs-tab-item:last-child {
    border-bottom: none;
}

.fbs-tab-item:hover, .fbs-tab-item.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Category Sections */
.fbs-category-section {
    position: relative;
    z-index: 1;
    display: none;
    animation: fbsFadeIn 0.5s ease forwards;
}

.fbs-category-section.active {
    display: block;
}

@keyframes fbsFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Swiper Container */
.fbs-swiper-container {
    width: 100%;
    padding: 20px 0 60px; /* Space for pagination */
    position: relative;
}

.swiper-slide {
    height: auto; /* Make slides equal height */
    display: flex;
}

/* Book Cards */
.fbs-book-card {
    background: rgba(10, 5, 20, 0.6);
    padding: 25px;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    width: 100%;
}

.fbs-book-card:hover {
    transform: translateY(-5px);
}

.fbs-book-cover-wrap {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding: 10px; /* Reduced padding */
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px; /* Ensures consistent spacing even with smaller images */
}

/* Category Glowing Borders & Shadows */
.fbs-theme-blue .fbs-book-cover-wrap {
    border: 1px solid rgba(100, 180, 255, 0.5);
    box-shadow: inset 0 0 15px rgba(100, 180, 255, 0.1); /* Changed to inset for tighter feel */
}
.fbs-theme-blue.fbs-book-card:hover .fbs-book-cover-wrap {
    box-shadow: inset 0 0 25px rgba(100, 180, 255, 0.2), 0 0 15px rgba(100, 180, 255, 0.3);
}

.fbs-theme-gold .fbs-book-cover-wrap {
    border: 1px solid rgba(255, 210, 100, 0.5);
    box-shadow: inset 0 0 15px rgba(255, 210, 100, 0.1);
}
.fbs-theme-gold.fbs-book-card:hover .fbs-book-cover-wrap {
    box-shadow: inset 0 0 25px rgba(255, 210, 100, 0.2), 0 0 15px rgba(255, 210, 100, 0.3);
}

.fbs-theme-purple .fbs-book-cover-wrap {
     border: 1px solid rgba(200, 100, 255, 0.5);
     box-shadow: inset 0 0 15px rgba(200, 100, 255, 0.1);
}
.fbs-theme-purple.fbs-book-card:hover .fbs-book-cover-wrap {
    box-shadow: inset 0 0 25px rgba(200, 100, 255, 0.2), 0 0 15px rgba(200, 100, 255, 0.3);
}

/* Made covers smaller */
.fbs-book-cover {
    max-width: 70%; /* Reduced from 100% */
    max-height: 230px; /* Set max height to prevent them from being too tall */
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 4px;
    transition: transform 0.4s ease;
}

.fbs-book-card:hover .fbs-book-cover {
    transform: scale(1.05); /* Slight zoom on hover instead of full card scale for better effect with small images */
}

.fbs-book-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.fbs-book-title {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 500;
    font-family: 'Cinzel', serif, sans-serif;
}

.fbs-book-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #ccc;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Buttons */
.fbs-book-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.fbs-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: 1px solid;
}

.fbs-btn-primary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.fbs-btn-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    color: #fff;
}

.fbs-btn-secondary {
    background: transparent;
    color: #ccc;
    border-color: rgba(255,255,255,0.2);
}
.fbs-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.fbs-amazon-icon {
    margin-right: 6px;
}

/* Swiper Navigation */
.fbs-nav-prev, .fbs-nav-next {
    color: rgba(255,255,255,0.5);
    transition: color 0.3s;
}
.fbs-nav-prev:hover, .fbs-nav-next:hover {
    color: #fff;
}
.fbs-pagination .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.3;
}
.fbs-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: #fff;
}

@media (max-width: 768px) {
    .fbs-category-selector-wrapper {
        width: 100%;
    }
    .fbs-category-dropdown-btn {
        min-width: 100%;
    }
    .fbs-book-cover {
        max-width: 60%; /* Slightly smaller on mobile to preserve proportions */
        max-height: 200px;
    }
    .fbs-book-cover-wrap {
        min-height: 220px;
    }
}
