/* ===============================================
   Produktliste Styling – Desktop + Mobile
   =============================================== */

/* Listen-Grundlayout */
.archive ul.products,
.search-results ul.products {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.woocommerce ul.products li.product {
    width: 100%;
    margin-bottom: 0 !important;
}

/* Einzelnes Listenelement */
.ipc-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
}

/* Produktbild */
.ipc-list-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ipc-product-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Produkttitel */
.ipc-list-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ipc-list-name {
    font-weight: 600;
    font-size: 1.05em;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ipc-list-name a {
    color: #333;
    text-decoration: none;
}
.ipc-list-name a:hover {
    color: #0073aa;
}

/* Metadaten */
.ipc-list-meta {
    font-size: 0.85em;
    color: #666;
    display: flex;
    gap: 6px 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Preis */
.ipc-list-price {
    flex-shrink: 0;
}
.ipc-list-price .price {
    font-weight: 700;
    font-size: 1.1em;
    color: #0073aa;
}

/* Button */
.ipc-list-link {
    flex-shrink: 0;
    margin-left: auto;
}
.ipc-list-link .button {
    background-color: #0073aa;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}
.ipc-list-link .button:hover {
    background-color: #005d8f;
}

/* Responsive Anpassung */
@media (max-width: 850px) {
    .ipc-list-item {
        flex-wrap: wrap;
        row-gap: 12px;
        justify-content: space-between;
    }
    .ipc-list-image {
        order: 1;
        width: 120px;
        height: 120px;
    }
    .ipc-list-info {
        order: 2;
        width: calc(100% - 140px);
    }
    .ipc-list-price {
        order: 3;
        text-align: left;
        width: auto;
    }
    .ipc-list-link {
        order: 4;
        width: auto;
        margin-left: 20px;
    }
}
@media (max-width: 549px) {
    .ipc-list-item {
        flex-direction: column;
        align-items: stretch;
    }
    .ipc-list-image {
        width: 100%;
        height: auto;
        max-height: 220px;
        justify-content: center;
    }
    .ipc-product-thumb {
        width: auto;
        height: auto;
        max-height: 220px;
        object-fit: contain;
        margin: 0 auto;
    }
    .ipc-list-info {
        width: 100%;
    }
    .ipc-list-price,
    .ipc-list-link {
        width: 100%;
        text-align: center;
        margin: 8px 0;
    }
    .ipc-list-link .button {
        width: 100%;
    }
}



/* =================================================================
   2. LAYOUT FÜR "ÄHNLICHE PRODUKTE" (STABIL & KORREKT)
   ================================================================= */

.related .col-inner {
    height: 100%;
}
.ipc-related-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ipc-related-image { width: 100%; height: 140px; margin-bottom: 15px; }
.ipc-related-image img { width: 100%; height: 100%; object-fit: contain; }
.ipc-related-info {
    flex-grow: 1; /* Sorgt für gleiche Höhe */
    text-align: left;
    margin-bottom: 10px;
}
.ipc-related-info .ipc-related-title a {
    font-weight: 600; line-height: 1.4; color: #333;
}
.ipc-related-price {
    font-weight: 700; text-align: left; margin-bottom: 15px;
}
.ipc-related-link {
    margin-top: auto;
}
.ipc-related-link .button {
    background-color: #0073aa; color: #fff; padding: 12px 18px;
    border-radius: 8px; border: none; text-align: center; width: 100%;
}