.bookshelf .thumb {
    display: inline-block;
    cursor: pointer;
    margin: 0 0.5%;
    width: 15% !important;
    max-width: 200px;
}

.bookshelf .thumb-slider {
    display: inline-block;
    cursor: pointer;
    margin: 0 0.5%;
}

.bookshelf .thumb-slider img {
    height: 250px;
    width: 100%;
    display: block;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.bookshelf .thumb img {
    height: 250px;
    width: 100%;
    display: block;
    align-items: center;
}

.bookshelf .shelf-img {
    z-index: 0;
    height: 120px;
    max-width: 100%;
    vertical-align: top;
    margin-top: -12px;
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
}

.bookshelf .covers {
    width: 100%;
    height: auto;
    z-index: 99;
    position: relative;
    text-align: center;
}

.bookshelf {
    text-align: center;
    padding-top: 20px;
}

@media (max-width: 480px) {
    .bookshelf .shelf-img {
        height: 70px;
    }
}

.subscribe-save-banner {
    position: absolute;
    width: 100%;
    bottom: 10px;
    right: 0;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    padding: 8px 35px;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
    text-align: center;
}

.subscribe-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subscribe-banner-content .banner-text {
    font-size: 14px;
    line-height: 1;
}

.subscribe-banner-content .subscribe-btn {
    background: #fff;
    color: #ff6b35;
    border: 2px solid #ff6b35;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
}

.subscribe-btn:hover {
    background: #ff6b35;
    color: #fff;
}

.login-modal,
.purchase-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.subscription-modal-content,
.login-modal-content,
.purchase-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subscription-close,
.login-close,
.purchase-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    transition: color 0.3s;
}

.subscription-close:hover,
.login-close:hover,
.purchase-close:hover {
    color: #000;
}

.subscription-content h3,
.login-content h3,
.purchase-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    margin-bottom: 15px;
}

.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.plan-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    background: #fff;
}

.plan-card:hover {
    border-color: #007bff;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.15);
}

.plan-card.popular {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.plan-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.plan-price {
    margin-bottom: 15px;
}

.plan-price .price {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
}

.plan-price .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 18px;
    margin-left: 10px;
}

.plan-price .billing-cycle {
    color: #666;
    font-size: 14px;
}

.trial-info {
    background: #e3f2fd;
    color: #1976d2;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
    display: inline-block;
}

.subscribe-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

.subscribe-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.plan-card.popular .subscribe-btn {
    background: #28a745;
}

.plan-card.popular .subscribe-btn:hover {
    background: #1e7e34;
}

.login-actions,
.purchase-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.login-actions .btn,
.purchase-actions .btn {
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.purchase-content p {
    font-size: 16px;
    margin-bottom: 10px;
}

.purchase-price {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin: 20px 0;
}

/* Flipbook Modal Styles */
.flipbook-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 30, 45, .6);
}

