/* ============================================================
   fabrilogy™ — Related Products Plugin
   Pfad: /httpdocs/shop/plugins/fabrilogy_related/css/fabrilogy_related.css
   ============================================================ */

.fabrilogy-related-products {
    width: 100%;
    margin: 20px 0 25px 0;
    padding: 0 20px;
    clear: both;
}

/* Überschrift mit farbigem Balken je Bereich */
.fabrilogy-related-products .related-headline {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3a3128;
    border-left: 4px solid #e07b00;
    padding-left: 10px;
    margin-bottom: 14px;
}

/* Bereich 1: Stoffe — orange */
.fabrilogy-related-bereich-1 .related-headline {
    border-left-color: #e07b00;
}

/* Bereich 2: Zubehör — grün */
.fabrilogy-related-bereich-2 .related-headline {
    border-left-color: #5a8a3c;
}

/* Bereich 3: Schnittmuster — blau */
.fabrilogy-related-bereich-3 .related-headline {
    border-left-color: #3a6a9a;
}

/* Grid */
.related-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.related-card {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
    border: 1px solid #e0d8d0;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .18s ease, border-color .18s ease;
}

@media (min-width: 768px) {
    .related-card {
        flex: 0 0 calc(33.333% - 8px);
        max-width: calc(33.333% - 8px);
    }
}

@media (min-width: 1200px) {
    .related-card {
        flex: 0 0 calc(16.666% - 10px);
        max-width: calc(16.666% - 10px);
    }
}

.related-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,.10);
    border-color: #e07b00;
}

.related-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7f4f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.related-card:hover .related-card__image img {
    transform: scale(1.05);
}

.related-card__no-image {
    font-size: 2rem;
    color: #ccc;
}

.related-card__info {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.related-card__name {
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
}

.related-card__price-normal {
    font-size: 1rem;
    font-weight: 700;
    color: #e07b00;
}

/* Mobil: max 4 Karten */
@media (max-width: 767px) {
    .related-card:nth-child(n+5) {
        display: none;
    }
}
