/* ═══════════════════════════════════════════════════════════
   BBF Ajaxcart – Frontend Styles  (Off-Canvas Standard-Design)
   Variablen werden serverseitig pro Shop gesetzt (SmartyOutputFilter:
   --bbf-sc-accent / -width / -radius / -anim / -hidden-x + Seite + Schatten).
   Die Fallbacks hier sorgen fuer einen sauberen, modernen Default.
   Das Panel enhanced NOVAs vorhandenen Mini-Warenkorb (.cart-dropdown) –
   reine CSS/JS-Veredelung, kein eigenes Template (render-sicher).
   ═══════════════════════════════════════════════════════════ */

.bbf-sidebasket-container {
    --bbf-sc-accent: #01687a;
    --bbf-sc-accent-contrast: #ffffff;
    --bbf-sc-width: 400px;
    --bbf-sc-radius: 0px;          /* Panel-Ecken (Off-Canvas: 0 = bündig, korrekt) */
    --bbf-sc-radius-ui: 12px;      /* Buttons / Thumbnails / Pills (immer modern) */
    --bbf-sc-anim: 0.34s;
    --bbf-sc-hidden-x: 100%;       /* Slide-Richtung: 100% = rechts, -100% = links */
    --bbf-sc-surface: #ffffff;
    --bbf-sc-surface-soft: #f6f7f9;
    --bbf-sc-text: #1b2733;
    --bbf-sc-text-soft: #6b7686;
    --bbf-sc-border: #e8ebef;
    --bbf-sc-shadow: -10px 0 44px rgba(17, 24, 39, 0.16);
}

/* ─── Produktlisten-Integration (unabhängig vom Panel) ─── */

.item-list-basket-details {
    margin-top: 0 !important;
}

.form-row .quantity,
.form-row .bbf-quantity {
    padding: 7px;
}

.form-basket {
    margin-top: -15px;
}

/* ═══════════════════════════════════════════════════════════
   Off-Canvas Panel
   ═══════════════════════════════════════════════════════════ */

.bbf-sidebasket-container {
    /* Verankerung als bildschirmhohes Panel. Seite (right/left:0) + Schatten
       setzt der Scoped-Style (!important), damit die Backend-Position greift. */
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    right: 0;
    left: auto;
    width: 100%;
    max-width: var(--bbf-sc-width, 400px);
    /* !important: Themes setzen auf Header-Dropdowns eigene z-indizes (z. B.
       1021) — das Panel muss aber garantiert ueber dem Backdrop (1045)
       liegen, sonst faengt der alle Panel-Klicks ab. */
    z-index: 1050 !important;
    /* Immer gerendert (display:flex), damit Ein- UND Ausfahrt animieren.
       Bootstraps dropdown-menu{display:none} wird hier bewusst überstimmt;
       sichtbar wird das Panel allein über .show (Transform/Visibility). */
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    background: var(--bbf-sc-surface);
    color: var(--bbf-sc-text);
    box-shadow: var(--bbf-sc-shadow);
    border: 0;
    border-radius: 0;
    /* Verborgen: off-canvas geschoben, nicht klickbar. */
    transform: translateX(var(--bbf-sc-hidden-x, 100%)) !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        transform var(--bbf-sc-anim, 0.34s) cubic-bezier(0.4, 0, 0.2, 1),
        opacity calc(var(--bbf-sc-anim, 0.34s) * 0.85) ease,
        visibility 0s linear var(--bbf-sc-anim, 0.34s);
    will-change: transform;
    contain: layout style;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
    line-height: 1.45;
}

.bbf-sidebasket-container.show {
    transform: translateX(0) !important;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition:
        transform var(--bbf-sc-anim, 0.34s) cubic-bezier(0.4, 0, 0.2, 1),
        opacity calc(var(--bbf-sc-anim, 0.34s) * 0.85) ease,
        visibility 0s;
}

