/* ========================================================================
   Produkt-Kacheln (Grid)
 ========================================================================== */

.leda-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--leda-white);
    transition: transform 0.3s, box-shadow 0.3s;
}

.leda-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.leda-product-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Icons Container (oben) */
.leda-product-card-icons {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

.leda-product-icon {
    width: 40px;
    height: 40px;
    background: var(--leda-white);
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leda-product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.leda-product-icon-klimaplus {
    /* Position bereits durch Icons-Container */
}

.leda-product-icon-colors {
    /* Position bereits durch Icons-Container */
}

/* Produktbild (bottom aligned) */
.leda-product-card-image {
    flex: 1;
    display: flex;
    align-items: flex-end; /* Bottom align */
    justify-content: center;
    padding: 3rem 1rem 1rem; /* Platz für Icons oben */
    min-height: 300px;
}

.leda-product-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.leda-product-card-placeholder {
    width: 100%;
    height: 200px;
    background: var(--leda-bg-grey);
}

/* Produktname */
.leda-product-card-title {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--leda-line);
}

.leda-product-card-title h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.leda-product-card:hover .leda-product-card-title h3 {
    color: var(--leda-red);
}

/* Responsive */
@media (max-width: 767px) {
    .leda-product-card-image {
        min-height: 200px;
    }

    .leda-product-icon {
        width: 35px;
        height: 35px;
    }
}

/* ============================================================
   LEDA Produktseite – Filter
   ============================================================ */

/* --- Wrapper --- */
.leda-product-filter {
    padding-right: 24px;
}

/* --- Gruppe --- */
.leda-filter-group {
    border-bottom: 1px solid #d8d8d8;
}

/* --- Gruppen-Header --- */
.leda-filter-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 14px 0;
    cursor: pointer;
    font-family: var(--font-quicksand, 'Quicksand', sans-serif);
    font-size: 36px;
    font-weight: 400;
    line-height: 48px;
    color: #333;
    text-align: left;
    user-select: none;
}

/* --- Chevron: SVG-basiert mit geschlossener Spitze --- */
.leda-filter-chevron {
    width: 24px;
    height: 14px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14'%3E%3Cpolyline points='1,1 12,13 23,1' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    transition: transform 0.25s ease;
}

/* Alte Pseudo-Elemente deaktivieren */
.leda-filter-chevron::before,
.leda-filter-chevron::after {
    display: none;
}

.leda-filter-group.is-open .leda-filter-chevron {
    transform: rotate(180deg);
}

/* --- Gruppen-Body (Animation) --- */
.leda-filter-group-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.leda-filter-group.is-open .leda-filter-group-body {
    max-height: 2000px;
}

/* --- Button Basis --- */
.leda-filter-btn {
    position: relative;
    background: #fff;
    border: 1px solid #cacaca;
    cursor: pointer;
    color: #333;
    font-family: var(--font-roboto, 'Roboto', sans-serif);
    transition: background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, opacity 0.15s ease;
}

/* Aktiv: roter Hintergrund */
.leda-filter-btn.is-active {
    background: var(--leda-red, #E3000E);
    border-color: var(--leda-red, #E3000E);
    color: #fff;
}

/* × Indikator bei aktivem Button */
.leda-filter-btn.is-active::after {
    content: '×';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 11px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

/* Deaktiviert (keine Treffer in Kombination) */
.leda-filter-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Icons bei aktivem Button weiß invertieren */
.leda-filter-btn.is-active img {
    filter: brightness(0) invert(1);
}

/* ================================================================
   Button-Variante: Text  (Kategorie + Türfunktion)
   2-spaltiges Grid, 80px Mindesthöhe, Text zentriert
   ================================================================ */
.leda-filter-buttons--text {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-bottom: 16px;
}

.leda-filter-buttons--text .leda-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    padding: 12px 16px;
    border-radius: 2px;
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* ================================================================
   Button-Variante: Quadrat mit Icon oben + Label unten
   (Feuersicht + Ausführung)
   ================================================================ */
.leda-filter-buttons--icon-square {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-bottom: 16px;
}

.leda-filter-buttons--icon-square .leda-filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 8px 12px;
    border-radius: 2px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.leda-filter-buttons--icon-square .leda-filter-btn span {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    display: block;
}

/* Feuersicht: alle Icons 82×66px */
.leda-filter-group[data-group-id="9"] .leda-filter-btn img {
    width: 82px;
    height: 66px;
    object-fit: contain;
}

/* Ausführung: individuelle Icon-Größen */
.leda-filter-btn[data-category-id="22"] img { width: 40px; height: 54px; object-fit: contain; } /* Klassisch */
.leda-filter-btn[data-category-id="23"] img { width: 30px; height: 80px; object-fit: contain; } /* Rund */
.leda-filter-btn[data-category-id="24"] img { width: 32px; height: 80px; object-fit: contain; } /* Eckig */

/* ================================================================
   Button-Variante: Breit mit Icon links + Label rechts
   (Eigenschaften)
   ================================================================ */
.leda-filter-buttons--icon-wide {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
}

.leda-filter-buttons--icon-wide .leda-filter-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 2px;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    box-sizing: border-box;
}

/* Eigenschaften: individuelle Icon-Größen */
.leda-filter-btn[data-category-id="25"] img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; } /* Klima Plus */
.leda-filter-btn[data-category-id="26"] img { width: 43px; height: 40px; object-fit: contain; flex-shrink: 0; } /* Wärmespeicher */
.leda-filter-btn[data-category-id="27"] img { width: 48px; height: 40px; object-fit: contain; flex-shrink: 0; } /* Wasserführend */
.leda-filter-btn[data-category-id="28"] img { width: 42px; height: 20px; object-fit: contain; flex-shrink: 0; } /* Drehbar */
.leda-filter-btn[data-category-id="29"] img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; } /* Katalysator */
.leda-filter-btn[data-category-id="30"] img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; } /* Heizhilfe */
.leda-filter-btn[data-category-id="31"] img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; } /* Elektronische Steuerung */
.leda-filter-btn[data-category-id="32"] img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; } /* LUC */
.leda-filter-btn[data-category-id="33"] img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; } /* Zubereiten/Warmhalten */

/* ============================================================
   Mobile (unterhalb UIKit @s = 640px)
   ============================================================ */
@media (max-width: 639px) {

    .leda-product-filter {
        padding-right: 0;
        margin-bottom: 32px;
    }

    /* Gruppen-Header rot wenn aktive Filter drin (nur Mobile) */
    .leda-filter-group.has-active .leda-filter-group-header {
        color: var(--leda-red, #E3000E);
    }

    /* Chevron ebenfalls rot bei aktiver Gruppe */
    .leda-filter-group.has-active .leda-filter-chevron {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14'%3E%3Cpolyline points='1,1 12,13 23,1' fill='none' stroke='%23E3000E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }
}

/* Tablet Portrait: Text-Buttons einspaltig (640px–959px) */
@media (min-width: 640px) and (max-width: 959px) {
    .leda-filter-buttons--text {
        grid-template-columns: 1fr;
    }

    .leda-filter-group-header {
        font-size: 28px;
    }
}