.gs_bookshowcase_popup {
    padding: 10px;
    box-sizing: border-box;
}

.gs_bookshowcase_popup_img,
.single-gs_bookshowcase .gs_book_img {
    width: 35%;
    text-align: center;
}

.gs_bookshowcase_popup_details {
    width: 64%;
    margin-left: 1%;
}

.gs_bookshowcase_popup .gs_bookshowcase_popup_img img {
    height: auto !important;
    max-width: 100%;
}

.gs_bookshowcase_popup_img,
.gs_bookshowcase_popup_details,
.single-gs_bookshowcase .gs_book_img,
.single-gs_bookshowcase .gs_book_details {
    display: inline-block;
    vertical-align: top;
}

.gs_bookshowcase_popup_details .gs-book-name,
.gs-single-container .gs-book-name {
    margin-bottom: 8px;
    text-align: left;
    font-family: cursive;
}

.gs_bookshowcase_popup_details .gs-book-desc,
.gs_bookshowcase_popup_details .gs-book-author,
.gs_bookshowcase_popup_details .gs-book-publish,
.gs_bookshowcase_popup_details .gs-book-publisher,
.gs_bookshowcase_popup_details .gs-book-translator,
.gs_bookshowcase_popup_details .gs-book-asin,
.gs_bookshowcase_popup_details .gs-book-pages,
.gs_bookshowcase_popup_details .gs-book-country,
.gs_bookshowcase_popup_details .gs-book-language,
.gs_bookshowcase_popup_details .gs-book-dimension,
.gs_bookshowcase_popup_details .gs-book-fsize,
.gs_bookshowcase_popup_details .gs-book-authordes,
.gs_bookshowcase_popup_details .gs-book-review,
.gs_bookshowcase_popup_details .gs-book-rating,
.gs_bookshowcase_popup_details .gs-book-url,
.gs-single-container .gs-book-desc,
.gs-single-container .gs-book-author,
.gs-single-container .gs-book-publish,
.gs-single-container .gs-book-publisher,
.gs-single-container .gs-book-translator,
.gs-single-container .gs-book-asin,
.gs-single-container .gs-book-pages,
.gs-single-container .gs-book-country,
.gs-single-container .gs-book-language,
.gs-single-container .gs-book-dimension,
.gs-single-container .gs-book-fsize,
.gs-single-container .gs-book-authordes,
.gs-single-container .gs-book-review,
.gs-single-container .gs-book-rating,
.gs-single-container .gs-book-url {
    margin-bottom: 6px;
    line-height: 1.5;
}

.gs_bookshowcase_popup_details .gs-bookshowcase-info,
.single-gs_bookshowcase .gs-bookshowcase-info {
    display: inline-block;
}

.white-popup {
    position: relative;
    background: #fff;
    width: auto;
    max-width: 80%;
    margin: 0 auto;
}

.gs_bookshowcase_popup .gs-book-desc {
    line-height: 1.3;
    font-size: 17px;
}




