/* K Garden 2.0.27 — one category card per row on phones. Product grids remain unchanged. */
@media (max-width:767px){
  body.kgx-final227 .kgx216-supplier-grid,
  body.kgx-final227 .kgx213-cat-grid,
  body.kgx-final227 .kgx212-root-grid,
  body.kgx-final227 .kgx210-root-grid,
  body.kgx-final227 .kgx205-category-grid,
  body.kgx-final227 .kg-category-grid.kgx209-category-grid,
  body.kgx-final227 .kgx-category-grid,
  body.kgx-final227 ul.products.kgx227-category-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-flow:row!important;
    gap:14px!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    transform:none!important;
  }

  body.kgx-final227 :is(.kgx216-cat,.kgx213-cat-card,.kgx212-root-card,.kgx210-root-card,.kgx205-category-card,.kg-category-card),
  body.kgx-final227 ul.products.kgx227-category-grid>li.product-category{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    grid-column:auto!important;
    transform:none!important;
  }

  body.kgx-final227 .kgx216-cat,
  body.kgx-final227 .kgx213-cat-card,
  body.kgx-final227 .kgx212-root-card,
  body.kgx-final227 .kgx210-root-card,
  body.kgx-final227 .kgx205-category-card,
  body.kgx-final227 .kg-category-card{
    min-height:280px!important;
    height:280px!important;
    border-radius:18px!important;
    overflow:hidden!important;
  }

  body.kgx-final227 :is(.kgx216-cat,.kgx213-cat-card,.kgx212-root-card,.kgx210-root-card,.kgx205-category-card,.kg-category-card) img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
    object-position:center!important;
  }

  body.kgx-final227 :is(.kgx216-cat-copy,.kgx213-cat-copy,.kgx212-root-copy,.kgx210-root-copy,.kgx205-category-copy,.kg-category-card-content){
    right:18px!important;
    left:18px!important;
    bottom:18px!important;
    max-width:calc(100% - 36px)!important;
  }

  body.kgx-final227 :is(.kgx216-cat-copy,.kgx213-cat-copy,.kgx212-root-copy,.kgx210-root-copy,.kgx205-category-copy,.kg-category-card-content) strong{
    font-size:23px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  /* Mobile shop drawer: one horizontal category row, no clipped labels. */
  body.kgx-final227 .kgx222-drawer-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  body.kgx-final227 .kgx222-drawer-card{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body.kgx-final227 .kgx222-drawer-main{
    display:grid!important;
    grid-template-columns:108px minmax(0,1fr)!important;
    align-items:center!important;
    min-height:84px!important;
  }
  body.kgx-final227 .kgx222-drawer-image{
    width:108px!important;
    height:84px!important;
    aspect-ratio:auto!important;
    border-radius:0 13px 13px 0!important;
  }
  body.kgx-final227 .kgx222-drawer-main strong{
    padding:12px 14px!important;
    font-size:16px!important;
    line-height:1.35!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  body.kgx-final227 .kgx222-drawer-child{
    margin:0 122px 10px 12px!important;
    font-size:13px!important;
    line-height:1.4!important;
  }

  /* Native WooCommerce subcategory cards at the top of archives. */
  body.kgx-final227 ul.products.kgx227-category-grid>li.product-category a{
    display:block!important;
    width:100%!important;
  }
  body.kgx-final227 ul.products.kgx227-category-grid>li.product-category img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16/9!important;
    object-fit:cover!important;
    margin:0 0 10px!important;
  }
  body.kgx-final227 ul.products.kgx227-category-grid>li.product-category .woocommerce-loop-category__title{
    min-height:0!important;
    margin:0!important;
    padding:0 4px 12px!important;
    font-size:20px!important;
    line-height:1.3!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
}
