.drugspro-pill-gallery {
  max-width: 1282px;
  margin: 0 auto;
}

.drugspro-pill-intro {
  margin: 0 0 1rem;
  color: #555;
  line-height: 1.6;
}

.drugspro-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 1rem;
}

.drugspro-pill-card {
  min-width: 0;
  margin: 0;
}

.drugspro-pill-card > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.drugspro-pill-card > a:hover,
.drugspro-pill-card > a:focus-visible {
  border-color: #bc841f;
  box-shadow: 0 5px 20px rgba(42, 32, 15, 0.12);
}

.drugspro-pill-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f3f3f3;
}

.drugspro-pill-card figcaption {
  display: grid;
  gap: 0.3rem;
  padding: 0.8rem;
  line-height: 1.45;
}

.drugspro-pill-card figcaption strong {
  font-size: 0.95rem;
}

.drugspro-pill-card figcaption span {
  color: #666;
  font-size: 0.82rem;
}

.drugspro-pill-gallery-fallback {
  padding: 1rem;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  text-align: center;
}

@media (max-width: 520px) {
  .drugspro-pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .drugspro-pill-card figcaption {
    padding: 0.65rem;
  }
}
