/* Koleksi Section Styles - Yellow Header with Star Icon */

.koleksi-section {
    margin-bottom: 30px;
    padding-bottom: 0;
    position: relative;
    overflow: visible !important;
}

.koleksi-header {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 5px;
}

.koleksi-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #f59e0b;
}

.koleksi-icon {
    margin-right: 10px;
    color: #1f2937;
    font-size: 16px;
}

.koleksi-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.koleksi-divider {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 15px 0 20px 0;
}

/* ===== TOMBOL NAVIGASI CUSTOM CAROUSEL KOLEKSI TERBARU ===== */

.koleksi-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 50;
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease;
    margin-top: -40px;
    /* size ikon */
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.koleksi-nav-prev { left: 0px; }
.koleksi-nav-next { right: 0px; }

/* Kedua ikon di-stack, ukuran sama */
.koleksi-nav-btn .nav-icon-off,
.koleksi-nav-btn .nav-icon-on {
    position: absolute;
    width: 36px;
    height: 36px;
    display: block;
    transition: opacity 0.2s ease;
}

/* Tombol PREV: flip horizontal agar panah mengarah ke kiri */
.koleksi-nav-prev .nav-icon-off,
.koleksi-nav-prev .nav-icon-on {
    transform: scaleX(-1);
}

/* === MODE OFF (default) === */
.koleksi-nav-btn .nav-icon-off { opacity: 0.35; } /* coklat transparan */
.koleksi-nav-btn .nav-icon-on  { opacity: 0; }    /* kuning tersembunyi */

/* === MODE ON (hover / active) === */
.koleksi-nav-btn:hover .nav-icon-off,
.koleksi-nav-btn:active .nav-icon-off,
.koleksi-nav-btn:focus .nav-icon-off {
    opacity: 0;
}
.koleksi-nav-btn:hover .nav-icon-on,
.koleksi-nav-btn:active .nav-icon-on,
.koleksi-nav-btn:focus .nav-icon-on {
    opacity: 1;
}

/* Scale ringan saat hover */
.koleksi-nav-btn:hover {
    transform: translateY(-60%) scale(1.15);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.20));
}

/* ===== END TOMBOL NAVIGASI ===== */

/* Navigation buttons for carousel */
.koleksi-rekomendasi-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.koleksi-rekomendasi-nav button {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.koleksi-rekomendasi-nav button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.koleksi-rekomendasi-nav button i {
    color: #6b7280;
    font-size: 12px;
}

/* ===== KOLEKSI RAK WRAPPER � hanya untuk recent_ebooks ===== */
.koleksi-rak-wrapper {
    position: relative !important;
    padding-bottom: 90px !important; /* ruang untuk rak 90px */
    overflow: visible !important;
}

.koleksi-rak-wrapper .mt-5.container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 5 !important;
}

.koleksi-rak-wrapper .slick-list {
    overflow: hidden !important;
    height: 340px !important;
}

.koleksi-rak-wrapper .slick-track {
    display: flex !important;
    align-items: flex-end !important;
    height: 340px !important;
    z-index: 5 !important;
    position: relative !important;
}

.koleksi-rak-wrapper .slick-slide,
.koleksi-rak-wrapper .ebook-card,
.koleksi-rak-wrapper .book {
    position: relative !important;
    z-index: 10 !important;
}

.koleksi-rak-wrapper .component {
    margin: 0 auto !important;
    height: 340px !important;
    overflow: visible !important;
}

.koleksi-rak-wrapper .mt-5.container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 5 !important;
}

/* content-wrapper overflow visible */
.content-wrapper {
    overflow: visible !important;
}

/* Slick list dan track — overflow visible agar rak tidak terpotong */
.koleksi-rak-wrapper .slick-list {
    overflow: hidden !important;
    height: 340px !important;
}

.koleksi-rak-wrapper .slick-track {
    display: flex !important;
    align-items: flex-end !important;
    height: 340px !important;
    z-index: 5 !important;
    position: relative !important;
}

/* Pastikan setiap slide di atas rak */
.koleksi-rak-wrapper .slick-slide {
    position: relative !important;
    z-index: 5 !important;
}

/* ===== WOODEN BOOKSHELF ORNAMENT ===== */

