/* css/crop_cart_box.css — Warenkorb-Kasten Kunstdruck (content_inc/scale_bg_zoom/crop_cart_box.php)
 *
 * Mobile first:
 *   < 1024px  data-mobile="sheet"  Bottom-Sheet (fixed, Glas), zu: Größe + Preis + Button
 *             data-mobile="flow"   normal unter dem Bild im Seitenfluss
 *   >= 1024px Glas-Panel rechts über dem scaleBgZoom, einklappbar (.is-collapsed)
 *
 * Größe + Keilrahmen sind zugeklappte Zeilen (.ccb-option); ein Klick schiebt
 * .ccb-layer von rechts in den Kasten (.is-open), Preis + Übernehmen unten fest.
 *
 * Die Bausteine (.ccb-layer, Größen-Tabelle, Punkte, Buttons) nutzt auch die Croptool-Leiste
 * (css/croptool/1.0/croptool_size_bar.css) — Grundwerte deshalb auf .ccb, nicht auf der ID.
 *
 * Alte Regeln für #crop_cart_box in scaleBgZoom_v3.css werden hier über
 * #crop_cart_box.ccb überschrieben (höhere Spezifität) — die Datei bleibt unverändert,
 * #scale_bg_zoom_cart_box (Originale) ist nicht betroffen.
 */

/* ── Grundwerte (gelten für jeden .ccb-Baustein: Warenkorb-Kasten UND Croptool-Leiste) ── */
.ccb {
    --ccb-ink:        #141413;
    --ccb-muted:      rgba(20, 20, 19, 0.62);
    --ccb-rule:       rgba(20, 20, 19, 0.14);
    --ccb-gold:       #ae8625;
    --ccb-gold-text:  #7a5e1a;
    --ccb-ok:         #4f7004;
    --ccb-low:        #8a3324;
    --ccb-glass:      rgba(247, 245, 241, 0.94);
    --ccb-glass-line: rgba(255, 255, 255, 0.6);
    --ccb-field:      rgba(255, 255, 255, 0.45);
    --ccb-ease:       cubic-bezier(.16, 1, .3, 1);

    color: var(--ccb-ink);
    font-family: var(--font-primary, Inter, sans-serif);
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
    text-shadow: none;
}

.ccb [hidden] {
    display: none !important;
}

.ccb svg path {
    filter: none;
}

/* Warenkorb-Kasten: alte Regeln aus scaleBgZoom_v3.css zurücksetzen */
#crop_cart_box.ccb {
    position: relative;
    top: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    text-shadow: none;
    color: var(--ccb-ink);
    transition: none;
    z-index: 10;
}

/* Globale Button-/Input-Styles der Seite (ui.css, buttons.css, input.css) im Kasten neutralisieren —
   jede Klasse unten setzt danach nur, was sie braucht */
.ccb button,
.ccb input {
    font-family: inherit;
    width: auto;
    min-width: 0;
    height: auto;
    float: none;
    box-shadow: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: normal;
    -webkit-appearance: none;
    appearance: none;
}

/* Glas nur, wo der Browser es kann — sonst fast deckend (bleibt lesbar) */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .ccb {
        --ccb-glass: rgba(247, 245, 241, 0.82);
    }
}

/* ── Panel ────────────────────────────────────────────────── */
.ccb .ccb-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    padding: 24px 20px;
}

.ccb .ccb-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ccb-gold-text);
}

.ccb .ccb-scroll {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ccb .ccb-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.ccb .ccb-head-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ccb .ccb-title {
    margin: 0;
    padding: 0;
    font-family: var(--font-display, inherit);
    font-size: clamp(28px, 2.4vw, 34px);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: left;
    color: var(--ccb-ink);
}

.ccb .ccb-subtitle {
    font-size: 14px;
    color: var(--ccb-muted);
}

.ccb .ccb-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Buttons (Atelier: eckig, Goldlinie beim Hover) ───────── */
.ccb .ccb-btn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
    border: 1px solid var(--ccb-ink);
    border-radius: 0;
    background: transparent;
    color: var(--ccb-ink);
    font-family: var(--font-display, inherit);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ccb .ccb-btn::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--ccb-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.55s var(--ccb-ease);
}

