
/* V161 - Compact ONLY the category cards on homepage.
   The section/container remains 1600px. Other homepage blocks unchanged. */

/* Undo V160's image-only shrink so proportions stay natural inside smaller cards. */
body:not(.admin-layout) .v117-home .v119-category-img{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Large desktop: cards are intentionally narrower and shorter. */
@media(min-width:1500px){
  body:not(.admin-layout) .v117-home .v119-category-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,300px))!important;
    justify-content:start!important;
    align-items:stretch!important;
    gap:16px!important;
    width:100%!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-card{
    width:100%!important;
    max-width:300px!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-img{
    height:155px!important;
    min-height:155px!important;
    aspect-ratio:auto!important;
    overflow:hidden!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-img img,
  body:not(.admin-layout) .v117-home .v119-category-img .image-placeholder{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-body{
    min-height:125px!important;
    padding:12px 14px 13px!important;
  }
}

/* Standard desktop: still compact, 4 cards per row. */
@media(min-width:1200px) and (max-width:1499px){
  body:not(.admin-layout) .v117-home .v119-category-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:14px!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-img{
    height:150px!important;
    min-height:150px!important;
    aspect-ratio:auto!important;
    overflow:hidden!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-body{
    min-height:122px!important;
    padding:11px 13px 12px!important;
  }
}

/* Tablet: 2 cards per row, comfortable tap size. */
@media(min-width:768px) and (max-width:1199px){
  body:not(.admin-layout) .v117-home .v119-category-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-img{
    width:100%!important;
    height:165px!important;
    aspect-ratio:auto!important;
  }
}

/* Mobile: preserve current usability; only slightly reduce height. */
@media(max-width:767px){
  body:not(.admin-layout) .v117-home .v119-category-grid{
    gap:10px!important;
  }

  body:not(.admin-layout) .v117-home .v119-category-img{
    width:100%!important;
    height:120px!important;
    aspect-ratio:auto!important;
  }
}
