/* 4x4.kg v2.1.3.9: category grids inside taxonomy archives now match /shop/.
   Targets only WooCommerce CATEGORY tiles, never product cards or product media.
   Text and item count remain native Porto/WooCommerce output. */
body.tax-product_cat .products > li.product-category,
body.tax-product_cat .products > .product-category {
  box-sizing:border-box!important;min-width:0!important;width:100%!important;
  background:#fff!important;border:1px solid #e7e9ec!important;
  border-radius:9px!important;box-shadow:0 1px 3px rgba(0,0,0,.03)!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;
  padding:14px 12px 16px!important;margin:0!important;
  overflow:hidden!important;text-align:center!important;
  transition:border-color .18s ease,box-shadow .18s ease!important;
}
body.tax-product_cat .products > li.product-category:hover,
body.tax-product_cat .products > .product-category:hover {
  border-color:#fa9a61!important;box-shadow:0 4px 12px rgba(26,42,48,.06)!important;
}
body.tax-product_cat .products > li.product-category > a,
body.tax-product_cat .products > .product-category > a {
  display:flex!important;flex-direction:column!important;align-items:center!important;
  width:100%!important;min-width:0!important;flex:1!important;
  color:inherit!important;text-decoration:none!important;
}
body.tax-product_cat .products > .product-category .product-image,
body.tax-product_cat .products > li.product-category .product-image,
body.tax-product_cat .products > .product-category .thumb-info-wrapper,
body.tax-product_cat .products > li.product-category .thumb-info-wrapper {
  box-sizing:border-box!important;display:flex!important;align-items:center!important;
  justify-content:center!important;width:100%!important;
  height:162px!important;min-height:162px!important;max-height:162px!important;
  margin:0 auto 8px!important;padding:0!important;background:#fff!important;
  overflow:hidden!important;border:0!important;border-radius:0!important;box-shadow:none!important;
}
body.tax-product_cat .products > .product-category img,
body.tax-product_cat .products > li.product-category img {
  display:block!important;box-sizing:border-box!important;
  width:158px!important;height:158px!important;max-width:100%!important;max-height:158px!important;
  object-fit:contain!important;object-position:center!important;
  margin:auto!important;padding:5px!important;transform:none!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
body.tax-product_cat .products > .product-category h2,
body.tax-product_cat .products > li.product-category h2,
body.tax-product_cat .products > .product-category .woocommerce-loop-category__title,
body.tax-product_cat .products > li.product-category .woocommerce-loop-category__title {
  box-sizing:border-box!important;width:100%!important;min-height:40px!important;
  color:#2c3942!important;font-family:inherit!important;
  font-size:15px!important;line-height:1.35!important;font-weight:700!important;
  text-align:center!important;margin:4px 0 5px!important;padding:0!important;
  overflow-wrap:anywhere!important;
}
body.tax-product_cat .products > .product-category h2 mark,
body.tax-product_cat .products > li.product-category h2 mark,
body.tax-product_cat .products > .product-category .count,
body.tax-product_cat .products > li.product-category .count,
body.tax-product_cat .products > .product-category .category-list-count,
body.tax-product_cat .products > li.product-category .category-list-count,
body.tax-product_cat .products > .product-category .kg4x4-term-count-v1726,
body.tax-product_cat .products > li.product-category .kg4x4-term-count-v1726 {
  display:block!important;box-sizing:border-box!important;
  width:100%!important;max-width:100%!important;
  background:transparent!important;border:0!important;padding:0!important;
  color:#808992!important;font-size:12px!important;line-height:1.45!important;
  font-weight:400!important;text-align:center!important;
  margin:4px auto 0!important;white-space:nowrap!important;
}
/* Native pure category row only: no overriding mixed product results. */
@supports selector(:has(*)) {
 body.tax-product_cat .products:has(> .product-category):not(:has(> .product:not(.product-category))) {
   display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
   align-items:stretch!important;column-gap:16px!important;row-gap:16px!important;
 }
 body.tax-product_cat .products:has(> .product-category):not(:has(> .product:not(.product-category))) > .product-category {
   float:none!important;clear:none!important;width:100%!important;max-width:100%!important;
 }
}
@media(max-width:1100px) {
 @supports selector(:has(*)) {
  body.tax-product_cat .products:has(> .product-category):not(:has(> .product:not(.product-category))) {
   grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
 }
}
@media(max-width:760px) {
 @supports selector(:has(*)) {
  body.tax-product_cat .products:has(> .product-category):not(:has(> .product:not(.product-category))) {
   grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;
  }
 }
 body.tax-product_cat .products > .product-category,
 body.tax-product_cat .products > li.product-category {min-height:203px!important;padding:9px 7px 12px!important;}
 body.tax-product_cat .products > .product-category .product-image,
 body.tax-product_cat .products > li.product-category .product-image,
 body.tax-product_cat .products > .product-category .thumb-info-wrapper,
 body.tax-product_cat .products > li.product-category .thumb-info-wrapper {
    height:120px!important;min-height:120px!important;max-height:120px!important;
 }
 body.tax-product_cat .products > .product-category img,
 body.tax-product_cat .products > li.product-category img {
    width:115px!important;height:115px!important;max-height:115px!important;padding:4px!important;
 }
 body.tax-product_cat .products > .product-category h2,
 body.tax-product_cat .products > li.product-category h2 {font-size:13px!important;min-height:36px!important;}
}
