/* =========================================================
   KOLEKSI BUKU WELCOME
   ========================================================= */

* {
    box-sizing: border-box;
}


/* =========================================================
   BODY
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    font-family: 'Nunito', sans-serif;

    background: #fffaf5;
    color: #2d2d2d;
}


/* =========================================================
   APP
   ========================================================= */

.app {
    width: 100%;
    min-height: 100vh;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.koleksi-page-container {
    width: min(1350px, 94%);
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.koleksi-page-header {
    padding: 30px 0 20px;

    text-align: center;
}


/* =========================================================
   TOMBOL KEMBALI
   ========================================================= */

.kembali-wrapper {
    display: flex;
    justify-content: flex-start;

    margin-bottom: 25px;
}

.btn-kembali {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 9px 16px;

    border: 1px solid #f97316;

    border-radius: 8px;

    background: #ffffff;

    color: #f97316;

    text-decoration: none;

    font-size: 13px;
    font-weight: 800;

    transition: all 0.2s ease;
}

.btn-kembali:hover {
    background: #f97316;
    color: #ffffff;

    transform: translateX(-2px);
}


/* =========================================================
   BADGE
   ========================================================= */

.koleksi-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 6px 13px;

    border-radius: 50px;

    background: #fff0df;

    color: #f97316;

    font-size: 12px;
    font-weight: 800;
}


/* =========================================================
   JUDUL
   ========================================================= */

.koleksi-page-header h1 {
    margin: 10px 0 6px;

    font-family: 'Poppins', sans-serif;

    font-size: 30px;
    line-height: 1.3;

    font-weight: 900;

    color: #292929;
}

.koleksi-page-header p {
    max-width: 650px;

    margin: 0 auto;

    font-size: 13px;
    line-height: 1.6;

    color: #777;
}


/* =========================================================
   SECTION
   ========================================================= */

.koleksi-page-section {
    padding: 5px 0 50px;
}


/* =========================================================
   FILTER
   ========================================================= */

.koleksi-filter {
    margin-bottom: 20px;
}


/* =========================================================
   SEARCH
   ========================================================= */

.koleksi-search {
    display: flex;
    justify-content: center;

    margin-bottom: 14px;
}

.koleksi-search form {
    display: flex;

    width: 100%;
    max-width: 650px;

    padding: 4px;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 10px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.koleksi-search input {
    flex: 1;

    min-width: 0;

    padding: 10px 13px;

    border: none;
    outline: none;

    background: transparent;

    font-family: 'Nunito', sans-serif;

    font-size: 13px;

    color: #333;
}

.koleksi-search input::placeholder {
    color: #aaa;
}

.koleksi-search button {
    padding: 0 18px;

    border: none;

    border-radius: 7px;

    background: #f97316;

    color: #ffffff;

    font-family: 'Nunito', sans-serif;

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition: 0.2s ease;
}

.koleksi-search button:hover {
    background: #ea580c;
}


/* =========================================================
   KATEGORI
   ========================================================= */

.kategori-list {
    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 6px;
}

.kategori-list a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 6px 12px;

    border: 1px solid #e9e9e9;

    border-radius: 50px;

    background: #ffffff;

    color: #666;

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;

    transition: all 0.2s ease;
}

.kategori-list a:hover {
    border-color: #f97316;

    color: #f97316;
}

.kategori-list a.active {
    border-color: #f97316;

    background: #f97316;

    color: #ffffff;
}


/* =========================================================
   HASIL PENCARIAN
   ========================================================= */

.koleksi-result {
    margin-bottom: 14px;

    font-size: 12px;

    color: #777;
}

.koleksi-result strong {
    color: #333;

    font-weight: 800;
}


/* =========================================================
   GRID BUKU
   ========================================================= */

.buku-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 14px;
}


/* =========================================================
   CARD BUKU
   ========================================================= */

.buku-card {
    overflow: hidden;

    min-width: 0;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 10px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.buku-card:hover {
    transform: translateY(-3px);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   COVER BUKU
   ========================================================= */

.buku-cover {
    width: 100%;

    height: 165px;

    overflow: hidden;

    background: #f4f4f4;
}

.buku-cover img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.3s ease;
}

.buku-card:hover .buku-cover img {
    transform: scale(1.04);
}


/* =========================================================
   CONTENT BUKU
   ========================================================= */

.buku-content {
    padding: 10px;
}


/* =========================================================
   KATEGORI + RATING
   ========================================================= */

.buku-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 5px;

    margin-bottom: 6px;
}

