/* GP538 – einheitliche obere Schnellaktionen und datenehrliche Loopcards.
 * Aeltere Icon-Overrides werden hier nicht erweitert, sondern gezielt
 * durch eine gemeinsame Positionsregel abgeloest. */
.gp-product-archive .gp-product-list .gp-product-loop-card{position:relative}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions{
  position:absolute;z-index:6;top:10px;right:10px;
  display:flex;flex-direction:row;align-items:center;justify-content:flex-end;
  gap:6px;width:auto;height:30px;
}
/* Entscheidend: alte absolute Herz-Positionierung aus GP516/523/528
 * innerhalb des neuen Flex-Paars aufheben. */
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-top-actions>.gp-product-loop-top-action,
.gp-product-archive .gp-product-list.is-list-view .gp-product-loop-top-actions>.gp-product-loop-top-action,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns] .gp-product-loop-top-actions>.gp-product-loop-top-action{
  position:static!important;inset:auto!important;top:auto!important;right:auto!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 29px!important;width:29px!important;height:29px!important;
  min-width:29px!important;min-height:29px!important;max-width:29px!important;
  padding:0!important;margin:0!important;box-sizing:border-box!important;
  border:1px solid #d6e2db!important;border-radius:50%!important;
  background:rgba(255,255,255,.98)!important;color:#315747!important;
  box-shadow:0 1px 3px rgba(21,46,34,.055)!important;
  font-size:0!important;line-height:1!important;cursor:pointer;
  transition:background-color .16s ease,color .16s ease,border-color .16s ease!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action .gp-library-button__icon{
  display:grid!important;place-items:center!important;width:15px!important;height:15px!important;
  flex:none!important;font-size:0!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action .gp-library-button__icon svg{
  display:block!important;width:15px!important;height:15px!important;
  fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;
  stroke-linecap:round!important;stroke-linejoin:round!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action [data-gp-label]{display:none!important}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action:hover{
  background:#f6faf7!important;border-color:#a7c5b4!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action:focus-visible{
  outline:2px solid #4c9971!important;outline-offset:2px!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action:is(.is-active,[aria-pressed="true"],[data-gp-selected="true"]){
  background:#e8f2eb!important;border-color:#9abd9f!important;color:#33734f!important;
  box-shadow:none!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-favorite:is(.is-active,[aria-pressed="true"],[data-gp-selected="true"]) svg{
  fill:currentColor!important;
}
/* Die Waage bleibt auch bei aktivem Vergleich eine klare Konturzeichnung. */
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-compare:is(.is-active,[aria-pressed="true"],[data-gp-selected="true"]) svg{
  fill:none!important;stroke-width:2.25!important;
}
/* Kategorien sauber neben dem Aktionspaar abschneiden, nicht ueberlagern. */
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-chips,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-chips{
  inset:10px auto auto 10px!important;
  max-width:calc(100% - 90px)!important;
  min-width:0;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-chip{
  max-width:100%!important;overflow:hidden!important;white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
/* Auch die Listenansicht nutzt genau dasselbe Icon-Paar. */
.gp-product-archive .gp-product-list.is-list-view .gp-product-loop-top-actions{
  top:10px;right:10px;
}
.gp-product-archive .gp-product-list.is-list-view .gp-product-loop-top-actions>.gp-product-loop-top-favorite{
  display:inline-flex!important;
}
/* Untere Aktionen entfallen; der Produktknopf bildet den klaren Abschluss. */
.gp-product-archive .gp-product-list .gp-product-loop-side-actions{display:none!important}
/* Ein klares zweispaltiges Meta-Raster: Bestand links, Lieferzeit rechts. */
.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{
  gap:6px!important;margin-top:0!important;
  padding:4px var(--gp-loop-main-pad-x,14px) 14px!important;
  justify-content:flex-end;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-commerce-metadata{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;align-items:center!important;min-height:18px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-stock-indicator,
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-delivery{
  display:flex;align-items:center;min-width:0;
  font-size:11px!important;line-height:1.25!important;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-stock-indicator{
  justify-content:flex-start;gap:5px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-delivery{
  justify-content:flex-end;text-align:right!important;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-stock-indicator.is-stock-unknown i{
  background:#97a8a0!important;
}
.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{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  align-items:baseline!important;column-gap:8px!important;row-gap:1px!important;
  min-height:0!important;margin:0!important;padding:0!important;text-align:left!important;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-price strong{
  grid-column:1!important;justify-self:start!important;line-height:1.07!important;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-price .gp-product-loop-package,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-price .gp-product-loop-package{
  grid-column:2!important;align-self:baseline!important;justify-self:end!important;
  margin:0!important;padding:0!important;transform:none!important;
  font-size:10.5px!important;line-height:1.15!important;text-align:right!important;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-main-actions,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-main-actions{
  margin-top:3px!important;
}
/* Enge 4er-Karten: nur zwei ruhige Titelzeilen und fester Medienabschluss. */
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"]{
  --gp-loop-main-pad-top:7px;--gp-loop-main-pad-bottom:3px;
  --gp-loop-title-size:clamp(13px,.81vw,14px);
  --gp-loop-title-min:2.45em;--gp-loop-title-max:2.45em;
  --gp-loop-desc-min:3.55em;--gp-loop-desc-max:3.55em;
}
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-main{
  gap:4px!important;padding-bottom:2px!important;
}
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-title{
  line-height:1.18!important;margin:0!important;-webkit-line-clamp:2!important;
}
@container gp-products (max-width:640px){
  .gp-product-archive .gp-product-list .gp-product-loop-top-actions{top:8px;right:8px;gap:5px}
  .gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-chips{max-width:calc(100% - 84px)!important}
}