.ccb .ccb-btn:hover::after {
    transform: scaleX(1);
}

.ccb .ccb-btn--outline:hover,
.ccb .ccb-btn--ghost:hover {
    background: rgba(20, 20, 19, 0.06);
}

.ccb .ccb-btn--primary {
    border-color: var(--btn-primary-bg, #141413);
    background: var(--btn-primary-bg, #141413);
    color: var(--btn-primary-text, #f7f5f1);
}

.ccb .ccb-btn--primary:hover {
    background: #2a2a28;
    color: var(--btn-primary-text, #f7f5f1);
}

.ccb .ccb-btn--primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ccb .ccb-btn--ghost {
    border-color: rgba(20, 20, 19, 0.3);
    font-family: var(--font-primary, inherit);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.ccb .ccb-btn--admin {
    min-height: 44px;
    border-style: dashed;
    border-color: rgba(20, 20, 19, 0.4);
    font-family: var(--font-primary, inherit);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    background: transparent;
    color: var(--ccb-ink);
}

.ccb .ccb-btn--admin span {
    color: var(--ccb-muted);
}

.ccb .ccb-collapse {
    display: none;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(20, 20, 19, 0.2);
    border-radius: 0;
    background: transparent;
    color: var(--ccb-ink);
    cursor: pointer;
}

.ccb .ccb-collapse:hover {
    background: rgba(20, 20, 19, 0.06);
}

/* ── Hinweis Auflösung (wird von showLowResolutionMsg geschaltet) ── */
.ccb .low_resolution_msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(138, 51, 36, 0.35);
    background: rgba(138, 51, 36, 0.08);
    color: var(--ccb-low);
    font-size: 13px;
}

.ccb .low_resolution_msg.hidden {
    display: none;
}

.ccb .low_resolution_msg svg {
    flex: 0 0 auto;
}

/* ── Auflösung der gewählten Größe (oben im Größen-Layer) ── */
.ccb .ccb-quality {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--ccb-field);
    font-size: 13px;
}

/* Hoch-/Querformat: ein Button rechts in der Auflösungszeile (print_size_layer.js toggleOrient) */
.ccb .ccb-quality-text {
    flex: 1 1 auto;
    min-width: 0;
}
.ccb button.ccb-orient {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -6px -4px -6px 0;
    padding: 0;
    border: 1px solid var(--ccb-rule);
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}
.ccb button.ccb-orient:hover,
.ccb button.ccb-orient:focus-visible {
    border-color: var(--ccb-gold);
    color: var(--ccb-gold);
}
.ccb button.ccb-orient[hidden] { display: none; }

/* ── Auflösungs-Punkte: data-level 1–4, "low" = zu gering ── */
.ccb .ccb-dots {
    display: inline-flex;
    gap: 4px;
}

.ccb .ccb-dots > span {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(20, 20, 19, 0.18);
}

.ccb .ccb-dots[data-level="1"] > span:nth-child(-n+1),
.ccb .ccb-dots[data-level="2"] > span:nth-child(-n+2),
.ccb .ccb-dots[data-level="3"] > span:nth-child(-n+3),
.ccb .ccb-dots[data-level="4"] > span {
    background: var(--ccb-ok);
}

.ccb .ccb-dots[data-level="low"] > span {
    background: #c9a49d;
}

/* ── Lange Größen-Liste: Kopf (Tabs + Auflösung) bleibt oben stehen ── */
/* .ccb-layer-body hat padding 20px → mit top:-20px klebt der Kopf ganz oben am Rand */
.ccb .ccb-size-top {
    position: -webkit-sticky;
    position: sticky;
    top: -20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: -20px -20px 0;
    padding: 20px 20px 12px;
    background: #f7f5f1;   /* deckend — sonst scheint die Liste beim Scrollen durch */
    border-bottom: 1px solid var(--ccb-rule);
}

.ccb .ccb-sizes + .ccb-sizes {
    margin-top: 10px;
}

.ccb .ccb-sizes-title {
    padding: 4px 12px 8px;
    font-family: var(--font-display, inherit);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Format-Tabs ──────────────────────────────────────────── */
.ccb .ccb-formats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.ccb .ccb-format {
    min-height: 40px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid rgba(20, 20, 19, 0.2);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.35);
    color: var(--ccb-ink);
    font-family: var(--font-primary, inherit);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ccb .ccb-format:hover {
    border-color: var(--ccb-ink);
}

.ccb .ccb-format.is-active {
    border-color: var(--ccb-ink);
    background: var(--ccb-ink);
    color: #f7f5f1;
}

.ccb .ccb-format--wide {
    grid-column: span 2;
}

/* ── Größen-Tabelle ───────────────────────────────────────── */
.ccb .ccb-size-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ccb .ccb-sizes-head,
.ccb .ccb-size {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 82px;
    align-items: center;
    gap: 8px;
}

.ccb .ccb-sizes-head {
    padding: 0 12px 6px;
    font-size: 12px;
    color: var(--ccb-muted);
}

.ccb .ccb-sizes-head span:last-child,
.ccb .ccb-size-price {
    text-align: right;
}

.ccb .ccb-sizes-list {
    display: flex;
    flex-direction: column;
}

.ccb .ccb-size {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-bottom-color: rgba(20, 20, 19, 0.08);
    border-radius: 0;
    background: transparent;
    color: var(--ccb-ink);
    font-family: var(--font-primary, inherit);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ccb .ccb-size:hover {
    background: rgba(255, 255, 255, 0.55);
}

.ccb .ccb-size.is-selected {
    border-color: var(--ccb-gold);
    background: rgba(255, 255, 255, 0.7);
}

.ccb .ccb-size-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

.ccb .ccb-size-price {
    font-weight: 600;
}

.ccb .ccb-badge,
.ccb .ccb-low-note {
    display: none;
}

.ccb .ccb-size.is-current .ccb-badge {
    display: inline;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ccb-gold-text);
}

/* Zu gering: ausgegraut, nicht klickbar */
.ccb .ccb-size.is-low,
.ccb .ccb-size:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ccb .ccb-size.is-low:hover {
    background: transparent;
}

.ccb .ccb-size.is-low .ccb-low-note {
    display: inline;
    font-size: 11px;
    color: var(--ccb-low);
}

/* ── Wunschformat ─────────────────────────────────────────── */
.ccb .ccb-custom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px;
    background: var(--ccb-field);
}

.ccb .ccb-custom-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
    align-items: end;
    gap: 8px;
}

.ccb .ccb-custom-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    color: var(--ccb-muted);
    cursor: default;
}

.ccb .ccb-custom-field input {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid rgba(20, 20, 19, 0.3);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ccb-ink);
    font-family: var(--font-primary, inherit);
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

.ccb .ccb-custom-field input:focus {
    outline: none;
    border-color: var(--ccb-gold);
}

.ccb .ccb-custom-x {
    padding-bottom: 12px;
    text-align: center;
}

.ccb .ccb-custom-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--ccb-muted);
}

