:root {
    --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
    --item1-filter: blur(30px);
    --item1-zIndex: 11;
    --item1-opacity: 0;

    --item2-transform: translateX(0);
    --item2-filter: blur(0px);
    --item2-zIndex: 10;
    --item2-opacity: 1;

    --item3-transform: translate(50%, 10%) scale(0.8);
    --item3-filter: blur(10px);
    --item3-zIndex: 9;
    --item3-opacity: 1;

    --item4-transform: translate(90%, 20%) scale(0.5);
    --item4-filter: blur(30px);
    --item4-zIndex: 8;
    --item4-opacity: 1;

    --item5-transform: translate(120%, 30%) scale(0.3);
    --item5-filter: blur(40px);
    --item5-zIndex: 7;
    --item5-opacity: 0;
}

.carousel {
    height: 70vh;
    position: relative;
}

.carousel .list {
    position: absolute;
    top: 0;
    width: 1140px;
    max-width: 90%;
    left: 50%;
    transform: translateX(-50%);
    height: 80%;
}

.carousel .list .item {
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    font-size: 15px;
}

.carousel .list .item img {
    width: 45%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.4s ease;
}

.carousel .list .item .detail {
    opacity: 0;
    pointer-events: none;
}

.carousel .list .item .intro {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    min-width: 400px;
    max-width: 500px;
    opacity: 0;
    pointer-events: none;
    z-index: 99;
}

.carousel .list .item:nth-child(2) .intro {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s;
}

.carousel .list .item:nth-child(n + 6) {
    opacity: 0;
    pointer-events: none;
}

.carousel .list .item:nth-child(2) {
    transform: var(--item2-transform);
    filter: var(--item2-filter);
    z-index: var(--item2-zIndex);
    opacity: var(--item2-opacity);
}

.carousel .list .item:nth-child(1) {
    transform: var(--item1-transform);
    filter: var(--item1-filter);
    z-index: var(--item1-zIndex);
    opacity: var(--item1-opacity);
    pointer-events: none;
}

.carousel .list .item:nth-child(3) {
    transform: var(--item3-transform);
    filter: var(--item3-filter);
    z-index: var(--item3-zIndex);
    opacity: var(--item3-opacity);
}

.carousel .list .item:nth-child(4) {
    transform: var(--item4-transform);
    filter: var(--item4-filter);
    z-index: var(--item4-zIndex);
    opacity: var(--item4-opacity);
}

.carousel .list .item:nth-child(5) {
    transform: var(--item5-transform);
    filter: var(--item5-filter);
    opacity: var(--item5-opacity);
    pointer-events: none;
}

.arrows {
    position: absolute;
    bottom: 10px;
    width: 1140px;
    max-width: 90%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.arrows #next,
.arrows #prev {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    color: var(--heading-color);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrows #next:hover,
.arrows #prev:hover {
    background: var(--main-color);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(88, 153, 255, 0.4);
}

