/* =========================================================================
   DSF Artikel Bedrucken v2.3.3 — Commerce Design System (dsf_design Native)
   Gilt fuer:
     1. Mini-Warenkorb (.dsf-cart-drawer & .cart-dropdown inkl. JTL-IO AJAX)
     2. Warenkorb (/Warenkorb, Desktop- & Mobile-Grid ohne Spaltenkollision)
     3. Checkout (/Bestellvorgang Schritt 1–3 & Bestellabschluss-Uebersicht)
   ========================================================================= */

/* ---------- 1. Dezentes Personalisierungs-Tag am Produkttitel ---------- */
.dsf-b-title-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #edf4e8;
    border: 1px solid #d4e3cb;
    color: #335d1d;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    vertical-align: middle;
    white-space: nowrap;
}

/* ---------- 2. Dezente Preis-Subline statt greller Gruen-Pille ---------- */
.dsf-b-aufpreis-badge {
    display: block;
    margin-top: 3px;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--dsf-muted, #5c645c) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cart-items-body.dsf-b-konfig-vater > .cart-items-price,
.checkout-items-item.type-1.dsf-b-checkout-vater > .checkout-items-item-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    text-align: right !important;
}

/* ---------- 3. Warenkorb (/Warenkorb) — Exaktes Grid ohne Ueberlappung ---------- */
.cart-items-body.dsf-b-konfig-vater > .dsf-b-cart-perso-block {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    box-sizing: border-box;
}

@media (min-width: 834px) {
    body.dsf-clean #main-wrapper .basket .basket-items .cart-items-body.dsf-b-konfig-vater:not(.type-2) {
        grid-template-rows: auto auto auto auto auto !important;
    }

    body.dsf-clean #main-wrapper .basket .basket-items .cart-items-body.dsf-b-konfig-vater:not(.type-2) > .dsf-b-cart-perso-block {
        grid-column: 1 / -1 !important;
        grid-row: 5 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 14px 0 0 !important;
        padding: 14px 0 0 !important;
        border-top: 1px solid #edf1ed !important;
    }
}

@media (max-width: 833.98px) {
    body.dsf-clean #main-wrapper .basket .basket-items .cart-items-body.dsf-b-konfig-vater:not(.type-2) > .dsf-b-cart-perso-block {
        grid-column: 1 / -1 !important;
        grid-row: 5 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 10px 0 2px !important;
        padding: 12px 0 0 !important;
        border-top: 1px solid #edf1ed !important;
    }
}

/* ---------- 4. Checkout Schritt 3 (#order-confirm) — Exaktes Grid ---------- */
.checkout-items-item.type-1.dsf-b-checkout-vater > .dsf-b-checkout-perso-block {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    box-sizing: border-box;
}

body.dsf-clean #main-wrapper :is(#checkout, #order-confirm) .checkout-items-item.type-1.dsf-b-checkout-vater {
    grid-template-rows: auto auto auto !important;
}

body.dsf-clean #main-wrapper :is(#checkout, #order-confirm) .checkout-items-item.type-1.dsf-b-checkout-vater > .dsf-b-checkout-perso-block {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 12px 0 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid #edf1ed !important;
}

