/* ==============================
   Sticky Download Panel (Container fährt komplett hoch/runter)
   ============================== */

/* Höhe des Headers zentral steuern */
:root { --panel-header-h: 56px; }

#catalog-panel {
  position: fixed;
  right: 2rem;
  bottom: 0;
  width: 310px;

  background: #21254a;
  color: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  border: 2px solid white;
  border-bottom: 0px;

  /* WICHTIG: ganze Box fährt raus, so dass nur der Header sichtbar bleibt */
  transform: translateY(calc(100% - var(--panel-header-h)));
  transition: transform .45s ease;
  will-change: transform;

  z-index: 9999;
  overflow: hidden; /* Inhalte sauber maskieren */
}

/* Offener Zustand: Panel vollständig sichtbar */
#catalog-panel.is-open {
  transform: translateY(0);
}

/* ==============================
   Header
   ============================== */
.catalog-header {
  height: var(--panel-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #21254a;
  cursor: pointer;
  font: 400 18px/1.2 "Montserrat";
  letter-spacing: .2px;
}

.catalog-header .toggle-icon {
  display: inline-block;
  transition: transform .3s ease;
}

/* Pfeil zeigt nach oben, wenn offen */
#catalog-panel.is-open .toggle-icon { transform: rotate(180deg); }


/* ==============================
   Content
   ============================== */
.catalog-content {
  background: #f6f7f9;
  color: #21254a;
  max-height: min(70vh, 640px); /* genug Platz, aber nicht größer als Viewport */
  overflow: auto;
  margin: 0 18px;
  border-radius: 6px 6px 0px 0px;
}

.catalog-content-inner {
  padding: 20px;
}

.catalog-content hr {
  margin-bottom: 10px;
}

/* Download-Link */
.download-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #21254a;
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 20px;
}

.download-link .download-icon { font-size: 22px; }

/* Grid-Vorschau */
.preview-images {

}

.preview-images img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Optional: kleine Screens */
@media (max-width: 480px) {
  #catalog-panel {
    right: 30px;
    width: calc(100vw - 60px);
  }
}

.catalog-header .toggle-img{
  width: 18px; height: 18px; display:inline-block;
  transition: transform .25s ease;
  /* ggf. CSS-Filter, falls du die Farbe invertieren willst:
     filter: brightness(0) invert(1);
  */
}

#catalog-panel.is-open .catalog-header .toggle-img{
  transform: rotate(180deg);
}