/* Gsb Popup Common  Style */

  // Magnific Popup
  .mfp-gsbook {

	color: #535353;

	.mfp-container:before {
		display: inline-block !important;
	}

	/* override the z-index */
	&.mfp-wrap {
		z-index: 1000001 !important;
		padding-left: 70px;
		padding-right: 70px;
        &, * {
            box-sizing: border-box;
        }
	}
	/* overlay at start */
	&.mfp-fade.mfp-bg {
		opacity: 0;
		transition: all 0.15s ease-out;
	}
	/* overlay animate in */
	&.mfp-fade.mfp-bg.mfp-ready {
		opacity: 0.8;
	}
	/* overlay animate out */
	&.mfp-fade.mfp-bg.mfp-removing {
		opacity: 0;
	}
	
	/* content at start */
	&.mfp-fade.mfp-wrap .mfp-content {
		opacity: 0;
		transition: all 0.15s ease-out;
	}
	/* content animate it */
	&.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
		opacity: 1;
	}
	/* content animate out */
	&.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
		opacity: 0;
	}

	.mfp-content--container {
		animation: gsteam_popup_anim 0.8s
	}

	.mfp-container .mfp-arrow {
		&,
		&:hover {
			background: rgba(255, 255, 255, .12) !important;
		}
	}

	.mfp-arrow {

		width: 44px !important;
		height: 44px !important;
		border-radius: 50%;
		color: #fff;
		outline: none !important;
		transition: all .2s ease-in-out;

		&:before {
			// font: normal normal normal 14px/1 FontAwesome;
			// text-rendering: auto;
			// -webkit-font-smoothing: antialiased;
			// -moz-osx-font-smoothing: grayscale;
			// border: none;
			// background: none;
			// margin: 0;
			// padding: 0;
			// font-size: 16px;
			// width: auto;
			// height: auto;
			// line-height: 46px;
			// display: block !important;
			// opacity: 1;

            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            background: none;
            border: none;
            display: block !important;
            font-family: Font Awesome\ 5 Free;
            font-size: 16px;
            font-weight: 900;
            height: auto;
            line-height: 46px;
            margin: 0;
            opacity: 1;
            padding: 0;
            width: auto;
		}

		&:after {
			content: none !important;
			display: none !important;
		}

		&.mfp-arrow-left {
			left: 20px !important;
			&:before {
				content: "\f053";
				margin-left: 16px;
			}
		}
		&.mfp-arrow-right {
			right: 20px !important;
			&:before {
				content: "\f054";
				margin-left: 18px;
			}
		}

		&, &:active {
			margin: 0 !important;
		}

	}

	.mfp-close {
		top: 10px !important;
		right: 10px !important;
		text-decoration: none !important;
		outline: none !important;
		border: none !important;
		
		&:after {
			content: none !important;
			display: none !important;
		}

	}

	&.mfp-removing {
		.mfp-arrow {
			opacity: 0;
			visibility: hidden;
		}
	}

}

.gs-book-popup--default .mfp-content--container {

    padding: 40px;

    .gs-book-details {
        padding-left: 40px;
    }

    .gs-book-desc {
        padding-top: 30px;
        margin-top: 40px;
        border-top: 1px solid #ddd;
    }
}

/* Css By Manzur 
================*/
.gs-book-popup--default {

    .gs_book_popup {

        --gsb-sp-section-space: 40px;

        max-width: 1172px;
        padding: 32px!important;
        width: 100%;
        margin-top: 48px;

        .mfp-content--container {
            padding: 0;
        }

        .gsb-sp-spacing-border {
            border-bottom: 1px solid #e5e5e5;
            padding-bottom: 28px;
            line-height: 0;
        }

        /* Popup Style 02 */
        .popup-navigation {

            a {
                line-height: 0;
                // background-color: red;
                display: inline-block;

                svg {
                    width: 20px;
                    height: 20px;
                }
            }
            
        }

        /* Popup Style 02 */
        .mfp-close {
            top: 22px !important;
            right: 38px !important;

            svg {
                width: 20px;
                height: 20px;
            }
        }
    }
}

.gs-book-popup--style_one,
.gs-book-popup--style_two,
.gs-book-popup--style_three,
.gs-book-popup--style_four,
.gs-book-popup--style_five {
    --gsb-sp-section-space: 50px;

    .gs_book_popup {
        max-width: 1172px;
        padding: 48px 32px;
        width: 100%;
        margin-top: 48px;

        .mfp-close {
            top: 10px !important;
            right: 10px !important;

            svg {
                width: 16px;
                height: 16px;
            }
        }

        ul.buy-store-link {
            margin-bottom: 16px;
        }

        .gsb-sp-spacing-border {
            border-bottom: 1px solid #e5e5e5;
            padding-bottom: 48px;
            line-height: 0;
        }
    }
}

/* gsb popup style One */
.gs-book-popup--style_one {
    --gsb-sp-section-space: 50px;

    .mfp-container {

        .mfp-content {
            .mfp-close {

                // top: 40px !important;
                // right: 40px !important;
                svg {
                    path {
                        fill: #030d1e;
                    }
                }

                &:hover svg path {
                    fill:#7948ff
                }
            }
        }
    }
}

