/* ATH homepage product grid 1.0.2 — four-column compact desktop cards */

body.ath-home-modern.ath-home-modern .ath-home-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card {
  height: 100%;
  min-height: 0;
  border-radius: 15px;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card__media {
  height: 148px;
  min-height: 148px;
  max-height: 148px;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card__media img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 148px !important;
  padding: 12px !important;
  object-fit: contain !important;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card__body {
  min-height: 0 !important;
  padding: 14px 14px 13px !important;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card h3 {
  min-height: 38px;
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.35;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card__body > p {
  display: -webkit-box;
  min-height: 36px;
  max-height: 36px;
  margin: 0 0 11px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card__footer {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  align-items: end;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card__price strong {
  font-size: 11px;
  line-height: 1.3;
}

body.ath-home-modern.ath-home-modern .ath-home-product-card__action {
  font-size: 9px;
  white-space: nowrap;
}

body.ath-home-modern.ath-home-modern #ath-free-plugins .ath-home-product-card__body,
body.ath-home-modern.ath-home-modern #ath-pro-plugins .ath-home-product-card__body {
  min-height: 0 !important;
  padding: 14px 14px 13px !important;
}

body.ath-home-modern.ath-home-modern #ath-free-plugins .ath-home-product-card__footer,
body.ath-home-modern.ath-home-modern #ath-pro-plugins .ath-home-product-card__footer {
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  margin-top: auto;
}

@media (max-width: 1180px) {
  body.ath-home-modern.ath-home-modern .ath-home-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body.ath-home-modern.ath-home-modern .ath-home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.ath-home-modern.ath-home-modern .ath-home-product-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.ath-home-modern.ath-home-modern .ath-home-product-card {
    display: grid;
    height: auto;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  body.ath-home-modern.ath-home-modern #ath-free-plugins .ath-home-product-card__footer,
  body.ath-home-modern.ath-home-modern #ath-pro-plugins .ath-home-product-card__footer {
    grid-template-columns: 1fr !important;
  }

  body.ath-home-modern.ath-home-modern .ath-home-product-card__media {
    height: 100%;
    min-height: 148px;
    max-height: none;
  }
}