/* Header (Theme-Navi) unter dem Panel/Backdrop halten. */
header#jtl-nav-wrapper {
    z-index: 1021;
}

/* ─── Backdrop ─── */

.bbf-sidecart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1045;
    border: 0;
    background: rgba(15, 23, 42, 0.46);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bbf-sidecart-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Hintergrund nicht mitscrollen, wenn das Panel offen ist. */
body.bbf-sc-noscroll {
    overflow: hidden;
}

/* ─── Header (per JS injiziert: Titel · Anzahl · Schließen) ─── */

.bbf-sidebasket-container .bbf-sidecart-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bbf-sc-surface);
    border-bottom: 1px solid var(--bbf-sc-border);
}

.bbf-sidebasket-container .bbf-sidecart-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--bbf-sc-text);
}

.bbf-sidebasket-container .bbf-sidecart-count {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: var(--bbf-sc-accent);
    background: var(--bbf-sc-surface-soft);
    background: color-mix(in srgb, var(--bbf-sc-accent) 13%, transparent);
    padding: 4px 9px;
    border-radius: 999px;
    min-width: 22px;
    text-align: center;
}

.bbf-sidebasket-container .bbf-sidecart-count:empty {
    display: none;
}

/* ─── Schließen-Button ─── */

.bbf-sidebasket-container .bbf-sidecart-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bbf-sc-text-soft);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.bbf-sidebasket-container .bbf-sidecart-close:hover {
    background: var(--bbf-sc-surface-soft);
    color: var(--bbf-sc-text);
}

.bbf-sidebasket-container .bbf-sidecart-close:focus-visible {
    outline: 2px solid var(--bbf-sc-accent);
    outline-offset: 2px;
}

.bbf-sidebasket-container .bbf-sidecart-close svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ─── Item-Liste (scrollbarer Body) ─── */

.bbf-sidebasket-container .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 20px;
    overscroll-behavior: contain;
}

.bbf-sidebasket-container .dropdown-cart-items {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

/* sr-only Kopf bleibt unsichtbar (NOVA-Default beibehalten). */
.bbf-sidebasket-container .dropdown-cart-items > tbody > tr > td {
    padding: 16px 0;
    border: 0;
    border-top: 1px solid var(--bbf-sc-border);
    vertical-align: top;
    background: transparent;
}

.bbf-sidebasket-container .dropdown-cart-items > tbody > tr:first-child > td {
    border-top: 0;
}

/* Preis-Spalte */
.bbf-sidebasket-container .dropdown-cart-items td.text-right-util {
    text-align: right;
    white-space: nowrap;
    padding-left: 10px;
    font-weight: 700;
    color: var(--bbf-sc-text);
    font-variant-numeric: tabular-nums;
}

/* Item-Zelle: Bild · Menge · Name nebeneinander */
.bbf-sidebasket-container .dropdown-cart-items .form-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.bbf-sidebasket-container .dropdown-cart-items .form-row > [class*="col"] {
    padding: 0;
    flex: 0 0 auto;
    max-width: none;
}

/* Bild */
.bbf-sidebasket-container .dropdown-cart-items .form-row > div:first-child a {
    display: block;
    line-height: 0;
}

.bbf-sidebasket-container .img-sm,
.bbf-sidebasket-container .dropdown-cart-items img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--bbf-sc-border);
    border-radius: var(--bbf-sc-radius-ui, 12px);
    padding: 4px;
}

