.nwl-sidecart {
    position: fixed;
    inset: 0;
    z-index: 1055;
    visibility: hidden;
    pointer-events: none;
}

.nwl-sidecart.is-open {
    visibility: visible;
    pointer-events: auto;
}

.nwl-sidecart__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(20, 28, 35, .48);
    opacity: 0;
    transition: opacity .24s ease;
    cursor: default;
}

.nwl-sidecart.is-open .nwl-sidecart__backdrop { opacity: 1; }

.nwl-sidecart__panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(440px, 100%);
    height: 100%;
    max-height: 100dvh;
    background: #fff;
    box-shadow: -10px 0 35px rgba(0, 0, 0, .18);
    transform: translateX(102%);
    transition: transform .28s ease;
    outline: 0;
}

.nwl-sidecart.is-open .nwl-sidecart__panel { transform: translateX(0); }

.nwl-sidecart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 18px 20px;
    border-bottom: 1px solid #e7e7e7;
    background: #fff !important;
    background-image: none !important;
}

.nwl-sidecart__title {
    background: transparent !important;
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
}

.nwl-sidecart__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
}

.nwl-sidecart__close:hover,
.nwl-sidecart__close:focus { background: #f2f3f4; }

.nwl-sidecart__status {
    padding: 0 20px;
    font-size: .9rem;
}

.nwl-sidecart__status:not(:empty) {
    padding-top: 12px;
    padding-bottom: 12px;
    background: #f2ed42;
}

.nwl-sidecart__content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nwl-sidecart__loading,
.nwl-sidecart__empty,
.nwl-sidecart__error {
    padding: 40px 10px;
    text-align: center;
}

.nwl-sidecart__footer {
    flex: 0 0 auto;
    padding: 18px 20px 22px;
    border-top: 1px solid #e7e7e7;
    background: #fff;
}

.nwl-sidecart__sum-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    font-size: 1.05rem;
}

.nwl-sidecart__footer .btn + .btn { margin-top: 10px; }

.nwl-sidecart__basket-link:hover,
.nwl-sidecart__basket-link:focus,
.nwl-sidecart__basket-link:focus-visible {
    background-color: #f2f3f4 !important;
    border-color: #c9ced3 !important;
    color: #212529 !important;
}

/* Eingelesene NOVA-Warenkorbpositionen kompakt darstellen. */
.nwl-sidecart__content .cart-items,
.nwl-sidecart__content #cart-items,
.nwl-sidecart__content .basket-items,
.nwl-sidecart__content .cart-dropdown,
.nwl-sidecart__content .basket-dropdown {
    width: 100%;
}

.nwl-sidecart__content img {
    max-width: 78px;
    height: auto;
}

.nwl-sidecart__content table { width: 100%; }
.nwl-sidecart__content .btn-checkout,
.nwl-sidecart__content .checkout-button,
.nwl-sidecart__content .cart-summary,
.nwl-sidecart__content .basket-summary,
.nwl-sidecart__content .shipping-calculator,
.nwl-sidecart__content .coupon-form { display: none !important; }

body.nwl-sidecart-open { overflow: hidden; }

