/* =============================================================================
   Supplier Logo Grid — [supplier_grid] shortcode
   ============================================================================= */

.sgrid-wrap {
  width: 100%;
  overflow: hidden;
}

.sgrid {
  display: grid;
  grid-template-columns: repeat(var(--sgrid-cols, 4), 1fr);
  gap: 0;
}

/* ---- Item ---- */

.sgrid-item {
  opacity: 0;
}

.sgrid-wrap.is-visible .sgrid-item {
  animation: sgrid-fade-in 0.7s ease forwards;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
}

@keyframes sgrid-fade-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0);     }
}

/* ---- Link / image ---- */

.sgrid-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sgrid-img {
  max-height: 40px;
  max-width: 130px;
  width: auto;
  height: auto;
  display: block;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.sgrid-item:hover .sgrid-img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .sgrid {
    --sgrid-cols: 3;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .sgrid {
    --sgrid-cols: 2;
    grid-template-columns: repeat(2, 1fr);
  }

  .sgrid-wrap.is-visible .sgrid-item {
    padding: 20px 24px;
  }

  .sgrid-img {
    max-height: 32px;
    max-width: 100px;
  }
}
