/* =========================================
   BD CART — Warenkorb Layout
   - Hero (Title + "weiter einkaufen")
   - Hinweis-Bar (dunkler Brown-Background)
   - 2-Spalten: Items (Tabelle) + Bestellübersicht
   - CTA "Begleitfarbe"
   - Empty-State
   ========================================= */


/* ─────────────────────────────────────────
   0. WC-DEFAULT-LAYOUT NEUTRALISIEREN
   - .cart-collaterals { float: right; width: 48% }
   - .cart_totals      { float: right; width: 48% }
   - WC stylet diese mit float-Layout aus woocommerce.css.
     Wir wollen Grid → diese Defaults müssen weg.
   ───────────────────────────────────────── */
.bd-cart .cart-collaterals,
.bd-cart .bd-cart__summary,
.woocommerce .bd-cart .cart-collaterals,
.woocommerce-page .bd-cart .cart-collaterals {
    float: none !important;
    width: auto !important;
}

.bd-cart .bd-summary,
.bd-cart .cart_totals,
.woocommerce .bd-cart .cart_totals,
.woocommerce-page .bd-cart .cart_totals {
    float: none !important;
    width: 100% !important;
}

.bd-cart .woocommerce-cart-form {
    width: 100%;
}


/* ─────────────────────────────────────────
   1. WRAPPER & HERO
   ───────────────────────────────────────── */
.bd-cart {
    margin-block: var(--space-xl) var(--space-3xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Breadcrumbs konsistent mit den anderen Pages */
.bd-cart .woocommerce-breadcrumb {
    color: var(--color-muted);
    font-size: var(--text-sm);
    margin: 0;
}

.bd-cart .woocommerce-breadcrumb a {
    color: var(--color-muted);
    text-decoration: none;
}

.bd-cart .woocommerce-breadcrumb a:hover {
    color: var(--color-heading);
    opacity: 1;
}

.bd-cart__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.bd-cart__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-h1);
    color: var(--color-heading);
    margin: 0 0 var(--space-xs);
}

.bd-cart__title em {
    font-style: italic;
    font-weight: var(--weight-bold);
}

.bd-cart__subline {
    color: var(--color-muted);
    font-size: var(--text-sm);
    margin: 0;
}

.bd-cart__continue-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: var(--transition);
    padding-bottom: var(--space-xs);
}

.bd-cart__continue-top:hover {
    color: var(--color-heading);
    opacity: 1;
}


/* ─────────────────────────────────────────
   2. HINWEIS-BAR (dunkel, Brown-Background)
   ───────────────────────────────────────── */