@media (max-width: 575.98px) {
    .nwl-sidecart__panel { width: 100%; }
    .nwl-sidecart__header { min-height: 64px; padding: 14px 16px; }
    .nwl-sidecart__content { padding: 16px; }
    .nwl-sidecart__footer { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .nwl-sidecart__panel,
    .nwl-sidecart__backdrop { transition: none; }
}


/* Das aus der Warenkorbseite rekonstruierte Formular muss sichtbar bleiben. */
.nwl-sidecart__cart-form {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    visibility: visible !important;
    opacity: 1 !important;
}

.nwl-sidecart__cart-form > .d-none,
.nwl-sidecart__cart-form > [hidden] {
    display: block !important;
}


/* Stückpreis und Mengensteuerung werden im kompakten Sidecart nicht angezeigt. */
.nwl-sidecart__hidden-field {
    display: none !important;
}

/* Kompakte Produktdarstellung: Bild | Anzahl × Produktname | Preis */
.nwl-sidecart__products {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.nwl-sidecart__products th {
    padding: 0 0 9px;
    border-bottom: 1px solid #e7e7e7;
    font-size: .78rem;
    font-weight: 600;
    text-align: left;
}

.nwl-sidecart__products th:first-child,
.nwl-sidecart__products td:first-child {
    width: 82px;
}

.nwl-sidecart__products th:last-child,
.nwl-sidecart__products td:last-child {
    width: 88px;
    text-align: right;
}

.nwl-sidecart__products td {
    padding: 14px 8px 14px 0;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
}

.nwl-sidecart__products td:last-child { padding-right: 0; }

.nwl-sidecart__product-image img {
    display: block;
    width: 70px;
    max-width: 70px;
    height: auto;
}

.nwl-sidecart__product-title {
    line-height: 1.35;
}

.nwl-sidecart__product-title a {
    font-weight: 600;
}

.nwl-sidecart__product-quantity {
    white-space: nowrap;
}

.nwl-sidecart__product-price {
    font-weight: 600;
    white-space: nowrap;
}

.nwl-sidecart__remove {
    display: inline-block;
    margin-top: 7px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit;
    font-size: .82rem;
    text-decoration: underline;
}

@media (max-width: 420px) {
    .nwl-sidecart__products th:first-child,
    .nwl-sidecart__products td:first-child { width: 66px; }
    .nwl-sidecart__products th:last-child,
    .nwl-sidecart__products td:last-child { width: 74px; }
    .nwl-sidecart__product-image img { width: 56px; max-width: 56px; }
}

/* V1.0.9: keinerlei Spaltenüberschriften im Sidecart anzeigen. */
.nwl-sidecart__products thead,
.nwl-sidecart__products th,
.nwl-sidecart__cart-form thead {
    display: none !important;
}


/* V1.0.10: Fallback für abweichende NOVA-Warenkorbstrukturen. */
.nwl-sidecart__content thead,
.nwl-sidecart__content th,
.nwl-sidecart__content .quantity-col-title,
.nwl-sidecart__content .unit-price-col-title,
.nwl-sidecart__content [data-label="Anzahl"]::before,
.nwl-sidecart__content [data-label="Stückpreis"]::before,
.nwl-sidecart__content [data-label="Stueckpreis"]::before {
    display: none !important;
    content: none !important;
}


/* V1.0.11: feste Dreispalten-Ausgabe ohne horizontales Scrollen. */
.nwl-sidecart__content {
    overflow-x: hidden;
}
.nwl-sidecart__products {
    max-width: 100%;
}
.nwl-sidecart__products td {
    box-sizing: border-box;
}
.nwl-sidecart__product-name {
    width: auto;
    overflow-wrap: anywhere;
    word-break: normal;
}
.nwl-sidecart__product-title a {
    font-weight: 400;
}

/* V1.0.12: geklonte Lazy-Loading-Produktbilder im Sidecart sichtbar halten. */
.nwl-sidecart__product-image picture,
.nwl-sidecart__product-image a,
.nwl-sidecart__product-image img { display: block !important; visibility: visible !important; opacity: 1 !important; }

/* V1.0.14: Produktbild als frisches IMG statt geklonter Lazy-Loading-Struktur. */
.nwl-sidecart__product-image {
    width: 82px;
    min-width: 82px;
}
.nwl-sidecart__product-image a,
.nwl-sidecart__product-image img {
    display: block !important;
}
.nwl-sidecart__product-image img {
    width: 70px !important;
    max-width: 70px !important;
    height: auto !important;
    object-fit: contain;
}

.nwl-sidecart__cross-selling {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e7e7e7;
}

.nwl-sidecart__cross-selling-title {
    margin: 0 0 .75rem;
    font-size: 1rem;
    font-weight: 600;
}

.nwl-sidecart__cross-selling-list {
    display: grid;
    gap: .65rem;
}

.nwl-sidecart__cross-selling-item {
    position: relative;
    border: 1px solid #e8e8e8;
    border-radius: .35rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.nwl-sidecart__cross-selling-link {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
    min-height: 76px;
    padding: .55rem 3.3rem .55rem .55rem;
    color: inherit;
    text-decoration: none;
}

.nwl-sidecart__cross-selling-item:hover,
.nwl-sidecart__cross-selling-item:focus-within {
    border-color: #b9b9b9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.nwl-sidecart__cross-selling-link:hover,
.nwl-sidecart__cross-selling-link:focus {
    color: inherit;
    text-decoration: none;
}

.nwl-sidecart__cross-selling-link img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.nwl-sidecart__cross-selling-add {
    position: absolute;
    top: 50%;
    right: .65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e47722;
    color: #fff;
    transform: translateY(-50%);
    cursor: pointer;
}

.nwl-sidecart__cross-selling-add:hover,
.nwl-sidecart__cross-selling-add:focus {
    background: #bd5d14;
}

.nwl-sidecart__cross-selling-add:disabled {
    cursor: wait;
    opacity: .65;
}

.nwl-sidecart__cross-selling-add svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nwl-sidecart__cross-selling-add.is-loading svg {
    animation: nwl-sidecart-spin .8s linear infinite;
}

.nwl-sidecart__cross-selling-details,
.nwl-sidecart__cross-selling-name,
.nwl-sidecart__cross-selling-price {
    display: block;
}

.nwl-sidecart__cross-selling-name {
    overflow-wrap: anywhere;
    font-size: .88rem;
    line-height: 1.3;
}

.nwl-sidecart__cross-selling-price {
    margin-top: .25rem;
    font-size: .88rem;
}

@keyframes nwl-sidecart-spin {
    to { transform: rotate(360deg); }
}
