/* GP541: kompaktere Loop-Cards im Katalog.
 * Ziel: weniger Leerraum zwischen Galerie/Medien und Textbereich,
 * kleinere obere Merken/Vergleichen-Icons und mehr Platz fuer Kategorien. */

/* Kleinere obere Schnellaktionen, damit die Kategorien mehr Platz haben. */
.gp-product-archive .gp-product-list .gp-product-loop-top-actions{
  top:8px!important;right:8px!important;gap:4px!important;height:24px!important;
}
.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{
  flex:0 0 24px!important;width:24px!important;height:24px!important;
  min-width:24px!important;min-height:24px!important;max-width:24px!important;
  max-height:24px!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action .gp-library-button__icon{
  width:12px!important;height:12px!important;
}
.gp-product-archive .gp-product-list .gp-product-loop-top-actions>.gp-product-loop-top-action .gp-library-button__icon svg{
  width:12px!important;height:12px!important;stroke-width:1.8!important;
}
/* Der aktive Zustand bleibt trotz kleinerer Icons klar sichtbar. */
.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"]),
.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"]){
  border-width:2px!important;
}

/* Mehr Platz fuer lange Kategorietexte. */
.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:8px auto auto 8px!important;
  max-width:calc(100% - 68px)!important;
}
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-chip{
  min-height:1.95rem!important;
  padding:.28rem .52rem!important;
  font-size:.73rem!important;
}

/* Kompaktere Medienzone: die Thumb-Leiste wird etwas flacher, der Leerraum unterhalb reduziert.
 * Weil auch Einzelbild-Karten dieselbe Medienhoehe nutzen, bleiben die Nachbarkarten symmetrisch. */
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="3"]{
  --gp-loop-image-h:230px;
  --gp-loop-gallery-h:58px;
}
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"]{
  --gp-loop-image-h:202px;
  --gp-loop-gallery-h:54px;
  --gp-loop-thumb-w:40px;
  --gp-loop-thumb-h:40px;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-media.has-gallery .gp-product-loop-gallery-thumbs,
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-media.has-gallery .gp-product-loop-gallery-thumbs{
  padding:4px 10px 6px!important;
  gap:5px!important;
}
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-gallery-thumb{
  padding:3px!important;
  border-radius:9px!important;
}

/* Textbereich leicht enger an die Medienkante ziehen. */
.gp-product-archive .gp-product-list.is-grid-view .gp-product-loop-main{
  gap:6px!important;
}
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="3"] .gp-product-loop-main{
  padding-top:12px!important;
}
.gp-product-archive .gp-product-list.is-grid-view[data-gp-columns="4"] .gp-product-loop-main{
  padding-top:5px!important;
  padding-bottom:2px!important;
}