.bd-cart__hint {
    background: var(--color-heading);
    color: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.bd-cart__hint-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bd-cart__hint-body {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.bd-cart__hint-body strong {
    color: var(--color-bg);
    font-weight: var(--weight-semibold);
    margin-right: 0.4rem;
}


/* ─────────────────────────────────────────
   3. LAYOUT — Items + Summary
   ───────────────────────────────────────── */
.bd-cart__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: start;
}

@media (min-width: 1024px) {
    .bd-cart__layout {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
        gap: var(--space-2xl);
    }
}


/* ─────────────────────────────────────────
   4. ITEMS — Tabelle / Liste
   ───────────────────────────────────────── */
.bd-cart__items-wrap {
    margin: 0;
    min-width: 0;
}

.bd-cart__items {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.bd-cart__items-head {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    font-weight: var(--weight-semibold);
    color: var(--color-muted);
}

@media (min-width: 768px) {
    .bd-cart__items-head {
        grid-template-columns: 88px 1fr 140px;
        gap: var(--space-md);
    }
    .bd-cart__items-head > span:nth-child(2) { padding-left: 0; }
    .bd-cart__items-head > span:last-child   { text-align: right; }
}

.bd-cart__list {
    list-style: none;
    margin: 0;
    padding: 0;
}


/* ─── Cart-Item ──────────────────────────── */
.bd-cart-item {
    list-style: none;
    display: grid;
    grid-template-columns: 88px 1fr;
    grid-template-areas:
        "image details"
        "image total";
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .bd-cart-item {
        grid-template-columns: 88px 1fr 140px;
        grid-template-areas: "image details total";
        align-items: center;
    }
}

.bd-cart-item:last-child {
    border-bottom: none;
}

.bd-cart-item__image {
    grid-area: image;
    width: 88px;
    height: 88px;
    border-radius: var(--radius-base);
    overflow: hidden;
    background: var(--color-bg-light);
}

.bd-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bd-cart-item__details {
    grid-area: details;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bd-cart-item__head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* h2 semantisch, optisch wie ein Body-Bold (kein Heading-Styling
   aus basics.css greift dadurch nicht zu hart) */
.bd-cart-item__name,
h2.bd-cart-item__name {
    font-family: var(--font-heading);
    font-size: var(--text-body);
    font-weight: var(--weight-bold);
    color: var(--color-heading);
    margin: 0;
    line-height: var(--leading-tight);
    letter-spacing: 0;
}

.bd-cart-item__name a {
    color: inherit;
    text-decoration: none;
}

.bd-cart-item__name a:hover {
    color: var(--color-primary);
    opacity: 1;
}

.bd-cart-item__variation {
    font-style: italic;
    color: var(--color-muted);
    font-size: var(--text-sm);
}

.bd-cart-item__specs {
    color: var(--color-muted);
    font-size: var(--text-sm);
    margin: 0;
}

.bd-cart-item__configuration {
    display: grid;
    gap: 0.2rem;
    margin: 0.2rem 0 0;
    color: var(--color-muted);
    font-size: var(--text-sm);
}

.bd-cart-item__configuration > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.bd-cart-item__configuration dt {
    font-weight: var(--weight-semibold);
    color: var(--color-heading);
}

.bd-cart-item__configuration dt::after {
    content: ':';
}

.bd-cart-item__configuration dd {
    margin: 0;
}

/* Pills */
.bd-cart-item__pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: 2px;
}

.bd-cart-item__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    line-height: 1;
    letter-spacing: var(--tracking-wide);
}

.bd-cart-item__pill--brand {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
    font-style: italic;
}

.bd-cart-item__pill--warn {
    background: color-mix(in srgb, var(--color-error) 10%, transparent);
    color: var(--color-error);
}

/* Controls (Qty + Entfernen) */
.bd-cart-item__controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xs);
}

/* Wrapper um WC's .quantity — der Stepper wird via JS injiziert
   und nutzt die globale .bd-qty-stepper-Komponente aus woocommerce.css */
.bd-qty {
    display: inline-flex;
    align-items: center;
}

.bd-qty .quantity { display: inline-flex; }

.bd-cart-item__remove {
    color: var(--color-muted);
    font-size: var(--text-sm);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.bd-cart-item__remove:hover {
    color: var(--color-error);
    opacity: 1;
}

/* Summe rechts */
.bd-cart-item__total {
    grid-area: total;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
    align-self: start;
}

@media (max-width: 767px) {
    .bd-cart-item__total {
        text-align: left;
        margin-top: var(--space-xs);
    }
}

.bd-cart-item__subtotal {
    font-family: var(--font-heading);
    font-size: var(--text-body);
    font-weight: var(--weight-bold);
    color: var(--color-heading);
}

/* Streichpreis bei Sale */
.bd-cart-item__regular {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-muted);
}

.bd-cart-item__regular del,
.bd-cart-item__regular del bdi,
.bd-cart-item__regular del .woocommerce-Price-amount {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    color: var(--color-muted);
    font-weight: var(--weight-regular);
}

.bd-cart-item__breakdown {
    font-size: var(--text-xs);
    color: var(--color-muted);
    font-style: italic;
}