.buku-kategori {
    display: block;

    max-width: 65%;

    overflow: hidden;

    padding: 3px 6px;

    border-radius: 4px;

    background: #fff1e7;

    color: #f97316;

    font-size: 8px;
    font-weight: 800;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.buku-rating {
    flex-shrink: 0;

    font-size: 9px;

    color: #777;

    font-weight: 800;

    white-space: nowrap;
}


/* =========================================================
   JUDUL
   ========================================================= */

.buku-content h3 {
    display: -webkit-box;

    min-height: 34px;

    margin: 0 0 4px;

    overflow: hidden;

    font-family: 'Poppins', sans-serif;

    font-size: 12px;

    line-height: 1.4;

    font-weight: 800;

    color: #292929;

    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* =========================================================
   PENULIS
   ========================================================= */

.buku-penulis {
    margin: 0 0 6px;

    overflow: hidden;

    font-size: 9px;

    line-height: 1.4;

    color: #888;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* =========================================================
   DESKRIPSI
   ========================================================= */

.buku-deskripsi {
    display: -webkit-box;

    min-height: 38px;

    margin: 0;

    overflow: hidden;

    font-size: 9px;

    line-height: 1.45;

    color: #777;

    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}


/* =========================================================
   FOOTER CARD
   ========================================================= */

.buku-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 5px;

    margin-top: 8px;

    padding-top: 8px;

    border-top: 1px solid #f1f1f1;
}

.buku-ulasan {
    overflow: hidden;

    font-size: 9px;

    color: #777;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* =========================================================
   TOMBOL LIHAT BUKU
   ========================================================= */

.btn-pinjam {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 6px 9px;

    border-radius: 5px;

    background: #f97316;

    color: #ffffff;

    text-decoration: none;

    font-size: 9px;

    font-weight: 800;

    white-space: nowrap;

    transition: 0.2s ease;
}

.btn-pinjam:hover {
    background: #ea580c;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.koleksi-empty {
    grid-column: 1 / -1;

    padding: 60px 20px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 12px;
}

.empty-icon {
    margin-bottom: 8px;

    font-size: 35px;
}

.koleksi-empty h3 {
    margin: 0 0 5px;

    font-family: 'Poppins', sans-serif;

    font-size: 17px;

    color: #333;
}

.koleksi-empty p {
    margin: 0 0 15px;

    font-size: 12px;

    color: #777;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Laptop kecil */

@media (max-width: 1200px) {

    .buku-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

}


/* Tablet */

@media (max-width: 1000px) {

    .buku-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));

        gap: 12px;
    }

    .buku-cover {
        height: 160px;
    }

}


/* Tablet kecil */

@media (max-width: 750px) {

    .koleksi-page-container {
        width: 92%;
    }

    .koleksi-page-header {
        padding-top: 20px;
    }

    .koleksi-page-header h1 {
        font-size: 25px;
    }

    .buku-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));

        gap: 10px;
    }

    .buku-cover {
        height: 155px;
    }

}


/* HP */

@media (max-width: 550px) {

    .kembali-wrapper {
        margin-bottom: 18px;
    }

    .btn-kembali {
        padding: 8px 12px;

        font-size: 11px;
    }

    .koleksi-page-header h1 {
        font-size: 22px;
    }

    .koleksi-page-header p {
        font-size: 11px;
    }

    .koleksi-search form {
        max-width: 100%;
    }

    .koleksi-search input {
        font-size: 11px;
    }

    .koleksi-search button {
        padding: 0 13px;

        font-size: 10px;
    }

    .buku-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .buku-cover {
        height: 180px;
    }

}


/* HP kecil */

@media (max-width: 380px) {

    .buku-cover {
        height: 150px;
    }

    .buku-content {
        padding: 8px;
    }

    .buku-content h3 {
        font-size: 11px;
    }

    .buku-penulis,
    .buku-deskripsi {
        font-size: 8px;
    }

    .btn-pinjam {
        padding: 5px 7px;

        font-size: 8px;
    }

}
