/* =========================================================
   EICHENREICH24 – PRODUKTE V2
========================================================= */

.er24-products,
.er24-products * {
    box-sizing: border-box;
}

.er24-products {
    --blue: #5878B5;
    --blue-dark: #45659F;
    --blue-soft: #EEF3FB;

    --text: #202938;
    --muted: #667286;
    --line: #DDE4ED;
    --light: #F7F9FC;

    width: 100%;

    color: var(--text);
    font-family: inherit;
}


/* =========================================================
   CONTAINER
========================================================= */

.er24-products__inner {
    width: min(
        1360px,
        calc(100% - 50px)
    );

    margin: 0 auto;
}


/* =========================================================
   HEAD
========================================================= */

.er24-products__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;

    margin-bottom: 30px;
}

.er24-products__head h2 {
    margin: 0;
    padding: 0;

    color: var(--text);

    font-size: clamp(
        36px,
        3.2vw,
        50px
    );

    line-height: 1.08;

    font-weight: 560;
    letter-spacing: -.035em;
}

.er24-products__head p {
    max-width: 520px;

    margin: 0;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.65;
}


/* =========================================================
   GRID
========================================================= */

.er24-products-grid {
    display: grid;

    align-items: stretch;

    gap: 16px;
}


/* 3 SPALTEN */

.er24-products-grid.er24-cols-3 {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


/* 4 SPALTEN */

.er24-products-grid.er24-cols-4 {
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
}


/* 5 SPALTEN */

.er24-products-grid.er24-cols-5 {
    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );
}


/* =========================================================
   CARD
========================================================= */

.er24-product-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    height: 100%;

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 7px;

    background: #fff;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


/* KEIN LIFT */

.er24-product-card:hover {
    border-color: #CBD6E5;

    box-shadow:
        0 12px 32px
        rgba(32,41,56,.06);
}


/* =========================================================
   BILDBEREICH
========================================================= */

.er24-product-card__media {
    position: relative;

    display: block;

    width: 100%;

    overflow: hidden;

    background: #EEF1F4;

    text-decoration: none !important;
}


/* 3 SPALTEN */

.er24-cols-3
.er24-product-card__media {
    aspect-ratio: 1 / .84;
}


/* 4 SPALTEN */

.er24-cols-4
.er24-product-card__media {
    aspect-ratio: 1 / .90;
}


/* 5 SPALTEN */

.er24-cols-5
.er24-product-card__media {
    aspect-ratio: 1 / 1;
}


/* =========================================================
   BILD MUSS IMMER KOMPLETT DIE BILDFLÄCHE AUSFÜLLEN
========================================================= */

.er24-product-card__image {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center center;

    transition:
        transform .5s ease;
}


/*
 * Nur das Bild zoomt minimal.
 * Keine Karte, kein Button bewegt sich.
 */

.er24-product-card:hover
.er24-product-card__image {
    transform: scale(1.025);
}


/* =========================================================
   SALE
========================================================= */

.er24-product-card__sale {
    position: absolute;

    top: 13px;
    left: 13px;

    z-index: 4;

    padding: 7px 10px;

    border-radius: 4px;

    background: var(--blue);

    color: #fff;

    font-size: 10px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: .05em;
    text-transform: uppercase;
}


/* =========================================================
   BODY
========================================================= */

.er24-product-card__body {
    flex: 1;

    display: flex;
    flex-direction: column;

    padding: 20px;
}


/* Bei mehr Spalten etwas kompakter */

.er24-cols-4
.er24-product-card__body {
    padding: 18px;
}

.er24-cols-5
.er24-product-card__body {
    padding: 16px;
}


/* =========================================================
   KATEGORIE
========================================================= */

.er24-product-card__category {
    width: fit-content;

    margin-bottom: 11px;

    color: var(--blue-dark);

    font-size: 10px;
    line-height: 1.3;

    font-weight: 700;

    letter-spacing: .055em;
    text-transform: uppercase;
}


/* =========================================================
   PRODUKTTITEL
========================================================= */

