/* Homepage mobile product cards — last-loaded equal height + wider cards */
@media (max-width: 767.98px) {
  body#index #wrapper.wrapper,
  body#index #wrapper > .container,
  body#index .columns-container.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body#index .hl-home-shell__products.container-md,
  body#index .hl-home-shell__products {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  body#index .ps-specials {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0.4rem 2px 0.5rem !important;
  }

  body#index .hl-home-shell__products .products,
  body#index .hl-home-shell__products .products.hl-category-products,
  body#index .hl-home-shell__products .products.hl-new-paging,
  body#index .ps-specials .products,
  body#index .ps-newproducts .products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    column-gap: 4px !important;
    row-gap: 8px !important;
    gap: 8px 4px !important;
    width: 100% !important;
    --hl-pc-gap-x: 4px !important;
    --hl-pc-gap-y: 8px !important;
  }

  /* Hide paged-out new products (must beat display:flex equal-height rule) */
  body#index .hl-home-shell__products .ps-newproducts .products > article.product-miniature.is-hl-new-page-hide,
  body#index .ps-newproducts .products > article.product-miniature.is-hl-new-page-hide {
    display: none !important;
  }

  body#index .hl-home-shell__products .products > article.product-miniature:not(.is-hl-new-page-hide),
  body#index .hl-home-shell__products .products > article.product-miniature.hl-pc:not(.is-hl-new-page-hide) {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    --hl-pc-img-h: 156px;
    --hl-pc-pad: 5px;
    --hl-pc-action-h: 36px;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .product-miniature__inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 100% !important;
    padding: var(--hl-pc-pad) !important;
    box-sizing: border-box !important;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .product-miniature__bottom {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .product-miniature__image-container,
  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .thumbnail-container {
    height: var(--hl-pc-img-h) !important;
    min-height: var(--hl-pc-img-h) !important;
    max-height: var(--hl-pc-img-h) !important;
    padding: 2px !important;
    box-sizing: border-box !important;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .product-miniature__title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    overflow: hidden !important;
    height: 2.44em !important;
    min-height: 2.44em !important;
    max-height: 2.44em !important;
    margin: 0 0 4px !important;
    font-size: 0.8125rem !important;
    line-height: 1.22 !important;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .hl-pc-status {
    min-height: 16px !important;
    height: 16px !important;
    margin: 0 0 2px !important;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .product-miniature__prices {
    min-height: 2.75em !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .hl-pc-avail {
    min-height: 14px !important;
    margin: 0 0 4px !important;
  }

  /* Pin CTA to card bottom — beat any later margin-top:0 */
  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .product-miniature__actions {
    display: flex !important;
    flex-direction: column !important;
    margin-top: auto !important;
    padding-top: 0 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    justify-content: flex-end !important;
  }

  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .product-miniature__actions .btn,
  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) .hl-pc-atc,
  body#index .hl-home-shell__products article.product-miniature.hl-pc:not(.is-hl-new-page-hide) a.hl-pc-view {
    width: 100% !important;
    min-height: var(--hl-pc-action-h) !important;
    height: var(--hl-pc-action-h) !important;
  }
}
