   :root {
      --color-fondo: #bbbdc1;
      --color-texto: #2e7d32;
      --color-boton: #4caf50;
      --color-blanco: #fff;
      --color-hover: #e65100;
    }

    body {
     margin: 0;
  font-family: 'Poppins', sans-serif;
  /*background-color: var(--color-fondo);
  background-image: linear-gradient(rgba(187,189,193,0.7), rgba(187,189,193,0.2)), url('/agrotg3/img/fondo-futuro.jpg'); */
  background-color: #85A7C8;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-texto);
    }

    footer {
      background-color: var(--color-texto);
      color: var(--color-blanco);
      padding: 1rem;
      text-align: center;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
    }


    h1, h2 {
      text-align: center;
    }

    .contenedor {
      padding: 2rem;
      max-width: 1100px;
      margin: auto;
	  margin-top: 5px;
	  margin-bottom: 5px;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 12px;
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
      position: relative;
      z-index: 1;
    }

	.filtros {
	  display: grid;
	  grid-template-columns: repeat(6, 1fr);
	  gap: 1.5rem;
	}

	
	.filtro-n,
	.filtro-p,
	.filtro-k {
	  grid-column: span 2;
	}
	
	.filtro-nombre,
	.filtro-cultivo,
	.filtro-micronutrientes,
	.filtro-etapa {
	  grid-column: span 3;
	}
	
	@media (max-width: 900px) {
  .filtros {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .filtro-nombre,
  .filtro-cultivo,
  .filtro-micronutrientes,
  .filtro-etapa {
    grid-column: span 2;
    max-width: 100%;
  }
}

@media (max-width: 500px) {
  .filtros {
    grid-template-columns: 1fr;
  }
  .filtro-nombre,
  .filtro-cultivo,
  .filtro-micronutrientes,
  .filtro-etapa {
    grid-column: span 1;
    max-width: 100%;
  }
}
	
	
    .filtros label {
      font-weight: bold;
      display: block;
      margin-bottom: 0.3rem;
    }

    .filtros input[type="range"],
    .filtros input[type="text"],
	.filtros select{
      width: 100%;
      padding: 0.3rem;
      font-size: 1rem;
      border-radius: 5px;
      border: 1px solid #ccc;
    }

    .filtros input[type="checkbox"] {
      margin-right: 0.5rem;
    }
	
	.filtros > div {
		  position: relative;
		}

	.filtros .filtro-nombre {
	  position: relative;
	  width: 100%;
	  display: flex;
	  flex-direction: column;
	  gap: 0.2rem;
	}

	#lista-autocompletar {
	  position: absolute;
	  top: calc(100% + 2px); /* Justo debajo del input, ajusta el +2px si hay borde */
	  left: 0;
	  width: 100%;
	  border: 1px solid #ccc;
	  max-height: 150px;
	  overflow-y: auto;
	  background: white;
	  z-index: 1000;
	  border-radius: 5px;
	  box-sizing: border-box;
	  display: none;
	}
	
	@media (max-width: 900px) {
  .filtros .filtro-nombre {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

    #lista-autocompletar div {
      padding: 5px 10px;
      cursor: pointer;
    }

    #lista-autocompletar div:hover {
      background-color: #e0e0e0;
    }

    .productos {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.5rem;
      margin-top: 1rem;
    }

   .producto {
	  background: white;
	  border-radius: 10px;
	  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
	  padding: 1rem;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  transition: transform 0.2s ease;
	}
	
	.producto:hover {
  transform: scale(1.05); /* Crece un 5% al hacer hover */
  box-shadow: 0 6px 15px rgba(0,0,0,0.2); /* Sombra más visible */
}

	.producto img {
  width: 100%;
  max-width: 300px;
  height: 200px;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0.5rem;
  object-fit: contain; /* Mantiene la proporción sin recortar */
  /* object-fit: cover;  Alternativa: llena el contenedor recortando si es necesario */
}

	.producto h3,.producto h4, .producto p {
	  width: 100%;
	  text-align: center;
	  margin-top: 0.2rem;    /* Reduce margen superior */
	  margin-bottom: 0.2rem; /* Reduce margen inferior */
	  padding: 0;            /* Elimina padding si existe */
	}

	.form-carrito {
	  width: 100%;
	  display: flex;
	  flex-direction: column;
	  align-items: stretch;
	  gap: 0.5rem;
	  margin-top: 0.8rem;
	}

	.form-carrito label {
	  font-weight: normal;
	  margin-bottom: 0.1rem;
	}

	.form-carrito select,
	.form-carrito input[type="number"] {
	  width: auto;
	  padding: 0.3rem;
	  border-radius: 5px;
	  border: 1px solid #ccc;
	  margin-bottom: 0.3rem;
	  font-size: 1rem;
	}

	.botones-producto {
	  display: flex;
	  gap: 0.7rem;
	  justify-content: center;
	  margin-top: 0.7rem;
	}

	.boton {
	  flex: 1 1 auto;
	  background: var(--color-boton);
	  color: var(--color-blanco);
	  font-weight: bold;
	  padding: 0.6rem 1.5rem;
	  border: none;
	  border-radius: 6px;
	  font-size: 1rem;
	  text-decoration: none;
	  text-align: center;
	  cursor: pointer;
	  transition: background 0.3s, transform 0.2s;
	}

	.boton:hover {
	  background: var(--color-hover);
	  color: #fff;
	  transform: scale(1.05);
	}

    /* Paginación */
    .paginacion {
      text-align: center;
      margin-top: 2rem;
    }

    .paginacion a, .paginacion span {
      margin: 0 5px;
      padding: 0.5rem 1rem;
      border-radius: 6px;
      font-weight: bold;
      font-size: 1rem;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
    }

    .paginacion a {
      background: var(--color-boton);
      color: var(--color-blanco);
      transition: background 0.3s, transform 0.2s;
    }

    .paginacion a:hover {
      background: var(--color-hover);
      transform: scale(1.05);
    }

    .paginacion .activo {
      background: var(--color-hover);
      color: #fff;
      cursor: default;
      pointer-events: none;
      transform: none;
    }

    /* Formulario añadir carrito */
    .form-carrito {
      margin-top: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .form-carrito label {
      font-weight: normal;
    }

    .form-carrito input[type="number"] {
      width: 60px;
      padding: 0.3rem;
      border-radius: 5px;
      border: 1px solid #ccc;
    }