/* ════════════════════════════════════════════════
   GR Affiliates Frontend CSS — Mobile First Grid
   ════════════════════════════════════════════════ */

/* Box container */
.grap-affiliate-box {
  margin: 40px 0;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #eaeaea;
}

/* Section Title */
.grap-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #111 !important;
  margin: 0 0 20px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile-First CSS Grid */
.grap-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 col no Mobile */
  gap: 16px;
}

/* Desktop Grid Override */
@media (min-width: 768px) {
  .grap-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Product Card */
.grap-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.grap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Clickable wrapper */
.grap-card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image Container */
.grap-figure {
  margin: 0; padding: 0;
  width: 100%; height: 200px;
  background: #f1f1f1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-bottom: 1px solid #f0f0f0;
}
.grap-img {
  width: 100%; height: 100%;
  object-fit: contain; /* Keeps product fully visible without crop inside the box */
  mix-blend-mode: multiply; /* Helps fake transparency on white background products */
}
.grap-no-img {
  color: #999; font-size: 13px; font-weight: 500;
}

/* Card Content Array */
.grap-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

/* Product title */
.grap-product-title {
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  margin: 0 0 16px !important;
  color: #333 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button */
.grap-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  background: #ff6c00;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 0;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}
.grap-card:hover .grap-btn {
  background: #e66100;
}
