/* v2.6.3 - Buscador mobile realmente en bottom, sin panel flotante arriba */
@media (min-width: 992px){
  #shopSidebar .search-box{ }
}

@media (max-width: 991.98px){
  /* Footer fijo: carrito izquierda / buscar derecha */
  .mobile-shop-actions.mobile-shop-actions-v261,
  .mobile-shop-actions{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(10px + env(safe-area-inset-bottom, 0px))!important;
    z-index:95000!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }

  /* Cuando se abre buscar, el sidebar NO debe convertirse en panel grande. Solo sostiene el input. */
  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open{
    position:static!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    width:auto!important;
    height:0!important;
    max-height:none!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
    transform:none!important;
    z-index:auto!important;
    display:block!important;
  }

  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open .mobile-sheet-head,
  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open .sidebar-title,
  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open #mobileCategoryToggle,
  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open .tabs-scroll{
    display:none!important;
  }

  /* El buscador es un módulo bottom real, justo encima del footer */
  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open .search-box,
  body.mobile-search-panel-open #shopSidebar .search-box{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(78px + env(safe-area-inset-bottom, 0px))!important;
    z-index:96000!important;
    display:flex!important;
    align-items:center!important;
    height:58px!important;
    min-height:58px!important;
    margin:0!important;
    padding:7px 48px 7px 14px!important;
    border-radius:20px!important;
    background:rgba(5,8,14,.98)!important;
    border:1px solid rgba(148,163,184,.18)!important;
    box-shadow:0 -18px 48px rgba(0,0,0,.50)!important;
    backdrop-filter:blur(18px)!important;
  }
  body.mobile-search-panel-open #shopSidebar .search-box input,
  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open .search-box input{
    width:100%!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0 12px!important;
    border-radius:14px!important;
    text-align:left!important;
    background:rgba(15,23,42,.96)!important;
    border:1px solid rgba(148,163,184,.22)!important;
    color:#fff!important;
    font-size:16px!important;
    font-weight:800!important;
  }
  body.mobile-search-panel-open #shopSidebar .search-box input::placeholder{color:#93a4bb!important;text-align:left!important;}
  body.mobile-search-panel-open #shopSidebar .search-clear-btn,
  aside.shop-sidebar#shopSidebar.mobile-open.mobile-search-open .search-clear-btn{
    position:absolute!important;
    right:17px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:34px!important;
    height:34px!important;
    border-radius:999px!important;
    background:#ffffff!important;
    color:#0f172a!important;
    border:0!important;
    font-size:23px!important;
    line-height:1!important;
    font-weight:900!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  /* Fondo suave al abrir búsqueda, pero sin tapar todo */
  body.mobile-search-panel-open #mobileFilterBackdrop{
    display:block!important;
    opacity:.28!important;
    background:#000!important;
  }

  /* Durante búsqueda/carrito, no mostrar carrusel ni título */
  body.mobile-search-panel-open .mobile-category-carousel,
  body.mobile-search-panel-open .section-head,
  body.catalog-searching .mobile-category-carousel,
  body.catalog-searching .section-head,
  body.cart-open .mobile-category-carousel,
  body.cart-open .section-head{
    display:none!important;
  }
}
