/* ============================================================
   GERMAN-SPOB – BELIEBTE PRODUKTE
   ============================================================ */


/* ============================================================
   01. BEREICH
   ============================================================ */

.popular-products {
    width: 100%;
    padding: 18px 14px 24px;
    box-sizing: border-box;
    background: #ffffff;
}


/* ============================================================
   02. ÜBERSCHRIFT
   ============================================================ */

.popular-products__title {
    margin: 0 0 18px;
    color: #062855;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
}

.popular-products__title::after {
    content: "";
    display: block;
    width: 38px;
    height: 2px;
    margin: 7px auto 0;
    background: #9a7b42;
}


/* ============================================================
   03. SLIDER
   ============================================================ */

.popular-products__slider {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.popular-products__grid {
    display: flex;
    align-items: stretch;
    gap: 18px;
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}


/* ============================================================
   04. PRODUKTKARTE
   ============================================================ */

.product-card {
    flex: 0 0 calc((100% - 54px) / 4);
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 12px;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #dce3eb;
    border-radius: 6px;

    box-shadow:
        0 2px 7px rgba(6, 40, 85, 0.04);
}


/* ============================================================
   05. BILDBEREICH
   ============================================================ */

.product-card__image-area {
    position: relative;

    flex: 0 0 178px;
    height: 178px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 14px;
}


/* ============================================================
   06. BILD-LINK
   ============================================================ */

.product-card__image-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 190px;



    box-sizing: border-box;

    background: #ffffff;

    /* schlichter dunkelgrauer Bildrahmen */
    border: 1px solid #555555;

    /* Schatten */
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.30);

    text-decoration: none;

    transition: border-color 0.2s ease;
}

.product-card__image-link:hover {
    transform: none;
    border-color: #333333;
    box-shadow: none;
}


/* ============================================================
   07. PRODUKTBILD
   ============================================================ */

.product-card__image {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    border: 0;
    background: transparent;
}


/* ============================================================
   08. BADGE
   ============================================================ */

.product-card__badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;

    padding: 4px 7px;
    border-radius: 2px;

    color: #ffffff;

    font-size: 9px;
    line-height: 1.1;
    font-weight: 700;

    text-transform: uppercase;
}

.product-card__badge--blue {
    background: #062855;
}

.product-card__badge--red {
    background: #9a7b42;
    color: #ffffff;
}


/* ============================================================
   09. INHALT
   ============================================================ */

.product-card__content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}


/* ============================================================
   10. TITEL
   ================================================================ */

.product-card__title {
    margin: 0 0 10px;

    min-height: 36px;

    color: #062855;

    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
}

.product-card__title a {
    color: inherit;
    text-decoration: none;
}

.product-card__title a:hover {
    text-decoration: underline;
}


/* ============================================================
   11. PRODUKTDATEN
   ============================================================ */

.product-card__facts {
    flex: 0 0 auto;

    margin: 0 0 12px;
    padding-top: 8px;

    border-top: 1px solid #e1e6ec;
}

.product-card__fact {
    display: grid;

    grid-template-columns:
        18px
        92px
        minmax(0, 1fr);

    align-items: start;

    column-gap: 8px;

    padding: 4px 0;

    color: #40536a;

    font-size: 10.5px;
    line-height: 1.3;
}


/* ============================================================
   12. PRODUKTDATEN-ICONS
   ============================================================ */

.product-card__fact-icon {
    display: flex;

    align-items: flex-start;
    justify-content: center;

    width: 18px;
    height: 18px;

    min-width: 18px;
    min-height: 18px;

    max-width: 18px;
    max-height: 18px;

    color: #53657a;

    overflow: hidden;
}

.product-card__fact-icon svg {
    display: block !important;

    width: 18px !important;
    height: 18px !important;

    min-width: 18px !important;
    min-height: 18px !important;

    max-width: 18px !important;
    max-height: 18px !important;

    flex: 0 0 18px !important;

    fill: none !important;
    stroke: currentColor !important;

    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;

    overflow: hidden !important;
}


