
        @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
body{
    margin: 0;
    background-color: #F4F4F4;
    font-family: Poppins, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Center the carousel vertically now that the header is gone */
    justify-content: center; 
}
:root{
    /* CSS variables defining the position and style of each item's transition state */
    --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
    --item1-filter: blur(30px);
    --item1-zIndex: 11;
    --item1-opacity: 0;

    --item2-transform: translateX(0); /* The current main item */
    --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 */
.carousel{
    position: relative;
    height: 600px;
    overflow: hidden;
    margin-top: 0; /* Removed negative margin */
    padding-bottom: 50px; /* Space for the back button */
}
.carousel .list{
    position: absolute;
    width: 1140px;
    max-width: 90%;
    height: 80%;
    left: 50%;
    transform: translateX(-50%);
}
.carousel .list .item{
    position: absolute;
    left: 0%;
    width: 70%;
    height: 100%;
    font-size: 15px;
    transition: transform 0.7s, filter 0.7s, opacity 0.7s, z-index 0.7s, left 0.5s, width 0.5s;
}
/* Hide items beyond the fifth position instantly */
.carousel .list .item:nth-child(n + 6){
    opacity: 0;
    pointer-events: none;
}
/* Default state (Item 2 is the main visible item) */
.carousel .list .item:nth-child(2){
    z-index: 10;
    transform: var(--item2-transform);
}
.carousel .list .item img{
    width: 50%;
    max-width: 400px; /* Constrain image size */
    object-fit: contain;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: right 1.5s;
    border-radius: 10px;
}

.carousel .list .item .introduce{
    opacity: 0;
    pointer-events: none;
}
.carousel .list .item:nth-child(2) .introduce{
    opacity: 1;
    pointer-events: auto;
    /* --- FIX: Reduced width and added left margin to prevent overlap --- */
    width: 350px; 
    position: absolute;
    left: 40px; 
    /* ------------------------------------------------------------------ */
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.5s;
}
.carousel .list .item .introduce .title{
    font-size: 2em;
    font-weight: 500;
    line-height: 1em;
    color: #2277f2;
    margin-bottom: 5px;
}
.carousel .list .item .introduce .topic{
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.1;
}
.carousel .list .item .introduce .des{
    font-size: small;
    color: #5559;
}
.carousel .list .item .introduce .seeMore{
    font-family: Poppins, sans-serif;
    margin-top: 1.2em;
    padding: 8px 15px;
    border: none;
    border-bottom: 2px solid #555;
    background-color: transparent;
    font-weight: bold;
    letter-spacing: 3px;
    transition: background 0.5s, color 0.5s, border-color 0.5s;
    border-radius: 4px;
}
.carousel .list .item .introduce .seeMore:hover{
    background: #2277f2;
    color: white;
    border-color: #2277f2;
}

/* Apply CSS variables based on position */
.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);
}
.carousel .list .item:nth-child(4){
    transform: var(--item4-transform);
    filter: var(--item4-filter);
    z-index: var(--item4-zIndex);
}
.carousel .list .item:nth-child(5){
    transform: var(--item5-transform);
    filter: var(--item5-filter);
    opacity: var(--item5-opacity);
    pointer-events: none;
}

/* Animation for content in item2 when it becomes the primary item */
.carousel .list .item:nth-child(2) .introduce .title,
.carousel .list .item:nth-child(2) .introduce .topic,
.carousel .list .item:nth-child(2) .introduce .des,
.carousel .list .item:nth-child(2) .introduce .seeMore{
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}
@keyframes showContent{
    from{
        transform: translateY(-30px);
        filter: blur(10px);
    }to{
        transform: translateY(0);
        opacity: 1;
        filter: blur(0px);
    }
}
.carousel .list .item:nth-child(2) .introduce .topic{ animation-delay: 1.2s; }
.carousel .list .item:nth-child(2) .introduce .des{ animation-delay: 1.4s; }
.carousel .list .item:nth-child(2) .introduce .seeMore{ animation-delay: 1.6s; }

