/* Sortiment im CandyShop-Style */

/* --- Filter / Kategorie-Auswahl --- */
html, body {
    height: 100%;
    /*overflow: hidden; /* Verhindert, dass die Seite scrollt */
}
main {
    height: calc(100vh - 100px); /* Höhe anpassen: Navbar + Header */
    /*overflow-y: auto;*/
    padding-bottom: 2rem;
    scrollbar-gutter: stable;

}

#sortiment-filter {
    display: block;
    margin: 1rem auto 2rem auto; /* zentriert, Abstand nach oben/unten */
    padding: 0.55rem 1rem;
    width: 260px;
    /*min-width: 220px;
    max-width: 280px;
    */
    border-radius: 999px;
    border: 1px solid #ffc0d9;
    background-color: #fff8fc;
    font-size: 0.95rem;
    font-family: inherit;

    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.2);
    outline: none;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;

    /* kleiner eigener Pfeil (optional, Browser-abhängig) */
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #FF69B4 50%),
                      linear-gradient(135deg, #FF69B4 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 4px),
                         calc(100% - 12px) calc(50% - 4px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

#sortiment-filter:focus {
    border-color: #FF69B4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.25);
    transform: translateY(-1px);
}

/* falls du später ein Label nutzt */
label[for="sortiment-filter"] {
    display: block;
    text-align: center;
    margin-bottom: 0.3rem;
}




/* Produktkarte */
.sortiment-produkt {
    border: 1px solid #ffd1ea;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.18);
    background-color: #ffffff;
    padding: 1.0rem;
    /*margin-bottom: 1.0rem;*/

    display: flex;
    flex-direction: column;
    /*height: 100%;*/
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#sortiment-container {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    position: relative;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    grid-template-rows: auto;

    column-gap: 1rem;   /* horizontaler Abstand */
    row-gap: 3rem;      /* NEU: vertikaler Abstand */
    padding: 0 1rem 3rem;
    /*object-fit: contain;*/
}
.sortiment-produkt:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(255, 105, 180, 0.35);
}

/* Produktbild */
.sortiment-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

/* Textbereich */
.sortiment-text {
    flex-grow: 1;
    font-size: 0.9rem;
    color: #333;
    max-height: 25svh;
}

.sortiment-text br {
    line-height: 1.4;
}

/* Bezeichnung (Titel) – erste Zeile */
.sortiment-text > :first-child {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #000;
}

/* Info-Text begrenzen (Beschreibung) – letzter Block */
.sortiment-text > :last-child {
    margin-top: 0.5rem;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* max. 3 Zeilen */
    -webkit-box-orient: vertical;
}

/* --- Add-to-Cart Button oben rechts --- */

.sortiment-adding-container {
    position: relative;
}

.addToCartBtn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;

    width: clamp(30px, 4vw, 45px);
    height: clamp(30px, 4vw, 45px);

    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 5px rgba(255, 105, 180, 0.4);

    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
    transform: translateZ(0);
}

.addToCartBtn:hover {
    background-color: #ffe4f3;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.5);
}

.addToCartIcon {
    width: 60%;
    height: 60%;
}

/* --- Mobile / kleinere Screens --- */

@media (max-width: 768px) {
    #sortiment-container {
        padding: 0 0.5rem 2rem;
        gap: 1.5rem;
    }
}

@media (max-width: 500px) {
    .addToCartBtn {
        height: 45px;
        width: 45px;
    }
}