/* ---------- 5. Checkout Schritt 1–2 & Bestellabschluss Sidebar ---------- */
.dsf-summary-items .dsf-summary-item-meta,
.dsf-mobile-order-summary .dsf-summary-item-meta {
    white-space: normal !important;
    line-height: 1.42 !important;
    font-size: 12.5px;
    color: var(--dsf-muted, #606660);
    margin-top: 2px;
}

/* ---------- 6. Gemeinsame Personalisierungs-Card (Warenkorb & Checkout) ---------- */
.dsf-b-cart-details {
    margin: 0 !important;
    border: 1px solid var(--dsf-line, #dce2d7) !important;
    border-radius: 10px !important;
    background: #f8faf7 !important;
    overflow: hidden;
    box-shadow: none !important;
}

.dsf-b-cart-details > .dsf-b-cart-details__summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 42px;
    padding: 9px 14px !important;
    background: #f6f8f4 !important;
    border: 0 !important;
    color: var(--dsf-ink, #202520) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 140ms ease;
}

.dsf-b-cart-details > .dsf-b-cart-details__summary:hover {
    background: #eef3ea !important;
}

.dsf-b-cart-details > .dsf-b-cart-details__summary::-webkit-details-marker {
    display: none !important;
}

.dsf-b-cart-details > .dsf-b-cart-details__summary::after {
    content: none !important;
    display: none !important;
}

.dsf-b-cart-details[open] > .dsf-b-cart-details__summary {
    border-bottom: 1px solid #e3eae0 !important;
}

.dsf-b-cart-details__title-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.dsf-b-cart-details__icon-svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: var(--dsf-green, #417525);
}

.dsf-b-cart-details__title {
    font-weight: 600;
    color: var(--dsf-ink, #202520);
}

.dsf-b-cart-details__count {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    background: #edf4e8;
    color: #335d1d;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
}

.dsf-b-cart-details__recipient-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dce2d7;
    color: var(--dsf-ink, #202520);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
}

.dsf-b-cart-details__right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
}

.dsf-b-cart-details__sum-inline {
    font-size: 13px;
    font-weight: 600;
    color: #335d1d;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dsf-b-cart-details__chevron {
    width: 16px;
    height: 16px;
    color: var(--dsf-muted, #606660);
    transition: transform 160ms ease;
    flex: 0 0 16px;
}

.dsf-b-cart-details[open] .dsf-b-cart-details__chevron {
    transform: rotate(180deg);
}

.dsf-b-cart-details__body {
    padding: 12px 14px !important;
    background: #fff !important;
}

.dsf-b-cart-content-grid {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.dsf-b-cart-content-main {
    flex: 1 1 auto;
    min-width: 0;
}

.dsf-b-cart-details__body ul.config-items,
.dsf-b-cart-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.dsf-b-cart-li {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    color: var(--dsf-ink, #202520) !important;
    border-bottom: 1px solid #f1f4f0 !important;
    position: static !important;
}

.dsf-b-cart-li:first-child {
    padding-top: 0 !important;
}

.dsf-b-cart-li:last-child {
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

.dsf-b-cart-li::before {
    content: none !important;
    display: none !important;
}

.dsf-b-cart-li__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
}

.dsf-b-cart-li__side {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f1f4ef;
    color: #4b544b;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

.dsf-b-cart-li__label {
    color: var(--dsf-muted, #5c645c);
    font-weight: 500;
}

.dsf-b-cart-li__val {
    color: var(--dsf-ink, #202520) !important;
    font-weight: 600 !important;
    word-break: break-word;
}

.dsf-b-cart-li__price {
    flex: 0 0 auto;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    color: var(--dsf-ink, #202520) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Kompakte Meta-Chips (Schriftart in sauberer Systemschrift, Farbe mit klarem Ring) */
.dsf-b-cart-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2ed;
}

.dsf-b-cart-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f5f7f4;
    border: 1px solid #e3e9e1;
    font-size: 12px;
    line-height: 1.35;
    color: var(--dsf-muted, #5c645c);
}

.dsf-b-cart-chip strong {
    color: var(--dsf-ink, #202520);
    font-weight: 600;
    font-family: inherit !important;
    letter-spacing: normal !important;
}

.dsf-b-cart-chip__swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #b8c2b5;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    flex: 0 0 12px;
}

/* Mockup-Vorschaukarten (Vorderseite / Rueckseite) */
.dsf-b-cart-mockups {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    margin: 0 !important;
}

.dsf-b-cart-mockup-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 5px;
    width: 72px;
    border: 1px solid #dfe6dc;
    border-radius: 8px;
    background: #f8faf7;
    text-decoration: none !important;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.dsf-b-cart-mockup-card:hover {
    border-color: var(--dsf-green, #417525);
    box-shadow: 0 2px 6px rgba(32, 37, 32, 0.08);
}

.dsf-b-cart-mockup-card img {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.dsf-b-cart-mockup-card span {
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--dsf-muted, #606660);
    text-align: center;
}

@media (max-width: 575.98px) {
    .dsf-b-cart-content-grid {
        flex-direction: column;
        gap: 10px;
    }

    .dsf-b-cart-details > .dsf-b-cart-details__summary {
        padding: 9px 12px !important;
        font-size: 13px !important;
    }

    .dsf-b-cart-details__body {
        padding: 10px 12px !important;
    }
}

/* Ruhiger, dsf_design-konformer Rechts- & Lieferzeithinweis (ohne grelles Gelb) */
.dsf-b-cart-hinweis {
    display: flex !important;
    align-items: flex-start;
    gap: 7px;
    margin: 8px 0 0 !important;
    padding: 7px 10px !important;
    background: #f5f7f4 !important;
    border: 1px solid #e3e9e1 !important;
    border-left: 1px solid #e3e9e1 !important;
    border-radius: 8px !important;
    color: #586058 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

.dsf-b-cart-hinweis::before,
.basket .basket-items .cart-items-body.dsf-b-konfig-vater .dsf-b-cart-hinweis::before,
.basket .basket-items .cart-items-body.dsf-b-konfig-vater .est-delivery-value::after {
    content: none !important;
    display: none !important;
}

.dsf-b-cart-hinweis__icon {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: var(--dsf-green, #417525);
}

.dsf-b-cart-hinweis strong {
    color: var(--dsf-ink, #202520) !important;
    font-weight: 600;
}

/* ---------- 7. Mini-Warenkorb (.dsf-cart-drawer & .cart-dropdown) ---------- */
.dropdown-cart-item-product > .row > .dsf-b-mini-perso {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf1ed;
    box-sizing: border-box;
}

.dsf-cart-drawer .dropdown-cart-item-product > .row > .dsf-b-mini-perso {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 2px 0 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid #edf1ed !important;
}

.dsf-b-mini-details {
    margin: 0 !important;
    border: 1px solid var(--dsf-line, #dce2d7) !important;
    border-radius: 8px !important;
    background: #f8faf7 !important;
    overflow: hidden;
}

.dsf-b-mini-details > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 36px !important;
    padding: 7px 11px !important;
    background: #f5f7f3 !important;
    color: var(--dsf-ink, #202520) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.dsf-b-mini-details > summary:hover {
    background: #edf2e9 !important;
}

.dsf-b-mini-details > summary::-webkit-details-marker {
    display: none !important;
}

.dsf-b-mini-details > summary::after {
    content: none !important;
    display: none !important;
}

.dsf-b-mini-details[open] > summary {
    border-bottom: 1px solid #e3eae0 !important;
}

.dsf-b-mini-details__left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.dsf-b-mini-details__count {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    background: #edf4e8;
    color: #335d1d;
    font-size: 11px;
    font-weight: 600;
}

.dsf-b-mini-details__right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: #335d1d;
    font-variant-numeric: tabular-nums;
}

.dsf-b-mini-details__chevron {
    width: 14px;
    height: 14px;
    color: var(--dsf-muted, #606660);
    transition: transform 150ms ease;
}

.dsf-b-mini-details[open] .dsf-b-mini-details__chevron {
    transform: rotate(180deg);
}

.dsf-b-mini-details__body {
    padding: 9px 11px !important;
    background: #fff !important;
}

.dsf-b-mini-details__list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.dsf-b-mini-details__item {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 4px 0 !important;
    border-bottom: 1px solid #f2f5f1 !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    color: var(--dsf-ink, #202520) !important;
}

.dsf-b-mini-details__item:first-child {
    padding-top: 0 !important;
}

.dsf-b-mini-details__item:last-child {
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

.dsf-b-mini-details__item-main {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--dsf-muted, #5c645c);
}

.dsf-b-mini-details__item-main strong {
    color: var(--dsf-ink, #202520);
    font-weight: 600;
}

.dsf-b-mini-details__item-price {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 600;
    color: var(--dsf-ink, #202520);
    font-variant-numeric: tabular-nums;
}

.dsf-b-mini-details__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #f0f3ef;
}

.dsf-b-mini-details__meta .dsf-b-cart-chip {
    padding: 2px 7px;
    font-size: 11.5px;
}

.dsf-b-mini-details__note {
    display: block;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid #f2f5f1;
    font-size: 11px;
    line-height: 1.38;
    color: var(--dsf-muted, #606660);
}