/* Custom animations for the 'next' and 'prev' transitions */
.carousel.next .item:nth-child(1){ animation: transformFromPosition2 0.5s ease-in-out 1 forwards; }
@keyframes transformFromPosition2{ from{ transform: var(--item2-transform); filter: var(--item2-filter); opacity: var(--item2-opacity); } }

.carousel.next .item:nth-child(2){ animation: transformFromPosition3 0.7s ease-in-out 1 forwards; }
@keyframes transformFromPosition3{ from{ transform: var(--item3-transform); filter: var(--item3-filter); opacity: var(--item3-opacity); } }

.carousel.next .item:nth-child(3){ animation: transformFromPosition4 0.9s ease-in-out 1 forwards; }
@keyframes transformFromPosition4{ from{ transform: var(--item4-transform); filter: var(--item4-filter); opacity: var(--item4-opacity); } }

.carousel.next .item:nth-child(4){ animation: transformFromPosition5 1.1s ease-in-out 1 forwards; }
@keyframes transformFromPosition5{ from{ transform: var(--item5-transform); filter: var(--item5-filter); opacity: var(--item5-opacity); } }

/* previous */
.carousel.prev .list .item:nth-child(5){ animation: transformFromPosition4 0.5s ease-in-out 1 forwards; }
.carousel.prev .list .item:nth-child(4){ animation: transformFromPosition3 0.7s ease-in-out 1 forwards; }
.carousel.prev .list .item:nth-child(3){ animation: transformFromPosition2 0.9s ease-in-out 1 forwards; }
.carousel.prev .list .item:nth-child(2){ animation: transformFromPosition1 1.1s ease-in-out 1 forwards; }
@keyframes transformFromPosition1{ from{ transform: var(--item1-transform); filter: var(--item1-filter); opacity: var(--item1-opacity); } }