.ccb .ccb-custom-info strong {
    color: var(--ccb-ink);
    font-size: 15px;
}

.ccb .ccb-custom-error {
    font-size: 12px;
    color: var(--ccb-low);
}

/* ── Preis + Warenkorb ────────────────────────────────────── */
.ccb .ccb-foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ccb .ccb-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--ccb-rule);
}

.ccb .ccb-available {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ccb-ok);
}

.ccb .ccb-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ccb .ccb-price-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.ccb .ccb-price-note {
    padding-top: 4px;
    font-size: 12px;
    color: var(--ccb-muted);
}

/* CartButton (btn-swallow): nur Breite, Höhe, Schrift — Aufbau/Animation bleibt */
.ccb .ccb-cart .btn-swallow {
    --sw-radius: 0;
    width: 100%;
    min-height: 56px;
    font-family: var(--font-display, inherit);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ccb .ccb-cart form {
    width: 100%;
}

.ccb .ccb-delivery {
    margin: 0;
    font-size: 13px;
    text-align: center;
    color: rgba(20, 20, 19, 0.7);
}

.ccb .payment_logos_cart {
    justify-content: center;
    height: auto;
}

/* ── Zugeklappte Einstellungen (Größe, Keilrahmen) ────────── */
.ccb .ccb-options {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--ccb-rule);
}

