/* Master Palm Store App Patch 455
   Corrects Patch 454: keep Featured Products and Volume Pricing in the
   intended 3/4 + 1/4 desktop layout. Only the product grid inside the 3/4
   column is capped at 3 cards per row. */

@media (min-width: 992px) {
  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr) !important;
    align-items: start !important;
    gap: 24px !important;
    width: 100% !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    grid-column: 1 / 2 !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card {
    grid-column: 2 / 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    align-self: stretch !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child .mpb2b-product-grid,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child .mpb2b-product-grid,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child .mpb2b-product-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child .mpb2b-product-grid > .mpb2b-product-card,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child .mpb2b-product-grid > .mpb2b-product-card,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout > div:first-child .mpb2b-product-grid > .mpb2b-product-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout {
    display: block !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products .mpb2b-product-grid,
  body.masterpalm-theme #site-main .mpb2b-home-products .mpb2b-product-grid,
  body.masterpalm-store-dark #site-main .mpb2b-home-products .mpb2b-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card {
    margin-top: 24px !important;
  }
}

@media (max-width: 767.98px) {
  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout {
    display: block !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products .mpb2b-product-grid,
  body.masterpalm-theme #site-main .mpb2b-home-products .mpb2b-product-grid,
  body.masterpalm-store-dark #site-main .mpb2b-home-products .mpb2b-product-grid {
    grid-template-columns: 1fr !important;
  }

  body.site-masterpalm #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card,
  body.masterpalm-theme #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card,
  body.masterpalm-store-dark #site-main .mpb2b-home-products > .mpb2b-home-layout > .mpb2b-volume-card {
    margin-top: 22px !important;
  }
}
