
*, *::before, *::after {
    box-sizing: border-box;
}

.giftcard-carousel-container {
    width: auto;
    height: 800px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 20px 0;
}

.giftcard-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.giftcard-carousel__item {
    position: absolute;
    width: 310px;
    /* height: 194px;  temporary */
    height: 185px; 
    opacity: 0;
    transform: translateY(300px) scale(0.4);
    filter: blur(0px);
    will-change: transform, opacity, filter;
    animation: carousel-animate-vertical 30s linear infinite;
    transition: all 0.3s ease;
    left: 50%;
    margin-left: -155px; 
}

.giftcard {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

/* Item positioning with delays - unchanged */
.giftcard-carousel__item:nth-child(1) { animation-delay: -0s; }
.giftcard-carousel__item:nth-child(2) { animation-delay: -3s; }
.giftcard-carousel__item:nth-child(3) { animation-delay: -6s; }
.giftcard-carousel__item:nth-child(4) { animation-delay: -9s; }
.giftcard-carousel__item:nth-child(5) { animation-delay: -12s; }
.giftcard-carousel__item:nth-child(6) { animation-delay: -15s; }
.giftcard-carousel__item:nth-child(7) { animation-delay: -18s; }
.giftcard-carousel__item:nth-child(8) { animation-delay: -21s; }
.giftcard-carousel__item:nth-child(9) { animation-delay: -24s; }
.giftcard-carousel__item:nth-child(10) { animation-delay: -27s;}

/* Animations remain exactly the same */
@keyframes carousel-animate-vertical {
    0% {
        transform: translateY(340px) scale(0.4);
        opacity: 0;
        filter: blur(0px);
        visibility: hidden;
        z-index: 1;
    }
    
    2%, 10% {
        transform: translateY(238px) scale(0.6);
        opacity: 1;
        filter: blur(2px);
        visibility: visible;
        z-index: 2;
    }
    
    12%, 20% {
        transform: translateY(140px) scale(0.8);
        opacity: 1;
        filter: blur(0px);
        visibility: visible;
        z-index: 3;
    }
    
    22%, 30% {
        transform: translateY(0) scale(1.1);
        opacity: 1;
        filter: blur(0px);
        visibility: visible;
        z-index: 10;
    }
    
    32%, 40% {
        transform: translateY(-140px) scale(0.8);
        opacity: 1;
        filter: blur(0px);
        visibility: visible;
        z-index: 3;
    }
    
    42%, 50% {
        transform: translateY(-238px) scale(0.6);
        opacity: 1;
        filter: blur(2px);
        visibility: visible;
        z-index: 2;
    }
    
    52% {
        transform: translateY(-340px) scale(0.4);
        opacity: 0;
        filter: blur(5px);
        visibility: visible;
        z-index: 1;
    }
    
    100% {
        transform: translateY(-340px) scale(0.4);
        opacity: 0;
        filter: blur(5px);
        visibility: hidden;
        z-index: 1;
    }
}

@media only screen and (max-width: 1080px) {
    #cover .image {
        position: absolute;
        -webkit-box-align: center;
        -ms-flex-align: center;
        height: 300px;
         width: 100%;
        z-index: 200;
        left: 50%;
        top: 10%;
        transform: translate(-50%, -50%);
    }

    #cover .wrapper-form {
        padding: 500px 2rem 4rem;
    }

}

@media only screen and (max-width: 600px) {
    #cover .image {
        position: absolute;
        -webkit-box-align: center;
        -ms-flex-align: center;
        height: 500px;
        /* width: 300px; */
        width: 100%;
        z-index: 200;
        left: 50%;
        top: 12%;
        transform: translate(-50%, -50%);
    }

    #cover .wrapper-form {
        padding: 400px 2rem 4rem;
    }

    @keyframes carousel-animate-vertical {
        0% {
            transform: translateY(220px) scale(0.32);
            opacity: 0;
            filter: blur(0px);
            visibility: hidden;
            z-index: 1;
        }
        
        2%, 10% {
            transform: translateY(150px) scale(0.48);
            opacity: 1;
            filter: blur(1.5px);
            visibility: visible;
            z-index: 2;
        }
        
        12%, 20% {
            transform: translateY(100px) scale(0.64);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 3;
        }
        
        22%, 30% {
            transform: translateY(0) scale(0.88);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 10;
        }
        
        32%, 40% {
            transform: translateY(-100px) scale(0.64);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 3;
        }
        
        42%, 50% {
            transform: translateY(-150px) scale(0.48);
            opacity: 1;
            filter: blur(1.5px);
            visibility: visible;
            z-index: 2;
        }
        
        52% {
            transform: translateY(-220px) scale(0.32);
            opacity: 0;
            filter: blur(4px);
            visibility: visible;
            z-index: 1;
        }
        
        100% {
            transform: translateY(-272px) scale(0.32);
            opacity: 0;
            filter: blur(4px);
            visibility: hidden;
            z-index: 1;
        }
    }
}

