/* Editorial tiles inherit one column from the existing product grid. */
#js-product-list .products > .onyx-editorial-tile {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  align-self: start;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f6f5f2;
}
#js-product-list .onyx-editorial-tile__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
/* List view: an editorial image remains compact rather than filling the row. */
#js-product-list.is-list-view .products > .onyx-editorial-tile {
  width: min(100%, 493px);
  justify-self: center;
}

/* ONYX categoryfix1: make the product grid independent of a controller's
   layout-* body class. Editorial tiles are regular grid items, not full rows.
   Scoped to the actual category/search listing; does not affect homepage cards. */
#js-product-list:not(.is-list-view) > .products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
#js-product-list > .products > .onyx-editorial-tile {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
#js-product-list > .products > .onyx-editorial-tile__image {
  max-width: 100%;
}
@media (max-width: 1199.98px) {
  #js-product-list:not(.is-list-view) > .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767.98px) {
  #js-product-list:not(.is-list-view) > .products {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