/* Germanized-Grundpreis im Cart */
.bd-cart-item__unit {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-muted);
    font-style: italic;
    line-height: var(--leading-snug);
}

.bd-cart-item__unit .bd-price__suffix {
    margin: 0;
}

.bd-cart-item__unit .bd-price__unit {
    font-style: italic;
}

/* Falls die Spans im Suffix mit Bullet getrennt sind, kompakter setzen */
.bd-cart-item__unit > .bd-price__suffix > * + *::before {
    content: " ";
}


/* ─── Cart-Actions (Coupon + Update) ──── */
.bd-cart__actions {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-light);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
    justify-content: space-between;
}

.bd-cart__coupon {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
    min-width: 0;
}

.bd-cart__coupon-input {
    padding: 0.5rem var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    font-size: var(--text-sm);
    width: 180px;
    min-height: 44px;
    transition: var(--transition);
}

.bd-cart__coupon-input:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
    border-color: var(--input-border-focus);
}

.bd-cart__coupon-btn,
.bd-cart__update {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: var(--transition);
    cursor: pointer;
}

.bd-cart__update {
    margin-left: auto;
}

.bd-cart__coupon-btn:hover,
.bd-cart__update:hover {
    background: var(--color-heading);
    color: var(--color-bg);
    border-color: var(--color-heading);
}

@media (max-width: 767px) {
    .bd-cart__actions {
        padding: var(--space-md);
        flex-direction: column;
        align-items: stretch;
    }

    .bd-cart__coupon {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .bd-cart__coupon-input {
        width: 100%;
    }

    .bd-cart__update {
        width: 100%;
        margin-left: 0;
    }
}


/* ─────────────────────────────────────────
   5. SUMMARY (rechte Spalte)
   ───────────────────────────────────────── */
.bd-cart__summary {
    min-width: 0;
}

@media (min-width: 1024px) {
    .bd-cart__summary {
        position: sticky;
        top: calc(var(--header-height) + var(--space-md));
    }
}

.bd-summary {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.bd-summary__title {
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: var(--weight-bold);
    color: var(--color-heading);
    margin: 0 0 var(--space-xs);
    letter-spacing: var(--tracking-h3);
}

.bd-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-md);
    padding-block: var(--space-xs);
    color: var(--color-text);
}

.bd-summary__row > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bd-summary__label {
    color: var(--color-heading);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
}

.bd-summary__sub {
    font-size: var(--text-xs);
    color: var(--color-muted);
}

.bd-summary__shipping-choice {
    min-width: 0;
    margin: 0;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.bd-summary .bd-summary__shipping-methods {
    display: grid;
    gap: var(--space-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.bd-summary .bd-summary__shipping-methods li {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.bd-summary__shipping-methods input {
    flex: 0 0 auto;
    accent-color: var(--color-primary);
}

.bd-summary__shipping-methods label {
    min-width: 0;
    margin: 0;
    color: var(--color-text);
    font-size: var(--text-sm);
    cursor: pointer;
}

.bd-summary__value {
    font-weight: var(--weight-semibold);
    color: var(--color-heading);
    font-size: var(--text-body);
    white-space: nowrap;
}

.bd-summary__row--coupon {
    color: var(--color-success);
}

.bd-summary__row--coupon .bd-summary__label,
.bd-summary__row--coupon .bd-summary__value {
    color: var(--color-success);
}

.bd-summary__row--total {
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-xs);
    padding-top: var(--space-md);
}

.bd-summary__value--total {
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-h3);
}


/* Zur-Kasse-Button (WC rendert das im Hook) */
.bd-summary__actions {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.bd-summary__actions a.checkout-button,
.bd-summary__actions .checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-md) var(--space-xl);
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-radius: var(--radius-pill);
    font-family: var(--font-base);
    font-weight: var(--weight-semibold);
    font-size: var(--text-body);
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    width: 100%;
}

.bd-summary__actions a.checkout-button::after,
.bd-summary__actions .checkout-button::after {
    content: "→";
    font-family: inherit;
    margin-left: 0.2rem;
}

.bd-summary__actions a.checkout-button:hover,
.bd-summary__actions .checkout-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-primary);
    opacity: 1;
}