@media (max-width: 1080px) {
    .giftcard-carousel-container {
        width: 100%;
        height: 200px;
        padding: 0 20px;
    }


    #cover .wrapper-form {
        padding: 350px 2rem 4rem;
    }

    .giftcard-carousel__item {
        width: 280px;
        height: 175px; /* 280px ÷ 1.6 = 175px */
        opacity: 0;
        transform: translateX(400px) scale(0.4);
        filter: blur(0px);
        will-change: transform, opacity, filter;
        animation: carousel-animate-horizontal 30s linear infinite;
        transition: all 0.3s ease;
        top: 50%;
        margin-top: -87.5px; /* Half of 175px */
        left: auto;
        margin-left: auto;
    }

    @keyframes carousel-animate-horizontal {
        0% {
            transform: translateX(280px) scale(0.4);
            opacity: 0;
            filter: blur(0px);
            visibility: hidden;
            z-index: 1;
        }
        
        2%, 10% {
            transform: translateX(196px) scale(0.6);
            opacity: 1;
            filter: blur(2px);
            visibility: visible;
            z-index: 2;
        }
        
        12%, 20% {
            transform: translateX(98px) scale(0.8);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 3;
        }
        
        22%, 30% {
            transform: translateX(0) scale(1.1);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 10;
        }
        
        32%, 40% {
            transform: translateX(-98px) scale(0.8);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 3;
        }
        
        42%, 50% {
            transform: translateX(-196px) scale(0.6);
            opacity: 1;
            filter: blur(2px);
            visibility: visible;
            z-index: 2;
        }
        
        52% {
            transform: translateX(-280px) scale(0.4);
            opacity: 0;
            filter: blur(5px);
            visibility: visible;
            z-index: 1;
        }
        
        100% {
            transform: translateX(-280px) scale(0.4);
            opacity: 0;
            filter: blur(5px);
            visibility: hidden;
            z-index: 1;
        }
    }
}

@media (max-width: 800px) {
    .giftcard-carousel__item {
        width: 196px;
        height: 122.5px; /* 196px ÷ 1.6 = 122.5px */
    }

    #cover .wrapper-form {
        padding: 300px 1rem 4rem;
    }

    #cover .image {
        position: absolute;
        -webkit-box-align: center;
        -ms-flex-align: center;
        height: 250px;
        /* width: 300px; */
        width: 100%;
        z-index: 200;
        left: 50%;
        top: 13%;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 460px) {
    .giftcard-carousel__item {
        width: 168px;
        height: 105px; /* 168px ÷ 1.6 = 105px */
    }

    #cover .image {
        top: 13%;
        height: 200px;
    }

    @keyframes carousel-animate-horizontal {
        0% {
            transform: translateX(238px) scale(0.4);
            opacity: 0;
            filter: blur(0px);
            visibility: hidden;
            z-index: 1;
        }
        
        2%, 10% {
            transform: translateX(166.6px) scale(0.6);
            opacity: 1;
            filter: blur(1.5px);
            visibility: visible;
            z-index: 2;
        }
        
        12%, 20% {
            transform: translateX(83.3px) scale(0.8);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 3;
        }
        
        22%, 30% {
            transform: translateX(0) scale(1.1);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 10;
        }
        
        32%, 40% {
            transform: translateX(-83.3px) scale(0.8);
            opacity: 1;
            filter: blur(0px);
            visibility: visible;
            z-index: 3;
        }
        
        42%, 50% {
            transform: translateX(-166.6px) scale(0.6);
            opacity: 1;
            filter: blur(1.5px);
            visibility: visible;
            z-index: 2;
        }
        
        52% {
            transform: translateX(-238px) scale(0.4);
            opacity: 0;
            filter: blur(4px);
            visibility: visible;
            z-index: 1;
        }
        
        100% {
            transform: translateX(-238px) scale(0.4);
            opacity: 0;
            filter: blur(4px);
            visibility: hidden;
            z-index: 1;
        }
    }
}