/* Haase Product Tabs – bewusst auf die Plugin-Inhalte begrenzt. */
.haase-product-tabs {
    padding-top: .55rem;
    padding-bottom: .55rem;
}

/* Der GPSR-Block liegt im JTL-HTML direkt hinter dieser Überschrift. In modernen Browsern
   wird der Originaltitel schon vor dem JS-Lauf ausgeblendet; JS entfernt ihn anschließend. */
.hr-sect.h3.mb-4:has(+ .gpsr-compliance) {
    display: none !important;
}

/* Zubehör und Ersatzteile verwenden absichtlich dieselbe kompakte Listenansicht. */
.haase-spare-list {
    width: 100%;
}

.haase-spare-row {
    display: grid;
    grid-template-columns: 96px minmax(260px, 1fr) minmax(180px, .55fr) minmax(385px, auto);
    column-gap: 1.15rem;
    align-items: center;
    min-height: 108px;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.haase-spare-row:first-child {
    border-top: 1px solid #e5e5e5;
}

.haase-spare-image {
    width: 96px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.haase-spare-image > a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.haase-spare-image img {
    display: block;
    max-width: 100%;
    max-height: 76px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.haase-spare-name {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: .2rem;
}

.haase-spare-sku {
    font-size: .82rem;
    opacity: .72;
}

.haase-spare-meta {
    min-width: 0;
}

.haase-spare-price .price_wrapper,
.haase-spare-price .price {
    margin-bottom: 0;
}

.haase-spare-delivery .item-delivery-status {
    margin-top: .2rem;
    margin-bottom: 0;
    line-height: 1.25;
}

.haase-spare-buy,
.haase-spare-form {
    width: 100%;
    margin: 0 !important;
}

.haase-spare-buy-inner {
    display: grid;
    grid-template-columns: 176px minmax(165px, 1fr);
    gap: .6rem;
    align-items: center;
}

/* Kompakte Mengenwahl ohne Bootstrap-input-group.
   Ursache des bisherigen Fehlers war die Kombination aus Bootstrap-Rahmen/Überlappungen
   und unseren festen Breiten. Jetzt besitzt nur der äußere Control-Rahmen eine Linie;
   die vier inneren Elemente sind borderlos. Dadurch gibt es keine überdeckten Kanten mehr. */
.haase-spare-counter {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    width: 176px !important;
    min-width: 176px !important;
    max-width: 176px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #707070;
    border-radius: .125rem;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
}

.haase-spare-counter .haase-qty-btn,
.haase-spare-counter .haase-qty-input,
.haase-spare-counter .haase-spare-unit {
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #525252;
    box-sizing: border-box;
}

.haase-spare-counter .haase-qty-btn {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.haase-spare-counter .haase-qty-input {
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    padding: 0 .25rem !important;
    text-align: center;
    font: inherit;
    appearance: textfield;
    -moz-appearance: textfield;
}

.haase-spare-counter .haase-qty-input::-webkit-outer-spin-button,
.haase-spare-counter .haase-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.haase-spare-counter .haase-spare-unit {
    flex: 0 0 56px !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    padding: 0 .2rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.haase-spare-counter .haase-qty-plus {
    flex-basis: 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
}

.haase-spare-counter:focus-within {
    border-color: #00a1cd;
}

.haase-spare-counter .haase-qty-input:focus,
.haase-spare-counter .haase-qty-btn:focus {
    outline: 0;
}

.haase-spare-cart-btn {
    width: 100%;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1.2;
    white-space: nowrap;
}

.haase-spare-details-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    white-space: nowrap;
}

.haase-manufacturer-tab > :first-child {
    margin-top: 0 !important;
}

.haase-manufacturer-tab > :last-child {
    margin-bottom: 0 !important;
}

/* Leere Standard-Empfehlungsbox vermeiden, wenn nur die beiden verschobenen Gruppen existieren. */
.recommendations:empty {
    display: none;
}

@media (max-width: 991.98px) {
    .haase-spare-row {
        grid-template-columns: 82px minmax(0, 1fr) minmax(150px, .55fr);
        min-height: 100px;
        row-gap: .65rem;
    }

    .haase-spare-image {
        width: 82px;
        height: 66px;
    }

    .haase-spare-image img {
        max-height: 66px;
    }

    .haase-spare-buy {
        grid-column: 2 / -1;
    }
}

@media (max-width: 767.98px) {
    .haase-spare-row {
        grid-template-columns: 72px minmax(0, 1fr);
        min-height: 0;
        padding: .95rem 0;
    }

    .haase-spare-image {
        width: 72px;
        height: 60px;
    }

    .haase-spare-image img {
        max-height: 60px;
    }

    .haase-spare-meta,
    .haase-spare-buy {
        grid-column: 1 / -1;
    }

    .haase-spare-meta {
        padding-left: 0;
    }

    .haase-spare-buy-inner {
        grid-template-columns: 176px minmax(145px, 1fr);
    }

}

@media (max-width: 575.98px) {
    .haase-spare-buy-inner { grid-template-columns: 1fr; }
    .haase-spare-counter { width: 176px !important; min-width: 176px !important; max-width: 176px !important; }
}


/* 1.0.21: Warenkorb-Bestaetigung im NOVA-Stil. */
.haase-cart-success-modal .haase-cart-success-image {
    max-height: 220px;
    width: auto;
}


/* 1.0.23: Originale GPSR-Ausgabe bleibt als stabile Datenquelle im DOM,
   wird aber ausserhalb des Haase-Reiters nicht angezeigt. */
.haase-gpsr-original-hidden {
    display: none !important;
}