.bd-summary__continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-heading);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: var(--transition);
}

.bd-summary__continue:hover {
    border-color: var(--color-heading);
    background: var(--color-bg-light);
    opacity: 1;
}


/* Trust-Sektion */
.bd-summary__trust {
    border-top: 1px dashed var(--color-border);
    padding-top: var(--space-md);
    margin-top: var(--space-xs);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.bd-summary__trust-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-muted);
    font-weight: var(--weight-semibold);
}

.bd-summary__methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.bd-summary__methods li {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--color-bg-light);
    border-radius: var(--radius-base);
    padding: 0.4rem 0.7rem;
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-heading);
}

.bd-summary__methods li i {
    color: var(--color-primary);
}

.bd-summary__trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.bd-summary__trust-list li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text);
    font-size: var(--text-sm);
}

.bd-summary__trust-list li i {
    color: var(--color-muted);
    width: 1.2rem;
    text-align: center;
}


/* ─────────────────────────────────────────
   6. CTA „Begleitfarbe"
   ───────────────────────────────────────── */
.bd-cart__cta {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.bd-cart__cta-text {
    flex: 1;
    min-width: 280px;
}

/* Auch wenn das HTML ein <p> ist, soll's wie ein H3 wirken */
.bd-cart__cta-title,
p.bd-cart__cta-title {
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: var(--weight-bold);
    color: var(--color-heading);
    margin: 0 0 var(--space-xs);
    letter-spacing: var(--tracking-h3);
    line-height: var(--leading-tight);
}

.bd-cart__cta-title em {
    font-style: italic;
    font-weight: var(--weight-bold);
}

.bd-cart__cta-sub {
    color: var(--color-muted);
    font-size: var(--text-sm);
    font-style: italic;
    margin: 0;
}

.bd-cart__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-heading);
    color: var(--color-bg);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.bd-cart__cta-btn:hover {
    background: var(--color-primary);
    transform: translateY(-1px);
    opacity: 1;
}


/* ─────────────────────────────────────────
   7. EMPTY-STATE
   ───────────────────────────────────────── */
.bd-cart-empty {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.bd-cart-empty__icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--color-bg-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.bd-cart-empty__title {
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: var(--weight-bold);
    color: var(--color-heading);
    margin: 0;
}

.bd-cart-empty__text {
    color: var(--color-muted);
    max-width: 50ch;
    margin: 0;
    font-size: var(--text-sm);
}

.bd-cart-empty__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--space-md) var(--space-xl);
    background: var(--color-primary);
    color: var(--color-primary-text);
    border-radius: var(--radius-pill);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    transition: var(--transition);
    margin-top: var(--space-sm);
}

.bd-cart-empty__cta:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-primary);
    opacity: 1;
}

.bd-cart-empty__suggest {
    margin-top: var(--space-2xl);
}

.bd-cart-empty__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}


/* ─────────────────────────────────────────
   8. WC-NOTICES INNERHALB CART
   - Coupon-Erfolg / -Fehler, Stock-Hinweise, generelle WC-Meldungen
   - Visuell als Card mit Icon-Pill links
   ───────────────────────────────────────── */
