/* v49 — final ultra-compact B2B catalogue override.
   Kept as the last stylesheet so legacy marketplace rules cannot reduce
   the desktop catalogue to two columns or stretch cards vertically. */

#market .dynamic-filters{
  margin:0 0 12px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

#market .filter-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(118px,1fr)) auto!important;
  gap:7px!important;
  align-items:end!important;
}

#market #approvedCatalog.catalog.compact-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  align-items:start!important;
  gap:10px!important;
  width:100%!important;
  max-width:none!important;
}

#market #approvedCatalog.compact-grid>.product-card{
  display:flex!important;
  flex-direction:column!important;
  align-self:start!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  cursor:pointer!important;
}

#market #approvedCatalog.compact-grid>.product-card>.image{
  position:relative!important;
  width:100%!important;
  height:140px!important;
  min-height:140px!important;
  max-height:140px!important;
  aspect-ratio:auto!important;
  padding:7px!important;
  background:#f8fafc!important;
}

#market #approvedCatalog.compact-grid>.product-card>.image img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}

#market #approvedCatalog.compact-grid>.product-card>.body{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  padding:9px 10px 10px!important;
}

#market #approvedCatalog.compact-grid .product-card h3{
  display:-webkit-box!important;
  min-height:2.45em!important;
  max-height:2.45em!important;
  margin:6px 0 3px!important;
  overflow:hidden!important;
  font-size:.91rem!important;
  line-height:1.225!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
}

#market #approvedCatalog.compact-grid .product-card .body>p,
#market #approvedCatalog.compact-grid .product-actions,
#market #approvedCatalog.compact-grid .expiry{
  display:none!important;
}

#market #approvedCatalog.compact-grid .card-verify{
  margin:0 0 4px!important;
  font-size:.58rem!important;
}

#market #approvedCatalog.compact-grid .badge{
  max-width:100%!important;
  padding:3px 6px!important;
  overflow:hidden!important;
  font-size:.55rem!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}

#market #approvedCatalog.compact-grid .meta{
  overflow:hidden!important;
  font-size:.67rem!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}

#market #approvedCatalog.compact-grid .stock{
  margin-top:6px!important;
  padding-top:6px!important;
  gap:6px!important;
  overflow:hidden!important;
  font-size:.65rem!important;
  white-space:nowrap!important;
}

#market #approvedCatalog.compact-grid .favorite-btn{
  position:absolute!important;
  z-index:3!important;
  top:7px!important;
  right:7px!important;
  width:34px!important;
  height:34px!important;
  padding:0!important;
  font-size:1.22rem!important;
}

html[dir="rtl"] #market #approvedCatalog.compact-grid .favorite-btn{
  right:auto!important;
  left:7px!important;
}

@media (max-width:1100px){
  #market .filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  #market #approvedCatalog.catalog.compact-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

@media (max-width:760px){
  #market .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #market #approvedCatalog.catalog.compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #market #approvedCatalog.compact-grid>.product-card>.image{height:120px!important;min-height:120px!important;max-height:120px!important}
}

@media (max-width:420px){
  #market .filter-grid{grid-template-columns:1fr!important}
  #market #approvedCatalog.catalog.compact-grid{grid-template-columns:1fr!important}
}
