/* Grid-Layout */
.ds-gallery{
    display: grid;
    gap: var(--ds-gap, 10px);
    --ds-gap: 10px;
    --ds-cols: 0; /* 0 = auto (unbegrenzt) */
}

/* 0 = auto: so viele Spalten wie reinpassen, jedes Item min. 25vw */
.ds-gallery[data-cols="0"]{
    grid-template-columns: repeat(auto-fit, minmax(15vw, 1fr));
}

/* Feste Spaltenanzahl: exakt N Spalten */
.ds-gallery:not([data-cols="0"]){
    grid-template-columns: repeat(var(--ds-cols), 1fr);
}

/* Items & Bilder */
.ds-gallery__item{
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.ds-gallery__item img{
    display:block;
    height: calc(var(--padding-horizontal)*3);
    width:auto;
    border:10px solid var(--color-text, #111);
    box-sizing:border-box;
}

/* Optional: verhindert, dass 25vw in schmalen Containern zu groß ist */
/* .ds-gallery[data-cols="0"]{
    grid-template-columns: repeat(auto-fit, minmax(min(25vw, 320px), 1fr));
} */


/* Mobile Fallback: bei sehr schmalen Screens erzwungen einspaltig */
@media (max-width: 480px){
    .ds-gallery[data-cols="0"],
    .ds-gallery:not([data-cols="0"]){
        grid-template-columns: 1fr;
    }

    .ds-gallery__item {
      width: 100%;
      object-fit: cover;
    }

    .ds-gallery__item img {
      width: 100%;
      height: auto;
      object-fit: cover;
    }
}

/* Download-Hinweis */
.ds-gallery__item a{
    cursor: alias;
    text-decoration: none;
}
