/* Modern Dental V406 — compact the whole green restorative section.
   Designed to load AFTER md405-restorative-cards.css.
   Product cards remain vertical, right-aligned, and swipeable.
   Only the restorative section is affected; admin/catalog/featured sections untouched. */

/* The green section must size to its real content instead of a tall reserved block. */
.md94-home .md402-restorative {
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding-top:10px!important;
  padding-bottom:9px!important;
}
.md94-home .md402-restorative .md402-intro {
  margin-bottom:6px!important;
}
.md94-home .md402-restorative .md402-shell {
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
}
.md94-home .md402-restorative .md402-shell > .products {
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  align-items:stretch!important;
  padding-top:0!important;
  padding-bottom:5px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}

/* Each card stays upright, but with a shallower photo area and no artificial
   352px minimum height. Nothing is clipped: text and purchase controls fit. */
.md94-home .md402-restorative .md402-shell > .products > .product-card {
  box-sizing:border-box!important;
  height:286px!important;
  min-height:286px!important;
  max-height:286px!important;
  padding:7px 9px!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
}
.md94-home .md402-restorative .product-card > a:has(> img.pimage) {
  box-sizing:border-box!important;
  width:100%!important;
  height:150px!important;
  min-height:150px!important;
  max-height:150px!important;
  flex:0 0 150px!important;
  aspect-ratio:auto!important;
  margin:0 0 5px!important;
  overflow:hidden!important;
}
.md94-home .md402-restorative .product-card img.pimage {
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
}
.md94-home .md402-restorative .product-card .pmeta {
  box-sizing:border-box!important;
  flex:0 0 14px!important;
  height:14px!important;
  min-height:0!important;
  max-height:14px!important;
  line-height:14px!important;
  margin-top:0!important;
  margin-bottom:2px!important;
}
.md94-home .md402-restorative .product-card .ptitle {
  box-sizing:border-box!important;
  flex:0 0 31px!important;
  height:31px!important;
  min-height:0!important;
  max-height:31px!important;
  line-height:15.5px!important;
  margin-top:0!important;
  margin-bottom:3px!important;
}
.md94-home .md402-restorative .product-card .price {
  box-sizing:border-box!important;
  flex:0 0 21px!important;
  height:21px!important;
  min-height:21px!important;
  max-height:21px!important;
  line-height:21px!important;
  margin-top:0!important;
  margin-bottom:4px!important;
}
.md94-home .md402-restorative .product-card .pactions {
  margin-top:auto!important;
  margin-bottom:0!important;
  min-height:32px!important;
  max-height:32px!important;
  flex:0 0 32px!important;
}
.md94-home .md402-restorative .product-card .pactions .btn,
.md94-home .md402-restorative .product-card .pactions .icon-btn {
  height:32px!important;
  min-height:32px!important;
  max-height:32px!important;
}

/* Keep existing mobile horizontal cards but make the whole section shorter. */
@media (max-width:600px) {
  .md94-home .md402-restorative {
    padding-top:9px!important;
    padding-bottom:8px!important;
  }
  .md94-home .md402-restorative .md402-intro {margin-bottom:6px!important;}
  .md94-home .md402-restorative .md402-shell > .products > .product-card {
    height:265px!important;
    min-height:265px!important;
    max-height:265px!important;
    padding:6px 7px!important;
  }
  .md94-home .md402-restorative .product-card > a:has(> img.pimage) {
    height:133px!important;
    min-height:133px!important;
    max-height:133px!important;
    flex-basis:133px!important;
  }
  .md94-home .md402-restorative .product-card .pactions,
  .md94-home .md402-restorative .product-card .pactions .btn,
  .md94-home .md402-restorative .product-card .pactions .icon-btn {
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
  }
  .md94-home .md402-restorative .product-card .pactions {flex-basis:30px!important;}
}