/* Mengen-Badge ("2x") */
.bbf-sidebasket-container .dropdown-cart-items .form-row > div:nth-child(2) {
    align-self: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: var(--bbf-sc-accent);
    background: var(--bbf-sc-surface-soft);
    background: color-mix(in srgb, var(--bbf-sc-accent) 12%, transparent);
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Name (nimmt den Rest) */
.bbf-sidebasket-container .dropdown-cart-items .form-row > .col,
.bbf-sidebasket-container .dropdown-cart-items .form-row > div:last-child {
    flex: 1 1 auto;
    min-width: 0;
}

.bbf-sidebasket-container .dropdown-cart-items .form-row > .col a,
.bbf-sidebasket-container .dropdown-cart-items .form-row > div:last-child a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--bbf-sc-text);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bbf-sidebasket-container .dropdown-cart-items .form-row > .col a:hover,
.bbf-sidebasket-container .dropdown-cart-items .form-row > div:last-child a:hover {
    color: var(--bbf-sc-accent);
}

.bbf-sidebasket-container .item-overflow-notice {
    font-size: 12.5px;
    color: var(--bbf-sc-text-soft);
    padding: 6px 0;
}

/* ─── Footer (Summen, Buttons, Versandhinweis) ─── */

.bbf-sidebasket-container .dropdown-body {
    flex: 0 0 auto;
    padding: 16px 20px 20px;
    background: var(--bbf-sc-surface-soft);
    border-top: 1px solid var(--bbf-sc-border);
}

.bbf-sidebasket-container .dropdown-body .list-unstyled {
    margin: 0;
    padding: 0;
}

.bbf-sidebasket-container .cart-dropdown-total-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--bbf-sc-text-soft);
}

.bbf-sidebasket-container .cart-dropdown-total-item-price {
    font-weight: 600;
    color: var(--bbf-sc-text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bbf-sidebasket-container .font-weight-bold-util {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 8px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--bbf-sc-border);
    font-size: 16px;
    font-weight: 700;
    color: var(--bbf-sc-text);
}

.bbf-sidebasket-container .font-weight-bold-util .cart-dropdown-total-item-price {
    font-size: 19px;
    color: var(--bbf-sc-accent);
}

/* Buttons: full-width gestapelt, Kasse = Akzent-CTA */
.bbf-sidebasket-container .cart-dropdown-buttons {
    margin: 16px 0 0;
    row-gap: 10px;
}

.bbf-sidebasket-container .cart-dropdown-buttons > [class*="col"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.bbf-sidebasket-container .cart-dropdown-buttons .btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    padding: 13px 16px;
    border-radius: var(--bbf-sc-radius-ui, 12px);
    border: 2px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.bbf-sidebasket-container .cart-dropdown-buttons .btn:focus-visible {
    outline: 2px solid var(--bbf-sc-accent);
    outline-offset: 2px;
}

/* Primärer CTA = „Zur Kasse" (NOVA: .cart-dropdown-next) */
.bbf-sidebasket-container .cart-dropdown-buttons .cart-dropdown-next.btn,
.bbf-sidebasket-container .cart-dropdown-buttons .btn.btn-primary {
    background: var(--bbf-sc-accent);
    border-color: var(--bbf-sc-accent);
    color: var(--bbf-sc-accent-contrast);
}

.bbf-sidebasket-container .cart-dropdown-buttons .cart-dropdown-next.btn:hover,
.bbf-sidebasket-container .cart-dropdown-buttons .btn.btn-primary:hover {
    filter: brightness(0.93);
    color: var(--bbf-sc-accent-contrast);
}

/* Sekundär = „Warenkorb" (NOVA: btn-primary, aber NICHT .cart-dropdown-next) */
.bbf-sidebasket-container .cart-dropdown-buttons .btn.btn-primary:not(.cart-dropdown-next),
.bbf-sidebasket-container .cart-dropdown-buttons .btn.btn-outline-primary:not(.cart-dropdown-next) {
    background: transparent;
    border-color: var(--bbf-sc-border);
    color: var(--bbf-sc-text);
    filter: none;
}

.bbf-sidebasket-container .cart-dropdown-buttons .btn.btn-primary:not(.cart-dropdown-next):hover,
.bbf-sidebasket-container .cart-dropdown-buttons .btn.btn-outline-primary:not(.cart-dropdown-next):hover {
    border-color: var(--bbf-sc-accent);
    color: var(--bbf-sc-accent);
    background: transparent;
}

/* Versand-/Versandkostenfrei-Hinweis */
.bbf-sidebasket-container .dropdown-body hr {
    margin: 14px 0;
    border: 0;
    border-top: 1px solid var(--bbf-sc-border);
    opacity: 1;
}

.bbf-sidebasket-container .cart-dropdown-shipping-notice {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--bbf-sc-text-soft);
}

.bbf-sidebasket-container .cart-dropdown-shipping-notice .font-weight-bold {
    color: var(--bbf-sc-text);
    margin-bottom: 2px;
}

/* ─── Leerer Warenkorb ─── */

.bbf-sidebasket-container .cart-dropdown-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 56px 28px;
    text-align: center;
    color: var(--bbf-sc-text-soft);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.bbf-sidebasket-container .cart-dropdown-empty::before {
    content: "";
    width: 64px;
    height: 64px;
    opacity: 0.55;
    background: center / contain no-repeat
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h2l2.4 12.3a1.5 1.5 0 0 0 1.5 1.2h8.7a1.5 1.5 0 0 0 1.5-1.2L22 7H6'/%3E%3Ccircle cx='10' cy='20' r='1.3'/%3E%3Ccircle cx='18' cy='20' r='1.3'/%3E%3C/svg%3E");
}

/* ─── Ladeindikator (Panel-weit, auch auf NOVA) ─── */

.bbf-sidebasket-container .bbf-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}

