* {
    margin: 0;
    padding: 0;
}

/* ---------------------------------------------PALETA DE COLORES SELECCIONADA------------------------------------------------------------------ */
:root {
    --verde: #008d36;
    --blanco: #ffffff;
    --gris: #383838;
    --rojo: #ba1a1a;

}

header {
    text-align: center;
    padding: 1em;
}

header img {
    width: 120px;
}

#itemActivo {
    background-color: var(--verde);
    color: var(--blanco);
    border-top: 2px solid var(--gris);
    border-bottom: 0;
}

body {
    font-family: 'Average', serif;
}

.clima {
    display: none;
}

.comPed {
    display: flex;
    flex-direction: row;
    padding: 2em 0 0 0;
    justify-content: space-between;

}

.comPed div {
    display: flex;
    width: 30vw;
    height: 60px;
    justify-content: center;
    align-items: center;
    background-color: var(--verde);
    color: var(--blanco);
    font-weight: bold;
    letter-spacing: 0.2rem;
    border-radius: 0 25px 0 25px;
    margin: 0 auto;

}

#formularioCP {
    margin: 0 auto;
    padding: 0 .5em 0 .5em;
}

.error {
    background-color: var(--rojo);
    color: var(--blanco);
    text-align: center;
    padding-top: 3px;
    padding-bottom: 3px;
}
/*--------------------------------------------------ESTILO DE MENU-------------------------------------------------------------------------------*/


nav ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
}

nav ul li {
    flex: 1;
}

nav ul li a,
nav ul li a:link {
    text-decoration: none;
    display: block;
    text-align: center;
    padding: 0.5em;
    font-weight: bold;
    letter-spacing: 0.2rem;
    color: var(--gris);
    background-color: var(--blanco);
    font-size: 1.3rem;
    border-bottom: 1px solid var(--gris);
    box-sizing: border-box;
}

nav ul li a:hover {
    background-color: var(--gris);
    color: white;
}

/* -------------------------------------------------- SECCION CATEGORIAS------------------------------------------------------------------------ */
.categorias {
    display: grid;
    grid-template: 50px / 100%;
    grid-gap: 20px;
    padding: 0 1em 0 1em;
    margin-bottom: 20px;
}

.categorias h2 {
    color: var(--verde);
    margin-top: 20px;
    grid-row: 1 / 2;
    grid-column: 1 / -1;
}

.categorias article div figure {
    overflow: hidden;
    position: relative;
}

.categorias article div figure figcaption {
    position: absolute;
    bottom: 0px;
    left: 0px;
    color: var(--gris);
    font-weight: bold;
    height: 0%;
    width: 100%;
    background-color: RGBA(255, 255, 255, .4);
}

.categorias article div figure figcaption h3 {
    margin-top: 35vh;
    margin-left: 10px;
}

.categorias article div figure:hover figcaption {
    height: 100%;


}

.categorias article div figure img {
    width: 100%;
    height: 40vh;
    object-fit: cover;
    object-position: center center;
}

.categorias article div figure:hover {
    border-radius: 0 25px 0 25px;
}

/* ------------------------------------------------SECCION ARTICULOS----------------------------------------------------------------------------- */
.articulos {
    padding: 0 1em 2em 1em;
    display: grid;
    grid-template: repeat(8, 1fr)/repeat(1, 1fr);
    grid-gap: 20px;


}

.articulos article div figure {
    overflow: hidden;

}

.articulos article div figure img {
    width: 100%;
    object-fit: cover;
    height: 40vh;
    margin-top: 2em;
    box-sizing: border-box;
}

.articulos article div figure img:hover {
    border-radius: 0 25px 0 25px;
    border: 3px solid var(--gris);

}

.titulo {
    display: flex;
    justify-content: space-between;
    gap: 20px;

}

.titulo h2 {
    color: var(--verde);
    margin-left: 15px;
}


.titulo h2,
.titulo div {
    margin-top: 20px;
}

.titulo div {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--verde);
    color: var(--blanco);
    width: 30vw;
    height: 50px;
    font-weight: bold;
    letter-spacing: 0.2rem;
    border-radius: 0 15px 0 15px;
}

