/* GP526 – Produktkarten unten sauber mittig ausrichten und
 * aktiven Merken/Vergleichen-Zustand siteweit konsistent halten. */

:root {
  --gp-library-active-bg:#eef7ea;
  --gp-library-active-border:#9fc38f;
  --gp-library-active-color:#4f8534;
  --gp-library-hover-bg:#f6fbf7;
  --gp-library-hover-border:#bfd4c4;
  --gp-library-hover-color:#2f5f44;
}

/* Einheitliches Prinzip für Merken + Vergleichen überall, wo die Toggle-Buttons auftauchen. */
:where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button {
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
:where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button:hover,
:where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button:focus-visible {
  background:var(--gp-library-hover-bg)!important;
  border-color:var(--gp-library-hover-border)!important;
  color:var(--gp-library-hover-color)!important;
}
:where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button:is(.is-active,[aria-pressed="true"]) {
  background:var(--gp-library-active-bg)!important;
  border-color:var(--gp-library-active-border)!important;
  color:var(--gp-library-active-color)!important;
  box-shadow:none!important;
}
:where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button:is(.is-active,[aria-pressed="true"]) .gp-library-button__icon svg {
  fill:currentColor;
  stroke:currentColor;
}

/* Oberes Karten-Herz etwas kleiner und ruhiger; aktiver Zustand nur leicht grün. */
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-top-favorite,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-top-favorite {
  top:9px;
  right:9px;
  width:26px!important;
  height:26px!important;
  min-width:26px!important;
  min-height:26px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #d6e1db!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.98)!important;
  color:#355f4d!important;
  box-shadow:0 1px 4px rgba(21,46,34,.06)!important;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-top-favorite .gp-library-button__icon,
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-top-favorite svg {
  width:13px;
  height:13px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-top-favorite:is(.is-active,[aria-pressed="true"]) {
  background:var(--gp-library-active-bg)!important;
  border-color:var(--gp-library-active-border)!important;
  color:var(--gp-library-active-color)!important;
  box-shadow:0 1px 4px rgba(21,46,34,.07)!important;
}

/* Unteren Kartenbereich leicht höher ziehen, damit oben/unten harmonischer verteilt ist. */
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-main,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-main {
  gap:4px;
  padding-bottom:1px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-description,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-description {
  margin-bottom:0;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-commerce,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-commerce {
  margin-top:-10px;
  gap:4px;
  padding:0 11px 10px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-commerce-metadata,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-commerce-metadata {
  min-height:17px;
  margin:0;
  gap:2px 8px;
  line-height:1.18;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-price,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-price {
  gap:0 7px;
  min-height:0;
  margin-top:-3px;
  line-height:1.05;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-price strong,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-price strong {
  line-height:1.02;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-price-note,
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-package,
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-availability {
  line-height:1.13;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-main-actions .gp-product-loop-button,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-main-actions .gp-product-loop-button {
  min-height:39px;
  padding:8px 10px;
}

/* Utility-Buttons unten sauber zentrieren und Beschriftung ruhiger setzen. */
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-side-actions,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-side-actions {
  gap:7px;
  align-items:stretch;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-side-actions .gp-library-button,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-side-actions .gp-library-button {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px;
  min-height:35px;
  padding:6px 8px!important;
  font-size:10.2px!important;
  line-height:1.08;
  letter-spacing:-.01em;
  white-space:nowrap;
  text-align:center;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-side-actions .gp-library-button__icon,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-side-actions .gp-library-button__icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 13px;
  width:13px;
  height:13px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-side-actions .gp-library-button__icon svg,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-side-actions .gp-library-button__icon svg {
  width:13px;
  height:13px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-side-actions .gp-library-button [data-gp-label],
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-side-actions .gp-library-button [data-gp-label] {
  position:relative;
  top:-.01em;
}

/* Produktdetail / Wissensartikel / Merkliste-Vorkommen ebenfalls dezent im aktiven Zustand. */
.gp-product-detail .gp-product-detail__primary-actions :where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button,
body.single-post .gp-knowledge-article .gp-article-actionbar :where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button,
.gp-knowledge-archive .gp-knowledge-card__actions :where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button,
.gp-home--v3 :is(.gp-home-article-card__favorite,.gp-home-product-card__favorite) :where([data-gp-favorite-toggle],[data-gp-compare-toggle]).gp-library-button {
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease;
}

@container gp-products (max-width:980px) {
  .gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-commerce {
    margin-top:-6px;
  }
  .gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-side-actions .gp-library-button {
    font-size:10.6px!important;
  }
}