/* gsb popup style Two */
.gs-book-popup--style_two {

    .gs_book_popup {
        --gsb-sp-title-font-family: "Hind", system-ui;
        padding: 24px 32px;

        .mfp-content--container {

            .gs-containeer-f {
    
                .popup-navigation {
                    border-bottom: 1px solid #e5e5e5;
                    padding-bottom: 24px;
                    margin-bottom: 30px;
        
                    .popup-nav {
        
                        svg {
                            height: 16px !important;
                            width: 16px !important;
        
                            path {
                                fill: #cccccc;
                                cursor: pointer;
                            }
        
                            &:hover path {
                                fill: #7948ff;
                            }
                        }
                    }
                }
            }
        }

        .mfp-close {
            right: 32px !important;
            top: 10px !important;

            svg {
                path {
                    fill: #cccccc;
                }
            }

            &:hover svg path {
                fill:#7948ff
            }
        }
    }
}

/* gsb popup style Three */
.gs-book-popup--style_three {

    .gsb--scrollbar {
        &::-webkit-scrollbar-thumb {
            background-color: #FF4C4C;
        }
    }

    .mfp-content--container {

        .gs-containeer-f {

            .popup-navigation {
                border-bottom: 1px solid #e5e5e5;
                padding-bottom: 14px;
                margin-bottom: 30px;
                margin-left: -10px;
    
                .popup-nav {
    
                    svg {
                        height: 16px !important;
                        width: 16px !important;
    
                        path {
                            fill: #cccccc;
                            cursor: pointer;
                        }
    
                        &:hover path {
                            fill: #7948ff;
                        }
                    }
                }
            }

        }
    }

    .mfp-container {

        .mfp-content {

            .mfp-close {
                top: 2px !important;
                right: 18px !important;

                svg {
                    width: 16px;
                    height: 16px;

                    path {
                        fill: #030d1e;
                    }
                }

                &:hover svg path {
                    fill:#7948ff
                }
            }
        }
    }

    .gs_book_popup {

        --gsb-sp-link-color: #FF4C4C;

        .gsb-sp-top-content {
            flex-direction: row-reverse;
        }

        .gs-col-md-12 {
            padding-left: 0;
            padding-right: 0;
        }
    } 
}

/* gsb popup style Four */
.gs-book-popup--style_four {

    .gs-book--scrollbar {
        &::-webkit-scrollbar-thumb {
            background-color: #7948ff;
        }
    }

    .gsb--scrollbar {
    
        &::-webkit-scrollbar-thumb {
            background-color: #7948FF;
        }
    }

    .gs_book_popup {
        padding: 48px 32px;
    }

    .mfp-content--container {

        .gs-containeer-f {

            .popup-navigation {
    
                .popup-nav {
    
                    svg {
                        height: 24px !important;
                        width: 24px !important;
    
                        path {
                            fill: #cccccc;
                            cursor: pointer;
                        }
    
                        &:hover path {
                            fill: #7948ff;
                        }
                    }
                }
            }

            .gs-col-md-4 {
                width: 34.333333%;
            }

            .gs-col-md-8 {
                width: 65.666667%;
            }
        }
    }

    .mfp-container {

        .mfp-content {
            padding-top: 100px;

            .mfp-close {
                top: -44px !important;
                right: 10px !important;

                svg {
                    path {
                        fill: #ffffff;
                    }
                }

                &:hover svg path {
                    fill:#7948ff
                }
            }
        }
    }
}

