/* CompatibleLids — Widget-Styles (UX4, 29.08.2026: aus dem Twig-Inline-Block
   ausgelagert; identischer Inhalt + die frühere Inline-Single-Regel unten). */
.compatible-lids {
    margin-top: 20px;
}

@media (min-width: 768px) {
    .compatible-lids--single {
        display: inline-block;
        width: calc(50% - 8px);
        vertical-align: top;
        box-sizing: border-box;
    }
    .compatible-lids--single .compatible-lids__grid {
        grid-template-columns: 1fr;
    }
}

.compatible-lids__delivery {
    font-size: 12px;
    color: #555;
    margin: 4px 0 6px 0;
}

.compatible-lids__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    margin-right: 4px;
}

.compatible-lids__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.compatible-lids__card {
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
    background: #fff;
    min-width: 0;
    overflow: hidden;
    /* F2 (12.06.): Karte als Spalte — Kaufformular klebt unten buendig */
    display: flex;
    flex-direction: column;
}

.compatible-lids__link,
.compatible-lids__title-link {
    text-decoration: none;
    color: inherit;
}

/* Bildformat unabhängig */
.compatible-lids__image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.compatible-lids__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.compatible-lids__title {
    font-weight: 700;
    margin-top: 6px;
}

.compatible-lids__meta {
    font-size: 13px;
    color: #666;
}

.compatible-lids__price {
    font-weight: bold;
    margin-bottom: 10px;
}

/* Desktop / Tablet */
.compatible-lids__form {
    width: 80%;
    /* margin-top:auto drueckt das Formular ans Kartenende (F2) */
    margin: auto auto 0;
}

.compatible-lids__qty {
    display: grid;
    grid-template-columns: 16% 34% 16% 34%;
    width: 100%;
}

.compatible-lids__btn,
.compatible-lids__input,
.compatible-lids__unit {
    height: 38px;
    border: 1px solid #cfd4da;
    background: #fff;
    color: #495057;
    box-sizing: border-box;
}

.compatible-lids__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    padding: 0;
}

.compatible-lids__btn.minus {
    border-right: 0;
    border-top-left-radius: 4px;
}

.compatible-lids__btn.plus {
    border-left: 0;
    border-right: 0;
}

.compatible-lids__input {
    width: 100%;
    min-width: 0;
    text-align: center;
    font-size: 16px;
    border-left: 0;
    border-right: 0;
    appearance: textfield;
    -moz-appearance: textfield;
}

.compatible-lids__input::-webkit-outer-spin-button,
.compatible-lids__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.compatible-lids__unit {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0 6px;
    border-top-right-radius: 4px;
    background: var(--bs-tertiary-bg);
}

.compatible-lids__submit {
    width: 100%;
    margin: -1px 0 0 0;
    height: 46px;
    font-weight: 600;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Echtes Mobile */
@media (max-width: 576px) {
    .compatible-lids__form {
        width: 100%;
    }

    .compatible-lids__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compatible-lids__meta {
        font-size: 12px;
    }

    .compatible-lids__qty {
        grid-template-columns: 25% 50% 25%;
    }

    .compatible-lids__btn,
    .compatible-lids__input {
        height: 40px;
    }

    .compatible-lids__btn {
        font-size: 22px;
    }

    .compatible-lids__input {
        font-size: 16px;
    }

    .compatible-lids__unit {
        display: none;
    }

    .compatible-lids__btn.plus {
        border-right: 1px solid #cfd4da;
        border-top-right-radius: 4px;
    }

    .compatible-lids__submit {
        height: 40px;
    }
}