.er24-product-card__title {
    margin: 0;
    padding: 0;

    color: var(--text);

    font-size: 18px;
    line-height: 1.32;

    font-weight: 560;

    letter-spacing: -.015em;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* 4 */

.er24-cols-4
.er24-product-card__title {
    font-size: 17px;
}


/* 5 */

.er24-cols-5
.er24-product-card__title {
    font-size: 16px;

    -webkit-line-clamp: 3;
}


.er24-product-card__title a {
    color: var(--text) !important;

    text-decoration: none !important;

    transition:
        color .2s ease;
}

.er24-product-card__title a:hover {
    color: var(--blue-dark) !important;
}


/* =========================================================
   BESCHREIBUNG
========================================================= */

.er24-product-card__excerpt {
    margin-top: 12px;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.6;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* kompakter bei 4 */

.er24-cols-4
.er24-product-card__excerpt {
    font-size: 13px;
}


/* bei 5 nur 2 Zeilen */

.er24-cols-5
.er24-product-card__excerpt {
    font-size: 13px;

    -webkit-line-clamp: 2;
}


/* =========================================================
   FOOTER
========================================================= */

.er24-product-card__footer {
    margin-top: auto;
    padding-top: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}


/* =========================================================
   PREIS
========================================================= */

.er24-product-card__price {
    color: var(--text);

    font-size: 22px;
    line-height: 1.1;

    font-weight: 600;

    white-space: nowrap;
}


.er24-cols-4
.er24-product-card__price {
    font-size: 20px;
}


.er24-cols-5
.er24-product-card__price {
    font-size: 18px;
}


.er24-product-card__price del {
    display: block;

    margin-bottom: 3px;

    color: #98A2B1;

    font-size: 13px;

    font-weight: 400;
}


.er24-product-card__price ins {
    color: var(--blue-dark);

    text-decoration: none;
}


/* =========================================================
   KAUFEN BUTTON
========================================================= */

.er24-product-card__button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    flex: 0 0 auto;

    padding: 0 14px;

    border: 1px solid var(--blue);
    border-radius: 5px;

    background: var(--blue);

    color: #fff !important;

    font-size: 13px;
    line-height: 1;

    font-weight: 600;

    text-decoration: none !important;

    transition:
        background-color .2s ease,
        border-color .2s ease;
}


/* KEIN HOVER LIFT */

.er24-product-card__button:hover {
    background: var(--blue-dark);

    border-color: var(--blue-dark);

    color: #fff !important;
}


/* schöneres Warenkorb-Icon */

.er24-product-card__button i {
    font-size: 13px;

    line-height: 1;
}


/* Bei 5 Spalten kompakter */

.er24-cols-5
.er24-product-card__button {
    min-height: 39px;

    padding: 0 11px;

    font-size: 12px;
}


/* AJAX */

.er24-product-card__button.loading {
    opacity: .6;
}

.er24-product-card__button.added {
    background: var(--blue-dark);

    border-color: var(--blue-dark);
}

.er24-product-card
.added_to_cart {
    display: none !important;
}


/* =========================================================
   EMPTY
========================================================= */

.er24-products__empty {
    padding: 28px;

    border: 1px solid var(--line);
    border-radius: 6px;

    background: var(--light);

    color: var(--muted);

    font-size: 15px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    .er24-products__inner {
        width: min(
            100% - 40px,
            1360px
        );
    }

    .er24-products__head {
        flex-direction: column;
        align-items: flex-start;

        gap: 14px;
    }


    /*
     * Egal ob Desktop 3/4/5:
     * Tablet immer 2.
     */

    .er24-products-grid.er24-cols-3,
    .er24-products-grid.er24-cols-4,
    .er24-products-grid.er24-cols-5 {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .er24-product-card__media,
    .er24-cols-3 .er24-product-card__media,
    .er24-cols-4 .er24-product-card__media,
    .er24-cols-5 .er24-product-card__media {
        aspect-ratio: 1 / .82;
    }

    .er24-product-card__body,
    .er24-cols-4 .er24-product-card__body,
    .er24-cols-5 .er24-product-card__body {
        padding: 19px;
    }

    .er24-product-card__title,
    .er24-cols-4 .er24-product-card__title,
    .er24-cols-5 .er24-product-card__title {
        font-size: 18px;
    }

    .er24-product-card__excerpt,
    .er24-cols-4 .er24-product-card__excerpt,
    .er24-cols-5 .er24-product-card__excerpt {
        font-size: 14px;
        -webkit-line-clamp: 3;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .er24-products__inner {
        width: calc(100% - 32px);
    }

    .er24-products__head {
        margin-bottom: 24px;
    }

    .er24-products__head h2 {
        font-size: 35px;
    }

    .er24-products__head p {
        font-size: 16px;
    }


    /*
     * Mobil immer 1.
     */

    .er24-products-grid.er24-cols-3,
    .er24-products-grid.er24-cols-4,
    .er24-products-grid.er24-cols-5 {
        grid-template-columns: 1fr;
    }


    .er24-product-card__media,
    .er24-cols-3 .er24-product-card__media,
    .er24-cols-4 .er24-product-card__media,
    .er24-cols-5 .er24-product-card__media {
        aspect-ratio: 1 / .78;
    }


    .er24-product-card__body,
    .er24-cols-4 .er24-product-card__body,
    .er24-cols-5 .er24-product-card__body {
        padding: 19px;
    }


    .er24-product-card__title,
    .er24-cols-4 .er24-product-card__title,
    .er24-cols-5 .er24-product-card__title {
        font-size: 21px;
    }


    .er24-product-card__excerpt,
    .er24-cols-4 .er24-product-card__excerpt,
    .er24-cols-5 .er24-product-card__excerpt {
        font-size: 14px;
        -webkit-line-clamp: 3;
    }


    .er24-product-card__footer {
        align-items: center;
    }


    .er24-product-card__price,
    .er24-cols-4 .er24-product-card__price,
    .er24-cols-5 .er24-product-card__price {
        font-size: 23px;
    }


    .er24-product-card__button,
    .er24-cols-5 .er24-product-card__button {
        min-height: 46px;

        padding: 0 15px;

        font-size: 14px;
    }

}


/* =========================================================
   EICHENREICH24 – WIDGET AUSSENABSTÄNDE
   Gleich wie die übrigen Startseiten-Ebenen
========================================================= */

.er24-products {
    padding-top: 72px;
    padding-bottom: 76px;
}


@media (max-width: 767px) {

    .er24-products {
        padding-top: 52px;
        padding-bottom: 56px;
    }

}
