@import url('https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

/* DEFINICION DE VARIABLES */
:root {
    --color-background: linear-gradient(180deg,
            #d9afd9 0%,
            #ffffff 33%,
            #97d9e1 66%,
            #ffffff 100%);
    --color-background-cajas: #c0d0d7ec;
    --color-background-cards: radial-gradient(circle farthest-corner at 54.5% 94.8%, rgba(227, 250, 251, .7) 0.4%, rgba(226, 241, 233, .8) 28.4%, rgba(198, 231, 215, .5) 58.4%, rgba(245, 237, 253, .9) 90%);

    --color-background-footer: #beb1f4fe;
    --color-background-header: rgb(0, 0, 0);
    --color-buttons: rgb(146, 146, 218);
    --color-buttons-hover: #49316d;
    --color-fonts: #4c4b4b;
    --font-titulo: "Merriweather Sans", sans-serif;
    --font-texto: "Roboto Mono", serif;
    --font-size_titulo: 1rem;
    --font-size_texto: clamp(1rem, 2vw+1rem, 3rem);
}

/* quita botones de +/- en input tipo number */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* FIN DE DEFINICION DE VARIABLES */

/* ESTILOS DE LA PAGINA */
html,
body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    min-height: 100dvh;
    min-width: 100dvw;
    overflow-x: hidden;
    font-family: var(--font-texto);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    margin: 0;
    padding: 0;
}

/* .container--div {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100dvh;
} */

/* Estilos header */
.header {
    display: inline;
    background-color: var(--color-background-header);
    font-family: var(--font-titulo);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}

.header--list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.header--add {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    color: white;
}

.header--list h1 {
    font-size: 4vw;
    color: white;
    text-align: center;
    align-self: center;
}

.header--list-form {
    display: flex;
    padding-right: .7em;
}

.header--img-logo {
    width: 5rem;
    top: 0;
    left: 0;
}

.header--img {
    width: 1.3rem;
}

.volver_pagina {
    width: 1.8rem;
    position: relative;
}

.acciones--lista {
    display: flex;
    flex-direction: row;
    padding-right: 1em;
    gap: .8em;
    align-items: center;
}

.acciones--item {
    border: solid .2em rgb(231, 173, 251);
    padding: .4em .5em;
    margin: .8em auto;
}


/* Fin Estilos header */
/* Estilos grilla productos */

.main {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 100%;
    align-items: stretch;
    font-family: var(--font-texto);
    position: relative;
    top: 5em;
    padding-top: 3em;
    padding-bottom: 5em;
    flex-grow: 1;

}

/*  Estilos pagina producto cargado */
.main--mensaje {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #b099d0c2;
    height: 100dvh;
    padding-top: 2em;
    margin-bottom: 0;
}

.main--mensaje img {
    width: 3.5em;
}

.saludo {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: .3em .5em;
}

.saludo h1 {
    font-size: 1rem;
    flex-grow: 1;
}

.buttons--saludo {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}


/* Fin Estilos pagina producto cargado */

.main--formulario {
    padding: 0;
}

.main h1 {
    display: inline-flex;
    align-self: center;
}

/* Estilos para contenedor y cards */
section.container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1rem;
    /* height: auto; */
    width: 90%;
    text-align: center;
    margin: auto;
    padding-bottom: 2em;
    min-height: auto;
}

.card {
    /* background-color: rgb(228, 226, 226); */
    margin: .8em auto;
    padding: .6em .9em;
    height: auto;
    min-height: 15em;
    border-radius: .4em;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    display: none;
    background: linear-gradient(135deg, #3498dbba 50%, #bd67fab2 50%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card.show {
    display: flex;
}

.card:hover {
    transform: scale(1.01);
    box-shadow: rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;
}


.card--footer {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    height: auto;
    font-size: 1.5em;
}


.card img {
    width: 70%;
    height: auto;
    object-fit: cover;
    border-radius: .5em;
}

.card--footer .delete {
    width: 1.3em;
    text-align: right;
}


.button-ver-mas {
    display: inline;
    justify-content: center;
    align-items: center;
    margin: 2em auto;
    padding: 1em 1.5em;
    width: 15em;
    border-radius: 0.5em;
    background-color: var(--color-background-footer);
    color: white;
    font-size: 1em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-ver-mas:hover {
    background-color: #0056b3;
}

img.icono-button {
    width: 3em;
    padding-right: 1.5em;
}

.cant-items {
    text-align: center;
    padding-bottom: 1em;
}

/* Fin Estilos grilla productos */

/* Estilos formulario carga productos */
.formulario {
    display: flex;
    flex-direction: column;
    top: 8em;
    width: 100dvw;
    height: auto;
    padding-top: .8em;
}

.formulario h1 {
    color: black;
    font-weight: bold;
    font-size: 1.6em;
}

#form {
    border: #4c4b4b 1px solid;
    background-color: black;
    display: flex;
    padding: .6em .7em;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    border-radius: .6em;
    height: 100%;
}

#form img {
    width: 2em;
}