.titulo div:hover {
    color: var(--blanco);
    background-color: var(--gris);
}

.botones {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.botonimagen {
    background-color: transparent;
    width: 40px;
    height: 40px;
    background-image: url("../img/icono/delete.png");
    background-position: center;
    background-repeat: no-repeat;
    border-color: transparent;
}

.botonimagen:hover {
    background-image: url("../img/icono/delete_rojo.png");

}

.botones a,
.botones a:link {
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5em;
    font-weight: bold;
    letter-spacing: 0.2rem;
    color: var(--blanco);
    background-color: var(--verde);
    border-radius: 0 15px 0 15px;
    box-sizing: border-box;
}

.botones a:hover {

    color: var(--blanco);
    background-color: var(--gris);
}

.articulos article div h3 {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* ---------------------------------------SECCION BOTONES COMPRAS Y PEDIDOS-------------------------------------- */

.comPed {
    display: flex;
    flex-direction: row;
    padding: 2em 0 0 0;
    justify-content: space-between;

}

.comPed div {
    display: flex;
    width: 30vw;
    height: 60px;
    justify-content: center;
    align-items: center;
    background-color: var(--verde);
    color: var(--blanco);
    font-weight: bold;
    letter-spacing: 0.2rem;
    border-radius: 0 25px 0 25px;
    margin: 0 auto;
    margin-bottom: 50px;

}

.comPed div:hover {
    background-color: var(--gris);

}


/* ----------------------------------------------------SECCION COMPRAS y PEDIOS FORMULARIO------------------ */
#fondoForm {
    background: RGBA(215, 244, 193, .5) url("../img/tramaFormulario.jpg") no-repeat center center;
    background-blend-mode: multiply;
    background-size: cover;


}

#formularioCP {
    padding: 0 .5em 0 .5em;
    width: 90%;
    margin-top: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    height: fit-content;

}

#formularioCP legend {
    margin-bottom: 20px;
    color: var(--verde);
    font-weight: bold;
    text-align: center;
    font-size: 1.3em;
    padding-top: 50px;
}

#formularioCP>input[type="text"],
#formularioCP>input[type="date"],
#formularioCP>select {
    flex: 1;
    padding: 0.3rem 0 0.3rem 0;
    outline: none;
    background-color: var(--blanco);
    color: var(--verde);
    border-radius: 5px;
    border: 2px solid var(--gris);
    width: 100%;
    height: 1em;
}

#formularioCP>input[type="text"]:focus,
#formularioCP>input[type="date"]:focus,
#formularioCP>select:focus {
    box-shadow: 0 0 5px var(--verde);
}

::placeholder {
    padding: 0.3em;
    color: var(--verde);
}

#formularioCP>label {
    font-weight: bold;
    margin-top: 15px;
}

#formularioCP>div>input[type="button"] {
    padding: 0em 1em 0em 1em;
    border-radius: 5px;
    font-weight: bold;
    color: var(--blanco);
    background-color: var(--verde);
    height: 3em;
    width: calc(98% / 2);
    margin-bottom: 50px;
    margin-top: 20px;
    border: transparent;
}

#formularioCP>div>input[type="button"]:hover {
    background-color: var(--gris);
    color: var(--blanco);
}

#formularioCP>div>input[type="button"]:focus {
    outline: 0;
}

/* -----------------------------------------------------SECCION LISTADO STOCK------------------------------------------------------------------ */

table {
    width: 100%;
    margin: 20px auto;
}

th {
    text-align: center;
    padding: 8px;
}

td {
    text-align: center;
    padding: 5px;
}

tbody>tr:nth-child(2n) {
    background-color: RGBA(215, 244, 193, .5);
}

tbody>tr:hover {
    background-color: var(--gris);
    color: var(--blanco);
}

tbody>tr:hover .botonEliminar {
    background-image: url("../img/icono/eliminar_blanco.png");
}

thead,
tfoot {
    background-color: #008d36;
    color: var(--blanco);
}

.botonEliminar {
    background-color: transparent;
    width: 20px;
    height: 20px;
    background-image: url("../img/icono/eliminar.png");
    background-position: center;
    background-repeat: no-repeat;
    border-color: transparent;
}

