.affiliate-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.affiliate-product-card {
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.affiliate-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.affiliate-product-card .product-img {
  width: 100%;
  max-width: 160px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

.affiliate-product-card h3 {
  font-size: 18px;
  margin: 10px 0 6px;
}

.affiliate-product-card h3 a {
  color: inherit;
  text-decoration: none;
}

.affiliate-product-card h3 a:hover {
  text-decoration: underline;
}

.affiliate-product-card p {
  margin: 4px 0;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff9900;
  color: #000;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: bold;
  z-index: 2;
}

.review-link {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: #0073aa;
  text-decoration: none;
}

.review-link:hover {
  text-decoration: underline;
}

.compare-link {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: #111;
  background: #f5f5f5;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.compare-link:hover {
  background: #e9e9e9;
}

.compare-link.secondary {
  background: #fafafa;
  font-size: 12px;
  margin-top: 4px;
}

.affiliate-product-card .buy-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
}

.affiliate-product-card .buy-btn:hover {
  text-decoration: none;
}