/*
 * Related products on mobile, photobook product 645 only.
 * WooCommerce sets first/last classes by query order, which breaks the 4-column
 * grid on phones (rows of 1 + 2 + 1). Scope: body.postid-645 and the Elementor
 * mobile breakpoint (max-width 767px). Tablet and desktop are not affected.
 */
@media (max-width: 767px) {
  body.postid-645 ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }

  /* WooCommerce clearfix (display: table) would become grid cells and shift the first card */
  body.postid-645 ul.products.columns-4::before,
  body.postid-645 ul.products.columns-4::after {
    content: none !important;
    display: none !important;
  }

  body.postid-645 ul.products.columns-4 li.product {
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    width: auto !important;
  }
}
