/* TrendishShop v200 — home popular categories: single compact row on phones only.
   Desktop/tablet layouts remain unchanged. */

@media (max-width:560px){
  body.home-overlay-layout .section .categories-grid{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:4px!important;
    width:100%!important;
    margin:0!important;
    overflow:visible!important;
  }

  body.home-overlay-layout .section .categories-grid .category-card{
    min-width:0!important;
    width:100%!important;
    border-radius:8px!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    background:#fff!important;
  }

  body.home-overlay-layout .section .categories-grid .category-card img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    object-fit:cover!important;
  }

  body.home-overlay-layout .section .categories-grid .category-card h3{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:28px!important;
    margin:0!important;
    padding:3px 1px!important;
    font-size:clamp(6.5px,1.95vw,9px)!important;
    font-weight:700!important;
    line-height:1.25!important;
    text-align:center!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
}

@media (max-width:360px){
  body.home-overlay-layout .section .categories-grid{gap:3px!important;}
  body.home-overlay-layout .section .categories-grid .category-card{border-radius:6px!important;}
  body.home-overlay-layout .section .categories-grid .category-card h3{
    min-height:25px!important;
    font-size:6.4px!important;
    line-height:1.2!important;
    padding:2px 0!important;
  }
}