/* gsb popup style Five */
.gs-book-popup--style_five {

    --gsb-sp-section-space: 30px;

    .gs_book_popup {
        // max-width: 1450px;
        // --gsb-sp-title-font-family: "Hind", system-ui;

        .gsb-sp-spacing-border {
            padding-bottom: 20px;
        }
    }

    .gs-book--scrollbar {
        &::-webkit-scrollbar-thumb {
            background-color: #7948ff;
        }
    }

    .gs_book_popup {
        padding: 50px 36px !important;
    }

    .gsb-author-details {
        margin-top: 20px;
    }

    .gsb-author-bio-wrapper {
        flex-direction: column;

        .gsb-author-img {
            width: 100%;

            .gs_book_author_img {
                width: 100%;
                height: 200px;
                border-radius: 5px;

                img {
                    width: 100%;
                    height: 100%;
                    border-radius: inherit;
                }
            }
        }

        .gsb-author-bio {
            padding-left: 0;
            margin-top: 16px;
        }
    }

    .mfp-content--container {

        .gs-containeer-f {

            .gs-col-md-4 {
                width: 31%;
            }

            .gs-col-md-8 {
                width: 69%;
            }

            .gsb-right-section {
                display: flex;
                flex-direction: row;

                .gsb-right-content-left {
                    width: 50%;
                    padding-left: 24px;
                    // padding-right: 60px;
                    // border-right: 2px solid #e5e5e5;

                    .gsb-sp-info-details-top {
                        max-height: 284px;
                        overflow: hidden;
                        overflow-y: auto;
                    }
                }

                .gsb-right-content-right {
                    width: 50%;
                    max-height: 475px;
                    overflow: hidden;
                    overflow-y: auto;
                    padding-left: 24px;
                    padding-right: 24px;

                    .gsb-right-content-top {
                        border-bottom: 1px solid #e5e5e5;
                        padding-bottom: 30px;
                    }
                }
            }

            .gs-book-details {
                padding-left: 0;
                padding-bottom: 30px;

                .gsb-right-top {
                    display: flex;
                    justify-content: space-between;
                    align-items: center; 
                }
            }
        }
    }

    .mfp-container {

        .mfp-content {
            padding-top: 100px;

            .mfp-close {
                top: -44px !important;
                right: 10px !important;

                svg {
                    path {
                        fill: #ffffff;
                    }
                }

                &:hover svg path {
                    fill:#7948ff
                }
            }
        }
    }
}


/* Responsive */
@media (min-width: 768px) and (max-width: 1024px) {

    .gs-book-popup--style_five {

        .mfp-content {
           
            .gs_book_popup {
                padding: 24px 16px !important;

                .gs-roow {

                    .gs-col-md-8 {

                        .gsb-right-section {
                            flex-direction: column;

                            .gsb-right-content-left {
                                width: 100%;
                                padding-right: 0px;
                                padding-left: 0px;
                                border-right: none;
                            }

                            .gsb-right-content-right {
                                width: 100%;
                                padding-left: 0px;
                                padding-right: 0px;
                                border-right: none;
                                max-height: inherit;
                            }
                        }
                    }
                }

                /* gsb popup style Three */
                .gs-book-popup--style_three {

                    .gs_book_popup {
                        padding: 48px 20px;

                        .gsb-sp-top-content {
                            gap: 30px;
                            
                            .gsb-sp-cover-img {
                                width: 45%;
                            }

                            .gsb-sp-info-details {
                                width: 55%;
                            }
                        } 
                    } 
                }
            }
        }
    }
}