.bbf-loader::after {
    content: "";
    width: 38px;
    height: 38px;
    border: 3px solid var(--bbf-sc-border);
    border-top-color: var(--bbf-sc-accent);
    border-radius: 50%;
    animation: bbf-spin 0.6s linear infinite;
}

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

/* ─── Erweiterungs-Slots (Fremdplugin-Inhalte: Tickets/Verleih/Cross-Selling) ─── */

.bbf-sidecart-slot:empty {
    display: none;
}

.bbf-sidecart-slot {
    padding: 0 20px;
}

.bbf-sidecart-slot[data-bbf-slot="top"] {
    margin: 8px 0;
}

.bbf-sidecart-slot[data-bbf-slot="bottom"] {
    margin-top: 10px;
}

/* ─── Kompatibilität: Miet-/Dummy-Artikel (Mengen gesperrt) ─── */

.qty-wrapper.bbf-rental-qty {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.bbf-rental-qty-value {
    font-weight: 700;
    color: var(--bbf-sc-text);
}

.bbf-rental-note {
    color: var(--bbf-sc-text-soft);
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */

/* Mobil: Vollbreite (mit kleiner Luft zur Gegenseite auf größeren Phones). */
@media (max-width: 576px) {
    .bbf-sidebasket-container {
        max-width: 100%;
    }

    .bbf-sidebasket-container .bbf-sidecart-head,
    .bbf-sidebasket-container .table-responsive,
    .bbf-sidebasket-container .dropdown-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Tablet: angenehme, nicht zu breite Spalte. */
@media (min-width: 577px) and (max-width: 992px) {
    .bbf-sidebasket-container {
        max-width: min(var(--bbf-sc-width, 400px), 420px);
    }
}

/* ═══════════════════════════════════════════════════════════
   Barrierefreiheit / Reduced Motion
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .bbf-sidebasket-container,
    .bbf-sidecart-backdrop,
    .bbf-sidebasket-container .bbf-sidecart-close,
    .bbf-sidebasket-container .cart-dropdown-buttons .btn {
        transition: none !important;
    }

    .bbf-loader::after {
        animation: none;
    }
}

/* ─── Inline-Bedienelemente: Mengen-Stepper, gesperrte Menge, Loeschen ─── */

/* Qty-Spalte mit Stepper: Pillen-Optik der "2x"-Badge zuruecknehmen */
.bbf-sidebasket-container .dropdown-cart-items .form-row > .bbf-qtycol-edit {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Mengen-Stepper: kompaktes - [Zahl] + */
.bbf-sidebasket-container .bbf-qty {
    display: inline-flex;
    align-items: stretch;
    height: 30px;
    border: 1px solid var(--bbf-sc-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.bbf-sidebasket-container .bbf-qm,
.bbf-sidebasket-container .bbf-qp {
    width: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bbf-sc-accent);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease;
}

.bbf-sidebasket-container .bbf-qm:hover,
.bbf-sidebasket-container .bbf-qp:hover {
    background: color-mix(in srgb, var(--bbf-sc-accent) 14%, transparent);
}

.bbf-sidebasket-container .bbf-qm:focus-visible,
.bbf-sidebasket-container .bbf-qp:focus-visible {
    outline: 2px solid var(--bbf-sc-accent);
    outline-offset: -2px;
}

.bbf-sidebasket-container .bbf-qi {
    width: 36px;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--bbf-sc-border);
    border-right: 1px solid var(--bbf-sc-border);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--bbf-sc-text);
    background: #fff;
    -moz-appearance: textfield;
    font-variant-numeric: tabular-nums;
}

.bbf-sidebasket-container .bbf-qi::-webkit-outer-spin-button,
.bbf-sidebasket-container .bbf-qi::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Gesperrte Menge (Tickets): Badge-Optik wie der Standard */
.bbf-sidebasket-container .bbf-qty-locked {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--bbf-sc-accent);
    background: color-mix(in srgb, var(--bbf-sc-accent) 12%, transparent);
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Loeschen-Button (in der Preis-Zelle, neben dem Preis) */
.bbf-sidebasket-container .bbf-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    vertical-align: middle;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9aa3ab;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease;
}

.bbf-sidebasket-container .bbf-del:hover {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.1);
}

.bbf-sidebasket-container .bbf-del:focus-visible {
    outline: 2px solid var(--bbf-sc-accent);
    outline-offset: 0;
}

/* ─── Coupon-Eingabe im Panel-Footer ─── */
.bbf-sidebasket-container .bbf-coupon-wrap {
    margin: 4px 0 12px;
}

.bbf-sidebasket-container .bbf-coupon {
    display: flex;
    gap: 8px;
    margin: 0;
}

.bbf-sidebasket-container .bbf-coupon-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--bbf-sc-border);
    border-radius: 10px;
    background: #fff;
    color: var(--bbf-sc-text);
    font-size: 13px;
}

