/* =========================
   HEADER – CSS INDEPENDIENTE
   ========================= */

.header-main {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 10%;
  background: transparent;
  transition: all 0.4s ease;
}

/* Sticky */
.header-main.sticky {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* Logo */
.header-logo img {
  max-width: 95px;
  height: auto;
}

/* ===== NAV ===== */
.header-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.header-nav a {
  color: #2c2c2c;
  font-size: 16px;
  font-weight: 400;
  text-transform: capitalize;
  padding: 6px 10px;
  transition: all 0.3s ease;
}

.header-nav a:hover {
  color: #3dae2b;
}

/* ===== ICONOS ===== */
.header-icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-icons i {
  font-size: 24px;
  color: #2c2c2c;
  cursor: pointer;
  transition: all 0.3s ease;
}

.header-icons i:hover {
  color: #3dae2b;
  transform: scale(1.1);
}

/* ===== MENU ICON ===== */
#header-menu {
  display: none;
  font-size: 34px;
}

/* ==================
   RESPONSIVE
   ================== */

@media (max-width: 900px) {
  .header-main {
    padding: 18px 6%;
  }
}

@media (max-width: 768px) {

  #header-menu {
    display: block;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    transition: all 0.4s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  }

  .header-nav.open {
    right: 0;
  }

  .header-nav a {
    font-size: 18px;
  }
}
/* ===== BOTÓN CERRAR MENÚ ===== */
.menu-close {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 34px;
  font-weight: 300;
  color: #2c2c2c;
  cursor: pointer;
  display: none;
  transition: all 0.3s ease;
}

.menu-close:hover {
  color: #3dae2b;
  transform: rotate(90deg);
}

/* Mostrar solo en móvil */
@media (max-width: 768px) {
  .menu-close {
    display: block;
  }
}

/* Ocultar botón hamburguesa cuando el menú está abierto */
.header-nav.open ~ .header-icons #header-menu {
  display: none;
}

/* =========================
   BUSCADOR HEADER
   ========================= */

.header-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
}

.header-search input {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: 14px;
  width: 180px;
}

.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

/* =========================
   BUSCADOR MOBILE
   ========================= */

@media (max-width: 768px) {

  /* Oculto por defecto */
  .header-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px;
    display: none;
    border-bottom: 1px solid #eee;
    z-index: 999;
  }

  /* Activo */
  .header-search.active {
    display: flex;
    justify-content: center;
  }

  .header-search input {
    width: 100%;
    max-width: 320px;
    font-size: 16px;
  }

  .header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  #search-toggle {
    font-size: 22px;
    cursor: pointer;
  }
}

/* Ocultar lupa toggle en desktop */
#search-toggle {
  display: none;
}

/* Mostrar solo en móvil */
@media (max-width: 768px) {
  #search-toggle {
    display: block;
  }
}