/* ---------------------------------------------------------VENTANA MODAL_AGREGAR ARTICULO---------------------------------------------------- */

#fondoFormArt {
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    place-items: center;

    /* cuando se visualice la modal hay que poner grid */
    /* display: grid; */
    display: none;
    z-index: 9000;
}
#guardado{
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    place-items: center;

    /* cuando se visualice la modal hay que poner grid */
    /* display: grid; */
    display: none;
    z-index: 10000;
}



#agregarArticulo{
    padding: 1em 3em 3em 3em;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    height:fit-content;
    background-color: var(--verde);
    width: 70%;
    box-sizing: border-box;
    border-radius: 0 25px 0 25px;
  
     
}
#guardado>div{
    padding: 2em 2em 2em 2em;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    height:fit-content;
    background-color: var(--verde);
    width: 70%;
    box-sizing: border-box;
    border-radius: 0 25px 0 25px;
    align-items: center;

}
#guardado>div>p{
    color:var(--blanco);
    margin-bottom: 20px;
   
    font-weight: bold;
    font-size: 1em;
}
#guardado>div>input[type="button"]{
    width: 50%;
    background-color: var(--gris);
    color: var(--blanco);
    border: transparent;
    border-radius: 0 5px 0 5px;
    padding: 0.5em;
    font-weight: bolder;

}
#guardado>div>input[type="button"]:hover{
    background-color: var(--blanco);
    color: var(--gris);
}



#agregarArticulo>legend {
    margin: 0 auto;
    color: var(--blanco);
    font-weight: bold;
}

#agregarArticulo>input[type="text"],
#agregarArticulo>select {
    flex: 1;
    padding: 0.3rem 0 0.3rem 0;
    outline: none;
    background-color: var(--blanco);
    color: var(--verde);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: transparent;
    width: 100%;
    height: 1em;
}

#agregarArticulo>label {
    color: var(--blanco);
    font-weight: bold;
    margin-bottom: 5px;
}

#agregarArticulo>input[type="text"]:focus,
#agregarArticulo>select:focus {
    box-shadow: 0 0 15px var(--gris);
}

#agregarArticulo>div {
    text-align: center;
    padding-top: 20px;
}

#agregarArticulo>div>input[type="button"] {
    padding: 0em 1em 0em 1em;
    border-radius: 5px;
    font-weight: bold;
    color: var(--blanco);
    background-color: var(--gris);
    height: 3em;
    width: calc(98% / 2);
    border-color: transparent;
}

#agregarArticulo>div>input[type="button"]:hover {
    background-color: var(--blanco);
    color: var(--gris);
}

#agregarArticulo>div>input[type="button"]:focus {
    outline: 0;
}

#agregarArticulo #imagen {
    background-color: silver;
    color: var(--gris)
}

#agregarArticulo #imagen::placeholder {
    color: grey
}

#agregarArticulo #imagen:focus {
    box-shadow: none;
}

/* --------------------------------------------------------SECCION DETALLE DE ARTICULO------------------------------------------------------- */


.detalle div figure img {
    width: 100%;
    object-fit: cover;
    height: 30vh;
    margin-top: 2em;
    box-sizing: border-box;

}

.detalle {
    display: grid;
    grid-template: 1fr / repeat(2, 1fr);
    grid-gap: 20px;

}

.detalle>div:first-child {
    margin-top: 2em;
    box-sizing: border-box;
    height: 50vh;
}

.detalle>div>div:first-child
 {
    margin: 0 auto;
    background-color: var(--rojo);
    border-radius: 0 15px 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    font-weight: bold;
    width: 25vw;
    margin-bottom: 50px;

}

.detalle>div>p {
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}


/* -------------------------------------------------------- FOOTER----------------------------------------------------------------------------- */
footer {
    background-color: var(--gris);
    color: var(--blanco);
}

footer div {
    display: flex;
    height: 5em;
    align-items: center;
}

#dire,
#tel {
    display: none;
    padding: 0 10px 0 10px;
}

footer div p:last-child {
    width: 50vw;
    display: flex;
    justify-content: end;
}

footer div p:last-child a,
footer div p:last-child a:link {
    color: transparent;
    height: 40px;
}