.flipbook-modal-content {
    position: relative;
    margin: 2% auto;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.flipbook-close {
    position: absolute;
    right: 15px;
    top: 8px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-close:hover,
.flipbook-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#flipbook-container {
    width: 100%;
    height: 100%;
}

.flipbook-main-wrapper {
    transform-origin: 0px 0px;
    transform: translate(0px, 0px) rotate(0deg);
}

.flipbook-menu-right {
    justify-content: flex-start !important;
}

.flipbook-menu-left {
    flex: 0 !important;
    justify-content: flex-start !important;
}

.flipbook-menu-btn-wrapper.flipbook-menu-btn {
    width: 14px !important;
    height: 14px !important;
    padding: 8px !important;
    margin: 2px !important;
    margin-right: 10px !important;
}

.flipbook-menuTop.flipbook-menu-fixed {
    padding: 2px !important;
}

.flipbook-submenu {
    right: auto !important;
    width: 120px !important;
}

@media only screen and (max-width: 768px) {
    .flipbook-menu-fixed .flipbook-menu {
        justify-content: space-around;
        width: auto !important;
    }
}

@media (max-width: 768px) {
    .subscribe-banner-content {
        flex-wrap: wrap;
    }
    
    .subscription-modal-content,
    .login-modal-content,
    .purchase-modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }

    .subscription-plans {
        grid-template-columns: 1fr;
    }

    .login-actions,
    .purchase-actions {
        flex-direction: column;
    }

    .flipbook-modal-content {
        width: 95%;
        height: 85%;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .subscribe-save-banner {
        padding: 12px 5px;
        font-size: 6px;
    }

    .bookshelf .thumb {
        width: 50% !important;
        max-width: 100px;
    }
}

/* Container */
.flipbook-carousel {
    position: relative;
}

/* Navigation Buttons */
.flipbook-navigation {
    position: absolute;
    top: 35%;
    left: 0;
    right: 0;
    transform: translateY(-35%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 20;
    padding: 0;
}

.flipbook-navigation .navigation {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.book-items {
    position: relative;
    cursor: default;
    margin: auto;
    display: flex;
    break-inside: avoid;
}

.book-cover {
    position: relative;
}

.book-cover .book-inside {
    position: absolute;
    width: 99%;
    height: 96%;
    top: 2%;
    left: 7px;
    border: 1px solid grey;
    border-radius: 2px 6px 6px 2px;
    background: white;
    box-shadow: 10px 40px 40px -10px #00000030, inset -2px 0 0 grey,
        inset -3px 0 0 #dbdbdb, inset -4px 0 0 white, inset -5px 0 0 #dbdbdb,
        inset -6px 0 0 white, inset -7px 0 0 #dbdbdb, inset -8px 0 0 white,
        inset -9px 0 0 #dbdbdb;
}

.book-cover .book-image {
    line-height: 0;
    position: relative;
    border-radius: 2px 6px 6px 2px;
    box-shadow: 4px 4px 10px -2px rgba(0, 0, 0, 0.2),
        24px 28px 20px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    transform-origin: 0 50%;
    transform: rotateY(0);
    transition: all .45s ease;
    cursor: pointer;
    width: 100%;
    height: 230px;
}

.book-image img {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 2px 6px 6px 2px;
}

.book-image:hover {
    transform: perspective(3000px) rotateY(-20deg) translateX(-10px) scaleX(0.94);
    /* transform: perspective(800px) rotateY(0deg) translateX(0px) scaleX(1); */
    transform-style: preserve-3d;
    box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.1),
        15px 14px 16px -6px rgba(0, 0, 0, 0.1);
}

.effect {
    position: absolute;
    width: 4px;
    height: 100%;
    margin-left: 1.5px;
    top: 0;
    border-left: 2px solid #00000010;
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0) 100%);
    transition: all 0.5s ease;
    z-index: 5;
}

.light {
    width: 90%;
    height: 100%;
    position: absolute;
    border-radius: 3px;
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 100%);
    top: 0;
    right: 0;
    opacity: 0.1;
    transition: all 0.5s ease;
    z-index: 4;
}

.book-image:hover .effect {
    margin-left: 1.7px;
}

.shelf-img {
    z-index: 0;
    height: 120px;
    max-width: 100%;
    vertical-align: top;
    margin-top: -12px;
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    text-align: center;
    padding-top: 20px;
}

.flipbook-carousel .swiper-wrapper {
    justify-content: center !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .book-cover .book-image {
        height: 180px;
    }

    .shelf-img {
        height: 110px;
    }
}

@media (max-width: 480px) {
    .book-cover .book-image {
        height: 140px;
    }

    .flipbook-navigation .navigation {
        width: 35px;
        height: 35px;
    }

    .flipbook-navigation {
        top: 35%;
        transform: translateY(-50%);
        padding: 0px;
    }

    .shelf-img {
        height: 90px;
    }
}

.subscribed-ribbon .ribbon {
    min-height: 5rem !important;
    min-width: 5rem !important;
}
.subscribed-ribbon .ribbon-bookmark.ribbon-top:after {
    border-width: 0rem 2.5rem .6rem !important;
}

.subscribed-ribbon .ribbon-bookmark.ribbon-top {
    right: 3.5rem !important;
}

.subscribed-ribbon .subscribed-text {
    font-size: 12px !important;
    font-weight: 600 !important;
}
