@font-face {
    font-family: 'Mercadona Sans';
    src: url("../../assets/fonts/MercadonaSansVF-Roman.ttf") format('truetype');
    font-style: normal;
    font-weight: 400;
}

*{
    --negro-mercadona: #1c1c1b;
}

body p, body button, body label{
    font-family: 'Mercadona Sans'!important;
}

#loading{
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff3d;
    height: 100%;
}

.loading-spinner{
    position: absolute;
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#wpadminbar, #moove_gdpr_save_popup_settings_button{
    display: none;
}

.d-none{
    display: none!important;
}

.image-canvas{
    image-rendering: auto;
    image-rendering: optimizeQuality;       /* Firefox, Edge */
    image-rendering: crisp-edges;           /* Chrome, Firefox */
    image-rendering: -webkit-optimize-contrast; /* Safari */
    -webkit-transform: translateZ(0); /* Activar hardware acceleration */
    transform: translateZ(0);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0%);
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* Para dispositivos con DPR alto */
@media (-webkit-min-device-pixel-ratio: 1) {
    .image-canvas {
        image-rendering: auto;
    }
}

#result{
    z-index: 11;
}

#cont-general{
    max-width: 100dvw;
    width: 100dvw;
    height: 100dvh;
    background-color: rgba(0,0,0,.5);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
}

#cont-pantalla{
    width: 465px;
    max-width: 100%;
    max-height: 950px;
    height: 100dvh;
    position: relative;
    background-color: #f3f3f3;
    overflow: hidden;
}

#cont-pantalla-inicial{
    width: 90%;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    & > div{
        display: flex;
        justify-content: center;
        flex-direction: column;
    }
}

#cont-logo{
    position: absolute;
    top: 0;
    max-width: 30%;
    left: 50%;
    transform: translate(-50%, 0%);
    z-index: 100;
}

#cont-imgs{
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: white;
}

div:has( > #cont-imgs){
    height: 100%;
}

#cont-img-info{
    position: absolute;
    bottom: 104px;
    width: 100%;
    height: 115px;
    z-index: 14;
    display: flex;
    flex-direction: row;
    background-color: white;
    gap: 20px;
    justify-content: end;
    border-radius: 10px 10px 0 0;
    box-shadow: 0px 5px 15px 0px black;

    & > div{
        height: 100%;
        width: 100%;
        position: relative;
    }

    & img{
        position: absolute;
        width: 30%;
        bottom: 0;
        max-width: 30%;
        left: 10px;
    }

    & #textos-info{
        position: absolute;
        padding: 10px 25px;
        display: flex;
        flex-direction: column;
        right: 0px;
        width: 70%;
        & p{
            margin-bottom: 7px;
            &#titulo-info{
                font-weight: 800;
                font-size: 18px;
                line-height: 20px;
            }
            &#texto-info{
                font-weight: 400;
                font-size: 14px;
            }
        }
    }
}



#cont-btns{
    position: absolute;
    z-index: 15;
    width: 100%;
    /*height: 90%; */
    top: 0;
}

#cont-btns-arriba-izq{
    position: absolute;
    top: 50px;
    left: 10px;
}

#cont-btns-arriba-drcha{
    position: absolute;
    top: 50px;
    right: 10px;
}

#cont-btns-abajo-izq{
    position: absolute;
    bottom: 50px;
    left: 10px;
}

#cont-btns-abajo-drcha{
    position: absolute;
    bottom: 50px;
    right: 10px;
}

#selector-modelos{
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 15;
    & p{
        position: absolute;
        top: 17%;
        font-size: 30px;
        font-weight: 800;
        width: 100%;
        text-align: center;
    }
    & > div > div{
        position: absolute;
        top: 25%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 0 40px;
        & img{
            width: 100%;
            height: auto;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            cursor: pointer;
            &:hover{
                border: 4px solid black;
            }
        }
    }
}

