/* GardenGid — article covers, 2026-11-05.
   A published cover can be a landscape photo, portrait photo or text infographic.
   Never crop the original image or stretch it to match the card's dimensions.
   Scoped to article cards; product/variety thumbnails are intentionally unchanged. */

/* List page: larger, uniform image frames with original image intact. */
.portal-article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.gg-article-result {
  min-width: 0;
}

.gg-article-result > .portal-photo {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background: #f7faf5;
  border-bottom: 1px solid #e8eee5;
}

.gg-article-result > .portal-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: scale-down;
  object-position: center;
  background: transparent;
}

/* Article detail: max-height was cutting off tall cover images. */
.prod-article-page .prod-article-image,
.prod-page .prod-article-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 680px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto 22px;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .portal-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .portal-article-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  .gg-article-result > .portal-photo {
    aspect-ratio: 3 / 2;
    padding: 10px;
  }
  .prod-article-page .prod-article-image,
  .prod-page .prod-article-image {
    max-height: 70vh;
  }
}