.bd-cart__notices {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.bd-cart__notices:empty {
    display: none;
}

.bd-cart__notices .woocommerce-error,
.bd-cart__notices .woocommerce-info,
.bd-cart__notices .woocommerce-message,
.bd-cart .woocommerce-error,
.bd-cart .woocommerce-info,
.bd-cart .woocommerce-message {
    margin: 0;
    padding: var(--space-md) var(--space-lg) var(--space-md) calc(var(--space-lg) + 36px);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    color: var(--color-heading);
    font-size: var(--text-sm);
    list-style: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    line-height: var(--leading-relaxed);
}

/* WC rendert manchmal <ul.woocommerce-error> mit <li>-Inhalten */
.bd-cart__notices ul,
.bd-cart .woocommerce-error ul,
.bd-cart .woocommerce-info ul,
.bd-cart .woocommerce-message ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bd-cart__notices li,
.bd-cart .woocommerce-error li,
.bd-cart .woocommerce-info li,
.bd-cart .woocommerce-message li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Icon links als ::before — passt zum FA-Light-Pattern */
.bd-cart__notices .woocommerce-error::before,
.bd-cart__notices .woocommerce-info::before,
.bd-cart__notices .woocommerce-message::before,
.bd-cart .woocommerce-error::before,
.bd-cart .woocommerce-info::before,
.bd-cart .woocommerce-message::before {
    font-family: "Font Awesome 7 Pro";
    font-weight: 300; /* light */
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 50%;
}

/* Success: Coupon eingelöst, Cart aktualisiert etc. */
.bd-cart__notices .woocommerce-message,
.bd-cart .woocommerce-message {
    border-left-color: var(--color-success);
    background: color-mix(in srgb, var(--color-success) 6%, var(--color-bg));
    color: var(--color-heading);
}

.bd-cart__notices .woocommerce-message::before,
.bd-cart .woocommerce-message::before {
    content: "\f058"; /* fa-circle-check */
    color: var(--color-success);
    background: color-mix(in srgb, var(--color-success) 15%, transparent);
}

/* Info: neutrale Hinweise */
.bd-cart__notices .woocommerce-info,
.bd-cart .woocommerce-info {
    border-left-color: var(--color-info);
    background: color-mix(in srgb, var(--color-info) 6%, var(--color-bg));
}

.bd-cart__notices .woocommerce-info::before,
.bd-cart .woocommerce-info::before {
    content: "\f05a"; /* fa-circle-info */
    color: var(--color-info);
    background: color-mix(in srgb, var(--color-info) 15%, transparent);
}

/* Error: Coupon ungültig, Stock-Limit überschritten etc. */
.bd-cart__notices .woocommerce-error,
.bd-cart .woocommerce-error {
    border-left-color: var(--color-error);
    background: color-mix(in srgb, var(--color-error) 6%, var(--color-bg));
    color: var(--color-error);
}

.bd-cart__notices .woocommerce-error::before,
.bd-cart .woocommerce-error::before {
    content: "\f06a"; /* fa-circle-exclamation */
    color: var(--color-error);
    background: color-mix(in srgb, var(--color-error) 15%, transparent);
}

/* Restore-Link in Notices (z.B. "Rückgängig machen") */
.bd-cart__notices a.restore-item,
.bd-cart__notices a.button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: var(--space-sm);
    padding: 0.3rem 0.8rem;
    background: var(--color-bg);
    color: var(--color-heading);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    text-decoration: none;
    transition: var(--transition);
}

.bd-cart__notices a.restore-item:hover,
.bd-cart__notices a.button:hover {
    background: var(--color-heading);
    color: var(--color-bg);
    border-color: var(--color-heading);
    opacity: 1;
}


.bd-summary__sub--packaging {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85em;
    line-height: 1.35;
}

.bd-summary__row--tax {
    padding-top: 0;
    margin-top: -0.25rem;
}

.bd-summary__row--tax .bd-summary__label,
.bd-summary__row--tax .bd-summary__value {
    font-size: var(--text-sm);
    color: var(--color-muted);
    font-weight: var(--weight-regular);
}

.bd-summary__row--tax .bd-summary__value {
    white-space: nowrap;
}

