@import url('https://fonts.googleapis.com/css2?family=Karantina:wght@300;400;700&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');

.banner {
    margin-top: -50px;
    height: 90vh;
    overflow: hidden;
    position: relative;
}

.product {
    position: fixed;
    left: 50%;
    top: 50%; /* Center vertically */
    transform: translate(-50%, -50%); /* Center horizontally and vertically */
    z-index: 2;
    width: 500px;
    transition: 0.7s;
}

.product .soda {
    position: absolute;
    top: 50%; /* Center soda vertically inside the product */
    left: calc(25%);
    transform: translate(-75%, -50%); /* Adjust for proper centering */
}
/* Default soda styles */
.soda {
    --left: 0px;
    background: 
        var(--url) var(--left),
        url(../demo-img/mockup.png) 0 0;
    background-size: auto 100%;
    width: 280px;
    aspect-ratio: 2 / 4;
    background-blend-mode: multiply;
    transition: 0.8s;
    mask-image: url(../demo-img/mockup.png);
    mask-size: auto 100%;
    opacity: 0;
}

/* Make each soda visible when the corresponding section is in view */
.soda:nth-child(1) {
    --url: url(../demo-img/bg3.png);
}
.soda:nth-child(2) {
    --url: url(../demo-img/bg4.png);
}
.soda:nth-child(3) {
    --url: url(../demo-img/bg5.png);
}
.soda:nth-child(4) {
    --url: url(../demo-img/bg6.png);
}
.soda:nth-child(5) {
    --url: url(../demo-img/bg7.png);
}

/* Sodas appear when the relevant section is in view */
.soda {
    position: absolute;
    top: 50%; 
    left: calc(25%);
    transform: translate(-75%, -50%);
}

@media screen and (max-width: 1024px) {
    .soda {
        width: 250px;
    }
}

@media screen and (max-width: 425px) {
    .soda {
        left: calc(-50%);
        transform: translate(50%, -50%);
    }
}
