/* SORFPANEL mobile catalog final correction - 2026-08-10 */
@media (max-width:768px){
  html body.page-products{background:#f6f7f9!important;overflow-x:hidden!important}
  html body.page-products .topbar,
  html body.page-products .header{display:none!important}
  html body.page-products main{margin:0!important;padding-top:0!important;padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  html body.page-products .search-results-page{margin:0!important;padding:0 0 18px!important;background:#f6f7f9!important}
  html body.page-products .search-results-shell{width:100%!important;max-width:none!important;margin:0!important;padding:0 10px 18px!important;box-sizing:border-box!important}

  /* Search header: one compact row, no empty band above. */
  html body.page-products .search-mobile-top{
    position:sticky!important;top:0!important;z-index:60!important;
    display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;align-items:center!important;gap:7px!important;
    width:auto!important;height:58px!important;min-height:58px!important;
    margin:0 -10px!important;padding:8px 10px!important;box-sizing:border-box!important;
    background:#fff!important;border-bottom:1px solid #eceef1!important;box-shadow:0 2px 8px rgba(15,23,42,.035)!important
  }
  html body.page-products .search-back{display:grid!important;place-items:center!important;width:36px!important;height:40px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:10px!important}
  html body.page-products .search-mobile-query{
    display:grid!important;grid-template-columns:26px minmax(0,1fr)!important;align-items:center!important;gap:4px!important;
    width:100%!important;min-width:0!important;height:42px!important;margin:0!important;padding:0 11px!important;box-sizing:border-box!important;
    border:1px solid #dfe3e8!important;border-radius:13px!important;background:#f6f7f9!important;box-shadow:none!important;overflow:hidden!important
  }
  html body.page-products .search-mobile-query:focus-within{border-color:#f56600!important;box-shadow:0 0 0 2px rgba(245,102,0,.09)!important;background:#fff!important}
  html body.page-products .search-mobile-query span{display:grid!important;place-items:center!important;width:22px!important;min-width:22px!important}
  html body.page-products .search-mobile-query .sp-icon{width:17px!important;height:17px!important;color:#6e7682!important}
  html body.page-products .search-mobile-query input{
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:40px!important;
    margin:0!important;padding:0!important;box-sizing:border-box!important;border:0!important;outline:0!important;background:transparent!important;
    color:#252a31!important;font-size:13px!important;line-height:40px!important;text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important
  }

  /* The old Tümü / Ürünler type switch is redundant on customer product listing. */
  html body.page-products .v2-search-tabs{display:none!important}

  html body.page-products .search-title-row{margin:9px 2px 7px!important;padding:0!important}
  html body.page-products .search-title-row h1{margin:0 0 2px!important;font-size:17px!important;line-height:1.2!important}
  html body.page-products .search-title-row p{margin:0!important;font-size:10px!important}

  /* Keep filter/sort close to the result area and remove oversized vertical gaps. */
  html body.page-products .search-mobile-actions{
    position:sticky!important;top:58px!important;z-index:55!important;
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;
    margin:0 -10px 8px!important;padding:7px 10px!important;background:#fff!important;border-top:0!important;border-bottom:1px solid #eceef1!important;box-shadow:0 3px 8px rgba(15,23,42,.025)!important
  }
  html body.page-products .search-layout{margin-top:0!important;padding-top:0!important}
  html body.page-products .search-results-main{margin:0!important;padding:0!important;min-width:0!important}
  html body.page-products .desktop-sort-row{display:none!important;margin:0!important}
  html body.page-products .search-empty{min-height:330px!important;margin:10px 0 0!important;padding:28px 18px!important}
  html body.page-products .search-empty h2{font-size:21px!important;margin:12px 0 5px!important}
  html body.page-products .search-empty p{margin:0 0 16px!important;font-size:12px!important;line-height:1.45!important}

  /* Ensure content never disappears behind the fixed bottom customer nav. */
  html body.page-products .search-product-grid,
  html body.page-products .catalog-pagination,
  html body.page-products .search-empty{scroll-margin-bottom:96px!important}

  /* Home quick-menu card: preserve the solved top spacing, only reduce dead space below labels. */
  html body.home-mobile-ready .mobile-home-only .mh-quick-rail{
    padding-bottom:8px!important;
    margin-bottom:10px!important;
  }
  html body.home-mobile-ready .mobile-home-only .mh-quick-rail>a>b{
    min-height:24px!important;
    margin-bottom:0!important;
  }
}

/* 2026-08-10: mobile home category pills - ONLY clipping + slight size increase */
@media (max-width:768px){
  html body.home-mobile-ready .sp-service-tabs{
    min-height:50px!important;
    height:auto!important;
    padding:7px 14px 8px!important;
    align-items:center!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    box-sizing:border-box!important;
  }
  html body.home-mobile-ready .sp-service-tabs a{
    min-height:36px!important;
    height:36px!important;
    padding:0 13px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    border-radius:999px!important;
    font-size:13px!important;
    line-height:1.1!important;
    overflow:visible!important;
  }
}
