/* AVENSA 6.0: la barra roja y la búsqueda están fuera del encabezado fijo. */
.av60-search-section{
  position:relative!important;
  top:auto!important;
  z-index:40!important;
  background:#fff;
  box-shadow:none!important;
  overflow:visible!important;
}
.av60-search-section .av58-search-row{
  position:relative;
  z-index:1;
}
.av60-search-section .av58-search-row .search{
  position:relative!important;
  overflow:visible!important;
  z-index:61!important;
}
.av60-search-section .av58-search-row .avensa-suggest{
  display:none;
  position:absolute!important;
  top:calc(100% + 5px)!important;
  left:0!important;
  right:0!important;
  width:auto;
  min-width:0;
  max-width:100%;
  z-index:1000!important;
}
.av60-search-section .av58-search-row .avensa-suggest.open{display:block!important}
.av60-search-section #av50-category-menu{z-index:70!important}
@media(min-width:1151px){
  .av60-search-section #av50-category-menu .av50-category-list{
    min-height:490px!important;
    justify-content:space-around!important;
    padding:12px 0!important;
    box-shadow:0 12px 28px #15151520;
  }
}
/* No fijar la barra roja cuando la cabecera se compacta. */
.av60-search-section #av50-category-menu .av50-category-list{
  position:absolute!important;
}
/* Separación inferior calculada en JS según el alto real del menú desplegado. */
@media(min-width:1151px){
  #inicio.av45-carousel{margin-bottom:var(--av60-hero-clearance, 185px)!important}
}

/* AVENSA 6.1 — El encabezado compacto siempre tapa los elementos que
   suben con el scroll; el menu rojo no es fijo ni sticky. */
.header.av58-header{position:sticky!important;top:0;z-index:500!important;isolation:isolate}
.av60-search-section{position:relative!important;z-index:3!important}
#inicio.av45-carousel{z-index:1!important}

/* El pie de las categorias coincide exactamente con el pie del banner.
   La variable se actualiza con el alto real del carrusel (responsive). */
@media (min-width:1151px){
  .av60-search-section #av50-category-menu .av50-category-list{
    height:var(--av61-banner-height, 340px)!important;
    min-height:0!important;
    max-height:none!important;
    padding:5px 0!important;
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:space-between!important;
    overflow:visible!important;
    box-shadow:none!important;
  }
  .av60-search-section #av50-category-menu .av50-item{
    flex:1 1 0;
    min-height:0;
    display:flex;
    flex-direction:column;
  }
  .av60-search-section #av50-category-menu .av50-item-row{
    flex:1;
    min-height:0!important;
    height:auto!important;
  }
  .av60-search-section #av50-category-menu .av50-main-link,
  .av60-search-section #av50-category-menu .av50-subtoggle{
    height:100%!important;
    min-height:0!important;
    display:flex;
    align-items:center;
  }
  .av60-search-section #av50-category-menu .av50-subtoggle{justify-content:center}
  #inicio.av45-carousel{margin-bottom:30px!important}
}


/* AVENSA 6.6: ajustes estéticos solicitados.
   - La franja de "LÍNEA DE PRODUCTOS" y el buscador pasa a fondo blanco.
   - Mantiene intacta la disposición y el comportamiento del header. */
.av60-search-section,
.av60-search-section .av58-search-row{
  background:#fff!important;
}