.ccb .ccb-option {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 16px 4px;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid var(--ccb-rule);
    border-radius: 0;
    background: transparent;
    color: var(--ccb-ink);
    font-family: var(--font-primary, inherit);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ccb .ccb-option:hover {
    background: rgba(255, 255, 255, 0.4);
}

.ccb .ccb-option-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ccb .ccb-option-label {
    font-family: var(--font-display, inherit);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.ccb .ccb-option-value {
    font-size: 16px;
    font-weight: 600;
}

.ccb .ccb-option-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ccb-muted);
}

.ccb .ccb-option-arrow {
    display: flex;
    color: var(--ccb-muted);
    transition: transform 0.3s var(--ccb-ease);
}

.ccb .ccb-option:hover .ccb-option-arrow {
    transform: translateX(3px);
    color: var(--ccb-ink);
}

/* ── Layer (schiebt sich von rechts in den Kasten) ────────── */
.ccb .ccb-layer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    background: rgba(247, 245, 241, 0.97);
    visibility: hidden;
    -webkit-transform: translateX(100%);
    transform: translateX(100%);
    transition: transform 0.45s var(--ccb-ease), visibility 0s linear 0.45s;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .ccb .ccb-layer {
        background: rgba(247, 245, 241, 0.82);
        -webkit-backdrop-filter: blur(24px) saturate(1.2);
        backdrop-filter: blur(24px) saturate(1.2);
    }
}

.ccb .ccb-layer.is-open {
    visibility: visible;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    transition: transform 0.45s var(--ccb-ease), visibility 0s linear 0s;
}

.ccb .ccb-layer-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 64px;
    padding: 10px 56px;
    border-bottom: 1px solid var(--ccb-rule);
}

.ccb .ccb-layer-back {
    position: absolute;
    left: 10px;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ccb-ink);
    cursor: pointer;
}

.ccb .ccb-layer-back:hover {
    background: rgba(20, 20, 19, 0.06);
}

.ccb .ccb-layer-title {
    font-family: var(--font-display, inherit);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ccb .ccb-layer-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 20, 19, 0.25) transparent;
}

.ccb .ccb-layer-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 16px;
    flex: 0 0 auto;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--ccb-rule);
}

.ccb .ccb-layer-foot .ccb-price {
    align-items: flex-start;
}

.ccb .ccb-layer-foot .ccb-price-value {
    font-size: 26px;
}

.ccb .ccb-layer-foot .ccb-btn--primary {
    min-width: 160px;
}

.ccb .ccb-layer-foot .ccb-btn--primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ccb.is-busy .ccb-layer-foot .ccb-btn--primary:disabled {
    opacity: 0.7;
    cursor: wait;
}

.ccb .ccb-layer-error {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--ccb-low);
}

.ccb .ccb-layer-error:empty {
    display: none;
}

/* ── Keilrahmen-Kacheln (Bilder aus images/crop_settings/) ── */
.ccb .ccb-frame-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ccb .ccb-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 10px 10px 14px;
    border: 1px solid rgba(20, 20, 19, 0.15);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.4);
    color: var(--ccb-ink);
    font-family: var(--font-primary, inherit);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ccb .ccb-frame:hover {
    border-color: var(--ccb-ink);
}

.ccb .ccb-frame.is-active {
    border-color: var(--ccb-gold);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 1px var(--ccb-gold);
}

.ccb .ccb-frame-img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 4px;
}

.ccb .ccb-frame-name {
    font-size: 14px;
    font-weight: 600;
}

.ccb .ccb-frame-price {
    font-size: 13px;
    color: var(--ccb-muted);
}