.bbf-sidebasket-container .bbf-coupon-input:focus {
    outline: none;
    border-color: var(--bbf-sc-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bbf-sc-accent) 18%, transparent);
}

.bbf-sidebasket-container .bbf-coupon-btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--bbf-sc-accent);
    border-radius: 10px;
    background: transparent;
    color: var(--bbf-sc-accent);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.bbf-sidebasket-container .bbf-coupon-btn:hover {
    background: var(--bbf-sc-accent);
    color: #fff;
}

.bbf-sidebasket-container .bbf-coupon-btn:focus-visible {
    outline: 2px solid var(--bbf-sc-accent);
    outline-offset: 2px;
}

.bbf-sidebasket-container .bbf-coupon-msg {
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 8px;
}

.bbf-sidebasket-container .bbf-coupon-msg.is-ok {
    color: #1b7a43;
    background: rgba(27, 122, 67, 0.1);
}

.bbf-sidebasket-container .bbf-coupon-msg.is-error {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.1);
}

/* ─── Settings: Bilder / Header-Summe ausblenden ─── */
.cart-icon-dropdown.bbf-hide-total .cart-icon-dropdown-price {
    display: none !important;
}

.cart-icon-dropdown.bbf-hide-images .dropdown-cart-items .form-row > div:first-child {
    display: none !important;
}

