.bookshelf_3D_container {
    width: 100%;
    height: 636px;
    text-align: center;
    overflow: hidden;
    position: relative;
    /* perspective: 1000px; */
    background: rgba(7, 10, 33, 1);
    /* background: transparent; */

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    font-family: 'Nunito Sans';
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /* margin-bottom: 20px; */
    margin-top: -20px
}

.bookshelf_3D_container .bookshelf_3D_slider{
    position: relative;
    width: 260px;
    height: 400px;
    transform-style: preserve-3d;
    /* top: 10%; */
    /* left: 50%; */
    /* transform: translateX(-50%) perspective(100vw) rotateX(-18deg) rotateY(0deg); */
    transform: perspective(100vw) rotateX(-18deg) rotateY(0deg);

    /* margin-top: 65px; */
    

    transition: transform 0.8s ease-in-out;
    will-change: transform;
     z-index: 2;
    /* animation: autoRun 20s linear infinite; */
    pointer-events: auto;
}



.bookshelf_3D_container .bookshelf_3D_slider .bookshelf_3D_item {
    position: absolute;
    inset: 0;
    /* transform:
        rotateY(calc((var(--position) - 1) * (360deg / var(--quantity))))
        translateZ(360px); */

    /* backface-visibility: visible; */
    transform-style: preserve-3d;
    transition: filter 0.6s ease, opacity 0.6s ease, transform 0.8s ease-in-out;
    filter: blur(1px);
    opacity: 0.8;
    border-radius: 24px;
    height: 360px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;    
    will-change: transform;
}

.bookshelf_3D_slider .column_3D_slider {
    position: absolute;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 1438px;
    height: 1048px;

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 3;
}

