/* Reset de css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Sin congiguracion el rem vale: */
  /* 1rem = 16px */

  /* Para que 1 rem = 10px */
  font-size: 62.5%;
}
body {
  font-family: "Nunito", sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  background-color: green;
  color: #f7bb2b;

  display: flex;
  flex-direction: column;

  min-height: 100vh;
}

.header {
  background-color: #006305;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.header__logo-store {
  vertical-align: middle;
}

.header__logo {
  padding: 1rem;
  margin-left: 2rem;

  font-size: 3rem;
  font-weight: bold;
}
.header__logo a {
  color: #f7bb2b;
  text-decoration: none;
}

.header__nav {
  padding: 1rem;
  margin-right: 2rem;
}

.header__nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.header__nav li {
  font-size: 3rem;
  font-weight: bold;
}

.header__nav a {
  color: #f7bb2b;
  text-decoration: none;
  display: inline-block;
  padding: 1rem;
}

.footer {
  background-color: #1d1a20;

  padding: 2rem;
  color: #f7bb2b;

  /* hago flexibles al p y la nav */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer nav ul {
  list-style: none;

  /* hago flexibles a los li de la lista */
  display: flex;
  justify-content: center;
  gap: 2rem; /* 20px */
}

/* -------------------------------------------------------------------------- */
/*                                    HOME                                    */
/* -------------------------------------------------------------------------- */

main {
  width: 90%;

  /* body dijo que sus hijos sean flexibles (header, main y footer) */
  /* al aplicar la propiedad "flex: 1" a un hijo, le decimos que ese 
  hijo siempre tomara el mayor espacio disponible */
  flex: 1;

  margin: 2rem auto;

  display: flex;
  flex-direction: column;
  align-items: center;
}

main h1 {
  font-size: 4rem;
  margin: 2rem 0;
}

main .parrafo-home {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  width: 80%;
}

.productos-home {
  width: 100%;
}

.productos-home h2 {
  text-align: center;
  font-size: 3rem;
  padding: 1rem;
  margin: 3rem;
}

.contenedor-tarjetas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.tarjeta-producto {
  background-color: #1d1a20;
  padding: 1rem;
  border-radius: 1rem;
  width: 30rem;

  /* hacemos flexibles los elementos del article */
  /* los colocamos en columna y centrados */
  display: flex;
  flex-direction: column;
  align-items: center;

  /* separacion */
  gap: 1rem;
}

.tarjeta-producto h3 {
  font-size: 2.5rem;
}

.tarjeta-producto p {
  font-size: 2rem;
  font-weight: bold;
}

.tarjeta-producto img {
  width: 100%;
  border-radius: 0.5rem;
}

/* -------------------------------------------------------------------------- */
/*                                  Contacto                                  */
/* -------------------------------------------------------------------------- */

.seccion-contacto {
  width: 100%;

  margin: 2rem auto;
}

.titulo-contacto {
  font-size: 4rem;
  text-align: center;
  margin: 2rem 0;
}

.form {
  background-color: #1c1b20;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 400px; /* para que no sea demasiado ancho */
  margin: 0 auto;   /* centra el form en la pantalla */
  text-align: center; /* centra el contenido dentro */
}

.campo-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.campo-form label {
  font-size: 2rem;
}
.campo-form input,
.campo-form textarea {
  padding: 1rem;
  font-size: 1.6rem;
  border-radius: 0.5rem;
  border: none;
}

.form button {
  background-color: #006305;
  color: #e5e6e8;
  border: none;
  padding: 0.5rem 1.5rem; /* tamaño cómodo */
  font-size: 1.8rem; /* un poco más chico que 2rem */
  font-weight: bold;
  border-radius: 0.5rem;
  cursor: pointer;
  display: inline-block;
  margin: 1rem 0 0.5rem 0; /* espacio entre botones */
}

.boton-volver{
  text-align: bottom;
  text-decoration: none;
  color:#f7bb2b;
  font-size: x-large;
  display: block;
}

/* -------------------------------------------------------------------------- */
/*                                media queries                               */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .header {
    display: flex;
    flex-direction: column;
  }

  .header__logo,
  .header__nav {
    margin: 0;
  }

  .contenedor-tarjetas {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tarjeta-producto {
    width: 80%;
  }
  .form {
    width: 80%;
    min-width: 400px;
  }
}