@use 'base/variables' as v;
@use 'base/mixins' as m;

.home {
    display: flex;
    align-items: center;
    min-height: 100vh;
    background: url('../img/home.jpg') center/cover no-repeat;

    .content {
        max-width: 50rem;

        h3 {
            margin-top: 5rem;
            font-size: 6rem;
            color: v.$negro;

            @include m.tablet {
                font-size: 5rem;
            }
        }

        span {
            margin-left: 3rem;
            font-size: 5vh;
            color: v.$verdeClaro;
            padding: 1rem 0;
            line-height: 1.5;

            @include m.tablet {
                font-size: 5vh;
            }
        }

        p {
            margin-left: 3rem;
            font-size: 1.5rem;
            color: v.$negro;
            padding: 1rem 0;
            line-height: 1.5;
        }

        a {
            @include m.boton(v.$verde, v.$blanco);
            margin-left: 3rem;
            border-radius: 1rem;

            transition: transform 0.3s ease;

            &:hover {
                transform: translateY(-.2rem);
            }
        }
    }

    @include m.tablet {
        background-position: left;
    }
}

.heading {
    text-align: center;
    font-size: 4rem;
    color: v.$negro;
    padding: 1rem;
    margin: 2rem 0;
    background: rgba(255, 51, 153, .05 );

    @include m.tablet {
        font-size: 3rem;
    }

    span {
        color: v.$rosa;
    }
}

.about {
    .row {
        display: flex;
        justify-content: center; // Asegura que el contenido esté centrado
        padding: 2rem 0;
        padding-bottom: 3rem;

        .contenedor {
            width: 95%;
            max-width: 1200px;
            display: flex;
            align-items: center;
            gap: 5rem;

            .video-container, .content-about {
                flex: 1 1 auto; // Asegura que ambos ocupen el mismo espacio
            }

            .video-container {
                position: relative;
                min-width: 40%;

                video {
                    width: 100%;
                    border: 1.5rem solid v.$blanco;
                    border-radius: 1rem;
                    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
                    object-fit: cover;
                }

                h3 {
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    font-size: 3rem;
                    background: v.$blanco;
                    width: 100%;
                    padding: 1rem 2rem;
                    text-align: center;
                    mix-blend-mode: screen;
                }
            }

            .content-about {

                min-width: 40%;

                .boton {
                    @include m.boton(v.$verde, v.$blanco);
                    border-radius: 1rem;
                    transition: transform 0.3s ease;

                    &:hover {
                        transform: translateY(-.2rem);
                    }
                }

                h3 {
                    font-size: 3rem;
                    color: v.$negro;
                    padding: 1rem 0;
                }

                p {
                    font-size: 1.5rem;
                    color: v.$grisOscuro;
                    padding: 1rem 0;
                    padding-top: 1rem;
                    line-height: 1.5;
                }
            }
        }
    }

    // Media query para pantallas menores a 768px
    @include m.tablet {
        .row {
            .contenedor {
                flex-direction: column; // Hace que los elementos se apilen verticalmente

                .video-container, .content-about {
                    flex: 1 1 100%; // Asegura que los elementos ocupen el 100% del ancho
                    min-width: auto;
                }
            }
        }
    }
}


.carrito {
    position: fixed;
    bottom: 8rem;
    right: 2rem;
    width: 5rem;
    height: 5rem;
    background-color: v.$rosa;
    color: v.$blanco;
    border-radius: 50%;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;

    transition: background-color 0.3s ease;

    &:hover {
        background-color: v.$rosaClaro;
    }

    .carrito-icon {
        font-size: 3rem;
        transition: transform 0.3s ease;

        &:hover {
            transform: translateY(-.2rem);
        }
    }
}

.float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 5rem;
    height: 5rem;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex; // Add this line
    justify-content: center; // Add this line
    align-items: center; // Add this line

    transition: background-color 0.3s ease;

    &:hover {
        background-color: #2aff78;
    }

    .whatsapp {
        font-size: 3rem;
        transition: transform 0.3s ease;

        &:hover {
            transform: translateY(-.2rem);
        }
    }
}

#preloader {
    background: #000;
    height: 100vh;
    width: 100%;
    position: fixed;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;

    .spinner {
        width: 100px;
        height: 100px;
        background: url('../img/preloader.gif') no-repeat center center;
        background-size: cover;
    }
}