/* v2.6.1 - Mobile polish: carrusel compacto arriba + footer Carrito/Buscar */
@media (min-width: 992px){
  .mobile-shop-actions-v261{display:none!important;}
}

@media (max-width: 991.98px){
  /* Carrusel más unido al top del catálogo y menos alto */
  .section-head{
    top:0!important;
    padding:8px 12px 6px!important;
    min-height:40px!important;
    box-shadow:0 10px 22px rgba(0,0,0,.16)!important;
  }
  .section-head h2,
  #currentCategoryTitle{
    font-size:18px!important;
    line-height:1.08!important;
  }
  .mobile-category-carousel{
    top:39px!important;
    margin:0 -12px 8px!important;
    padding:6px 0 7px!important;
    background:linear-gradient(180deg, rgba(5,8,14,.98), rgba(7,11,18,.94))!important;
  }
  .mobile-category-carousel-track{
    gap:7px!important;
    padding:0 10px!important;
  }
  .mobile-cat-link{
    min-height:36px!important;
    padding:0 14px!important;
    border-radius:11px!important;
    font-size:13px!important;
    box-shadow:0 7px 16px rgba(0,0,0,.14)!important;
  }
  .tab-pane[id^="cat-"]{
    scroll-margin-top:90px!important;
  }

  /* Footer mobile profesional: Carrito izquierda, Buscar derecha */
  .mobile-shop-actions.mobile-shop-actions-v261{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(10px + env(safe-area-inset-bottom, 0px))!important;
    z-index:90000!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    height:58px!important;
    padding:7px!important;
    border:1px solid rgba(148,163,184,.16)!important;
    border-radius:20px!important;
    background:rgba(5,8,14,.92)!important;
    box-shadow:0 18px 45px rgba(0,0,0,.45)!important;
    backdrop-filter:blur(18px)!important;
  }
  .mobile-shop-actions-v261 button{
    width:100%!important;
    min-width:0!important;
    height:44px!important;
    border:1px solid rgba(148,163,184,.20)!important;
    border-radius:15px!important;
    background:rgba(15,23,42,.92)!important;
    color:#e5f3ff!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    font-weight:900!important;
    line-height:1!important;
    position:relative!important;
    box-shadow:none!important;
  }
  .mobile-shop-actions-v261 button.active,
  .mobile-shop-actions-v261 button:active{
    background:#ffffff!important;
    color:#0f172a!important;
    border-color:#ffffff!important;
  }
  .mobile-shop-actions-v261 span{font-size:19px!important;line-height:1!important;}
  .mobile-shop-actions-v261 strong{font-size:13px!important;line-height:1!important;white-space:nowrap!important;}
  .mobile-shop-actions-v261 .item_count{
    position:absolute!important;
    top:-6px!important;
    right:10px!important;
    min-width:22px!important;
    height:22px!important;
    padding:0 6px!important;
    border-radius:999px!important;
    background:#ffffff!important;
    color:#0f172a!important;
    border:1px solid rgba(56,189,248,.35)!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:12px!important;
    font-style:normal!important;
    font-weight:1000!important;
  }

  /* Cuando se usa buscador o carrito, no mostramos categorías arriba */
  body.mobile-search-panel-open .mobile-category-carousel,
  body.mobile-search-panel-open .section-head,
  body.cart-open .mobile-category-carousel,
  body.cart-open .section-head,
  body.apolo-search-active .mobile-category-carousel,
  body.apolo-search-active .section-head{
    display:none!important;
  }

  /* Panel de búsqueda más limpio al abrir desde footer */
  body.mobile-search-panel-open #shopSidebar.mobile-open{
    padding-top:12px!important;
  }
  body.mobile-search-panel-open #shopSidebar .search-box{
    display:flex!important;
    margin-top:8px!important;
  }
  body.mobile-search-panel-open #shopSidebar .mobile-sheet-head{
    display:flex!important;
  }

  /* El carrito abierto toma prioridad visual y oculta la barra inferior */
  body.cart-open .mobile-shop-actions-v261{
    opacity:0!important;
    pointer-events:none!important;
    transform:translateY(10px)!important;
  }
}
