/* parte visible */

body{
    background-color: var(--bg-col-2);
}

main{
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1200px;
    padding-inline: var(--margin-mobile);
    margin-block-start: 3rem;

}

.carousel{ 
    width: 100%;
    height: 100%;
    
}

.carousel > .ph-container{
    width: 400%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    transition: all 150ms ease;
    transform: translate(-0%);
}

.product-img{
    width: calc(100%/4);
    object-fit: contain;
    aspect-ratio: 1/1;
    border-radius: 4px;
}


.ph-selector-container{
    margin-block: 12px;
    width: 100%;
    /* max-width: 600px; */
    margin-inline: auto;
    display: flex;
    gap: 12px;
}

.ph-container:hover{
    cursor: pointer;
}

/*VENTANA MODAL*/



.close-modal{
    
    background-color: transparent;
    position: absolute;
    right: 10px;
    top: 10px;
}

.close-modal:hover{
    cursor: pointer;
}

/*ORDEN DE LOS ELEMENTOS: modal>modal-carousel>ph-container-modal>product-img*4 */
.modal{
    position: fixed;
    z-index: 300;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000de;
    display: none;
}

.modal-carousel{
    position: absolute;
    top: 50%;
    left: 50%;

    overflow-x: scroll;
    scroll-snap-type: x mandatory;

    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    max-height:800px ;
    max-width: 700px;
}



.ph-container-modal{

    width: 400%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    transition: all 150ms ease;
    transform: translate(-0%);
}

.ph-container-modal > .product-img{
    scroll-snap-align: start; /* Ajuste al inicio */
    scroll-snap-stop: always; /* Fuerza parada en cada imagen */
}

.desktop-version > button{
    position: absolute;
    background-color: var(--shadow-col);
    display: none;
}


.desktop-version > button:hover{
    cursor: pointer;
}

.prev-btn{
    top: 50%;
    left: 30px;
}

.next-btn{
    top: 50%;
    right: 30px;
    transform: rotate(180deg);
}

/**/

.ph-selector{
    width: 64px;
    height: 64px;
    border-radius: 4px;
}



.ph-selector:first-child{
    margin-inline-start: 2px;
}

.ph-selector > img{
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;


}

.ph-selector.ph-selected {
    outline: 2px solid var(--primary);
    filter: brightness(80%);

}

.ph-selector:hover > img{
    filter: brightness(80%);
}


.info-container{
    max-width: 400px;
    /* margin-inline: var(--margin-mobile); */
    color: var(--txt-col-2);
}


.desc-container{
    width: auto;
    margin-block: 1rem;
    overflow: hidden;
    justify-self: stretch;

}

.scroll-container{
    overflow-x: auto;

}
.info-selector{
    min-width: 376px;
    display: flex;
    justify-content: space-between;
    margin-block-end: var(--margin-2);
    gap: 16px;
}



.info-selector-btn{
    color: var(--txt-col-3);
}

.info-selector-btn:hover{
    cursor: pointer;
}

.info-selected{
    border-block-end: 2px solid var(--primary);
    color: var(--txt-col-1);
}

.product-wrapper{
    display: flex;
    flex-direction: row;
    width: 200%;
}

.product-description{
    width: calc(100% / 2);
    margin: 0;
}



.product-name{}

.product-price{
    font-size: var(--title-m);
    color: var(--txt-col-1);
}

.product-buy{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    max-width: 400px;
    margin-block-start: 2rem;
    font-size: var(--btn-m);
}

.product-dropdown{
    width: 100%;
}


.features-list{
    width: calc(100% / 2);
}

.features-list > li{
    padding: .5rem 1rem;
    border-radius: 8px;
}

.features-list > li:nth-child(odd){
    background-color: var(--bg-col-3);
}

.features-container > summary{
    padding: 0;
} 


.product-icon-container{
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.bg-section.products{
    background-color: var(--bg-col-1);
}

.product-section{
    justify-content: center;
}

.title-section{
    color: var(--txt-col-3);
}


@media screen and (min-width: 768px){
    main{
        column-gap: 1rem;
        grid-template-columns: repeat(12,1fr);
        grid-template-rows: auto;
        justify-content: start;
        align-items: flex-start;
        flex-direction: row;
    }

    .carousel{
        grid-column: 1/8;
    }
    .info-container{
        grid-column: 8/-1;

    }

    .desc-container{
        grid-column: 1/8;

    }
    .product-box{
        margin-inline: 0;
    }

    .modal-carousel{
        overflow-x: hidden;
    }

    .desktop-version > button{
        display: block;
    }
}



@media screen and (min-width: 1024px){
    main{
        margin-inline: auto;
        column-gap: var(--margin-3);
    }


    .info-container{
        
        min-width: 400px;
    }

    
    
}