/* ============================================================
   13. PRODUKTDATEN-TEXT
   ============================================================ */

.product-card__fact-label {
    color: #53657a;
    font-weight: 500;
    white-space: nowrap;
}

.product-card__fact-value {
   min-width: 0;

    color: #314760;

    overflow-wrap: anywhere;
    word-break: normal;
}


/* ============================================================
   14. AKTUELLE PHP-STRUKTUR
   Hersteller / Mercedes-Nr. / Modelle bleiben zusammen
   ============================================================ */

.product-card__description {
    flex: 0 0 auto;

    margin: 0 0 12px;
    padding: 0;

    color: #40536a;

    font-size: 10.5px;
    line-height: 1.4;

    overflow-wrap: anywhere;
}


/* ============================================================
   15. SERVICE-TEXT
   ============================================================ */

.product-card__service-text {
    flex: 0 0 auto;

    margin: 0 0 12px;

    color: #53657a;

    font-size: 11px;
    line-height: 1.4;
}


/* ============================================================
   16. PREIS
   Nur der Preis wird nach unten gedrückt
   ============================================================ */

.product-card__price {
    margin-top: auto;
    margin-bottom: 10px;

    color: #80632f;

    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
}


/* ============================================================
   17. AKTIONEN
   ============================================================ */

.product-card__actions {
    flex: 0 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        48px;

    gap: 8px;

    width: 100%;

    margin: 0;
}

.product-card__details--red:only-child {
    grid-column: 1 / -1;
}


/* ============================================================
   18. DETAILS-BUTTON
   ============================================================ */

.product-card__details {
    min-height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 0 12px;
    box-sizing: border-box;

    background: #062855;
    border: 1px solid #062855;

    color: #ffffff;

    font-size: 10px;
    line-height: 1;
    font-weight: 700;

    text-align: center;
    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.product-card__details:hover {
    background: #031a36;
    border-color: #031a36;
}

.product-card__details--red {
    background: #9a7b42;
    border-color: #9a7b42;
    color: #ffffff;
}

.product-card__details--red:hover {
    background: #80632f;
    border-color: #80632f;
    color: #ffffff;
}


/* ============================================================
   19. WARENKORB
   ============================================================ */

.product-card__cart {
    width: 48px;
    min-height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #062855;

    color: #062855;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.product-card__cart:hover {
    background: #062855;
    color: #ffffff;
}

.product-card__cart:disabled { cursor: wait; opacity: .7; }
.product-card__cart.is-added { background: #062855; color: #ffffff; }
.product-card__cart.has-error { border-color: #d92733; color: #d92733; }
.popular-products__cart-message { min-height: 1.25em; margin: 10px 48px 0; color: #062855; font-size: .85rem; text-align: right; }

.product-card__cart-icon {
    display: block !important;

    width: 20px !important;
    height: 20px !important;

    min-width: 20px !important;
    min-height: 20px !important;

    max-width: 20px !important;
    max-height: 20px !important;

    fill: none !important;
    stroke: currentColor !important;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ============================================================
   20. SLIDER-PFEILE
   ============================================================ */

.popular-products__arrow {
    width: 24px;
    height: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;

    background: transparent;

    color: #062855;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}


/* ============================================================
   21. TABLET
   ============================================================ */

@media (max-width: 1000px) {

    .product-card {
        flex-basis:
            calc((100% - 18px) / 2);
 }

}


/* ============================================================
   22. MOBIL
   ============================================================ */

@media (max-width: 600px) {

    .popular-products {
        padding:
            16px 8px
            20px;
    }

    .popular-products__slider {
        grid-template-columns:
            20px
            minmax(0, 1fr)
            20px;
    }

    .product-card {
        flex-basis: 100%;
    }

    .product-card__image-link {
        width: 190px;
        height: 150px;
    }

    .product-card__fact {
        grid-template-columns:
            18px
            82px
            minmax(0, 1fr);
    }

}
