.single-product-image-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(91, 91, 91, 0.8);
    overflow: auto;
    margin: none !important;
}

.single-product-image-modal-content {
    background: var(--white);
    margin: 5% auto;
    border-radius: 10px;
    width: 845px;
    height: 640px;
    position: relative;
    display: block;
}

.modal-header {
    display: flex;
    gap: 15px;
    padding-top: 30px;
    padding-left: 30px;
    padding-bottom: 30px;
}

.modal-header h2 {
    font-size: 25px;
    font-weight: 700;
    font-family: "Inter", sans-serif;
    color: var(--black);
    margin-bottom: 0 !important;
}

.woocommerce-product-rating.modal-rating {
    margin-top: 4px !important;

}

.modal-header {
    position: relative;
}

.modal-close-button {
    position: absolute;
    right: 25px;
    top: 25px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    font-size: 24px;
    line-height: 24px;
    color: #333;
}

.modal-close-button:hover {
    color: #000;
}

.modal-tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    border-top: 1px solid #E0E7F1 !important;
    background: #eff3f9 !important;
}

.modal-tab {
    width: 33.33% !important;
    border-top: 1px solid #E0E7F1;
    font-size: 14px !important;
}

.modal-tab.active {
    background-color: var(--white) !important;
}

.modal-tab-content {
    display: flex;
    justify-content: center;
    gap: 40px;
    height: auto;
    margin-top: 40px;
}

.modal-tab-content-writer {
    justify-content: space-between !important;
}

.modal-tab-content img {
    max-width: 100%;
    height: auto;
}

/* Product image styling */
.product-image img {
    width: 196px;
    height: 286px;
    border-radius: 12px;
    margin-bottom: 20px;
    margin-top: 60px;
    top: 445px;
    left: 286px;
}

.modal-context .product-image img {
    margin-top: 95px;
}

.product-short-description {
    width: 500px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    height: 400px;
    overflow-y: auto;
    max-height: none;
    text-align: justify;
    margin-top: 55px;
    padding-right: 5px;
}

.modal-context.modal-tab-content {
    margin-top: 0 !important;
}

.product-specs.product-short-description {
    margin-top: 20px !important;
    height: 475px !important;
}

.product-specs table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    color: var(--ash);
    margin-top: 40px;
}

.product-specs table tbody tr {
    border-bottom: 1px solid #eee;
}

.product-specs table td {
    padding: 8px 10px;
    vertical-align: top;
}

.product-specs table td:first-child {
    font-weight: 400;
    width: 25%;
    color: var(--black);
    text-align: left;
    border-right: 1px solid #eee;
    padding-right: 5px;
    padding-left: 25px;
}

.product-specs table td:last-child {
    text-align: left;
    padding-left: 25px;
    color: var(--black);
    border-bottom: none !important;
}

.product-specs table tbody tr:first-child {
    font-weight: 600;
}

.product-specs table tbody tr:last-child {
    border-bottom: 0;
}

.book_isbn {
    border-bottom: none !important;
}

.product-specs table td a {
    color: var(--link-blue);
    text-decoration: none;
}

.product-specs table td a:hover {
    text-decoration: underline;
}

/* Author Info Section */
.author-info {
    display: flex;
    align-items: flex-start !important;
    gap: 25px;
}

.author-image {

    margin-left: 10px;
    flex-shrink: 0;
}

.author-image .circle-img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 50%;
    margin-left: 20px !important;
}

.author-details {
    flex: 1;
    margin-right: 30px;
    height: 450px !important;
    overflow-y: auto;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px;
}

.author-books-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.author-bio {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    padding-right: 5px;
}

.add-wish-and-share .wd-action-btn>a.added::before {
    content: "";
    display: inline-block;
    width: 17px;
    height: 16px;
    margin-right: 5px;
    background-color: var(--wd-primary-color);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 16"><path d="M8.20146 1.25349C10.1278 -0.475636 13.1046 -0.418232 14.9601 1.44115C16.8157 3.30053 16.8794 6.26283 15.1536 8.1949L8.20055 15.1589L1.24763 8.1949C-0.478058 6.26283 -0.413551 3.29584 1.44115 1.44115C3.29794 -0.415649 6.26954 -0.478203 8.20146 1.25349Z"/></svg>') no-repeat center;
    -webkit-mask-size: contain;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 16"><path d="M8.20146 1.25349C10.1278 -0.475636 13.1046 -0.418232 14.9601 1.44115C16.8157 3.30053 16.8794 6.26283 15.1536 8.1949L8.20055 15.1589L1.24763 8.1949C-0.478058 6.26283 -0.413551 3.29584 1.44115 1.44115C3.29794 -0.415649 6.26954 -0.478203 8.20146 1.25349Z"/></svg>') no-repeat center;
    mask-size: contain;
}

.custom-wishlist-item .tooltiptext {
    position: fixed;
    background-color: var(--black);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 9999;
    display: none;
}


.ff-wd-toast {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 10px 15px;
    border-radius: 6px;
    color: var(--white);
    opacity: 0;
    transition: all 0.4s ease;
    min-width: 200px;
    text-align: center;
    font-size: 14px;
    pointer-events: none;
}

.ff-wd-toast-success {
    background-color: var(--wd-primary-color);
}

.ff-wd-toast-error {
    background-color: #f44336;
}

.pdf-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.pdf-popup-content {
    background: transparent;
    max-width: 1200px;
    width: 90%;
    display: flex;
    border-radius: 8px;
    position: relative;
    margin-left: 150px;
}

