/* Scoped ED-like styling for artikel product list only */

.artikel_lijst.cardlijst .product-card,
.groepen_lijst .product-card {
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease;
}

.artikel_lijst.cardlijst .product-card .card-header,
.groepen_lijst .product-card .card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  padding: 6px 10px;
  height: 54px;
  overflow: hidden;
}

/* Override legacy fixed height on panel-heading inside product cards */
.artikel_lijst.cardlijst .product-card .panel-heading,
.groepen_lijst .product-card .panel-heading {
  height: 54px;
  min-height: 54px;
}

.artikel_lijst.cardlijst .product-card .card-body,
.groepen_lijst .product-card .card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.artikel_lijst.cardlijst .product-card .subgroep-naam {
  margin-top: 8px;
  line-height: 1.2;
  height: 2.4em; /* exactly 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.artikel_lijst.cardlijst .product-card .artikel-merk {
  line-height: 1.2;
  height: 1.2em; /* single line */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Constrain product image to a consistent height to prevent card jumping */
.artikel_lijst.cardlijst img.article-small {
  max-width: 105%;
  height: 200px;
  width: auto;
  object-fit: contain;
  min-width: 0; /* override legacy min-width */
}

@media (max-width: 991px) {
  .artikel_lijst.cardlijst img.article-small { height: 170px; }
}
@media (max-width: 575px) {
  .artikel_lijst.cardlijst img.article-small { height: 150px; }
}

.artikel_lijst.cardlijst .product-card .card-footer {
  background-color: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  padding: 10px;
}

.artikel_lijst.cardlijst .product-card:hover,
.groepen_lijst .product-card:hover {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0.6rem 1.25rem rgba(0, 0, 0, 0.12);
}

/* Tuning panel-heading gradient from legacy to flat in this scope */
.artikel_lijst.cardlijst .panel-heading {
  background-image: none;
}

/* Remove legacy blue gradient on hoofdgroep cards */
.artikel_lijst.groepen_lijst .panel-heading,
.groepen_lijst .panel-heading {
  background-image: none !important;
  background-color: #fff !important;
}

/* Spacing between cards */
.artikel_lijst.cardlijst .row [class*="col-"],
.groepen_lijst .row [class*="col-"] {
  margin-bottom: 15px;
}

/* Typography tweaks */
.artikel_lijst.cardlijst .card-header .panel-title,
.groepen_lijst .card-header .panel-title {
  font-size: 1em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artikel_lijst.cardlijst .product-info .prijs {
  color: #0066cc;
}

/* Banners grid under page title: max 3 square blocks per row */
.banners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
  margin: 10px 0 15px 0;
}

.banners-grid .pagina_banner {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 8px;
  text-align: center;
}

.banners-grid .pagina_banner h4 {
  font-size: 14px;
  margin: 0 0 6px 0;
}

.banners-grid .pagina_banner img {
  width: 100%;
  aspect-ratio: 1 / 1; /* square */
  object-fit: cover;
  border-radius: 3px;
}

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

@media (max-width: 575px) {
  .banners-grid {
    grid-template-columns: 1fr;
  }
}


