/* G LAB category archive responsive layout */

@media (max-width: 767px) {

 body.tax-product_cat .products-loop:has(> li.product-category):not(:has(> li:not(.product-category))),
 body.woocommerce-shop .products-loop:has(> li.product-category):not(:has(> li:not(.product-category))) {
   display: grid !important;
   grid-template-columns: repeat(2,minmax(0,1fr)) !important;
   gap: 12px !important;
   padding: 0 !important;
   margin: 0 0 20px !important;
   width: 100% !important;
 }

}

@media (min-width: 768px) and (max-width: 991px) {

 body.tax-product_cat .products-loop:has(> li.product-category):not(:has(> li:not(.product-category))),
 body.woocommerce-shop .products-loop:has(> li.product-category):not(:has(> li:not(.product-category))) {
   display: grid !important;
   grid-template-columns: repeat(3,minmax(0,1fr)) !important;
   gap: 16px !important;
   padding: 0 !important;
   margin: 0 0 24px !important;
   width: 100% !important;
 }

}

@media (max-width: 991px) {

 body.tax-product_cat .products-loop:has(> li.product-category):not(:has(> li:not(.product-category)))::before,
 body.tax-product_cat .products-loop:has(> li.product-category):not(:has(> li:not(.product-category)))::after,
 body.woocommerce-shop .products-loop:has(> li.product-category):not(:has(> li:not(.product-category)))::before,
 body.woocommerce-shop .products-loop:has(> li.product-category):not(:has(> li:not(.product-category)))::after {
   display: none !important;
   content: none !important;
 }

 body.tax-product_cat .products-loop > li.product-category,
 body.woocommerce-shop .products-loop > li.product-category {
   float: none !important;
   clear: none !important;
   width: auto !important;
   max-width: 100% !important;
   min-width: 0 !important;
   margin: 0 !important;
   padding: 8px !important;
   box-sizing: border-box !important;
   border: 1px solid #e8e8e8;
   border-radius: 6px;
   background: #fff;
   text-align: center;
 }

 body.tax-product_cat .products-loop > li.product-category > a,
 body.woocommerce-shop .products-loop > li.product-category > a {
   display: block !important;
   width: 100% !important;
   text-decoration: none;
 }

 body.tax-product_cat .products-loop > li.product-category img,
 body.woocommerce-shop .products-loop > li.product-category img {
   display: block !important;
   width: 100% !important;
   max-width: 100% !important;
   height: auto !important;
   aspect-ratio: 1 / 1;
   object-fit: contain !important;
   margin: 0 auto 8px !important;
 }

 body.tax-product_cat .products-loop > li.product-category h2,
 body.tax-product_cat .products-loop > li.product-category h3,
 body.woocommerce-shop .products-loop > li.product-category h2,
 body.woocommerce-shop .products-loop > li.product-category h3 {
   font-size: 13px !important;
   line-height: 1.4 !important;
   font-weight: 600 !important;
   text-align: center !important;
   overflow-wrap: anywhere;
   white-space: normal !important;
   margin: 6px 0 !important;
   color: #222;
 }

}