@media (min-width: 480px) and (max-width: 767px) {

    .gs-book-popup--style_one,
    .gs-book-popup--style_two,
    .gs-book-popup--style_three,
    .gs-book-popup--style_four,
    .gs-book-popup--style_five {
        --gsb-sp-section-space: 50px;
    
        .gs_book_popup {
            // max-width: 1172px;
            padding: 48px 0px;
            // width: 100%;
            // margin-top: 48px;
            // background-color: #ffebeb;


            .mfp-close {
                top: 0px !important;
                right: 0px !important;
            }
        }
    }

    .gs-book-popup--style_two {

        .gs_book_popup {
            padding: 20px 0px !important;

            // .mfp-container {

            //     .mfp-content {

            //         .mfp-close {
            //             right: 0 !important;
            //         }
            //     }
            // }
        }
    }

    /* gsb popup style Three */
    .gs-book-popup--style_three {

        .mfp-container {

            .mfp-content {

                .mfp-close {
                    top: 2px !important;
                    right: 6px !important;
                }
            }
        }

        .gs_book_popup {
            padding: 48px 20px;

            .gsb-sp-top-content {
                flex-direction: column;
            }
        } 
    }

    /* gsb popup style Three */
    .gs-book-popup--style_four {

        .mfp-container {

            .mfp-content {

                .mfp-close {
                    top: 2px !important;
                    right: 6px !important;
                }
            }
        }

        .gs_book_popup {
            padding: 48px 20px;

            .gsb-sp-top-content {
                flex-direction: column;
            }
        } 
    }

    .gs-book-popup--style_five {

        .mfp-content {
           
            .gs_book_popup {
                padding: 24px 16px !important;

                .gs-roow {

                    .gs-col-md-4 {
                        width: 100%;
                        padding-left: 0px;
                        padding-right: 0px;
                    }

                    .gs-col-md-8 {
                        width: 100%;

                        .gsb-right-section {
                            flex-direction: column;

                            .gsb-right-content-left {
                                width: 100%;
                                padding-right: 0px;
                                padding-left: 0px;
                                padding-top: 32px;
                                border-right: none;
                            }

                            .gsb-right-content-right {
                                width: 100%;
                                padding-left: 0px;
                                padding-right: 0px;
                                border-right: none;
                                max-height: inherit;
                            }
                        }
                    }
                }

                .gsb-author-bio-wrapper {

                    .gsb-author-bio {
                        padding-left: 0;
                    }

                    .gsb-author-img {

                        .gs_book_author_img {

                            img {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 479px) {

    .gs-book-popup--style_one,
    .gs-book-popup--style_two,
    .gs-book-popup--style_three,
    .gs-book-popup--style_four,
    .gs-book-popup--style_five {
        --gsb-sp-section-space: 50px;
    
        .gs_book_popup {
            // max-width: 1172px;
            padding: 48px 0px;
            // width: 100%;
            // margin-top: 48px;
            // background-color: #ffebeb;


            .mfp-close {
                top: 0px !important;
                right: 0px !important;
            }
        }
    }

    .gs-book-popup--style_two {

        .gs_book_popup {
            padding: 20px 0px !important;

            .mfp-container {

                .mfp-content {

                    .mfp-close {
                        right: 0 !important;
                    }
                }
            }
        }
    }

    /* gsb popup style Three */
    .gs-book-popup--style_three {

        .mfp-container {

            .mfp-content {

                .mfp-close {
                    top: -8px !important;
                    right: 0px !important;
                }
            }
        }

        .gs_book_popup {

            .gsb-sp-top-content {
                flex-direction: column;
            }
        } 
    }

    .gs-book-popup--style_five {

        .mfp-content {
           
            .gs_book_popup {
                padding: 24px 16px !important;

                .gs-roow {

                    .gs-col-md-4 {
                        width: 100%;
                        padding-left: 0px;
                        padding-right: 0px;
                    }

                    .gs-col-md-8 {
                        width: 100%;

                        .gsb-right-section {
                            flex-direction: column;

                            .gsb-right-content-left {
                                width: 100%;
                                padding-right: 0px;
                                padding-left: 0px;
                                padding-top: 32px;
                                border-right: none;
                            }

                            .gsb-right-content-right {
                                width: 100%;
                                padding-left: 0px;
                                padding-right: 0px;
                                border-right: none;
                                max-height: inherit;
                            }
                        }
                    }
                }

                .gsb-author-bio-wrapper {

                    .gsb-author-bio {
                        padding-left: 0;
                    }

                    .gsb-author-img {

                        .gs_book_author_img {

                            img {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                }
            }
        }
    }
}

/*==========================================================================
  Popup frame, shared by every popup style: a centered card up to 1120px wide
  with rounded corners and a round close button. Phones get a full-screen sheet.
==========================================================================*/
.mfp-wrap.mfp-gsbook {
    // Accent Color of the matching single page style (set inline per popup style); purple by default.
    --gsb-popup-accent-color: var(--gsb-popup-accent, #7948FF);

    .mfp-container {
        padding: 5vh 16px;
    }

    .gs_book_popup {
        --gsb-sp-link-color: var(--gsb-popup-accent-color);

        // Download button in the popup's accent color.
        .gsb-book-info .gsb-download-url .gsb-info-single-value a.gsb-download-link {
            background: var(--gsb-popup-accent-color);
            box-shadow: 0 6px 16px color-mix(in srgb, var(--gsb-popup-accent-color) 28%, transparent);

            &:hover,
            &:focus {
                background: color-mix(in srgb, var(--gsb-popup-accent-color) 86%, #000);
            }
        }

        .gsp-thumb-slider {
            --gsb-gallery-accent: var(--gsb-popup-accent-color);
        }
    }

    .mfp-content .gs_book_popup {
        position: relative;
        box-sizing: border-box;
        width: 100%;
        max-width: 1120px;
        margin: 0 auto;
        padding: 0 !important; // older per-style rules add padding here, mostly on phones
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 30px 80px rgba(9, 12, 22, .35);

        .mfp-content--container {
            max-width: none;
            margin: 0;
            padding: 40px;
        }
    }

    // Older per-style rules pushed some popups down and moved the close button outside.
    .mfp-content {
        padding: 0 !important;
    }

    .mfp-content .gs_book_popup .mfp-close {
        position: absolute;
        top: 14px !important;
        right: 14px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
        border-radius: 50%;
        background: #f3f0ff;
        background: color-mix(in srgb, var(--gsb-popup-accent-color) 12%, #fff);
        opacity: 1;
        line-height: 1;
        cursor: pointer;
        transition: background-color .2s ease;

        svg {
            width: 14px;
            height: 14px;
            pointer-events: none;

            path {
                fill: var(--gsb-popup-accent-color);
                transition: fill .2s ease;
            }
        }

        &:hover,
        &:focus-visible {
            background: var(--gsb-popup-accent-color);

            svg path {
                fill: #fff;
            }
        }
    }

    // Previous / next book: round buttons in the accent color with a white chevron.
    // (.mfp-container raises the weight above an older translucent arrow style.)
    .mfp-container .mfp-arrow,
    .mfp-container .mfp-arrow:hover {
        background: var(--gsb-popup-accent-color) !important;
    }

    .mfp-arrow {
        width: 48px !important;
        height: 48px !important;
        margin-top: -24px;
        border-radius: 50%;
        background: var(--gsb-popup-accent-color) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
        opacity: 1;
        transform: none;
        transition: filter .2s ease, transform .2s ease;

        &::after {
            display: none !important;
        }

        &::before {
            content: "" !important;
            position: absolute;
            top: 50%;
            left: 50%;
            width: 11px !important;
            height: 11px !important;
            margin: 0 !important;
            border: 0 !important;
            border-top: 2.5px solid #fff !important;
            border-left: 2.5px solid #fff !important;
            opacity: 1 !important;
            background: none !important;
        }

        &:hover {
            filter: brightness(.9);
        }

        &:focus-visible {
            outline: 2px solid #fff;
            outline-offset: 3px;
        }
    }

    .mfp-arrow-left {
        left: 24px;

        &::before {
            transform: translate(-30%, -50%) rotate(-45deg);
        }
    }

    .mfp-arrow-right {
        right: 24px;

        &::before {
            transform: translate(-70%, -50%) rotate(135deg);
        }
    }
}

@media (max-width: 767px) {
    .mfp-wrap.mfp-gsbook {

        .mfp-container {
            padding: 0;
        }

        .mfp-content {
            vertical-align: top;
        }

        .mfp-content .gs_book_popup {
            max-width: none;
            min-height: 100vh;
            border-radius: 0;
            box-shadow: none;

            .mfp-content--container {
                padding: 64px 18px 32px;
            }
        }

        .mfp-content .gs_book_popup .mfp-close {
            position: fixed;
            top: 12px;
            right: 12px;
            z-index: 5;
        }

        // Previous / next arrows would sit on top of the content on a phone.
        .mfp-arrow {
            display: none;
        }
    }
}

/*==========================================================================
  Popup Style One: Quick View
==========================================================================*/
.gs_book_popup .gsb-qv {
    --gsb-qv-accent: var(--gsb-popup-accent, var(--gsb-sp-link-color, #7948FF));
    color: #111827;
    text-align: left;

    .gsb-qv__top {
        display: grid;
        grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
        gap: 36px;
        align-items: start;
    }

    .gsb-qv__cover {
        min-width: 0;

        .gsb-sp-cover-img,
        .gsp-thumb-slider {
            width: 100% !important;
            margin: 0;
        }

        .gsb-sp-cover-img img {
            display: block;
            width: 100%;
            height: auto;
            border-radius: 10px;
            box-shadow: 0 16px 36px rgba(17, 24, 39, .18);
        }

        // An older popup rule puts 10px above every gallery image, which left a gap above the thumbnails.
        .gsp-thumb-slider .gsb-gallery-img {
            margin: 0 !important;
        }

        // Gallery: the main image keeps a book shape; thumbnails sit below it.
        .gsp-thumb-slider .mySwiper2 {
            overflow: hidden;
            border-radius: 10px;
            box-shadow: 0 16px 36px rgba(17, 24, 39, .18);

            .gsb-gallery-img {
                display: block;
                width: 100%;
                aspect-ratio: 2 / 3;
                object-fit: cover;
            }
        }

        .gsp-thumb-slider .mySwiper {
            margin-top: 10px;

            .gsb-gallery-img {
                display: block;
                width: 100%;
                aspect-ratio: 1;
                object-fit: cover;
                border-radius: 6px;
            }
        }
    }

    .gsb-qv__main {
        min-width: 0;
        padding-top: 4px;

        .gsb-title h2 {
            margin: 0 0 8px;
            padding-right: 40px;
            font-family: inherit !important;
            font-size: clamp(24px, 2.6vw, 32px);
            font-weight: 700;
            line-height: 1.2;
            color: #0f172a;
        }

        .gsb-authors {
            margin: 0 0 14px;

            h4 {
                margin: 0;
                font-size: 15px;
            }
        }

        .gsb-short-desc {
            margin: 0 0 18px;
            font-size: 15px;
            line-height: 1.7;
            color: #4b5563;
        }
    }

    // Key facts as small chips.
    .gsb-qv__facts {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 0 0 20px;

        > * {
            margin: 0 !important;
        }

        > *:not(:has(.gsb-info-single)) {
            display: none;
        }

        .gsb-info-single {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin: 0 !important;
            padding: 9px 14px !important;
            border: 1px solid #e5e7eb !important;
            border-radius: 10px;
            background: #fafbfc;
        }

        .gsb-info-single-name {
            width: auto !important;
            margin: 0 !important;
            font-size: 12px;
            font-weight: 500;
            color: #6b7280;

            .gsb-info-single-icon {
                display: none;
            }
        }

        .gsb-info-single-value {
            font-size: 15px;
            font-weight: 600;
            color: #111827;
        }

        .gsbook--rating--wrapper {
            font-size: 16px;
        }
    }

    .gsb-qv__stores {
        margin: 0 0 4px;

        .gsb-retails {
            margin: 0 !important;
        }

        .gsb-sp-label h3 {
            margin-bottom: 10px !important;
            font-size: 12px !important;
            font-weight: 600 !important;
            letter-spacing: .08em !important;
            text-transform: uppercase !important;
            color: #6b7280 !important;
        }

        ul.buy-store-link.gsb-stores {
            margin: 0 !important;
        }
    }

    .gsb-qv__more {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-top: 18px;
        font-size: 15px;
        font-weight: 600;
        color: var(--gsb-qv-accent);
        text-decoration: none;

        i {
            font-size: 12px;
            transition: transform .2s ease;
        }

        &:hover {
            text-decoration: underline;
            text-underline-offset: 4px;

            i {
                transform: translateX(3px);
            }
        }
    }

    // Sections that open on demand.
    .gsb-qv__sections {
        margin-top: 32px;
        border-top: 1px solid #eef0f3;

        &:empty {
            display: none;
        }
    }

    .gsb-qv__section {
        border-bottom: 1px solid #eef0f3;

        > summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 16px 2px;
            list-style: none;
            font-size: 16px;
            font-weight: 600;
            color: #111827;
            cursor: pointer;

            &::-webkit-details-marker {
                display: none;
            }

            &::after {
                content: "";
                flex: 0 0 auto;
                width: 8px;
                height: 8px;
                margin-right: 4px;
                border-right: 2px solid #9ca3af;
                border-bottom: 2px solid #9ca3af;
                transform: rotate(45deg) translateY(-2px);
                transition: transform .2s ease;
            }

            &:hover {
                color: var(--gsb-qv-accent);
            }

            &:focus-visible {
                outline: 2px solid var(--gsb-qv-accent);
                outline-offset: 2px;
            }
        }

        &[open] > summary::after {
            transform: rotate(-135deg) translateY(-2px);
        }
    }

    .gsb-qv__panel {
        padding: 0 0 22px;

        // The section name is already in the row above.
        .gsb-sp-label,
        .book-label {
            display: none !important;
        }

        .gsb-description,
        .gsb-book-formats,
        .gsb-author-details,
        .gs-book-review {
            margin: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            box-shadow: none !important;
            background: none !important;
        }
    }

    // An older rule adds space above every .gsb-book-info.
    .gsb-qv__details.gsb-book-info,
    .gsb-qv__facts.gsb-book-info {
        margin-top: 0 !important;
    }

    // Book Details: two columns of label / value rows.
    .gsb-qv__details {
        column-count: 2;
        column-gap: 40px;

        > * {
            break-inside: avoid;
        }

        .gsb-info-single {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin: 0 !important;
            padding: 7px 0 !important;
            border: 0 !important;
        }

        .gsb-info-single-name {
            flex: 0 0 44%;
            width: auto !important;
            min-width: 0;
            margin: 0 !important;
            font-size: 14px;
            color: #030D1E;
        }

        .gsb-info-single-value {
            flex: 1 1 auto;
            min-width: 0;
            font-size: 14px;
            color: var(--gsb-sp-info-color, #4B5563);
            overflow-wrap: anywhere;
        }
    }
}

@media (max-width: 767px) {
    .gs_book_popup .gsb-qv {

        .gsb-qv__top {
            grid-template-columns: minmax(0, 1fr);
            gap: 24px;
        }

        .gsb-qv__cover {
            width: 100%;
            max-width: 200px;
            margin: 0 auto;
        }

        .gsb-qv__main .gsb-title h2 {
            padding-right: 0;
        }

        .gsb-qv__details {
            column-count: 1;

            .gsb-info-single {
                flex-direction: row !important;
            }

            .gsb-info-single-name {
                flex-basis: 46% !important;
                width: auto !important;
                margin: 0 !important;
            }
        }
    }
}

/* Popup Styles Two to Five (Hero, Magazine, Tabbed, Side Drawer) and the popup gallery are
   part of GS Books Showcase Pro, which ships its own stylesheet. */

/*-- Author photo in popups on a phone: a square photo
     above the name and bio. An older rule made it full width, which cropped it into a strip. --*/
@mixin gsb-popup-author-stacked {
    .gsb-author-bio-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px;
        padding-left: 0 !important;
    }

    .gsb-author-img {
        flex: 0 0 auto !important;
        width: 120px !important;
        max-width: 120px !important;
        margin: 0 !important;

        .gs_book_author_img,
        img {
            width: 120px !important;
            height: 120px !important;
            max-width: none;
        }

        img {
            display: block;
            object-fit: cover;
            object-position: center top;
            border-radius: 12px !important;
        }
    }

    .gsb-author-bio {
        margin-top: 0 !important;
        padding-left: 0 !important;
    }
}

@media (max-width: 767px) {
    .mfp-wrap.mfp-gsbook .gs_book_popup {
        @include gsb-popup-author-stacked;
    }
}