/* ===== MODE BOOKSHELF: Sembunyikan teks di Koleksi Terbaru ===== */

/* ===== SEMBUNYIKAN TEKS DI KOLEKSI TERBARU ===== */
/* Selector: .koleksi-carousel-wrapper = wrapper Koleksi Terbaru yang benar */

.koleksi-carousel-wrapper .ebook-content,
.koleksi-carousel-wrapper .more-details-wrapper {
    display: none !important;
}

/* ===== END SEMBUNYIKAN TEKS ===== */

/* ===== UKURAN BUKU ANIMASI — Koleksi Terbaru ===== */
/* Scale seluruh .align > li (buku + ornamen) menjadi 82% */
.koleksi-carousel-wrapper .align > li {
    transform: scale(0.82) !important;
    transform-origin: bottom center !important;
    margin-left:  -35px !important;
    margin-right: -35px !important;
    vertical-align: bottom !important;
}

.koleksi-carousel-wrapper .align {
    margin-bottom: -80px !important;  /* naikkan buku ke atas */
    margin-top: 0px !important;
    padding-left: 50px !important;
}

.koleksi-carousel-wrapper .book {
    position: relative !important;
    z-index: 5 !important;
}
/* ===== END UKURAN BUKU ===== */

.koleksi-rak-wrapper figcaption {
    display: none !important;
}

.koleksi-rak-wrapper .align {
    margin: 10px auto 0;
    text-align: center;
}

.koleksi-rak-wrapper .align > li {
    width: 165px;
    height: 340px;
    padding: 0;
    margin: 0 1px;
    vertical-align: bottom;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}

.koleksi-rak-wrapper .book:hover {
    z-index: 100;
    position: relative;
}

.koleksi-rak-wrapper .book {
    margin-bottom: 0;
    overflow: visible;
    transform: scale(0.8);
    transform-origin: bottom center;
    position: relative;
    z-index: 10; /* buku SELALU di atas rak (z-index:3) */
}

.koleksi-rak-wrapper .mt-5.container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 5 !important;
}

/* content-wrapper di layout juga harus overflow visible */
.content-wrapper {
    overflow: visible !important;
}

/* Rak kayu: ditangani via HTML flexbox di blade — tidak perlu ::after */

.koleksi-rak-wrapper .component {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    height: 380px;
    padding-bottom: 90px !important; /* ruang untuk rak di bawah */
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* Buku z-index lebih tinggi dari rak (z-index:2) */
.koleksi-rak-wrapper .ebook-card,
.koleksi-rak-wrapper .slick-slide,
.koleksi-rak-wrapper .book {
    position: relative !important;
    z-index: 10 !important;
}

/* ===== END MODE BOOKSHELF ===== */

/* Category Tab section with tabs on right */
.koleksi-section.category-tab .koleksi-header {
    margin-bottom: 0;
}

.koleksi-section.category-tab .koleksi-divider {
    margin-bottom: 10px;
}

.koleksi-section.category-tab .nav-tabs {
    border-bottom: none;
    margin-top: -40px;
}

.koleksi-section.category-tab .nav-tabs > li > a {
    border: 1px solid transparent;
    border-radius: 4px;
    color: #6b7280;
    padding: 6px 15px;
}

.koleksi-section.category-tab .nav-tabs > li.active > a,
.koleksi-section.category-tab .nav-tabs > li.active > a:focus,
.koleksi-section.category-tab .nav-tabs > li.active > a:hover {
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #f59e0b;
}

.koleksi-section.category-tab .nav-tabs > li > a:hover {
    border-color: #fbbf24;
    background: #fffbeb;
    color: #f59e0b;
}

/* Scale Wooden Bookshelf for Mobile */
@media (max-width: 991px) {
    .rak-buku {
        height: 45px !important;
    }
    .rak-buku img {
        height: 45px !important;
    }
    .rak-buku div[style*="background-image"] {
        height: 45px !important;
        background-size: auto 45px !important;
    }
    .koleksi-rak-wrapper,
    .koleksi-rak-wrapper .component {
        padding-bottom: 45px !important;
        margin-bottom: 5px !important;
    }
    .koleksi-section {
        margin-bottom: 10px !important;
    }
}