/* Native cart dialog: available wherever the header cart is shown. */
html.bd-cart-drawer-open { overflow: hidden; }
.bd-cart-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(100%, var(--shop-drawer-width));
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: var(--space-xl);
    border: 0;
    background: var(--shop-bg);
    color: var(--shop-color);
    box-shadow: var(--card-shadow-elevated);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    opacity: 0;
    transition: transform var(--shop-drawer-duration) var(--ease-enter), opacity var(--shop-drawer-duration) var(--ease-enter);
}
.bd-cart-drawer[open] { display: flex; flex-direction: column; gap: var(--space-lg); }
.bd-cart-drawer.is-open { transform: translateX(0); opacity: 1; }
.bd-cart-drawer::backdrop {
    background: var(--shop-drawer-overlay);
    opacity: 0;
    transition: opacity var(--shop-drawer-duration) var(--ease-enter);
}
.bd-cart-drawer.is-open::backdrop { opacity: 1; }
.bd-cart-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.bd-cart-drawer__head h2 { margin: var(--space-xs) 0 0; font-size: var(--text-h3); line-height: var(--leading-tight); }
.bd-cart-drawer__eyebrow { color: var(--color-accent); font-size: var(--text-xs); }
.bd-cart-drawer .bd-cart-drawer__close {
    width: var(--shop-drawer-touch); height: var(--shop-drawer-touch); min-width: var(--shop-drawer-touch);
    padding: 0; border: 0; background: var(--shop-bg-muted); color: var(--shop-title);
}
.bd-cart-drawer__status { margin: 0; padding: var(--space-sm) var(--space-md); background: var(--color-success-bg); color: var(--shop-title); font-size: var(--text-sm); line-height: var(--leading-snug); border-radius: var(--radius-lg); }
.bd-cart-drawer__status.is-error { color: var(--color-error); background: var(--shop-bg-muted); }
.bd-cart-drawer__status[hidden] { display: none; }
.bd-cart-drawer__content { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: var(--space-xl); }
.bd-cart-drawer__content[aria-busy="true"] { opacity: .65; pointer-events: none; }
.bd-cart-drawer__items { margin: 0; padding: 0; list-style: none; }
.bd-cart-drawer__item { display: grid; grid-template-columns: var(--shop-drawer-photo) minmax(0, 1fr); gap: var(--space-md); padding-block: var(--space-lg); border-bottom: 1px solid var(--shop-border); }
.bd-cart-drawer__photo { aspect-ratio: 1; background: var(--shop-media-bg); border-radius: var(--radius-lg); overflow: hidden; }
.bd-cart-drawer__photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bd-cart-drawer__name { margin: 0 0 var(--space-xs); font-size: var(--text-body); color: var(--shop-title); font-weight: var(--weight-semibold); line-height: var(--leading-snug); overflow-wrap: anywhere; }
.bd-cart-drawer__name a { color: inherit; text-decoration: none; }
.bd-cart-drawer__quantity { color: var(--color-accent); white-space: nowrap; }
.bd-cart-drawer__details .variation { margin: var(--space-xs) 0; font-size: var(--text-xs); }
.bd-cart-drawer__details .variation p { margin: 0; }
.bd-cart-drawer__price { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.bd-cart-drawer__remove { display: inline-flex; align-items: center; min-height: var(--shop-drawer-touch); font-size: var(--text-xs); color: var(--shop-muted); text-decoration: underline; text-underline-offset: var(--space-xxs); }
.bd-cart-drawer__remove[aria-disabled="true"] { opacity: .5; }
.bd-cart-drawer__summary { margin-top: auto; display: grid; gap: var(--space-sm); }
.bd-cart-drawer__subtotal { display: flex; justify-content: space-between; gap: var(--space-sm); margin: 0; color: var(--shop-title); font-size: var(--text-body); }
.bd-cart-drawer__tax { margin: 0 0 var(--space-xs); color: var(--shop-muted); font-size: var(--text-xs); line-height: var(--leading-snug); }
.bd-cart-drawer .btn { min-height: var(--shop-drawer-touch); font-size: var(--text-sm); padding: var(--space-sm) var(--space-md); }
.bd-cart-drawer .bd-cart-drawer__continue { margin: 0; padding: var(--space-xs); color: var(--shop-muted); }
.bd-cart-drawer__empty { display: grid; justify-items: start; gap: var(--space-md); padding-block: var(--space-xl); }
.bd-cart-drawer__empty > i { font-size: var(--text-h2); color: var(--color-accent); }
.bd-cart-drawer__empty h3, .bd-cart-drawer__empty p { margin: 0; }
.bd-cart-is-adding { cursor: wait; opacity: .8; }
.bd-cart-is-added { animation: bd-cart-added var(--duration-slow) var(--ease-enter); }
@keyframes bd-cart-added { 50% { transform: scale(var(--motion-scale-md)); } }
@media (max-width: 640px) {
    .bd-cart-drawer { padding: var(--space-lg) var(--space-md) max(var(--space-md), env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    .bd-cart-drawer, .bd-cart-drawer::backdrop { transition: none; }
    .bd-cart-is-added { animation: none; }
}
.bd-cart-drawer__details .variation { color: var(--shop-muted); line-height: var(--leading-snug); }
.bd-cart-drawer__details .variation dt[class*="variation-gzd-"],
.bd-cart-drawer__details .variation dd.variation-gzd-unit_price { display: none; }
.bd-cart-drawer__details .variation dd { margin: 0 0 var(--space-xs); }
.bd-cart-drawer__price .unit-price { display: block; color: var(--shop-muted); font-size: var(--text-xs); font-weight: var(--weight-regular); }

/* Compact quantity controls share the native quantity decorator on every page. */
.bd-cart-drawer__quantity-form { margin: var(--space-sm) 0 0; }
.bd-cart-drawer .quantity.bd-qty-stepper {
    display: inline-grid; grid-template-columns: var(--shop-drawer-stepper-columns);
    align-items: center; gap: 0; width: auto; padding: var(--space-xxs);
    border: 1px solid var(--shop-border); border-radius: var(--radius-full);
    background: var(--color-white);
}
.bd-cart-drawer .quantity input.qty {
    width: var(--shop-drawer-touch); min-width: 0; height: var(--shop-drawer-touch);
    margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
    text-align: center; color: var(--shop-title); font: inherit; font-weight: var(--weight-semibold);
    background: transparent; appearance: textfield;
}
.bd-cart-drawer .quantity input.qty::-webkit-inner-spin-button,
.bd-cart-drawer .quantity input.qty::-webkit-outer-spin-button { appearance: none; margin: 0; }
.bd-cart-drawer .bd-qty-stepper__btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--shop-drawer-touch); min-width: 0; height: var(--shop-drawer-touch);
    margin: 0; padding: 0; border: 0; border-radius: var(--radius-full);
    background: transparent; color: var(--shop-title); font-size: var(--text-sm); cursor: pointer;
}
.bd-cart-drawer .bd-qty-stepper__btn:hover { background: var(--shop-bg-muted); color: var(--color-accent); }
.bd-cart-drawer .bd-qty-stepper__btn:disabled { opacity: .4; cursor: default; }
.bd-cart-drawer .quantity input.qty:focus-visible,
.bd-cart-drawer .bd-qty-stepper__btn:focus-visible { outline: var(--focus-ring); outline-offset: var(--space-xxs); }
.bd-cart-drawer__cost, .bd-cart-drawer__total {
    display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md);
    margin: 0; color: var(--shop-title); font-size: var(--text-sm); line-height: var(--leading-snug);
}
.bd-cart-drawer__cost > :first-child, .bd-cart-drawer__total > :first-child { min-width: 0; overflow-wrap: anywhere; }
.bd-cart-drawer__cost .amount, .bd-cart-drawer__total .amount { white-space: nowrap; }
.bd-cart-drawer__total { padding-top: var(--space-sm); border-top: 1px solid var(--shop-border); font-weight: var(--weight-semibold); font-size: var(--text-body); }
