/*
 * Catalog grid sizing on top of styles.min.css (plain CSS for the same reason
 * as payment-methods.css). Grid columns were sized by their content (300px
 * cards), so below ~1170px the page got wider than the window.
 */
@media (min-width: 768px) {
  .catalog .container {
    grid-template-columns: 228px minmax(0, 1fr);
  }

  .catalog.featured .container {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .catalog-mode-grid .catalog-items > div:first-child {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-mode-grid.featured .catalog-items > div:first-child {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .catalog-items .catalog-item img {
    max-width: 100%;
    height: auto;
  }
}

@media (min-width: 768px) and (max-width: 1099.98px) {
  .catalog-mode-grid .catalog-items > div:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-mode-grid.featured .catalog-items > div:first-child {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
