


/*.w100 {
  max-width: 1400px;
  width: 100%;
  margin: auto;
  padding: 0px 15px;
}*/

/* TOP BAR */

.flex-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

}
.div-top-bar-redes{
  display: flex;
  align-items: center;
  gap: 5px;
}

.div-top-bar-redes a{
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background-color: white;
  color: var(--color-celeste);
  border: 1px solid var(--color-celeste);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: all ease .3s;
}

.nav ul  div:nth-child(1),.nav ul div:nth-child(2){
  border-right: 2px solid #F3F3F3 ;
  padding-right: 100px;
}


.div-top-bar-redes a:hover{
  background-color: var(--color-celeste);
  color: var(--ColorWhite);
  border: 1px solid var(--ColorWhite);
}

.flex-topbar p{
  font-size: 10px;
  font-family: var(--font-Poppins);
  font-size: 12px;
}

.topbar {
  width: 100%;
  background-color: var(--color-celeste);
  color: var(--ColorWhite);
  font-size: 14px;
  position: fixed;
  top: 0px;
  z-index: 10000;
  padding: 8px 15px;
  transition: transform 0.3s ease, opacity 0.3s ease; /* Agregar transición */
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: rgba(0,0,0,0.08) 0 2px 6px;
  transition: transform 0.3s ease; /* Agregar transición */
}


/* Ajustar la posición inicial del header para desktop */
.header-container {
  max-width: 1400px;
  margin: auto;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 0; /* Cambiar de 46px a 0 */
  transition: margin-top 0.3s ease; /* Agregar transición */
}


/* Estado inicial con topbar visible en desktop */
body:not(.mobile-view) .header {
  top: 46px; /* Altura del topbar */
}


/* Cuando el topbar está oculto */
.topbar-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Cuando el header sube al tope */
.header-top {
  transform: translateY(-46px); /* Mover arriba la altura del topbar */
}



.logo{
    width: 87px;
    height: 88px;
}

.logo img {
    width: 100%;
    object-fit: cover;
    overflow: hidden;
  height: auto;
}

.search {
 /* flex: 1;*/
  display: flex;
  width: 60%;
}

.search input {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border: 1px solid var(--borde-form);
  border-radius: 8px 0 0 8px;
  outline: none;
  border-right: 0px;

}

.search button {
  background: var(--color-celeste);
  border: none;
  padding: 0 20px;
  color: #fff;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
height: 46px;
}

.contact {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background-color: #F9F9F9;
  padding: 15px 30px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}
.contact p{
    color: var(--color-title);
}
.contact i{
    color: var(--color-celeste);
}

/* NAV */
.nav {
  border-top: 1px solid #eee;
  padding: 10px 0px;
}

.nav ul {
  max-width: 1400px;
  margin: auto;
  display: flex;
 /* gap: 30px;*/
  padding:15px 12px;
  list-style: none;
  justify-content: space-between;
}

.flex-nav-link{
  display: flex;
  align-items: center;
  gap: 40px;
}

      /* Estilos para el buscador desktop */
.search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-results-desktop {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-results-desktop.active {
    display: block;
}

/* Estilos para items de resultados (igual que en móvil) */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.search-result-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Estados de carga/error */
.search-loading, .search-no-results, .search-error {
    padding: 15px;
    text-align: center;
    color: #666;
}

.search-error button.retry-search {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
}

.search-error button.retry-search:hover {
    background: #0056b3;
}



.wasap-btn-link{
  display: flex;
  align-items: center;
  gap: 10px;
}

.wasap-btn-link a i{
  font-size: 25px;
  color: #27A11A;
}


.nav a {
  text-decoration: none;
  color: var(--color-title);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
    transition: all ease .3s;
}

.nav a:hover{
    color: var(--color-celeste);
}


.has-sub .active-categoria{
    color: var(--color-celeste);
}

.has-sub {
  position: relative;
}

/* SUBMENU DESKTOP - OCULTAMOS POR DEFECTO */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  width: 260px;
  padding: 15px;
  list-style: none;
  box-shadow: rgba(0,0,0,0.15) 0 5px 15px;
  display: none;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 101;
  border-radius: 0 0 8px 8px;
}

*/
/* Mostrar solo con clase active */
.has-sub.active .submenu {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  gap: 10px;
}

/* Si el submenú ya está abierto, lo mantenemos visible */
.submenu:hover {
  display: flex !important;
}

/* Hover para enlace principal */
.has-sub > a:hover {
  color: var(--azul);
}

/* nos aseguramos que el menu este por encima*/
.has-sub {
  z-index: 100;
}
/*Ocultamos el icono de las flecha de categoria*/
.has-sub a .ocultar{
    display: none;
}

/* estilos para enlaces del submenu */
.submenu li a {
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}

.submenu li a:hover {
  background: #f5f5f5;
  color: var(--color-celeste);
}

/* FLECHA */
.arrow {
  font-size: 12px;
  margin-left: 6px;
  transition: transform 0.3s ease;
}

.has-sub.active .arrow {
  transform: rotate(180deg);
}

/* HAMBURGUESA */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-celeste);
  transition: 0.3s;
}

/* SIDEBAR MOBILE */
.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100%;
  background: #fff;
  padding: 20px;
  transition: 0.3s;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar.active {
  left: 0;
  top: 107px;

}

.sidebar ul {
  list-style: none;
}

.sidebar > ul > li {
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-weight: 600;
  color: #333;
}

.sidebar > ul > li:hover {
  color: var(--azul);
}

.mobile-sub > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mobile-sub ul {
  display: none;

  padding-top: 10px;
}

.mobile-sub.active ul {
  display: block;
}

.mobile-sub ul li a {
  display: inline-block;
  padding: 8px 0;
  font-weight: normal;
  color: #666;
  border-bottom: none;
}

