@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.top-bar {
  background: #242424;
  color: #ffffff;
  text-align: center;
  padding: 12px;
  font-size: 14px;
}

.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 100px;
  border-bottom: 1px solid #ddd;
}

.nav-left {
  justify-self: start;
}

.nav-left .search {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  width: 220px;
}

.logo {
  height: 70px;
  width: 140px;
  display: block;
  margin: 0 auto 8px auto;
}

.nav-center {
  justify-self: center;
  text-align: center;
}

/* Flex para los íconos */
.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px; /* espacio más controlado */
}

.menu {
  list-style: none;
  display: flex;
  gap: 25px;
  justify-content: center;
}

.menu li {
  position: relative;
}

.menu a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
}

.nav-right img {
  width: 22px;
  cursor: pointer;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search {
  padding: 8px 40px 8px 14px; /* espacio para el icono */
  border-radius: 20px;
  border: 1px solid #ccc;
  width: 22px;
  font-size: 14px;
}

.search:focus + .search-icon {
  opacity: 1;
}


/* Icono */
.search-icon {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Hover */
.search-box:hover .search-icon {
  opacity: 1;
  transform: scale(1.05);
}


/* MEGA DROPDOWN */
.dropdown-menu {
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  margin-top: 10px;
  pointer-events: auto;

  background: #ffffff;
  border-radius: 18px;
  padding: 18px;

  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 👈 columnas */
  gap: 8px 16px;

  min-width: 520px;
  max-width: 1500px;

  box-shadow: 0 18px 40px rgba(0,0,0,0.14);

  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 9999;

  list-style: none;
  margin: 0;
}




/* Ítems */
.dropdown-menu li a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #1f2937;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
  background: #f4f6f8;
  color: #000;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease;
}

/* Flecha */
.dropdown-toggle .arrow {
  font-size: 15px;
  transition: transform 0.25s ease;
}

/* Cuando está abierto */
.dropdown:hover .dropdown-toggle {
  color: #E66400; /* azul elegante */
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown:hover .dropdown-toggle .arrow {
  transform: rotate(180deg);
}

.dropdown-title {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

/* HAMBURGUESA */
.burger {
  display: none;
  width: 28px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.burger img {
  width: 24px;
  height: 24px;
}

.menu-overlay{
  display: none;
}

/* ===============================
   OVERLAY BLUR
================================ */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;

  z-index: 900;
}

/* ACTIVO */
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}

/* ===============================
   SEARCH OVERLAY - PANTALLA COMPLETA
================================ */
/* ===============================
   SEARCH OVERLAY PROFESIONAL
================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: #fff; /* pantalla blanca completa */
  display: flex;
  flex-direction: column; /* input arriba */
  align-items: center; /* centrado horizontal */
  justify-content: flex-start; /* input arriba */
  padding-top: 40px; /* más arriba que antes */
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 1500;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay .search-container {
  width: 90%;
  max-width: 600px;
  background: transparent;
}

.search-overlay input {
  width: 100%;
  padding: 14px 16px 14px; /* espacio para ícono de lupa */
  font-size: 16px;
  border: 1px solid #ddd; /* borde sutil */
  border-radius: 24px; /* más redondeado para estilo moderno */
  outline: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* sombra ligera profesional */
  transition: all 0.2s ease;
}

/* Hover y focus para input */
.search-overlay input:focus {
  border-color: #888;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* Icono de lupa dentro del input */
.search-overlay .search-container {
  position: relative;
}


/* ===============================
   RESPONSIVE NAVBAR (MOBILE)
================================ */
@media (max-width: 1024px) {

  .navbar {
    display: flex; /* cambiar grid a flex */
    align-items: center;
    justify-content: center; /* todo en una línea */
    gap: 6vw;
    padding: 12px 16px;
  }

  .nav-left, .nav-center, .nav-right {
    display: flex;
    align-items: center;
  }

  .logo {
    height: 42px;
  }

  .burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    z-index: 1200;
  }

  /* MENU LATERAL */
  .menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 10px;
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding-bottom: 80px;
  }

  .menu.active {
    left: 0;
  }

  .menu a {
    display: flex;
    justify-content: space-between;
    padding: 14px 6px;
    border-bottom: 1px solid #eee;
  }

  /* DROPDOWN MOBILE */
  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    background: #fff;

    display: none;
    grid-template-columns: 1fr;
    padding: 0;
    margin-top: 10px;

    min-width: 100%;
    max-width: 100%;
    max-height: 40vh;
    overflow-y: auto;

    opacity: 1;
    visibility: visible;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  /* DESACTIVAR HOVER EN MOBILE */
  .dropdown:hover .dropdown-menu {
    transform: none;
  }

  .dropdown-title {
    display: none;
  }

  body.menu-open .burger {
    opacity: 0;
    pointer-events: none;
  }

  .burger {
    display: flex;
  }

  .navbar {
    grid-template-columns: auto 1fr auto;
  }

  .nav-left {
    display: block;
  }

  .search-box {
    width: auto;
  }

  .search {
    display: none; /* ocultamos input */
  }

  .search-icon {
    position: static;
    width: 22px;
    height: 22px;
    opacity: 1;
    cursor: pointer;
  }

}

