/* Product cards responsive: 1 phone, 2 larger phone, 3 tablet, 4 desktop.
   Loaded AFTER layout_v4.css, whose earlier rules used 2 and 6 columns. */
.product-grid,.desk-product-grid,.catalog-grid{min-width:0;grid-auto-flow:row;overflow:visible}
.product-grid > .m-card,.desk-product-grid > .desk-card,.catalog-grid > .desk-card{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
.m-card .m-title,.desk-card h3{overflow-wrap:anywhere;word-break:normal}
.m-card .m-actions a,.desk-card .desk-actions a{min-width:0;box-sizing:border-box}
@media (max-width:575.98px){
 .mobile-app .product-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;overflow:visible!important}
 .mobile-app .product-grid .m-card{display:flex;flex-direction:column;border-radius:15px;max-width:100%;}
 .mobile-app .product-grid .m-card .pic{height:auto!important;aspect-ratio:1.7 / 1!important;max-height:280px;overflow:hidden}
 .mobile-app .product-grid .m-card .m-info{padding:12px 14px!important}
 .mobile-app .product-grid .m-card .m-title{font-size:16px!important;line-height:1.3!important;min-height:0!important;max-height:none!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 .mobile-app .product-grid .m-card .m-desc{font-size:13px!important;line-height:1.4!important;height:auto!important;min-height:18px!important;max-height:38px;overflow:hidden;margin:6px 0 12px!important}
 .mobile-app .product-grid .m-card .m-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:10px!important}
 .mobile-app .product-grid .m-card .m-actions a{min-height:40px!important;height:auto!important;padding:10px 7px!important;font-size:13px!important;white-space:normal!important;text-align:center}
}
@media (min-width:576px) and (max-width:767.98px){
 .mobile-app .product-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
}
@media (min-width:768px) and (max-width:1199.98px){
 .mobile-app .product-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
 .mobile-app .product-grid .m-card .pic{height:auto!important;aspect-ratio:1.15/1!important}
}
@media (min-width:1200px){
 .desktop-site .desk-product-grid,.desktop-site .catalog-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:15px!important}
 .desktop-site .desk-product-grid .desk-card,.desktop-site .catalog-grid .desk-card{min-width:0!important}
 .desktop-site .desk-card .img{height:auto!important;aspect-ratio:1.3/1!important}
 .desktop-site .desk-card .body{display:flex;flex-direction:column;min-height:160px}
 .desktop-site .desk-card .desk-actions{margin-top:auto}
}
/* Avoid a half-hidden horizontal product card list on narrow devices. */
.mobile-app .product-grid{max-width:100%;scroll-snap-type:none}

/* The same card density for the category/raw-material navigation grids. */
@media (max-width:575.98px){
  .mobile-app .category-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:15px!important;overflow:visible!important}
  .mobile-app .category-grid .cat-card{width:100%;min-width:0}
  .mobile-app .category-grid .cat-card img{height:auto!important;aspect-ratio:1.7/1}
  .mobile-app .category-grid .cat-meta{height:auto!important;min-height:68px!important;padding:10px 13px!important}
  .mobile-app .category-grid .cat-meta strong{font-size:15px!important;line-height:1.3!important}
}
@media (min-width:576px) and (max-width:767.98px){
  .mobile-app .category-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
}
@media (min-width:768px) and (max-width:1199.98px){
  .mobile-app .category-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
}
@media (min-width:1200px){
  .desktop-site .cat-grid-desktop,.desktop-site .ms-raw-category-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important}
  .desktop-site .ms-raw-category-grid .desk-cat-chip{min-width:0;grid-template-columns:76px minmax(0,1fr) 18px!important;}
  .desktop-site .ms-raw-category-grid .desk-cat-chip strong{overflow-wrap:anywhere}
}
