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

    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('/img/fondo-futuro.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-texto);
  
}

    header {
      background: var(--color-texto);
      color: var(--color-blanco);
      padding: 1rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      position: relative;
      overflow: hidden;
    }

    header video {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      object-fit: cover;
      z-index: 0;
      opacity: 0.25;
      pointer-events: none;
    }

    .logo {
      display: flex;
      align-items: center;
      z-index: 1;
    }

    .logo img {
      height: 50px;
      margin-right: 0.5rem;
    }

    .logo h1 {
      margin: 0;
      font-size: 1.5rem;
    }

    nav {
      display: flex;
      gap: 1rem;
      z-index: 1;
    }

    nav a {
      color: var(--color-blanco);
      text-decoration: none;
      font-weight: 600;
      transition: all 0.3s ease;
      padding: 0.5rem;
      border-radius: 5px;
    }

    nav a:hover {
      transform: scale(1.1);
      background-color: var(--color-hover);
    }

.banner {
  position: relative;
  overflow: hidden;
  perspective: 1000px;
  text-align: center;
  padding: 0.5rem 0; /* reduce espacio vertical */
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner h2 {
  font-size: 3rem;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: surgir 8s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center bottom;
  opacity: 0;
  position: relative;
}

@keyframes surgir {
  0% {
    transform: translateY(100%) scale(0.8) rotateX(80deg);
    opacity: 0;
    filter: blur(4px);
  }
  15% {
    transform: translateY(0) scale(1) rotateX(0);
    opacity: 1;
    filter: blur(0);
  }
  40% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(0) scale(1.1);
  }
  60% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  80% {
    transform: translateY(-100%) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateY(-100%) scale(0.8);
    opacity: 0;
  }
}

    .categorias {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1rem;
      padding: 2rem;
    }

    .categoria {
  background: var(--color-blanco);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.categoria:hover {
  transform: translateY(-5px);
}

/* Fertilizantes: animación secuencial de sombras de colores primarios y secundarios */
.categoria.fertilizantes:hover {
  animation: sombraColores 3s linear infinite;
}

@keyframes sombraColores {
  0% {
    box-shadow: 0 0 10px 3px red;
  }
  16% {
    box-shadow: 0 0 10px 3px orange;
  }
  33% {
    box-shadow: 0 0 10px 3px yellow;
  }
  50% {
    box-shadow: 0 0 10px 3px green;
  }
  66% {
    box-shadow: 0 0 10px 3px blue;
  }
  83% {
    box-shadow: 0 0 10px 3px indigo;
  }
  100% {
    box-shadow: 0 0 10px 3px violet;
  }
}

/* Fungicidas: sombra violeta */
.categoria.coadyuvantes:hover {
  box-shadow: 0 0 15px 5px rgb(1, 40, 214);
}

.categoria.fungicidas:hover {
  box-shadow: 0 0 15px 5px violet;
}

/* Insecticidas: sombra amarilla */
.categoria.insecticidas:hover {
  box-shadow: 0 0 15px 5px yellow;
}

/* Herbicidas: sombra verde */
.categoria.herbicidas:hover {
  box-shadow: 0 0 15px 5px green;
}

.categoria.neutralizador:hover {
  box-shadow: 0 0 15px 5px #00bcd4; /* azul celeste */
}

.categoria.nematicida:hover {
  box-shadow: 0 0 15px 5px #8e44ad; /* morado */
}

.categoria.acaricida:hover {
  box-shadow: 0 0 15px 5px #ff5722; /* naranja fuerte */
}

.categoria.desinfectante:hover {
  box-shadow: 0 0 15px 5px #9c27b0; /* violeta */
}

.categoria.sustrato:hover {
  box-shadow: 0 0 15px 5px #795548; /* marrón */
}

    .categoria h3 {
      margin: 0.5rem 0;
    }

    .boton {
      display: inline-block;
      margin-top: 1rem;
      background: var(--color-boton);
      color: var(--color-blanco);
      padding: 0.5rem 1rem;
      border: none;
      border-radius: 5px;
      text-decoration: none;
      font-weight: 600;
    }
	
	
	.boton:hover {
    background: #e65100;
    transform: scale(1.07);
}

    @media (max-width: 600px) {
      .banner h2 {
        font-size: 1.5rem;
        padding: 0 1rem;
      }

      nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-top: 1rem;
      }
    }

    /* Distribución de 4 columnas y centrado de las últimas 2 en pantallas grandes */
@media (min-width: 992px) {
  .categorias {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-content: center;
    gap: 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
  }

  /* Centrar las últimas dos tarjetas si sobran */
  .categorias > .categoria:nth-last-child(2):nth-child(odd),
  .categorias > .categoria:nth-last-child(1):nth-child(odd) {
    grid-column: 2 / span 1; /* Las últimas dos se centran en el medio */
  }
}

/* === BUSCADOR === */
.buscador {
  text-align: center;
  margin: 2rem auto;
  padding: 1rem;
  max-width: 800px;
}

.buscador-form {
  display: flex;
  justify-content: center;
  align-items: stretch; /* ✅ Alinea ambos al mismo alto */
  gap: 1rem;
  flex-wrap: wrap;
}

.buscador-form input {
  width: 80%;
  max-width: 800px;
  padding: 0.8rem 1rem;
  font-size: 1.5rem;
  border-radius: 10px;
  border: 2px solid var(--color-texto);
  outline: none;
  font-family: 'Poppins', sans-serif;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  height: 56px; /* ✅ Altura fija igual al botón */
  box-sizing: border-box;
}

.buscador-form input:focus {
  box-shadow: 0 0 10px var(--color-boton);
  transform: scale(1.03);
}

.titulo-portafolio {
  text-align: center;
  color: #ffffff;
  font-size: 2.5rem;
  font-family: 'Poppins', sans-serif;
  margin: 2rem 0 1rem 0;
  opacity: 0;
  transform: translateY(20px);
  animation: aparecer 1s ease-out forwards;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.titulo-portafolio:hover {
  transform: scale(1.08);
  text-shadow: 0 0 15px rgba(44, 43, 43, 0.6);
}

@keyframes aparecer {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === AUTOCOMPLETADO === */
#lista-autocompletar {
  position: absolute;
  top: 100%; /* justo debajo del input */
  left: 0;
  width: 100%; /* mismo ancho que el contenedor padre */
  background-color: #fff;
  border: 2px solid var(--color-texto);
  border-radius: 10px;
  margin-top: 5px;
  z-index: 1000;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  display: none;
}

/* Cada opción del autocompletado */
#lista-autocompletar div {
  padding: 0.8rem 1rem;
  font-size: 1.5rem;
  color: var(--color-texto);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Hover con efecto */
#lista-autocompletar div:hover {
  background-color: var(--color-boton);
  color: #fff;
  transform: scale(1.02);
}

.buscador-input-container {
  position: relative;
  width: 80%;
  max-width: 800px;
}