/* STORE APP Patch 573 — one product card per row on phones for /product and /products.
   The layout loads this AFTER the legacy catalog CSS (including P449/P522).
   It is scoped to the real catalog markup; desktops, homepage, detail and checkout are untouched. */
@media screen and (max-width: 767.98px) {
  html body.site-masterpalm #site-main section.mpb2b-catalog-page,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-container,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-head,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-layout,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-results {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-search {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-search input {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* Collapse the desktop sidebar/result two-track layout before sizing cards. */
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-layout {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 14px !important;
    width: 100% !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-filter-panel,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-results {
    display: block !important;
    flex: 0 0 auto !important;
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* Explicitly override legacy three/two-column !important declarations. */
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-results > .mpb2b-product-grid.mpb2b-product-grid-catalog {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    align-items: stretch !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-catalog-results > .mpb2b-product-grid.mpb2b-product-grid-catalog > article.mpb2b-product-card {
    display: flex !important;
    flex-direction: column !important;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-product-card .mpb2b-product-media {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 195px !important;
    aspect-ratio: 4 / 3 !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-product-card .mpb2b-product-body {
    min-width: 0 !important;
    width: 100% !important;
    padding: 15px !important;
    box-sizing: border-box !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-product-card .mpb2b-product-body strong,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-product-card .mpb2b-price,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-product-card .mpb2b-cordless-note {
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-product-card .mpb2b-card-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-results-bar,
  html body.site-masterpalm #site-main section.mpb2b-catalog-page .mpb2b-pagination {
    flex-wrap: wrap !important;
    gap: 9px !important;
  }
}
