@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");

/* Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: "Poppins", serif;
    font-size: 62.5%;
}

img {
    width: 100%;
}

.background {
    background-image: url(/img/Backgroun_image.webp);
    height: 100vh;
    width: 100%;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wrapper {
    height: 100vh;
    width: 100%;
    padding: 3rem 2rem;
}

/* Barra de navegación */
.nav {
    background-color: #ffffff79;
    backdrop-filter: blur(40px);
    border-radius: 12rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 2rem;
    z-index: 102;
}

.nav-icon {
    border: none;
    background-color: transparent;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon:hover {
    background-color: #ffffff6b;
    cursor: pointer;
}

.nav-icon--active {
    background-color: #ffffff6b;
}

.nav-icon box-icon {
    fill: #3b413a;
}

/*Contenido principal*/
.content {
    height: 80%;
    position: relative; /* P. posicionar info infreior por*/
}

/* Productos */
.products {
    background-color: #ffffff59;
    border-radius: 3.2rem;
    padding: 2.6rem;
    backdrop-filter: blur(40px);
    display: flex; /* P. Para cuando al poner a su tercer hijo en position absolute no se desborde */
    flex-direction: column;
    height: 100%;
}

/* header */
.header {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}

.header__controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.control {
    border: none;
    background-color: transparent;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control box-icons {
    fill: #3b413a;
}

.control:hover {
    background-color: #ffffff6b;
}

.control--active {
    background-color: #ffffff6b;
}

.header__search {
    background-color: #ffffff59;
    border-radius: 3.2rem;
    max-width: 13.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
}

.search-input {
    background-color: transparent;
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.6rem;
    color: #5e6d59;
}

.search-button {
    background: none;
    border: none;
}

/* CAROUSEL */
.carousel {
    height: 100%;
    width: 100%;
    position: relative; /* Para Poner */
}

.carousel__container {
    height: 100%;
    width: 100%;
}

/* Estos son las propiedades para todo los items se muestren o no*/
.carousel__item {
    position: absolute;
    width: 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    bottom: 0;
    /*Con esto centramos todo los mentos en el centro de manera vertical y orizontal, ya que estos son absolutos*/
    transform: translate(-50%, -50%);
    left: 50%;
    top: 60%;

    will-change: filter;
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

/*Todas los contenedores de las imágenes van a tener 10rem altura y la imagen ocupara el 100 de este contenedor*/
.carousel__image {
    height: 10rem;
    will-change: filter;
    transition: all 0.3s ease-in-out;
}

.carousel__image img {
    height: 100%;
    width: auto;
}

.carousel__item-details {
    padding: 2rem 0;
    will-change: filter;
    transition: all 0.3s ease-in-out;
}

/* Aquí personalizamos la visibilidad de los elementos, ajustamos su posición, aplicamos escalas, efectos de desenfoque y opacidad a algunos, y finalmente definimos su z-index. */

.item-1,
.item-5 {
    z-index: 98;
    filter: blur(5px);
}

.item-1 {
    left: 18%;
}

.item-5 {
    left: 82%;
}

.item-2,
.item-4 {
    opacity: 1;
    z-index: 99;
    filter: blur(5px);
}

.item-2 {
    left: 20%;
}

.item-4 {
    left: 80%;
}

.item-3 {
    left: 50%;
    width: 5rem;
    opacity: 1;
    z-index: 100;
}

.item-3 .carousel__image {
    transform: scale(2.6) translateY(-1rem);
}

.item-3 .carousel__item-details {
    transform: scale(1.4) translateY(50%);
    opacity: 0;
    filter: blur(10px);
}

.carousel__item-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 400;
}

.carousel__item-price {
    color: #fff;
    font-weight: 600;
    font-size: 1.8rem;
}

/* Controles del carrusel */
.carousel__controls-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

.carousel__controls-container > * {
    pointer-events: auto;
}

.carousel__controls-container button {
    display: none;
    border: none;
    cursor: pointer;
    font-size: 3rem;
    color: #ffffff;
    width: 5rem;
    height: 5rem;
    text-transform: capitalize;
    font-family: monospace;
    background-color: #f4f4f400;
    border-radius: 3rem;
    outline: none;
    user-select: none;
    will-change: filter;
    transition: background-color 0.2s ease-in-out;
}

.carousel__controls-container button:hover {
    background-color: #ffffff33;
}

.carousel-controls-previous {
    left: 0rem;
}

.carousel-controls-next {
    right: 0rem;
}

/* Opcional */
.carousel__container {
    /* user-select: none; */
    cursor: grab;
}

.carousel__container:active {
    cursor: grabbing;
}

/* Contenedor inferior agregar a carrito */
.footer {
    width: 100%;
    border-radius: 6rem;
    backdrop-filter: blur(20px);
    background-color: #ffffff70;
    position: absolute;
    bottom: -20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem 1rem 3rem;
}

.footer-name {
    font-size: 1.4rem;
    color: #fff;
    font-weight: 400;
}

.footer-price {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.footer__add {
    background-color: #fff;
    font-size: 1.4rem;
    border: none;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 4rem;
}

.footer__add:hover {
    background-color: #738a6c;
    cursor: pointer;
    color: #fff;
}

@media (min-width: 768px) {
    .wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 4rem;
        position: relative;
        top: -3rem;
        padding: 0;
        width: auto;
    }

    .nav {
        flex-direction: column;
        justify-content: space-evenly;
        width: 7rem;
        height: 28.8rem;
        margin: 0;
        position: initial;
    }

    .content {
        height: 60rem;
        width: 110rem;
        position: relative;
    }

    /* carrucel */

    .carousel__item {
        width: 20rem;
        top: 50%;
    }
    .carousel__image {
        height: 20rem;
    }
    .item-2,
    .item-4 {
        filter: none;
    }
    .item-1,
    .item-5 {
        filter: blur(10px);
    }

    .item-3 {
        left: 50%;
        width: 50rem;
        opacity: 1;
        z-index: 100;
    }
    .item-3 .carousel__image {
        transform: scale(1.8);
    }

    .item-3 .carousel__item-details {
        transform: scale(1.4) translateY(120%);
        opacity: 0;
        filter: blur(10px);
    }

    .carousel__controls-container button {
        display: block;
    }

    .carousel__item-title {
        font-size: 2rem;
    }

    .carousel__item-price {
        font-size: 2.2rem;
    }

    /* contenedor flotante donde se ve los precios del producto */
    .footer {
        width: 46rem;
        height: 11rem;
        padding: 0 3rem 0 5rem;
        transform: translate(-50%);
        left: 50%;
        bottom: -50px;
    }

    .footer-name {
        font-size: 2.2rem;
    }

    .footer-price {
        font-size: 2.6rem;
        font-weight: 800;
    }

    .footer__add {
        padding: 1.6rem 3rem;
        font-size: 1.6rem;
    }
}