ul li a{
  color: #333333;
}

.mobile-sub ul li:hover {
  color: var(--color-celeste);
}

/* OVERLAY */
.overlay {
  position: fixed;
  inset: 0;
  /*background: rgba(0,0,0,.5);*/
  background-color: rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 999;
  top: 165px;
}

.overlay.active {
  display: block;
}


@media (min-width:1050px ) {
 .overlay {
    top: 216px;
}
}

@media (max-width:1200px ) {
 .nav ul  div:nth-child(1),.nav ul div:nth-child(2){
  border-right: 2px solid #F3F3F3 ;
  padding-right: 68px;
  /*height: 30px;*/
}
}


@media (min-width: 901px) {
  /* Mostramos los submenú al hacer hover */
  .has-sub:hover .submenu {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  /* La clase active solo para móvil - ajustar para que no interfiera */
  .has-sub.active .submenu {
    display: none !important; /* Ocultar en desktop cuando tiene clase active */
  }

  /* Asegurar que el submenú se mantenga visible al pasar sobre él */
  .submenu:hover {
    display: flex !important;
  }

  /* Flecha en hover */
  .has-sub:hover .arrow {
    transform: rotate(180deg);
  }
}


/*ARREGAMOS ESTO NOMAS LO DE ARRIBA PARA QUE NOS FUNCIONE CON EL MOUSE*/




/*ESTO ES PARA PSOSITION FIXED*/
.topbar{
  width: 100%;
    background-color: var(--color-celeste);
    color: var(--ColorWhite);
    font-size: 14px;
    position: fixed;
    top: 0px;
    z-index: 10000;
    padding: 8px 15px;
}

 .header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: rgba(0,0,0,0.08) 0 2px 6px;
}
/* Para compensar el espacio que ocupaba el nav fijo */
.spaceNav {
  padding-top: 200px;
}

/* Mostramos el espacio solo cuando el nav está visible (en desktop) */




/* =============================== */
/* EFECTO HAMBURGUESA → X (MINIMO) */
/* =============================== */

.hamburger span {
  transition: all 0.35s ease;
  transform-origin: center;
}

/* Estado X */
.hamburger.closeBar span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.closeBar span:nth-child(2) {
  opacity: 0;
}

.hamburger.closeBar span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}






/* RESPONSIVE */
/* RESPONSIVE */



@media (max-width:1050px ) {
 .nav{
  display: none;
 }
 .contact{
  display: none;
 }

 .hamburger {
    display: flex;
    flex-shrink: 0; /* Evita que se encoja demasiado */
  }
  .search{
    width: 80%;
  }

  .sidebar.active

 {
    left: 0;
    top: 165px;
}

button span{
    display: none;
}

    .spaceNav {
        padding-top: 122px;
    }

.hamburger{
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--borde-form);
}
}

@media (max-width: 1000px) {
 .flex-nav-link{
  gap: 25px;
 }
}
/*
@media (max-width: 900px) {
  .nav, .contact {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-shrink: 0; /* Evita que se encoja demasiado
  }

  .header-container {
    padding: 10px 15px;
    flex-wrap: nowrap; /* Asegura que no salten a nueva línea
    gap: 10px; /* Reduce el espacio entre elementos
  }

  .logo {
    flex-shrink: 0; /* Evita que el logo se encoja
  }

  .logo img {
    height: 40px; /* Reduce un poco el logo en móvil
    max-width: 100%; /* Asegura que no se desborde
    object-fit: contain;
  }

  .search {
    flex: 1; /* Ocupa el espacio disponible
    min-width: 0; /* Permite que se reduzca
    width: auto; /* Ancho automático
  }

  .search input {
    width: 100%;
    max-width: 100%; /* Asegura que no se desborde
    padding: 8px 10px; /* Reduce padding un poco
    font-size: 14px; /* Ajusta tamaño de texto
  }

  .search button {
    padding: 0 15px; /* Reduce padding
    font-size: 14px;
  }
}
*/



@media (max-width:600px ) {
 .topbar{
    display: none;
  }

      .sidebar.active

 {
        left: 0;
        top: 119px;
    }

    .overlay{
        top: 119px;
    }

    .header-container{
        margin-top: 0px;
    }

    .header {
    top: 0 !important; /* Forzar top:0 en mobile */
    transform: none !important; /* No aplicar transformaciones */
  }
}

/*
@media (max-width: 600px) {
  .flex-topbar {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    padding: 8px 15px; /* Añade padding lateral
  }
  .topbar{
    display: none;
  }
  .header-container {
    padding: 10px;
    gap: 8px; /* Reduce más el espacio en móviles pequeños
  }

  .logo img {
    height: 35px; /* Logo aún más pequeño en móviles
  }

  .search {
    min-width: 0;
    max-width: calc(100% - 90px); /* Limita el ancho para dejar espacio al logo y hamburguesa
  }

  .search input {
    padding: 8px;
    font-size: 13px;
  }

  .search button {
    padding: 0 12px;
    font-size: 13px;
  }

  .hamburger {
    padding: 8px 5px; /* Ajusta padding para mejor toque
  }

  .sidebar {
    width: 280px;
  }

  .sidebar.active {
  left: 0;
  top: 63px;

}
}
*/

/* Para pantallas muy pequeñas (menos de 400px)
@media (max-width: 400px) {
    /*
  .header-container {
    flex-wrap: wrap; /* Permite que salte a nueva línea si es necesario
    justify-content: space-between;
  }

  .logo {
    order: 1;
  }

  .hamburger {
    order: 3;
  }

  .search {
    order: 2;
    width: 100%;
    max-width: 100%;

  }

  .logo img {
    height: 32px;
  }
}*/