/* DETAIL VIEW STYLES */
.carousel .list .item .detail{
    opacity: 0;
    pointer-events: none;
}
.carousel.showDetail .list .item:nth-child(3),
.carousel.showDetail .list .item:nth-child(4),
.carousel.showDetail .list .item:nth-child(5),
.carousel.showDetail .list .item:nth-child(1){
    left: 100%;
    opacity: 0;
    pointer-events: none;
}
.carousel.showDetail .list .item:nth-child(2){
    width: 100%;
    transition: width 0.5s, left 0.5s;
}
.carousel.showDetail .list .item:nth-child(2) .introduce{
    opacity: 0;
    pointer-events: none;
}
.carousel.showDetail .list .item:nth-child(2) img{
    right: 50%;
    transform: translate(50%, -50%); /* Center the image in its new 50% width area */
    transition: right 1.5s, transform 1.5s;
}
.carousel.showDetail .list .item:nth-child(2) .detail{
    opacity: 1;
    width: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    pointer-events: auto;
    padding-left: 5%; /* Prevent overlap with image */
}
.carousel.showDetail .list .item:nth-child(2) .detail .title{
    font-size: 3em;
    font-weight: 700;
    color: #333;
}
.carousel.showDetail .list .item:nth-child(2) .detail .des {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
    margin-left: 35%;
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications{
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: flex-end; /* Align specs to the right */
    border-top: 1px solid #5553;
    margin-top: 20px;
    padding-top: 10px;
    margin-left: 5%;
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications div{
    width: 90px;
    text-align: center;
    flex-shrink: 0;
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p:nth-child(1){
    font-weight: bold;
    margin-bottom: 0;
    color: #2277f2;
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p:nth-child(2){
    margin-top: 0;
    font-size: 0.8em;
    color: #555;
}
.carousel.showDetail .list .item:nth-child(2) .detail .checkout{
    margin-top: 30px;
}
.carousel.showDetail .list .item:nth-child(2) .detail .checkout button{
    font-family: Poppins, sans-serif;
    border: 1px solid #5555;
    margin-left: 5px;
    padding: 10px 20px;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}
.carousel.showDetail .list .item:nth-child(2) .detail .checkout button:nth-child(1){
    background-color: #eee;
    color: #333;
}
.carousel.showDetail .list .item:nth-child(2) .detail .checkout button:nth-child(2){
    background-color: #2277f2;
    color: #eee;
    border-color: #2277f2;
}
.carousel.showDetail .list .item:nth-child(2) .detail .checkout button:hover:nth-child(1){
    background-color: #ddd;
}
.carousel.showDetail .list .item:nth-child(2) .detail .checkout button:hover:nth-child(2){
    background-color: #1a5ac9;
}


/* Detail content animation */
.carousel.showDetail .list .item:nth-child(2) .detail .title,
.carousel.showDetail .list .item:nth-child(2) .detail .des,
.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 .des{ 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.6s; }

.arrows{
    position: absolute;
    bottom: 0px;
    width: 1140px;
    max-width: 90%;
    display: flex;
    justify-content: space-between;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
#prev,
#next{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-family: monospace;
    border: 1px solid #5555;
    font-size: large;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: background-color 0.3s, transform 0.3s;
}
#prev:hover, #next:hover {
    background-color: #2277f2;
    color: white;
    transform: scale(1.1);
}

#back{
    position: absolute;
    z-index: 100;
    bottom: 50px; /* Adjusted to be higher than arrows */
    left: 50%;
    transform: translateX(-50%);
    border: none;
    border-bottom: 2px solid #555;
    font-family: Poppins, sans-serif;
    font-weight: bold;
    letter-spacing: 3px;
    background-color: transparent;
    padding: 10px 20px;
    opacity: 0; /* Default hidden */
    pointer-events: none; /* Default disabled */
    transition: opacity 0.5s;
}
.carousel.showDetail #back{
    opacity: 1;
    pointer-events: auto;
}
.carousel.showDetail #prev,
.carousel.showDetail #next{
    opacity: 0;
    pointer-events: none;
}
/* Background blob effect */
.carousel::before{
    width: 500px;
    height: 300px;
    content: '';
    background-image: linear-gradient(70deg, #d7dade, #2277f2);
    position: absolute;
    z-index: 0;
    border-radius: 20% 30% 80% 10%;
    filter: blur(150px);
    top: 50%;
    left: 50%;
    transform: translate(-10%, -50%);
    transition: 1s;
}
.carousel.showDetail::before{
    transform: translate(-100%, -50%) rotate(90deg);
    filter: blur(130px);
}
@media screen and (max-width: 991px){
    /* ipad, tablets */
    .carousel .list .item{
        width: 90%;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .specifications{
        overflow: auto;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .title{
        font-size: 2em;
    }
    .carousel .list .item:nth-child(2) .introduce{
        width: 60%;
        left: 20px; /* Adjusted for tablet view */
    }
}
@media screen and (max-width: 767px){
    /* mobile */
    body {
        /* Keep justify-content: center for mobile as well */
        justify-content: center;
        padding-top: 0;
    }
    .carousel{
        height: 550px;
        margin-top: 0;
    }
    .carousel .list .item{
        width: 100%;
        font-size: 10px;
    }
    
    .carousel .list{
        height: 100%;
    }
    .carousel .list .item:nth-child(2) .introduce{
        width: 45%;
        left: 20px; /* Adjusted for mobile view */
    }
    .carousel .list .item img{
        width: 55%;
    }
    
    .carousel.showDetail .list .item:nth-child(2) .detail{
        backdrop-filter: blur(5px);
        font-size: small;
        width: 90%;
        text-align: left;
        padding: 20px;
        top: 60%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: rgba(255, 255, 255, 0.8);
        border-radius: 10px;
    }
    .carousel.showDetail .list .item:nth-child(2) img{
        right: 0;
        left: 50%;
        top: 25%;
        transform: translate(-50%, -50%);
        width: 60%;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .title{
        font-size: 1.8em;
        text-align: center;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .specifications{
        justify-content: space-around;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .checkout{
        display: flex;
        justify-content: center;
        margin-top: 15px;
    }
    .carousel.showDetail #back{
        bottom: 0px;
    }
}

button:hover {
    cursor: pointer;
}
