.pdf-catalog__wrapper {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin: 2rem 0;
    aspect-ratio: 16 / 8;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.pdf-catalog__wrapper.fullscreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.pdf-catalog__book {
    position: relative;
    padding: 15px;
    width: 100%;
}

.pdf-catalog__zoom {
    transform-origin: center center;
    transition: transform 0.25s ease;
}

#pdf-flipbook {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}


#pdf-flipbook canvas {
    max-width: 100%;
    max-height: 100%;
}
#pdf-flipbook.loading {
    min-height: 40vh;
}

#pdf-flipbook.loading::after {
    content: "";
    position: absolute;
    z-index: 10000;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-left: -22px;
    margin-top: -22px;
    border-radius: 50%;
    border: 4px solid rgba(0,0,0,.15);
    border-top-color: rgba(0,0,0,.65);
    animation: flipbookSpin 0.8s linear infinite;
}

@keyframes flipbookSpin {
    to { transform: rotate(360deg); }
}


.pdf-view {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.pdf-page {
    max-width: 100%;
    max-height: 100%;
}


.pdf-toolbar {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0, 1);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
}


.pdf-toolbar .pdf-toolbar__center {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.pdf-toolbar .pdf-page-counter,
.pdf-toolbar button,
.pdf-toolbar a {
    color: white;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
    font-size: 14px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: none;
    transition: all 0.3s ease;
    min-height: 32px;
    display: block;
}

.pdf-toolbar a,
.pdf-toolbar button {
    min-width: 40px;
}

.pdf-toolbar a:hover,
.pdf-toolbar button:hover {
    background: rgba(255, 255, 255, 0.6);
}

.pdf-fullscreen .icon {
    display: block;
    transition: all 0.3s ease;
}

.pdf-fullscreen:hover .icon {
    transform: scale(1.5);
}


.fullscreen .pdf-fullscreen .icon {
    transform: scale(1.5);
}

.fullscreen .pdf-fullscreen:hover .icon {
    transform: scale(1);
}

.pdf-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    z-index: 9999;
}

.pdf-nav.prev { left: 10px; }
.pdf-nav.next { right: 10px; }

.pdf-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}


/* ===============================
   Catalog grid
================================ */

.pdf-catalog__title {
    font-family: "Poppins", Sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    padding-bottom: 1em;
}

.pdf-catalog__items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 24px;
}

.pdf-catalog__item {
    cursor: pointer;
}

.pdf-catalog__item .thumbnail {
    position: relative;
    display: block;
    border: 5px solid #e5e7eb;
    border-radius: 0px;
    background: #fff;
    overflow: hidden;
}

.pdf-catalog__item .thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: inherit;
    background: #fafafa;
    transition: opacity 0.3s ease;
}


.pdf-catalog__item .name {
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    margin: 10px 2px 4px;
}

.pdf-catalog__item .date {
    font-family: "Poppins", Sans-serif;
    color: #6b7280;
    font-size: 14px;
    margin: 0 2px;
    text-align: center;
}

@media (max-width: 1200px) {
    .pdf-catalog__items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pdf-catalog__items {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px 18px;
    }
}

@media (max-width: 768px) {
    .pdf-catalog__wrapper {
        aspect-ratio: 8 / 10;
    }

    .pdf-catalog__title {
        padding-bottom: 1em;
    }

    .pdf-catalog__item .name {
        font-size: 14px;
    }

    .pdf-catalog__item .date {
        font-size: 12px;
    }
    .pdf-catalog__items {
        grid-template-columns: repeat(2, 1fr);
    }
}