.facebook {
    background-color: transparent;
    background-image: url("../img/icono/facebook.png");
    background-position: center;
    background-repeat: no-repeat;
    border-color: transparent;

}

.instagram {
    background-color: transparent;
    background-image: url("../img/icono/instagram.png");
    background-position: center;
    background-repeat: no-repeat;
    border-color: transparent;
}

.facebook:hover {
    background-image: url("../img/icono/facebook_verde.png");
}

.instagram:hover {
    background-image: url("../img/icono/instagram_verde.png");
}





/* ---------------------------------------------- MEDIAS QUERYS---------------------------------------------------------------------------------- */

/* -----------------------------------------------RESOLUCION 576----------------------------------------------------------------------------------*/

@media screen and (min-width: 576px) {
    header {
        text-align: left;
    }

    nav ul {
        flex-direction: row;
    }

    nav ul li a,
    nav ul li a:link {
        border-bottom: 0;
        border-right: 2px solid white;
    }

    nav ul li:last-child a,
    nav ul li:last-child a:link {
        border-right: 0;
        width: 50vw;
    }

    .categorias {
        grid-template: 50px repeat(2, 1fr) / repeat(2, 1fr);
    }
}

/* -------------------------------------------------RESOLUCION 768------------------------------------------------------------------------------ */
@media screen and (min-width: 768px) {
    nav ul li {
        padding: 0.2rem;
    }

    nav ul li a,
    nav ul li a:link {
        border-bottom: 0;
        border-right: 0;
    }

    header {
        width: 50vw;
    }

    .clima {
        display: flex;
        flex-direction: row;
        padding: 2em 0 0 0;
        justify-content: space-between;
    }
  

    .clima div {
        display: flex;
        width: 45vw;
        height: 200px;
        justify-content: center;
        align-items: center;
        background-color: var(--verde);
        color: var(--blanco);
        font-weight: bold;
        font-size: 1.5em;
        letter-spacing: 0.2rem;
        border-radius: 0 25px 0 25px;
        margin: 0 auto;

    }

    .articulos {
        padding: 0em .5em 0em .5em;
        grid-template: repeat(3, 1fr)/repeat(3, 1fr);
        margin-bottom: 20px;
    }

    .titulo h2 {
        margin-left: 8px;
    }

    #dire,
    #tel {
        display: inline-block;
        width: 25vw;
        margin-top: 15px;
    }

    .comPed div {

        width: 40vw;
        height: 100px;
    }

    #formularioCP {
        width: 70%;
    }

    #agregarArticulo, #guardado>div  {
        width: 60%;
    }
  
    
    .detalle div figure img {
        height: 50vh;
    }
    
}


/* ------------------------------------------------RESOLUCION 992------------------------------------------------------------------------------- */
@media screen and (min-width: 992px) {
    .menuIndex {
        display: flex;
        align-items: center;
    }

    header {
        width: 50vw;
    }

    nav ul li {
        padding: 0.2rem;
    }

    nav ul li a,
    nav ul li a:link {
        border-bottom: 0;
        border-right: 0;
    }

    nav ul li:last-child a,
    nav ul li:last-child a:link {
        border-right: 0;
        width: 25vw;
    }

    .menuIndex {
        border-bottom: 2px solid var(--gris);
    }

    .categorias {
        grid-template: 50px repeat(1, 1fr) / repeat(4, 1fr);
    }

    .titulo div {
        width: 20vw;
    }


    #formularioCP {
        width: 45%;
    }

    #agregarArticulo,#guardado>p {
        width: 50%;
    }

}

/* -------------------------------------------RESOLUCION 1200---------------------------------------------------------------------------------- */
@media screen and (min-width: 1200px) {
    .centrado {
        margin: 0 auto;
        width: 1200px;
    }

    nav ul li:last-child a,
    nav ul li:last-child a:link {
        border-right: 0;
        width: 20vw;
    }

    .categorias {
        margin: 0 auto;
        width: 1200px;
    }

    .clima div {
        width: 35vw;
        font-size: 2em;
    }

    .comPed div {
        width: 35vw;
        height: 150px;
    }

    #formularioCP {
        padding: 0;
        width: 45%;
    }

    #agregarArticulo, #guardado>div {
        width: 30%;
    }

}