/* ─── Off-Canvas: Konto / Merkzettel / Vergleich (Phase B/C/D) ─── */
.bbf-simple-panel .dropdown-body {
    padding: 18px 18px 24px;
    overflow-y: auto;
    flex: 1 1 auto;
    display: block;
}

/* Vergleichs-/Merkzettel-Tabellen im schmalen Panel: horizontal scrollbar statt Überlauf */
.bbf-simple-panel .table-responsive {
    overflow-x: auto;
    max-width: 100%;
}

.bbf-simple-panel img {
    max-width: 100%;
    height: auto;
}

.bbf-account-panel .form-group {
    margin-bottom: 14px;
}

.bbf-account-panel label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bbf-sc-text);
    margin-bottom: 4px;
    display: block;
}

.bbf-account-panel .form-control,
.bbf-account-panel input[type="text"],
.bbf-account-panel input[type="email"],
.bbf-account-panel input[type="password"] {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--bbf-sc-border);
    background: #fff;
    color: var(--bbf-sc-text);
    font-size: 14px;
    padding: 0 12px;
}

.bbf-account-panel .form-control:focus,
.bbf-account-panel input:focus {
    outline: none;
    border-color: var(--bbf-sc-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bbf-sc-accent) 18%, transparent);
}

.bbf-account-panel .btn {
    border-radius: 10px;
    min-height: 44px;
    font-weight: 700;
}

.bbf-account-panel .btn-primary {
    background: var(--bbf-sc-accent);
    border-color: var(--bbf-sc-accent);
    color: #fff;
}

.bbf-account-panel .btn-primary:hover {
    filter: brightness(0.95);
}

.bbf-account-panel a {
    color: var(--bbf-sc-accent);
}

.bbf-account-panel .custom-control,
.bbf-account-panel .form-check {
    margin: 6px 0;
}

/* ═══════════════════════════════════════════════════════════
   Markup-Variante: eigenes Cart-Template (form#bbd-ajax-cart-form)
   Manche Shops rendern im Header-Mini-Warenkorb statt NOVAs Standard-Markup
   ein (älteres) Plugin-/Theme-Template mit verschachtelten col-3/col-9-Reihen,
   eigenem Mengen-Stepper und Löschen-Spalte. Die generischen Regeln oben
   (Mengen-Badge-Pille auf nth-child(2) inkl. white-space:nowrap, max-width:none
   auf allen col-Spalten) passen dort nicht — die Zeilen liefen rechts aus dem
   Panel. Die ID-Selektoren hier gewinnen gegen alle Klassenregeln oben.
   ═══════════════════════════════════════════════════════════ */

/* Formular als Flex-Spalte, damit die Item-Liste scrollt und Summen/Buttons
   unten bleiben (die Flex-Regeln oben zielen auf direkte Panel-Kinder). */
.bbf-sidebasket-container #bbd-ajax-cart-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
}

.bbf-sidebasket-container #bbd-ajax-cart-form .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* NOVAs unsichtbaren Fake-Submit (Enter-Catcher) im Panel nie anzeigen —
   der Panel-Submit wird ohnehin per JS abgefangen. */
.bbf-sidebasket-container #bbd-ajax-cart-form .btn-hidden {
    display: none !important;
}

/* Grid-Spalten wiederherstellen: Pillen-Optik/nowrap/Content-Sizing der
   generischen Regeln zurücknehmen, damit nichts über den Panelrand läuft. */
.bbf-sidebasket-container #bbd-ajax-cart-form .dropdown-cart-items .form-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.bbf-sidebasket-container #bbd-ajax-cart-form .dropdown-cart-items .form-row > [class*="col"] {
    flex: 1 1 auto;
    /* width:auto ist Pflicht: Bootstraps .col-*{width:100%} wirkt bei
       flex-basis:auto als Basis -> nicht schrumpfende Spalten (Preis/Löschen,
       flex:0 0 auto) würden zeilenbreit und quetschen die Nachbarspalte
       (Menge/Titel) unsichtbar auf 0. */
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    white-space: normal;
}