.arrows #back {
    color: var(--main-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 30px;
    border-radius: 30px;
    border: 1px solid rgba(88, 153, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.arrows #back:hover {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
    box-shadow: 0 6px 20px rgba(88, 153, 255, 0.4);
    transform: translateY(-2px);
}

.carousel .list .item .intro .title {
    font-size: 2.8em;
    font-weight: 700;
    text-wrap: wrap;
    color: var(--main-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(88, 153, 255, 0.1);
}

.carousel .list .item .intro .desc {
    max-width: 450px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
    margin-bottom: 25px;
    font-weight: 400;
}

.carousel .list .item .intro .seeMore {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--main-color);
    border-radius: 30px;
    padding: 12px 30px;
    color: var(--main-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(88, 153, 255, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
}

.carousel .list .item .intro .seeMore:hover {
    background: var(--main-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 153, 255, 0.4);
}

.carousel .list .item:nth-child(2) .intro .title,
.carousel .list .item:nth-child(2) .intro .desc,
.carousel .list .item:nth-child(2) .intro .seeMore {
    opacity: 0;
    animation: showContent 0.3s 0.5s ease-in-out 1 forwards;
}

@keyframes showContent {
    from {
        transform: translateY(50px);
        filter: blur(10px);
    }

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

.carousel .list .item:nth-child(2) .intro .desc {
    animation-delay: 0.5s
}

.carousel .list .item:nth-child(2) .intro .seeMore {
    animation-delay: 0.7s
}

/* Animation for the next a */

.carousel.next .list .item:nth-child(1) {
    animation: positionItem2 0.5s ease-in-out 1 forwards;
}

@keyframes positionItem2 {
    from {
        transform: var(--item2-transform);
        filter: var(--item2-filter);
        z-index: var(--item2-zIndex);
        opacity: var(--item2-opacity);
    }
}

.carousel.next .list .item:nth-child(2) {
    animation: positionItem3 0.7s ease-in-out 1 forwards;
}

@keyframes positionItem3 {
    from {
        transform: var(--item3-transform);
        filter: var(--item3-filter);
        z-index: var(--item3-zIndex);
        opacity: var(--item3-opacity);
    }
}

.carousel.next .list .item:nth-child(3) {
    animation: positionItem4 0.9s ease-in-out 1 forwards;
}

@keyframes positionItem4 {
    from {
        transform: var(--item4-transform);
        filter: var(--item4-filter);
        z-index: var(--item4-zIndex);
        opacity: var(--item4-opacity);
    }
}

.carousel.next .list .item:nth-child(4) {
    animation: positionItem5 1.1s ease-in-out 1 forwards;
}

@keyframes positionItem5 {
    from {
        transform: var(--item5-transform);
        filter: var(--item5-filter);
        z-index: var(--item5-zIndex);
        opacity: var(--item5-opacity);
    }
}

/* Animation for the previous a */
.carousel.prev .list .item:nth-child(2) {
    animation: positionItem1 0.5s ease-in-out 1 forwards;
}

@keyframes positionItem1 {
    from {
        transform: var(--item1-transform);
        filter: var(--item1-filter);
        z-index: var(--item1-zIndex);
        opacity: var(--item1-opacity);
    }
}

.carousel.prev .list .item:nth-child(3) {
    animation: positionItem2 0.7s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(4) {
    animation: positionItem3 0.9s ease-in-out 1 forwards;
}

.carousel.prev .list .item:nth-child(5) {
    animation: positionItem4 1.1s ease-in-out 1 forwards;
}

/* Show details effect */
.carousel .list .item {
    transition: left 0.5s, opacity 0.5s, width 0.5s;
}

.carousel.showDetail .list .item:nth-child(3),
.carousel.showDetail .list .item:nth-child(4) {
    left: 100%;
    opacity: 0;
    pointer-events: none;
}

.carousel.showDetail .list .item:nth-child(2) {
    width: 100%;
}

.carousel.showDetail .list .item:nth-child(2) .intro {
    opacity: 0;
    pointer-events: none;
}

.carousel .list .item:nth-child(2) img {
    transition: right 0.5s;

}

.carousel.showDetail .list .item:nth-child(2) img {
    right: 50% !important;
    width: 40%;
}

.carousel.showDetail .list .item:nth-child(2) .detail {
    opacity: 1;
    pointer-events: auto;
    width: 50%;
    position: absolute;
    right: 0;
    text-align: right;
    top: 50%;
    transform: translateY(-50%);
}

.carousel.showDetail .list .item:nth-child(2) .detail .title {
    text-align: center;
    font-size: 4em;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border-top: 1px solid #555;
    margin-top: 20px;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div {
    width: auto;
    text-align: center;
    flex-shrink: 0;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p:nth-child(1) {
    font-weight: bold;
}

.carousel.showDetail .list .item:nth-child(2) .detail .checkout {
    font-weight: 500;
}

.carousel.showDetail .list .item .checkout a:nth-child(2) {
    background-color: #693eff;
    color: var(--secondary-text-color);
}

.carousel.showDetail .list .item:nth-child(2) .detail .title,
.carousel.showDetail .list .item:nth-child(2) .detail .desc,
.carousel.showDetail .list .item:nth-child(2) .detail .specifications,
.carousel.showDetail .list .item:nth-child(2) .detail .checkout {
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}

.carousel.showDetail .list .item:nth-child(2) .detail .desc {
    animation-delay: 1.2s;
}

.carousel.showDetail .list .item:nth-child(2) .detail .specifications {
    animation-delay: 1.4s;
}

.carousel.showDetail .list .item:nth-child(2) .detail .checkout {
    animation-delay: 1.4s;
}

.carousel.showDetail #next,
.carousel.showDetail #prev {
    opacity: 0;
    pointer-events: none;
}

.carousel.showDetail #back {
    opacity: 1;
    pointer-events: auto;
}

/* Background carousel */
.carousel::before {
    width: 500px;
    height: 300px;
    content: '';
    background-image: linear-gradient(45deg, #000000 5%, var(--main-color) 10%);
    position: absolute;
    z-index: -1;
    border-radius: 20% 30% 80% 10%;
    filter: blur(150px);
    top: 50%;
    left: 50%;
    transform: translate(-10%, -50%);
    transition: 1s;
    opacity: 0.35;
}

.carousel.showDetail::before {
    transform: translate(-100%, -50%) rotate(70deg);
}

/* Checkout a */
.checkout {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    /* Adjust as needed */
}

.checkout a {
    position: relative;
    padding: 12px 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary-text-color);
    background: linear-gradient(180deg, var(--backgroundW095), var(--backgroundW095));
    border: 2px solid var(--main-color);
    border-radius: 8px;
    box-shadow: 0 0 10px var(--background03);
    backdrop-filter: blur(5px);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.checkout a:hover {
    transform: scale(1.05);
    color: var(--main-color);
    box-shadow: 0 0 20px var(--background05);
    background-color: var(--background) !important;
}

.checkout a:focus {
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
}

.checkout a:active {
    transform: scale(0.98);
    box-shadow: 0 0 15px var(--background04);
}

/* Ripple effect */
.ripple {
    position: absolute;
    background: var(--background05);
    border-radius: 50%;
    transform: scale(0);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .checkout-btn {
        padding: 10px 20px;
        font-size: 1em;
        border-width: 1.5px;
        box-shadow: 0 0 8px var(--background03);
    }

    .checkout-btn:hover {
        transform: scale(1.03);
        box-shadow: 0 0 15px var(--background05);
    }

    .checkout-btn:active {
        transform: scale(0.95);
    }
}

@media screen and (max-width: 1200px) {

    /* laptop */
    .carousel .list .item img {
        right: -20% !important;
    }
}

@media screen and (max-width: 991px) {

    /* ipad - tablet */
    .carousel .list .item {
        width: 90%;
    }

    .carousel .list .detail .specifications {
        overflow: auto;
    }

    .carousel .list .item .intro {
        width: 45% !important;
    }

    .carousel .list .item .intro .desc {
        width: 100% !important;
    }

    .carousel .list .item img {
        right: 0% !important;
    }
}

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

    /* mobile */
    .carousel .list .item {
        width: 100%;
        font-size: 10px;
    }

    .carousel {
        height: 600px;
    }

    .carousel .list {
        height: 100%;
    }

    .carousel .list .item .intro {
        width: 50%;
    }

    .carousel .list .item .intro .desc {
        width: 45% !important;
    }

    .carousel .list .item img {
        width: 40%;
    }

    .carousel.showDetail .list .item .detail .title {
        font-size: 2em;
    }

    .carousel.showDetail .list .item .detail .desc {
        height: 100px;
        overflow: auto;
    }

    .carousel.showDetail .list .item .detail .checkout {
        display: flex;
        width: max-content;
        float: right;
    }

    .carousel .list .item img {
        right: 0 !important;
    }

}