.pdf-popup-right {
    background: transparent;
    position: relative;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

.pdf-popup-middle {
    width: 12px;
}

.pdf-popup-left {
    width: 800px;
    padding: 0;
}

.pdf-popup-content .info-part {
    background: var(--white);
    padding: 16px 20px;
    width: 275px;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

.pdf-popup-content .close-part {
    display: flex;
    color: var(--white);
    gap: 22px;
    cursor: pointer;
    margin-bottom: -8px;
}

.pdf-popup-content .close-part h3 {
    color: var(--white);
    font-size: 20px;
}

.pdf-popup-close {
    position: absolute;
    top: -3px;
    left: -2px;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    line-height: 31px;
}

.pdf-product-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.pdf-product-image img {
    max-width: 50px;
    min-height: 72px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-product-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
}

.pdf-product-author {
    margin-top: 5px;
}

.pdf-product-author a {
    font-size: 14px;
}

.pdf-product-price {
    font-weight: 600;
    margin-bottom: 15px;
}

.pdf-popup-add-to-cart {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdf-popup-add-to-cart .button {
    display: inline-block;
    width: 169px;
    background: var(--navy);
    border-radius: 34px;
    -webkit-border-radius: 34px;
    -moz-border-radius: 34px;
    -ms-border-radius: 34px;
    -o-border-radius: 34px;
}

.pdf-popup-add-to-cart span {
    line-height: 33px;
    color: var(--white);
}

.pdf-popup-add-to-cart p {
    border: none !important;
    padding: 0px !important;
    margin-bottom: 0px !important;
}

.pdf-popup-add-to-cart .button:hover {
    background: #3C1AB8;
}

.pdf-popup-left {
    background: #f0f0f0;
    padding: 0;
}

.pdf-iframe-wrapper {
    background: var(--white);
    padding: 20px;
    overflow: hidden;
}

.pdf-iframe-wrapper iframe {
    display: block;
    width: 100%;
    border: none !important;
    background: var(--white);
}

.scroll-spacer {
    display: none;
}

@media screen and (max-width: 767px) {
    .single-product-image-modal-content {
        width: 100%;
        height: auto;
        margin: 0;
        margin-top: 80px;
        border-radius: unset;
        border-top-right-radius: 20px;
        border-top-left-radius: 20px;
    }
/* 
    .modal-tab-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        overflow-y: auto;
        height: 692px;
        margin-top: 0 !important;
    } */

    .modal-tab-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        overflow-y: scroll;
        height: auto;
        margin-top: 0 !important;
    }

    .modal-tab-content {
        justify-content: unset !important;
    }

    .modal-tab-content img {
        margin-top: 0 !important;
    }

    .modal-tab-content .product-image {
        margin-top: 30px !important;
    }

    .product-specs table {
        margin-top: unset !important;
    }

    .product-short-description, .product-specs.product-short-description, .author-details {
        width: 90%;
        max-height: none;
        margin-top: unset !important;
        font-weight: 400;
        padding-left: 6px;
        overflow-y: unset;
    }

    .author-info {
        flex-direction: column;
        align-items: center !important;
        margin-top: 30px;
    }

    .modal-header h2 {
        font-size: 20px;
        overflow: hidden;
        max-width: 30ch;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .modal-tab-content-writer .author-details {
        margin-right: unset;
        max-height: 470px;
        overflow-y: unset;
    }

    .author-details .author-name, .author-details .author-books-count {
        text-align: center;
    }

    .author-image .circle-img {
        margin-left: unset !important;
        width: 170px;
        height: 170px;
    }

    .product-specs table td:first-child {
        width: 30%;
        padding-left: 0;
    }

    .author-info .author-bio {
        font-size: 16px;
        font-weight: 400;
    }

    .woocommerce-product-rating.modal-rating {
        margin-top: 1px !important;
        display: none;
    }

    .single-product-image-modal .modal-close-button {
        display: none;
    }

    .single-product-image-modal .modal-tab {
        background-color: #E0E7F1;
    }

    .single-product-image-modal {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99990;
        overflow: hidden;
    }

    .single-product-image-modal.open {
        display: block;
    }

    .single-product-image-modal .single-product-image-modal-content {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 92vh;
        max-height: 100vh;
        background: var(--white);
        border-radius: 25px 25px 0 0;
        box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.18);
        transform: translateY(100%);
        transition: transform 0.36s ease;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 99991;
        display: flex;
        flex-direction: column;
    }

    .single-product-image-modal .single-product-image-modal-content.active {
        transform: translateY(0);
    }

    .single-product-image-modal .single-product-image-modal-content.dragging {
        transition: none !important;
    }

    .single-product-image-modal .modal-header {
        padding-top: 25px;
        padding-bottom: 23px;
        text-align: center;
        border-bottom: 1px solid #eee;
        background: var(--white);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .single-product-image-modal .modal-tabs button {
        font-weight: 600;
        padding: 10px 0;
        font-size: 15px;
        border-bottom: 2px solid #E0E7F1;
    }

    #product-info-modal.open .modal-tabs button.active {
        color: var(--navy);
        border-bottom: 2px solid var(--navy);
    }

    .single-product-image-modal .drawer-handle-bar {
        width: 50px;
        height: 5px;
        background-color: #d8d8d8;
        border-radius: 3px;
        margin: 20px auto;
    }

    .single-product-image-modal-content .drag-handle {
        height: 10px !important;
    }

    .scroll-spacer {
        display: block;
        height: 20px;
    }
}