:root {
  --color-principal: #1265a6;
  --color-oscuro: #1b1d39;
  --color-gris: #706f6f;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 9999;
  backdrop-filter: blur(8px);
  transition: background-color 0.3s, top 0.3s;
}

header:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.logo img {
  height: 110px;
  width: 190px; /* puedes ajustar este valor */
  transition: all 0.3s ease;
}


nav ul {
  list-style: none;
  display: flex;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-weight: 300;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-principal);
}

nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(28, 53, 94, 0.95);
  padding: 0.5rem;
  border-radius: 5px;
  z-index: 9999;
}

nav ul li:hover ul {
  display: block;
}

nav ul li ul li {
  width: 200px;
}

nav ul li ul li a {
  display: block;
  padding: 0.5rem 1rem;
}

nav ul li ul.submenu-productos {
  display: none;
  position: absolute;
  background-color: rgba(28, 53, 94, 0.95);
  padding: 1rem;
  border-radius: 5px;
  z-index: 9999;
  width: 400px;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

nav ul li:hover ul.submenu-productos {
  display: grid;
}

nav ul li ul.submenu-productos li a {
  display: block;
  padding: 0.3rem 0.5rem;
  color: #fff;
  border-radius: 3px;
}

nav ul li ul.submenu-productos li a:hover {
  background-color: rgba(255,255,255,0.1);
  color: var(--color-principal);
}

/* Buscador */
.buscador {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.buscador input {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 160px;
}

.buscador input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.buscador button {
  background: var(--color-principal);
  color: #fff;
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 992px) {
  header {
    padding: 0.5rem 1rem;
  }

  .logo img {
    height: 80px;
  }

  nav ul {
    flex-direction: column;
    background-color: rgba(28, 53, 94, 0.98);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem;
  }

  nav ul li {
    margin-bottom: 0.8rem;
  }

  nav ul li ul.submenu-productos {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .buscador {
    margin-top: 0.8rem;
    justify-content: center;
  }

  .buscador input {
    width: 80%;
  }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  border-radius: 5px;
  transition: 0.3s;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

@media (max-width: 768px) {
  #menu-toggle {
    display: flex;
  }

  nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: transparent;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    display: none;
  }

  nav.active {
    display: flex;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  nav.show {
  display: flex;
}

}

