.featured .product-grid {
  grid-template-columns: repeat(var(--homepage-grid-columns, 4), minmax(0, 1fr));
}

.store-grid {
  grid-template-columns: repeat(var(--store-grid-columns, 4), minmax(0, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.product-card > a {
  color: inherit;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
}

.product-card .product-image {
  flex: 0 0 250px;
  height: 250px;
}

.product-card .product-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-card h3 {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card p {
  display: -webkit-box;
  min-height: 4.65em;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-card .add-request-button {
  margin-top: auto;
}

html[data-home-columns="5"] .featured .product-card .product-image,
html[data-store-columns="5"] .store-grid .product-card .product-image { flex-basis:210px; height:210px; }
html[data-home-columns="6"] .featured .product-card .product-image,
html[data-store-columns="6"] .store-grid .product-card .product-image { flex-basis:185px; height:185px; }
html[data-store-columns="7"] .store-grid .product-card .product-image { flex-basis:160px; height:160px; }
html[data-store-columns="8"] .store-grid .product-card .product-image { flex-basis:140px; height:140px; }
html[data-home-columns="5"] .featured .product-card h3,
html[data-home-columns="6"] .featured .product-card h3,
html[data-store-columns="6"] .store-grid .product-card h3,
html[data-store-columns="7"] .store-grid .product-card h3,
html[data-store-columns="8"] .store-grid .product-card h3 { font-size:.88rem; }
html[data-store-columns="7"] .store-grid .product-card p,
html[data-store-columns="8"] .store-grid .product-card p { font-size:.72rem; }
html[data-store-columns="7"] .store-grid .add-request-button,
html[data-store-columns="8"] .store-grid .add-request-button { font-size:.66rem; padding:10px 7px; }

html[data-home-columns="6"] .featured .product-card p {
  display: none;
  min-height: 0;
}

@media (max-width: 1180px) {
  .featured .product-grid,
  .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html[data-home-columns="2"] .featured .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-store-columns="2"] .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured .product-card .product-image,
  .store-grid .product-card .product-image { flex-basis:230px !important; height:230px !important; }
}

@media (max-width: 800px) {
  .featured .product-grid,
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured .product-card .product-image,
  .store-grid .product-card .product-image { flex-basis:215px !important; height:215px !important; }
}

@media (max-width: 560px) {
  .featured .product-grid,
  .store-grid { grid-template-columns: 1fr; }
  .featured .product-card .product-image,
  .store-grid .product-card .product-image { flex-basis:280px !important; height:280px !important; }
}