#cont-gamas{
    position: absolute;
    bottom: 0;
    height: 104px;
    width: 100%;
    z-index: 14;
    display: flex;
    background-color: #fff;
    padding: 0 10px;
    align-items: center;
    padding-top: 5px;
    justify-content: space-around;
    & .cont-gama{
        display: flex;
        flex-direction: column;
        align-items: center;       
        width: 64px;
        height: 64px;
        &.active{
            & .cont-img-gama{
                border: 3px solid black;
                border-radius: 50px;         
            }
            & img{
                border: 1px solid white;
            }
        }

        &.inactive img{
            opacity: .5;
        }
    }
    & img{
        vertical-align: top;
        max-width: 100%;
        height: 64px;
        width: 64px;
        border-radius: 50px;
    }

    & .titulo-gama{
        font-size: 13px;
        font-weight: 800;
        margin-bottom: 0;
    }
}

#cont-colores{
    position: absolute;
    top: 20dvh;
    right: 10px;
    max-height: 50%;
    display: flex;
    flex-direction: column;
    z-index: 16;
    gap: 20px;
    cursor: pointer;
    align-items: end;
    height: fit-content;
    /* overflow-y: scroll; */

    & .cont-color{
        border-radius: 50px;
        width: 60px;
        height: 60px;
        aspect-ratio: 1/1;
        border: 3px solid white;

        &.active{
            border: 5px solid white;
            width: 70px;
            height: 70px;
        }

        &.inactive{
            background-color: black;
            width: 55px;
            height: 55px;
        }
    }
}

.btns{
    cursor: pointer;
    & button, & img{
        cursor: pointer;
    }
    &.inicio{
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 7px;
        & > button{
            width: 100%;
            color: white;
            background-color: #1c1c1b;
            font-size: 20px;
            border: 3px solid #1c1c1b;
            border-radius: 45px;
            padding: 7px;
            &:disabled{
                background-color: #1c1c1b69;
                border: 3px solid #1c1c1b05;
                &:hover{
                    background-color: #1c1c1b69;
                    border: 3px solid #1c1c1b05;
                    color: white;
                }
            }
            &:hover{  
                background-color: transparent;
                color: black;
            }
        }
    }

    &.btn-redondo{
        position: relative;
        background-color: #1c1c1b;
        border: 3px solid #1c1c1b;
        border-radius: 100px;
        width: 50px;
        height: 50px;
        &:hover, &.active{
            border: 3px solid white;
        }
        & img{
            position: absolute;
            top: 50%;
            left:50%;
            transform: translate(-50%, -50%);
            max-width: 25px;
            max-height: 25px;
        }
    }
}

#hacer-foto{
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: white;
}

#video{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#capturar-imagen{
    z-index: 101;
    position: absolute;
    width: 70px;
    height: 70px;
    top: 85%;
    left: 50%;
    transform: translate(-50%, 0);
    border: 6px solid #bebebe;
    &:hover{
        border:  9px solid #bebebe;
    }
}

.btn-atras{
    position: absolute!important;
    top: 50px;
    left: 10px;
    background-color: white!important;
    border: 2px solid var(--negro-mercadona);
    & img{
        transform: translate(-65%, -50%) scaleX(-1)!important;
    }

    &:hover{
        background-color: var(--negro-mercadona)!important;
        & img{
            filter: invert(1)!important;
        }
    }
}

/* Comparador */
.comparison-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}
#cont-img-edit,
#cont-img-oc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#cont-img-oc {
  overflow: hidden;
  z-index: 10;
  width: 50%; /* Vista inicial al 50% */
}
#cont-img-oc.comparar {
  overflow: hidden;
  z-index: 13;
  width: 50%; /* Vista inicial al 50% */
}
.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: black;
  transform: translateX(-50%);
  z-index: 13;
  cursor: ew-resize;
}

#antes, #despues{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;

    & img{
        width: 20px;
        height: auto;
    }

    & p{
        position: absolute;
        top: -40%;
        color: black;
        font-size: 18px;
        font-weight: 900;
    }
}

#antes > p{
    transform: translate(-95%, 445%) scale(.7, 1);
}

#antes > img{
    transform: translate(-122%, 0%) scale(0.6) scaleX(-1);
}

#despues > p{
    transform: translate(-9%, 445%) scale(.7, 1);
}

#despues > img{
    transform: translate(25%, 0) scale(0.6);
}

/* RESPONSIVE */
@media (max-width: 800px) {
    #cont-pantalla{
        width: 465px;
        max-width: 100%;
        max-height: 950px;
        height: 100%;
        position: relative;
        background-color: #f3f3f3;
        overflow: hidden;
    }
}