/* ── Nur Desktop / nur Sheet ──────────────────────────────── */
.ccb .ccb-tab,
.ccb .ccb-grip,
.ccb .ccb-peek {
    display: none;
}

/* Vorschau an der Wand: anderes Format mittig zuschneiden statt verzerren */
#art.ccb-previewing img {
    object-fit: cover;
}


/* ════════════════════════════════════════════════════════════
   MOBIL < 1024px
   ════════════════════════════════════════════════════════════ */
@media screen and (max-width: 1023px) {

    /* ── Bottom-Sheet ── */
    #crop_cart_box.ccb[data-mobile="sheet"] {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        overflow: hidden;
    }

    /* Layer offen: Sheet wird hoch genug für den Layer */
    #crop_cart_box.ccb[data-mobile="sheet"].has-layer {
        top: 12vh;
    }

    .ccb[data-mobile="sheet"] .ccb-panel {
        max-height: 82vh;
        gap: 0;
        padding: 0;
        border-top: 1px solid var(--ccb-glass-line);
        background: var(--ccb-glass);
        -webkit-backdrop-filter: blur(22px) saturate(1.2);
        backdrop-filter: blur(22px) saturate(1.2);
        box-shadow: 0 -18px 40px rgba(20, 20, 19, 0.16);
    }

    .ccb[data-mobile="sheet"].has-layer .ccb-panel {
        height: 100%;
        max-height: none;
    }

    .ccb[data-mobile="sheet"] .ccb-grip {
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 0 0 auto;
        height: 26px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .ccb[data-mobile="sheet"] .ccb-grip span {
        width: 44px;
        height: 4px;
        border-radius: 2px;
        background: rgba(20, 20, 19, 0.3);
    }

    .ccb[data-mobile="sheet"] .ccb-peek {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
        padding: 0 18px 12px;
        border: 0;
        background: transparent;
        color: var(--ccb-ink);
        text-align: left;
        cursor: pointer;
    }

    .ccb[data-mobile="sheet"] .ccb-peek-size {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .ccb[data-mobile="sheet"] .ccb-peek-value {
        display: flex;
        align-items: center;
        gap: 8px;
        font-family: var(--font-display, inherit);
        font-size: 22px;
        font-weight: 600;
        letter-spacing: 0.04em;
    }

    .ccb[data-mobile="sheet"] .ccb-peek-value svg {
        transition: transform 0.3s ease;
    }

    .ccb[data-mobile="sheet"].is-open .ccb-peek-value svg {
        transform: rotate(180deg);
    }

    .ccb[data-mobile="sheet"] .ccb-peek-price {
        font-size: 24px;
        font-weight: 700;
    }

    /* zu: nur Peek + Warenkorb */
    .ccb[data-mobile="sheet"] .ccb-head,
    .ccb[data-mobile="sheet"] .ccb-body,
    .ccb[data-mobile="sheet"] .ccb-price-row,
    .ccb[data-mobile="sheet"] .ccb-foot .payment_logos_cart,
    .ccb[data-mobile="sheet"] .ccb-foot .payment_logos_cart_header {
        display: none;
    }

    /* offen: Einstellungen scrollen im Sheet */
    .ccb[data-mobile="sheet"] .ccb-scroll {
        gap: 0;
    }

    .ccb[data-mobile="sheet"].is-open .ccb-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ccb[data-mobile="sheet"].is-open .ccb-body {
        display: flex;
        padding: 0 18px 16px;
    }

    .ccb[data-mobile="sheet"] .ccb-foot {
        flex: 0 0 auto;
        gap: 8px;
        padding: 12px 18px 18px;
        border-top: 1px solid rgba(20, 20, 19, 0.1);
    }

    /* Sheet verdeckt sonst das Seitenende */
    body.ccb-has-sheet {
        padding-bottom: 170px;
    }

    /* ── Im Seitenfluss ── */
    .ccb[data-mobile="flow"] .ccb-panel {
        padding: 28px 20px 40px;
        background: var(--color-bg, #f7f5f1);
    }

    /* Layer im Fluss: über den ganzen Bildschirm — ÜBER der Navigation
       (navigation/v7.1: fixed, z-index 500), sonst verdeckt sie Zurück/Schließen oben.
       Fuß mit "Übernehmen" über der Safe-Area unten. */
    .ccb[data-mobile="flow"] .ccb-layer {
        position: fixed;
        z-index: 600;
    }
    .ccb[data-mobile="flow"] .ccb-layer .ccb-layer-foot {
        padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    }

    /* z-index allein reicht nicht, wenn ein Eltern-Element eine eigene Ebene bildet —
       solange ein Layer offen ist (js/print_size_layer.js setzt .ccb-layer-open an <html>),
       fährt die Navigation (navigation/v7.1 .desk-nav-bar) nach oben weg. */
    html.ccb-layer-open .desk-nav-bar {
        -webkit-transform: translateY(-110%) !important;
        transform: translateY(-110%) !important;
    }
}


/* ════════════════════════════════════════════════════════════
   DESKTOP >= 1024px — Glas-Panel rechts über dem Bild
   ════════════════════════════════════════════════════════════ */
@media screen and (min-width: 1024px) {

    /* Höhe = Bildschirm minus Navigation (--navHeight aus navigation/v7.1/style_navigation.css),
       aber nie höher als der Bildbereich. Warenkorb bleibt unten fest, der Inhalt scrollt. */
    #crop_cart_box.ccb {
        position: absolute;
        top: 0px;
        right: 0px;
        bottom: auto;
        height: calc(100vh - var(--navHeight, 150px) - 0px);
        max-height: calc(100% - 0px);
        width: 33%;
        min-width: 340px;
        max-width: 380px;
        padding: 0;
        border-radius: 0;
        overflow: hidden;
        border: 1px solid var(--ccb-glass-line);
        box-shadow: 0 24px 60px rgba(20, 20, 19, 0.18);
    }

    /* Kopf + Einstellungen scrollen (.ccb-scroll), Preis + Warenkorb bleiben darunter fest */
    .ccb .ccb-panel {
        height: 100%;
        overflow: hidden;
        gap: 0;
        padding: 0;
        background: var(--ccb-glass);
        -webkit-backdrop-filter: blur(20px) saturate(1.2);
        backdrop-filter: blur(20px) saturate(1.2);
    }

    .ccb .ccb-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 26px 26px 20px;
        scrollbar-width: thin;
        scrollbar-color: rgba(20, 20, 19, 0.25) transparent;
    }

    .ccb .ccb-collapse {
        display: flex;
    }

    .ccb .ccb-foot {
        flex: 0 0 auto;
        gap: 10px;
        padding: 0 26px 18px;
        border-top: 1px solid var(--ccb-rule);
    }

    .ccb .ccb-foot .ccb-price-row {
        border-top: 0;
    }

    /* Eingeklappt: nur die Lasche */
    #crop_cart_box.ccb.is-collapsed {
        bottom: auto;
        height: auto;
        max-height: none;
        width: auto;
        min-width: 0;
        max-width: none;
        border: 0;
        box-shadow: none;
    }

    .ccb.is-collapsed .ccb-panel,
    .ccb.is-collapsed .ccb-layer {
        display: none;
    }

    .ccb.is-collapsed .ccb-tab {
        display: flex;
        align-items: center;
        gap: 16px;
        margin: 0;
        padding: 16px 20px;
        border: 1px solid var(--ccb-glass-line);
        border-radius: 0;
        background: var(--ccb-glass);
        -webkit-backdrop-filter: blur(20px) saturate(1.2);
        backdrop-filter: blur(20px) saturate(1.2);
        box-shadow: 0 18px 40px rgba(20, 20, 19, 0.16);
        color: var(--ccb-ink);
        text-align: left;
        cursor: pointer;
    }

    .ccb .ccb-tab-text {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .ccb .ccb-tab-value {
        font-family: var(--font-display, inherit);
        font-size: 20px;
        font-weight: 600;
        letter-spacing: 0.04em;
    }
}
