body {
    margin: 0;
}

.container {
    margin-top: 9.5rem;
    display: flex;
    gap: 5px;
    height: auto;
    min-height: 60vh;
}

.item:nth-child(2) {
    flex-grow: 1;
}


#space {
    width: 20%;
}

#Filtros {
    width: 20%;
    position: fixed;
    left: 0;
    top: 9.5rem;
}

#Productos {
    width: 60%; 
}

#Espacio {
    width: 20%;
    position: fixed;
    right: 0;
    top: 9.5rem;
}

.container2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
}

.container2 > div {
    min-height: 350px; 
    height: auto;
    background-color: rgb(255, 255, 255);
    box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.2); 
    border-radius: 8px;
    transition: transform 0.4s ease, background-color 0.4s ease;
    position: relative;
}

.card:hover {
    background-color: rgba(190, 190, 190, 0.603);
    transform: scale(1.05);
}

.img-producto {
    overflow: hidden;
    display: flex;
    margin: 0.4rem 0;
    align-items: center;
    justify-content: center;
}

.img-producto > img {
    object-fit: cover;
    width: 80%;
    display: block;
    aspect-ratio: 4/3;
}

.text-producto {
    text-align: center;
    padding: 0 10px;
}

h4 {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    padding: 0;
    margin-top: 1rem;
}

h5 {
    font-family: "Montserrat", sans-serif;
    font-size: 1.8rem;
    padding: 0;
    margin-top: 1rem;
    color: #9f7200;
}


.vista-rapida {
    text-align: center;
    width: 85%;
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translate(-50%, 50%);
    background-color: rgba(0, 0, 0, 0.808);
    color: white;
    padding: 15px;
    border-radius: 20px;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; 
}

.card:hover .vista-rapida {
    opacity: 1;
    pointer-events: auto;
}

#wpp {
    position: fixed;
    bottom: 3%;
    right: 3%;
    width: 60px; 
    height: auto;
    z-index: 100; 
    transition: transform 0.3s;
}

#wpp:hover {
    transform: scale(1.1);
}

/*Laptops pequeñas o pantallas divididas */
@media screen and (max-width: 1350px) {
    .container2 {
        grid-template-columns: repeat(2, 1fr); 
    }
}

/*Tablets (Ocultar filtros laterales y centrar productos) */
@media screen and (max-width: 1024px) {
    #space, #Filtros, #Espacio {
        display: none !important;
    }

    #Productos {
        width: 100%;
        padding: 0 15px;
    }
    
    .container2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .container2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    h4 { font-size: 0.9rem; }
    h5 { font-size: 1rem; }
}

@media screen and (max-width: 480px) {
    .container {
        margin-top: 6rem; 
    }

    .container2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .vista-rapida {
        /*opacity: 1;
        position: relative;
        bottom: 0;
        left: 0;
        transform: none;
        width: 90%;
        margin: 15px auto 10px auto;
        font-size: 1.2rem;
        padding: 10px;
        pointer-events: auto;*/
        display: none;
    }

    .card { 
        width: 100%;
        height: 1rem;
    }

    .container2 > div {
    min-height: 200px; 
    height: auto;
}
    
    #wpp {
        width: 50px;
        right: 5%;
        bottom: 5%;
    }
}