.form--list {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    width: 100%;
    gap: 1em;
    align-items: baseline;
    align-content: center;
}

.form--item-content {
    display: flex;
    flex-direction: row;
    /* Label e input en la misma fila */
    justify-content: space-between;
    align-items: center;
    /* Alinea verticalmente el contenido */
    width: 100%;
}

.form--item {
    display: flex;
    flex-direction: column;
    /* Mantener los hijos en columna para que el span quede debajo */
    padding: .6em .7em;
    width: 100%;
}


.form--item label {
    margin-right: 1em;
}

.form--item input {
    width: 90%;
    padding: .5em;
    height: 2.5em;
    text-align: right;
    margin-bottom: 0.2em;
}

.form-msj {
    color: red;
    font-size: 1em;
    font-weight: bolder;
    margin-top: 0.2em;
    text-align: right;

}

#form button {
    background-color: rgb(139, 139, 245);
    display: flex;
    justify-content: center;
    align-self: center;
    width: 5em;
    margin-top: .2em;
    padding: .4em .7em;
    border-radius: .3em;
}

.buttons_section {
    display: flex;
    flex-direction: row;
    gap: 1em;
    align-self: center;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
}

/* Fin Estilos formulario productos */

/* Estilos footer */
.footer {
    background-color: var(--color-background-footer);
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-evenly;
    align-items: center;
    font-family: var(--font-titulo);
    height: auto;
    bottom: 0;
    position: fixed;
    width: 100dvw;
    padding: .5em;
}

.footer--redes-list {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.footer--redes-item {
    margin: 0 0.8em;
    align-self: center;
}

.icono--footer {
    width: 2em;
}

/* Fin Estilos footer */

/* Estilos para medianos */
@media (min-width: 767px) and (max-width: 1023px) {
    .header--list {
        text-align: center;
        font-size: 1.6vw
    }

    .header h1 {
        display: block;
        font-size: 1em;
    }

    section.container {
        grid-template-columns: repeat(2, 1fr);
        align-items: stretch;
        width: 90%;
    }

    #form {
        width: 80%;
        margin: 1em auto;
        padding: .6em 1em;
        align-items: center;
    }

    #form img {
        width: 2.5em;
    }

    .form--item input {
        width: 100%;
        padding-left: 1em;
        height: 3em;
        text-align: right;
    }

    #form button {
        width: 6em;
        margin-top: .2em;
        padding: .3em .6em;
        border-radius: .3em;
    }
}


/* estilos para desktop */
@media (min-width: 1024px) {

    .header--list {
        color: white;
    }

    .header h1 {
        display: block;
        font-size: 1.3vw;
    }

    #search-item {
        display: inline;
    }

    #botonBuscar {
        display: inline;
    }

    section.container {
        grid-template-columns: repeat(3, 1fr);
        width: 80%;
        gap: 2em;
    }

    .card {
        width: 100%;
    }

    .card img {
        width: 80%;
    }

    .card--footer {
        font-size: 1.3em;
    }

    .card--footer .delete {
        width: 1.3em;
    }

    #form {
        width: 70%;
        margin: 1em auto;
        padding: .6em 1em;
    }

    #form img {
        width: 3em;
    }

    .form--list {
        display: flex;
        flex-direction: column;
        /* justify-content: space-evenly; */
        width: 100%;
        gap: 1em;
        padding: 1em;
        margin: .8em;
    }

    .form--item {
        justify-content: space-around;
        padding: 1em 1.5em;
        width: 100%;

    }

    .form--item label {
        display: block;
        margin-right: 1em;
        padding-left: 1em;
    }

    .form--item input {
        width: 100%;
        padding-left: 1em;
        height: 3em;
        text-align: right;
    }

    #form button {
        width: 8em;
        margin-top: .2em;
        padding: 1em 1.2em;
        border-radius: .3em;
    }

    .buttons_section {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 3em;
        align-self: center;
        text-align: center;
        font-size: 1.2em;
        font-weight: bold;
    }

    /* Estilos footer  */
    .footer {
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-evenly;
        height: auto;
        padding: 1em;
        position: fixed;
    }

    .acciones--item span {
        display: inline;
    }

}