/* AVENSA 5.8 — header estilo solicitado por el cliente. Las reglas previas del carrusel no se tocan. */
.av58-header{position:sticky;top:0;z-index:20;overflow:visible}
.av58-header .mainnav{max-width:1220px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 20px 14px}
.av58-header .mainnav .logo{flex:0 0 auto;order:0}
.av58-header .mainnav .links{display:flex!important;flex:1 1 auto;min-width:0;max-width:none;margin:0;padding:0;justify-content:center;align-items:center;gap:clamp(10px,1.55vw,24px);font-size:clamp(11px,.85vw,14px);font-weight:750;white-space:nowrap;overflow:visible;order:1}
.av58-header .mainnav .links a{flex:0 0 auto;white-space:nowrap}
.av58-header .mainnav .cart-icon-button{order:2;flex:0 0 auto;margin-left:0}
.av58-search-row{max-width:1220px;margin:0 auto;padding:0 20px;display:grid;grid-template-columns:clamp(250px,26%,330px) minmax(0,1fr);align-items:stretch;position:relative;z-index:4;min-height:58px}
.av58-search-row .search{display:flex!important;order:initial!important;flex:none!important;min-width:0;width:100%!important;height:58px;border:1px solid #e2e3e6;border-radius:0 6px 6px 0;background:#fff;align-items:center;margin:0;box-shadow:none}
.av58-search-row .search input{flex:1;min-width:0;height:100%;padding:14px 18px;font-size:14px}
.av58-search-row .search-indicator{position:relative;right:auto;top:auto;transform:none;margin:0 14px 0 8px}
.av58-search-row .av58-search-spacer{min-height:58px;background:#fff}
/* Menú rojo independiente de la altura de las seis imágenes panorámicas */
.av58-header .av50-category-menu,
.av58-header .av50-category-menu#av50-category-menu{position:relative!important;inset:auto!important;top:auto!important;left:auto!important;bottom:auto!important;display:block!important;z-index:30;width:100%!important;height:58px!important;filter:none;margin:0!important;color:#fff}
.av58-header .av50-heading,
.av58-header #av50-category-menu .av50-heading{height:58px!important;min-height:58px;flex:none!important;border-radius:0!important;padding:0 19px;font-size:13px;letter-spacing:0;background:#d70b22}
.av58-header .av50-category-list,
.av58-header #av50-category-menu .av50-category-list{position:absolute!important;z-index:40;left:0!important;top:58px!important;bottom:auto!important;display:flex;flex-direction:column;justify-content:flex-start;gap:0;width:100%;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding:8px 0!important;margin:0;background:#e4141b;box-shadow:0 10px 22px #1b101012}
.av58-header #av50-category-menu .av50-item-row{min-height:42px!important;height:auto!important}
.av58-header #av50-category-menu .av50-main-link{min-height:42px!important;height:auto!important;padding:8px 9px 8px 18px!important;font-size:11.5px!important;line-height:1.25}
.av58-header #av50-category-menu .av50-subtoggle{min-height:42px!important;height:auto!important;min-width:37px}
.av58-header #av50-category-menu .av50-submenu{z-index:50;left:100%;top:0}
.av58-header.is-compact .av50-category-list{visibility:hidden;pointer-events:none;opacity:0}
.av58-header .av50-category-list{transition:opacity .15s ease}
/* Barra de búsqueda y menú delante de los banners, sin estirar el carrusel. */
#inicio.av45-carousel{margin-top:0!important;z-index:1}
@media(min-width:1151px){#inicio.av45-carousel{margin-bottom:max(24px,calc(406px - 26.04167vw))}}
#inicio.av45-carousel .av45-track{aspect-ratio:1920/500;min-height:0;height:auto}
/* Espacio para desplegables del carrusel sin afectar hero */
@media(min-width:1151px){.av58-header .mainnav .links{gap:clamp(12px,1.7vw,26px)}}
@media(max-width:1150px){
.av58-header .mainnav{flex-wrap:wrap;row-gap:12px}
.av58-header .mainnav .links{flex:1;justify-content:flex-end;gap:12px;overflow-x:auto;font-size:12px;scrollbar-width:none}
.av58-header .mainnav .links::-webkit-scrollbar{display:none}
.av58-search-row{grid-template-columns:minmax(230px,30%) minmax(0,1fr)}
.av58-header #av50-category-menu .av50-category-list{display:none!important;max-height:min(440px,70vh)!important;overflow-y:auto!important;overflow-x:hidden!important}
.av58-header #av50-category-menu.is-open .av50-category-list{display:block!important}
.av58-header #av50-category-menu .av50-item.is-expanded>.av50-submenu{position:relative!important;left:0!important;top:auto!important;width:100%;max-width:100%;min-width:100%;box-shadow:none}
.av58-header #av50-category-menu .av50-item:not(.is-expanded):hover>.av50-submenu{display:none}
.av58-header #av50-category-menu .av50-item.is-expanded>.av50-submenu{display:block}
}
@media(max-width:700px){
.av58-header .mainnav{padding:13px 16px;gap:10px}
.av58-header .mainnav .logo{order:0}
.av58-header .mainnav .cart-icon-button{order:1;margin-left:auto}
.av58-header .mainnav .links{order:2;flex-basis:100%;width:100%;justify-content:flex-start;overflow-x:auto;white-space:nowrap;padding:3px 0;gap:16px}
.av58-search-row{padding:0 12px;grid-template-columns:1fr;gap:8px}
.av58-search-row .av50-category-menu{grid-row:1;width:100%}
.av58-header .av58-search-row .av50-category-menu{height:49px!important}
.av58-header .av50-heading,.av58-header #av50-category-menu .av50-heading{height:49px!important;min-height:49px}
.av58-header #av50-category-menu .av50-category-list{top:49px!important}
.av58-search-row .search{height:50px;border-radius:8px;grid-row:2}
.av58-search-row .av58-search-spacer{display:none}
.av58-search-row .search input{padding:12px}
#inicio.av45-carousel{margin-top:12px!important}
#inicio.av45-carousel .av45-track{aspect-ratio:auto;height:clamp(230px,65vw,280px)}
}