.background-swiper-next-btn-3d,
.background-swiper-prev-btn-3d {
    position: absolute;
    width: 70px;
    height: 70px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center center;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.background-swiper-next-btn-3d {
    background-image: url('https://cdn1.fahasa.com/media/hoisach_2026/arrow-right-neon.svg');
    right: 5%;
}

.background-swiper-prev-btn-3d {
    background-image: url('https://cdn1.fahasa.com/media/hoisach_2026/arrow-left-neon.svg');
    left: 5%;
}
/* 
.background-swiper-next-btn,
.background-swiper-prev-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.32);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center center;
    cursor: pointer;
}

.background-swiper-next-btn {
    right: 16px;
}

.background-swiper-prev-btn {
    left: 16px;
}

.background-swiper-next-btn::before,
.background-swiper-prev-btn::before {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    background: url(/skin/frontend/ma_vanese/fahasa/images/ico_arrow_gray.svg) no-repeat center center;
    background-size: contain;
    transition: transform 0.6s ease;
}

.background-swiper-next-btn::before {
    transform: rotate(180deg);
}

.background-swiper-next-btn.disabled-nav,
.background-swiper-prev-btn.disabled-nav {
    pointer-events: none;
    cursor: pointer !important;
} */
 

.bookshelf_3D_item .book-card {
    position: relative;
    overflow: hidden;

    border-radius: 24px;
    padding: 16px;
    width: 100%;
    height: 100%;
    background: rgba(37, 30, 151, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* backface-visibility: hidden; */
    -webkit-font-smoothing: subpixel-antialiased;
    transform: translateZ(0);
    text-rendering: optimizeLegibility;
}


.bookshelf_3D_item .book-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;

    background: linear-gradient(
        180deg,
        #6fe8ff 0%,
        #6fe8ff 6%,
        #ffffff 22%,
        #ffffff 78%,
        #6fe8ff 94%,
        #6fe8ff 100%
    );


    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    padding: 3px;
}


.bookshelf_3D_item .book-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.bookshelf_3D_item .book-thumb img {
    /* width: 100%; */
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    /* aspect-ratio: 1/1; */
    /* background-color: white; */
    image-rendering: -webkit-optimize-contrast;
    /* backface-visibility: hidden; */
    pointer-events: none;
}

.bookshelf_3D_item .discount-badge {
    position: absolute;
    top: 22px;
    left: 1.5px;
    background: linear-gradient(180deg, #FD3E74 0%, #D10A28 100%);

    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-bottom-right-radius: 6px;
    border-top-right-radius: 6px;
    z-index: 11;
}

.bookshelf_3D_item .book-info {
    background: rgba(7, 10, 33, 0.8);
    height: 60px;
    padding: 4px 10px;
    margin-top: 10px;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 8px;
}

.bookshelf_3D_item .book-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;

    overflow: hidden;
    margin-bottom: 4px;

    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #0044ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 6px rgba(0, 68, 255, 0.7)) drop-shadow(0 0 2px rgba(0, 68, 255, 1));


    text-align: center;
}


.bookshelf_3D_item .book-price {

    display: flex;
    align-items: center;
    justify-content: center;
}

.bookshelf_3D_item .price-final {
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #ff0033 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 6px rgba(255, 0, 51, 0.6)) drop-shadow(0 0 2px rgba(255, 0, 51, 0.8));
}


.bookshelf_3D_item .price-org {
    font-size: 13px;
    color: rgba(255, 255, 255, 1);
    text-decoration: line-through;
    margin-left: 8px;
}

.bookshelf_3D_item .btn-add-cart-3d-wrap{
    border-radius: 4px;
    border: 2px solid rgba(218, 240, 255, 1);

    box-shadow: 0px 0px 3px 0px rgba(26, 160, 200, 1);
    margin-top: 10px;
    padding: 0.8px;
}

.bookshelf_3D_item .btn-add-cart-3d {
    background: linear-gradient(180deg, #CE2A3C 0%, #87112C 55.6%, #6D0452 89.11%);
    border: 1.5px solid rgba(255, 175, 211, 1);
    box-shadow: 0px 0px 4px 1px rgba(250, 120, 178, 1) inset;

    color: #fff;
    padding: 10px 0;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
}

/* .bookshelf_3D_item:not(.active-item) .book-card {
    opacity: 0.5;
    transform: scale(0.9);
}

.bookshelf_3D_item.active-item .book-card {
    opacity: 1;
    transform: scale(1.05);
} */

.bookshelf_3D_banner {
    /* width: 100%; */
    display: flex;
    justify-content: center;
    /* margin-bottom: 20px; */
}

/* .bookshelf_3D_banner_img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
} */

.bookshelf_3D_banner_img {
    display: inline-block;
    max-width: 70%;
    height: auto;
    z-index: 1000;
}


@media (min-width: 993px) {
    .background-swiper-next-btn-3d:hover,
    .background-swiper-prev-btn-3d:hover {
        filter: brightness(1.2);
        transform: translateY(-50%) scale(1.2);
        opacity: 1;
    }

    /* .background-swiper-next-btn:hover,
    .background-swiper-prev-btn:hover {
        transform: translateY(-50%) scale(1.24);
        opacity: 1;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.1);
    }

    .background-swiper-next-btn:hover::before,
    .background-swiper-prev-btn:hover::before {
        transform: rotate(0deg);
        width: 26px;
        height: 26px;
        filter: brightness(0.6);
    }

    .background-swiper-next-btn:hover::before {
        transform: rotate(180deg);
        width: 26px;
        height: 26px;
        filter: brightness(0.6);
    } */
}

@media (max-width: 992px) {
    .bookshelf_3D_container {
        height: 500px;
    }

    .column_3D_slider{
        /* top: 90% !important; */
        width: 900px !important;
    }

    .bookshelf_3D_item .book-card{
        padding: 12px !important
    }
    .bookshelf_3D_item .book-title{
        font-size: 14px !important;
    }
    .bookshelf_3D_item .book-info{
        margin-top: 8px;
    }
    .bookshelf_3D_item .price-final{
        font-size: 14px !important;
    }
    .bookshelf_3D_item .price-org{
        font-size: 13px !important;
        margin-left: 6px;
    }
    .bookshelf_3D_slider .bookshelf_3D_item{
        width: 200px !important;
        height: 280px !important;
    }
    .btn-add-cart-3d-wrap{
        margin-top: 8px !important;
    }
    .bookshelf_3D_item .btn-add-cart-3d{
        padding: 6px;
        font-size: 13px !important;
    }
    .bookshelf_3D_container .bookshelf_3D_slider {
        width: 200px;
        height: 360px;
        /* top: 10%;
        margin-top: 40px; */
        /* transform: translateX(-50%) perspective(100vw) rotateX(-18deg) rotateY(0deg); */
        transform: perspective(100vw) rotateX(-18deg) rotateY(0deg);
    }

    /* .bookshelf_3D_container .bookshelf_3D_slider .bookshelf_3D_item {
        transform:
            rotateY(calc((var(--position) - 1) * (360deg / var(--quantity))))
            translateZ(260px);
    } */

    /* .background-swiper-next-btn {
        right: 8px;
    }

    .background-swiper-prev-btn {
        left: 8px;
    } */

    .background-swiper-next-btn-3d,
    .background-swiper-prev-btn-3d {
        width: 70px;
        height: 70px;
    }

    .background-swiper-next-btn-3d {
        right: 0%;
    }

    .background-swiper-prev-btn-3d {
        left: 0%;
    }
}

@media (max-width: 768px) {
    .bookshelf_3D_item .price-final{
        font-size: 13px !important;
    }
    .bookshelf_3D_item .price-org{
        font-size: 12px !important;
        margin-left: 4px;
    }
}

@media (max-width: 600px) {
    .bookshelf_3D_container {
        height: 360px;
    }

    .column_3D_slider{
        /* top: 95% !important; */
        width: 600px !important;
    }

    .bookshelf_3D_item .book-card{
        padding: 6px !important;
        border-radius: 12px !important;
    }

    .bookshelf_3D_item .book-thumb img{
        border-radius: 8px;
    }

    .bookshelf_3D_slider .bookshelf_3D_item{
        /* padding: 8px; */
        width: 140px !important;
        height: 200px !important;
    }

    .bookshelf_3D_item .book-info{
        padding: 4px;
        margin-top: 6px;
        height: 50px;
    }

    .bookshelf_3D_item .book-title{
        font-size: 11px !important;
    }
    .bookshelf_3D_item .price-final{
        font-size: 10px !important;
    }
    .bookshelf_3D_item .price-org{
        font-size: 9px !important;
    }
    .bookshelf_3D_item .discount-badge {
        font-size: 10px;
        padding: 2px 6px
    }
    .bookshelf_3D_container .bookshelf_3D_slider {
        width: 140px;
        height: 260px;
        /* transform: translateX(-50%) perspective(100vw) rotateX(-18deg) rotateY(0deg); */
        transform: perspective(100vw) rotateX(-18deg) rotateY(0deg);
    }

    .btn-add-cart-3d-wrap{
        margin-top: 6px !important;
    }
    .bookshelf_3D_item .btn-add-cart-3d{
        padding: 6px;
        font-size: 11px !important;
    }

    /* .bookshelf_3D_container .bookshelf_3D_slider .bookshelf_3D_item {
        transform:
            rotateY(calc((var(--position) - 1) * (360deg / var(--quantity))))
            translateZ(150px);
    } */

    .background-swiper-next-btn-3d,
    .background-swiper-prev-btn-3d {
        width: 50px;
        height: 50px;
    }

    .background-swiper-next-btn-3d {
        right: 0%;
    }

    .background-swiper-prev-btn-3d {
        left: 0%;
    }
}

/* .bookshelf_3D_item.active-item .book-card {
    transform: translateZ(20px) scale(1.07);
} */

.bookshelf_3D_item .book-card {
    transform-origin: center center;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.bookshelf_3D_container .bookshelf_3D_slider .bookshelf_3D_item.active-item,
.bookshelf_3D_container .bookshelf_3D_slider .bookshelf_3D_item.side-item {
    filter: blur(0px);
    opacity: 1;
    z-index: 10;
}

.bookshelf_3D_container .bookshelf_3D_slider {
    touch-action: pan-y;
    user-select: none;
}


/* 
.bookshelf_3D_item .book-title {
    font-size: clamp(11px, 1.3vw, 14px) !important; 
}

.bookshelf_3D_item .price-final {
    font-size: clamp(11px, 1.5vw, 16px) !important;
}

.bookshelf_3D_item .price-org {
    font-size: clamp(10px, 1vw, 13px) !important;
} */

/* Button add cart */
.bookshelf_3D_item .btn-add-cart-3d {
    padding: 0.5vw 0;
    font-size: clamp(10px, 1.1vw, 13px) !important;
}