/* Bildspalte (äußere Reihe): nur so breit wie das Thumbnail. Der Deckel ist
   Pflicht: Themes setzen teils img{width:100%} auf Mini-Cart-Bilder (gleiche
   Spezifität wie die generische 58px-Regel oben, aber später geladen) — ohne
   Deckel frisst die Spalte (flex-basis:auto + intrinsische Bildbreite) die
   ganze Zeile und die Titelspalte kollabiert auf 0. */
.bbf-sidebasket-container #bbd-ajax-cart-form .dropdown-cart-items td > .form-row > [class*="col"]:first-child {
    flex: 0 0 auto;
    max-width: 74px;
}

.bbf-sidebasket-container #bbd-ajax-cart-form .dropdown-cart-items img,
.bbf-sidebasket-container #bbd-ajax-cart-form .dropdown-cart-items .img-sm {
    width: 58px;
    height: 58px;
}

/* Abstand zwischen Titel-/Löschen-Reihe und Menge-/Preis-Reihe. */
.bbf-sidebasket-container #bbd-ajax-cart-form .dropdown-cart-items td > .form-row > [class*="col"]:last-child > .form-row + .form-row {
    margin-top: 8px;
}

/* Titel: 2 Zeilen, dann Ellipsis (wie im Standard-Markup). */
.bbf-sidebasket-container #bbd-ajax-cart-form .bbf-cart-items a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--bbf-sc-text);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

.bbf-sidebasket-container #bbd-ajax-cart-form .bbf-cart-items a:hover {
    color: var(--bbf-sc-accent);
}

.bbf-sidebasket-container #bbd-ajax-cart-form .bbf-cart-items .shortdescription:empty {
    display: none;
}

/* Löschen-Spalte: rechtsbündig, nur Inhaltsbreite. */
.bbf-sidebasket-container #bbd-ajax-cart-form .cart-del-col {
    flex: 0 0 auto;
    text-align: right;
}

/* Preisspalte (hier ein div, kein td): rechtsbündig, nicht umbrechend. */
.bbf-sidebasket-container #bbd-ajax-cart-form .dropdown-cart-items .form-row > .text-right-util {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    color: var(--bbf-sc-text);
    font-variant-numeric: tabular-nums;
}

/* Fallback, falls der Template-Stepper stehen bleibt (JS ersetzt ihn sonst
   durch den eigenen): niemals breiter als die Spalte. */
.bbf-sidebasket-container #bbd-ajax-cart-form .qty-wrapper {
    max-width: 150px;
    margin: 0;
}

/* Template-Kopf „Weiter einkaufen" dezent unter dem injizierten Panel-Kopf. */
.bbf-sidebasket-container .bbf-sidecart-header {
    flex: 0 0 auto;
    padding: 10px 20px;
    border-bottom: 1px solid var(--bbf-sc-border);
    font-size: 13px;
}

.bbf-sidebasket-container .bbf-sidecart-header .row {
    margin: 0;
}

.bbf-sidebasket-container .bbf-sidecart-header [class*="col"] {
    padding: 0;
}

.bbf-sidebasket-container .bbf-sidecart-header a {
    color: var(--bbf-sc-text-soft);
    text-decoration: none;
}

.bbf-sidebasket-container .bbf-sidecart-header a:hover {
    color: var(--bbf-sc-accent);
}

/* Template-Footer (Buttons außerhalb des dropdown-body). */
.bbf-sidebasket-container .bbf-sidecart-footer {
    flex: 0 0 auto;
    padding: 0 20px 20px;
    background: var(--bbf-sc-surface-soft);
}

.bbf-sidebasket-container .bbf-sidecart-footer .cart-dropdown-buttons {
    margin: 0;
    row-gap: 10px;
}
