/* ==========================================================================
   PHOTO HUBER - ONLINE PRINT SHOP & FOTOBESCHNITT
   style-print.css - Modern, Responsive, Touch-Optimized
   ========================================================================== */

/* Lokale Schriften (100% DSGVO-konform im öffentlichen /fonts/-Ordner, WOFF2 + TTF Fallback) */
@font-face {
    font-family: 'Caveat';
    src: url('fonts/Caveat.woff2') format('woff2'),
         url('fonts/Caveat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Caveat';
    src: url('fonts/Caveat.woff2') format('woff2'),
         url('fonts/Caveat-Bold.ttf') format('truetype');
    font-weight: 600 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Courier Prime';
    src: url('fonts/CourierPrime-Regular.woff2') format('woff2'),
         url('fonts/CourierPrime-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Courier Prime';
    src: url('fonts/CourierPrime-Bold.woff2') format('woff2'),
         url('fonts/CourierPrime-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Gelasio';
    src: url('fonts/Gelasio.woff2') format('woff2'),
         url('fonts/Gelasio-Regular.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DejaVu Sans';
    src: url('fonts/DejaVuSans.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'DejaVu Sans';
    src: url('fonts/DejaVuSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #D10031;
    --primary-hover: #a8002c;
    --primary-light: #fff1f2;
    --primary-border: #fecdd3;
    --dark: #111827;
    --dark-surface: #1f2937;
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background-color: var(--bg-page);
    color: var(--text);
    line-height: 1.5;
    padding-bottom: 70px; /* Space for compact sticky checkout bar */
    min-height: 100vh;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.print-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.print-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.print-brand-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.print-brand-main {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.print-brand-main:hover {
    transform: scale(1.02);
}

.brand-logo-24foto {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}

.brand-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
}

.print-brand-partner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.brand-logo-filialen {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.brand-partner-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Fallback legacy .print-brand */
.print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}

.print-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.print-step.active {
    background: #ffffff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

.header-express-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    letter-spacing: 0.1px;
    white-space: nowrap;
    animation: badgePulse 3s infinite ease-in-out;
}

.header-express-badge .badge-icon {
    font-size: 13px;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(209, 0, 49, 0);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(209, 0, 49, 0.12);
    }
}

@media (max-width: 1100px) {
    .header-express-badge {
        display: none;
    }
}

.print-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-header-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    background: #f1f5f9;
}

.btn-header-back:hover {
    color: var(--dark);
    background: #e2e8f0;
}

/* ==========================================================================
   MAIN CONTAINER
   ========================================================================== */
.print-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ==========================================================================
   HERO / INTRO BANNER (Modern Light Split-Hero)
   ========================================================================== */
.print-intro {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--primary, #d10031);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
}

.print-intro::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(209, 0, 49, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.print-intro-left {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.print-intro-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.express-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 50px;
    box-shadow: 0 1px 3px rgba(190, 18, 60, 0.08);
}

.express-hero-badge strong {
    color: #9f1239;
    font-weight: 800;
}

.express-hero-badge .badge-lightning {
    font-size: 14px;
    filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.6));
}

.print-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
}

.print-intro h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.print-intro p {
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 14px;
    max-width: 680px;
}

.print-intro-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.print-feature-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Hero Steps Card (Right Column) */
.print-intro-right {
    flex: 0 0 360px;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.hero-steps-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.hero-steps-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.hero-steps-tag {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hero-steps-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.hero-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
}

.hero-step-item:last-child {
    margin-bottom: 0;
}

.hero-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    left: 12px;
    width: 2px;
    height: calc(100% - 18px);
    background: #f1f5f9;
}

.hero-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    z-index: 2;
}

.hero-step-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-step-text strong {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.hero-step-text span {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.35;
}

/* ==========================================================================
   UPLOAD DROPZONE
   ========================================================================== */
.upload-dropzone {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    margin-bottom: 24px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background: #fff5f6;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.upload-dropzone.dropzone-highlight {
    border-color: var(--primary) !important;
    background: #fff1f2 !important;
    box-shadow: 0 0 0 4px rgba(209, 0, 49, 0.25), 0 8px 24px rgba(209, 0, 49, 0.15) !important;
    animation: dropzonePulse 1.5s infinite alternate ease-in-out;
}

@keyframes dropzonePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 4px rgba(209, 0, 49, 0.2); }
    100% { transform: scale(1.015); box-shadow: 0 0 0 8px rgba(209, 0, 49, 0.35); }
}

.upload-dropzone h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 6px;
}

.upload-dropzone p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.btn-upload-browse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(209, 0, 49, 0.3);
    transition: all 0.2s ease;
}

.btn-upload-browse:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(209, 0, 49, 0.4);
}

.dropzone-hints {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
}

/* ==========================================================================
   BATCH TOOLBAR (GLOBAL BAR)
   ========================================================================== */
.batch-toolbar {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
}

.batch-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.batch-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.batch-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.select-custom {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-custom:focus {
    border-color: var(--primary);
    background: #ffffff;
}

.btn-batch-apply {
    background: var(--dark);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-batch-apply:hover {
    background: #000000;
}

.batch-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.batch-stat {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.batch-stat strong {
    color: var(--dark);
}

.btn-clear-all {
    background: transparent;
    border: 1px solid #fee2e2;
    color: #ef4444;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-all:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* ==========================================================================
   PHOTO CARDS GRID
   ========================================================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.photo-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

/* Preview Area */
.card-preview-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0f172a;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.card-img-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease, outline 0.2s ease;
}

.card-img-preview.with-white-border {
    outline: 5px solid #ffffff;
    outline-offset: -5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.card-preview-wrap:hover .card-img-preview {
    transform: scale(1.02);
}

/* Foto-Puzzle Card Preview (Querformat 28x19 cm = 28/19 / Hochformat 19x28 cm = 19/28) */
.photo-card.card-puzzle .card-preview-wrap,
.card-preview-wrap.puzzle-preview-wrap {
    aspect-ratio: 28 / 19;
    background: #111827;
}
.photo-card.card-puzzle.is-portrait .card-preview-wrap,
.card-preview-wrap.puzzle-preview-wrap.is-portrait {
    aspect-ratio: 19 / 28;
}
.photo-card.card-puzzle .card-img-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Puzzle Overlay Caption on Preview & Canvas */
.puzzle-preview-caption {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    max-width: 85%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 6;
    pointer-events: none;
}

@keyframes puzzleTextAddedGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(209, 0, 49, 0.9), 0 4px 16px rgba(0, 0, 0, 0.5);
        transform: translate(-50%, -50%) scale(0.92);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(209, 0, 49, 0.4), 0 8px 24px rgba(209, 0, 49, 0.6);
        transform: translate(-50%, -50%) scale(1.08);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(209, 0, 49, 0), 0 4px 16px rgba(0, 0, 0, 0.35);
        transform: translate(-50%, -50%) scale(1.0);
    }
}

.puzzle-draggable-textbox {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    cursor: move;
    user-select: none;
    z-index: 25;
    padding: 6px 14px;
    border-radius: 8px;
    white-space: nowrap;
    border: 2px dashed transparent;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

/* Inactive / Deselected state: Clean view for natural customer preview */
.puzzle-draggable-textbox:not(.is-active) {
    cursor: pointer;
    box-shadow: none;
}
.puzzle-draggable-textbox:not(.is-active) .puzzle-textbox-del,
.puzzle-draggable-textbox:not(.is-active) .puzzle-textbox-resize {
    display: none !important;
}

.puzzle-draggable-textbox:not(.is-active):hover {
    border-color: rgba(209, 0, 49, 0.45);
    background: rgba(209, 0, 49, 0.08);
}

/* Active / Selected state: Shows dashed edit border and controls */
.puzzle-draggable-textbox.is-active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.puzzle-draggable-textbox.is-active:hover,
.puzzle-draggable-textbox.is-active:active {
    border-color: #ef4444;
    border-style: solid;
    box-shadow: 0 6px 20px rgba(209, 0, 49, 0.5);
}

.puzzle-draggable-textbox.is-active .puzzle-textbox-del {
    display: flex !important;
}

.puzzle-draggable-textbox.is-active .puzzle-textbox-resize {
    display: block !important;
}

.puzzle-draggable-textbox.is-pulsing {
    animation: puzzleTextAddedGlow 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.puzzle-draggable-textbox .puzzle-textbox-text {
    pointer-events: none;
    font-weight: 700;
    line-height: 1.25;
}

.puzzle-draggable-textbox.bg-none {
    background: transparent;
}
.puzzle-draggable-textbox.bg-none .puzzle-textbox-text {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.95);
}
.puzzle-draggable-textbox.bg-white {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.puzzle-draggable-textbox.bg-white .puzzle-textbox-text {
    text-shadow: none;
}
.puzzle-draggable-textbox.bg-dark {
    background: rgba(24, 24, 27, 0.90);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.puzzle-textbox-del {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.puzzle-textbox-resize {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--primary, #D10031);
    border: 1.5px solid #ffffff;
    cursor: nwse-resize;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.card-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    transition: opacity 0.2s ease;
    z-index: 8;
    pointer-events: none;
}

.card-preview-wrap:hover .card-preview-overlay {
    opacity: 1;
}

.btn-card-edit-overlay {
    background: #ffffff;
    color: var(--dark);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    pointer-events: auto;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Badges on preview */
.card-badge-top-left {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 5;
}

.card-badge-top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 25;
    pointer-events: auto;
}

.badge-dpi {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.badge-dpi.dpi-good {
    border-left: 3px solid #10b981;
}

.badge-dpi.dpi-medium {
    border-left: 3px solid #f59e0b;
}

.badge-dpi.dpi-bad {
    border-left: 3px solid #ef4444;
}

.badge-format {
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}

.btn-card-delete {
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    pointer-events: auto;
}

.btn-card-delete:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Card Body */
.card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.card-filename {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.card-item-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.card-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

.card-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.card-field label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

.card-field.card-field-full {
    grid-column: span 2;
}

.card-field select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 5px 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Clean static value display when only 1 option exists */
.card-static-value {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}

.rand-segmented-control {
    display: flex;
    background: #f1f5f9;
    padding: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    gap: 2px;
}

.rand-seg-btn {
    flex: 1;
    padding: 5px 7px;
    font-size: 11.5px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
}

.rand-seg-btn.active {
    background: #ffffff;
    color: var(--dark);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rand-seg-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: var(--dark);
}

.card-field select:focus {
    border-color: var(--primary);
}

.card-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

/* Quantity Stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    overflow: hidden;
}

.qty-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-input {
    width: 44px;
    height: 28px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: #ffffff;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0 2px;
    cursor: text;
    transition: all 0.15s ease;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.btn-card-edit {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-card-edit:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   STICKY BOTTOM CHECKOUT BAR (COMPACT & MODERN)
   ========================================================================== */
.print-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    padding: 8px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.print-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.bottom-summary-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.summary-pill {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.summary-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.summary-counts-val {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dark);
}

.summary-counts-val strong {
    font-weight: 800;
    color: var(--dark);
}

.summary-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.bottom-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-bottom-add-product {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-bottom-add-product:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-checkout {
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    padding: 9px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(209, 0, 49, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-checkout:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(209, 0, 49, 0.4);
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================================
   FULLSCREEN LIGHTBOX EDITOR MODAL
   ========================================================================== */
.editor-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Editor Top Bar */
.editor-top-bar {
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #ffffff;
    z-index: 10;
    box-sizing: border-box;
    width: 100%;
    flex-wrap: nowrap;
}

.editor-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.editor-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.editor-format-select {
    background: rgba(209, 0, 49, 0.2);
    color: #fecdd3;
    border: 1px solid rgba(209, 0, 49, 0.5);
    border-radius: 50px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.editor-format-select:focus,
.editor-format-select:hover {
    background: rgba(209, 0, 49, 0.35);
    border-color: var(--primary);
    color: #ffffff;
}

.editor-format-select option {
    background: #1f2937;
    color: #ffffff;
}

.editor-format-pill {
    background: rgba(209, 0, 49, 0.15);
    font-size: 11.5px;
    font-weight: 700;
    color: #fecdd3;
    padding: 3px 8px;
    border-radius: 50px;
    border: 1px solid rgba(209, 0, 49, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

.editor-counter-badge {
    font-size: 11.5px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.editor-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-editor-wall {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.btn-editor-wall:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff;
}

.btn-editor-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-editor-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-editor-save {
    background: var(--primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(209, 0, 49, 0.3);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-editor-save:hover {
    background: var(--primary-hover);
}

.btn-editor-save-next {
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-editor-save-next:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Editor Main Body */
.editor-main {
    flex: 1 1 0;
    min-height: 0;
    height: calc(100vh - 54px);
    max-height: calc(100vh - 54px);
    height: calc(100dvh - 54px);
    max-height: calc(100dvh - 54px);
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Canvas Stage (Left / Center) */
.editor-canvas-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090d16;
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

.crop-workspace {
    position: relative;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.9);
    cursor: grab;
    overflow: hidden;
    background: #ffffff;
}

.crop-workspace:active {
    cursor: grabbing;
}

.crop-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
}

.canvas-img-element {
    position: absolute;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
}

.crop-white-border-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 12px solid #ffffff;
    box-sizing: border-box;
    pointer-events: none;
    display: none;
}

/* Corner Drag Handles */
.crop-handle {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 10;
    pointer-events: auto;
    box-sizing: border-box;
    transition: border-color 0.15s ease, transform 0.15s ease;
    touch-action: none;
}

.crop-handle.handle-tl {
    top: -2px;
    left: -2px;
    border-top: 4px solid #ffffff;
    border-left: 4px solid #ffffff;
    cursor: nwse-resize;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
}

.crop-handle.handle-tr {
    top: -2px;
    right: -2px;
    border-top: 4px solid #ffffff;
    border-right: 4px solid #ffffff;
    cursor: nesw-resize;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
}

.crop-handle.handle-br {
    bottom: -2px;
    right: -2px;
    border-bottom: 4px solid #ffffff;
    border-right: 4px solid #ffffff;
    cursor: nwse-resize;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
}

.crop-handle.handle-bl {
    bottom: -2px;
    left: -2px;
    border-bottom: 4px solid #ffffff;
    border-left: 4px solid #ffffff;
    cursor: nesw-resize;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
}

.crop-handle:hover,
.crop-handle:active,
.crop-workspace.is-resizing .crop-handle {
    border-color: var(--primary, #d10031);
    transform: scale(1.15);
}

.crop-workspace.is-resizing .crop-grid-lines {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
}

/* Stage Navigation Buttons (Previous / Next Image) */
.btn-stage-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 20;
}

.btn-stage-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-stage-nav.prev {
    left: 20px;
}

.btn-stage-nav.next {
    right: 20px;
}

/* Editor Control Sidebar / Bottom Tray */
.editor-sidebar {
    width: 360px;
    min-width: 340px;
    max-width: 380px;
    flex-shrink: 0;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    position: relative;
    background: #111827;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: scroll !important;
    overflow-x: hidden;
    color: #ffffff;
    z-index: 25;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: auto;
    scrollbar-color: #64748b #0f172a;
}

.editor-sidebar::-webkit-scrollbar {
    width: 14px !important;
    display: block !important;
}

.editor-sidebar::-webkit-scrollbar-track {
    background: #0f172a !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.editor-sidebar::-webkit-scrollbar-thumb {
    background: #64748b !important;
    border-radius: 7px !important;
    border: 3px solid #0f172a !important;
    min-height: 48px !important;
    cursor: pointer !important;
}

.editor-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

.editor-sidebar::-webkit-scrollbar-thumb:active {
    background: var(--primary, #D10031) !important;
}

/* Tool Tabs */
.editor-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
    position: sticky;
    top: 0;
    z-index: 15;
    flex-shrink: 0;
}

.editor-tab-btn {
    flex: 1;
    padding: 12px 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.editor-tab-btn span {
    font-size: 16px;
}

.editor-tab-btn.active {
    color: #ffffff;
    border-bottom-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
}

/* Tab Content */
.editor-tab-content {
    padding: 20px 20px 60px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.tool-group-title {
    font-size: 11.5px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

/* Crop Mode Switcher */
.crop-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px;
    border-radius: var(--radius-sm);
    gap: 4px;
}

.crop-mode-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.crop-mode-btn.active {
    background: var(--primary);
    color: #ffffff;
}

/* Action Button Grid (Rotate, Flip, Reset) */
.tool-btn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.tool-btn span {
    font-size: 18px;
}

/* Sliders */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.slider-val {
    color: #f87171;
    font-weight: 700;
}

.slider-input {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Filter Cards */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    border-color: var(--primary);
    background: rgba(209, 0, 49, 0.15);
}

.filter-icon {
    font-size: 20px;
}

.filter-label {
    font-size: 12px;
    font-weight: 700;
}

/* Checkbox Toggle Item */
.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-label {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: #334155;
    border-radius: 50px;
    transition: background 0.2s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-item.checked .toggle-switch {
    background: var(--primary);
}

.toggle-item.checked .toggle-switch::after {
    transform: translateX(18px);
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 980px) {
    .print-steps {
        display: none;
    }
    
    .print-intro {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 20px 18px;
    }

    .print-intro-right {
        flex: 1 1 auto;
        width: 100%;
    }

    .editor-main {
        flex-direction: column;
        height: calc(100vh - 54px);
        max-height: calc(100vh - 54px);
        height: calc(100dvh - 54px);
        max-height: calc(100dvh - 54px);
    }

    .editor-canvas-stage {
        flex: 1 1 50%;
        min-height: 220px;
    }

    .editor-sidebar {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1 1 50%;
        height: auto;
        max-height: 50vh;
        min-height: 200px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        overflow-y: auto !important;
    }

    .btn-stage-nav {
        display: none; /* Swipe / Onscreen tabs on mobile */
    }

    .batch-toolbar {
        top: 55px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .batch-left, .batch-right {
        justify-content: space-between;
    }

    .batch-controls {
        width: 100%;
    }

    .batch-controls select {
        flex: 1;
    }

    .print-bottom-bar {
        padding: 6px 14px;
    }

    .print-bottom-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .bottom-summary-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 1px;
    }

    .summary-pill.summary-pill-counts .summary-label {
        display: none;
    }

    .summary-counts-val {
        font-size: 11.5px;
        color: var(--text-muted);
    }

    .summary-pill.summary-pill-price .summary-label {
        display: none;
    }

    .summary-price {
        font-size: 16.5px;
    }

    .btn-checkout {
        width: auto;
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 50px;
    }

    .btn-bottom-add-product {
        padding: 7px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .btn-add-prod-label {
        display: none;
    }
    .btn-bottom-add-product {
        padding: 7px 10px;
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 56px;
    }
    .print-brand-wrap {
        gap: 10px;
    }

    .brand-logo-24foto {
        height: 36px;
    }

    .brand-divider {
        height: 30px;
    }

    .brand-logo-filialen {
        height: 32px;
    }

    .brand-partner-sub {
        display: none;
    }

    .btn-header-back {
        padding: 5px 8px;
        font-size: 12px;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .print-container {
        padding: 14px 12px;
    }

    .upload-dropzone {
        padding: 30px 16px;
    }

    /* Mobile Editor Top Bar Optimization */
    .editor-top-bar {
        padding: 8px 12px;
        gap: 6px;
    }

    .editor-title {
        display: none; /* Hide lengthy filename so format & counter fit in one single line on phones */
    }

    .editor-title-area {
        gap: 6px;
    }

    .editor-format-select {
        font-size: 11px;
        padding: 2px 6px;
        max-width: 105px;
    }

    .editor-format-pill {
        font-size: 11px;
        padding: 2px 7px;
    }

    .editor-counter-badge {
        font-size: 11px;
    }

    .btn-editor-cancel {
        padding: 5px 8px;
        font-size: 11.5px;
    }

    .btn-editor-save {
        padding: 5px 10px;
        font-size: 11.5px;
    }

    .btn-editor-save-next {
        padding: 5px 10px;
        font-size: 11.5px;
    }
}

/* ==========================================================================
   CHECKOUT MODAL
   ========================================================================== */
.checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.checkout-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.checkout-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.checkout-header h2 {
    font-size: 19px;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.checkout-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.checkout-section-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Delivery Segmented Control */
.delivery-segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius);
    gap: 6px;
}

.delivery-tab-btn {
    background: transparent;
    border: none;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.delivery-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.delivery-tab-btn small {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
}

.delivery-tab-btn.active small {
    color: var(--primary);
}

/* Branch Cards */
.branch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.branch-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.branch-card:hover {
    border-color: var(--border-hover);
    background: #ffffff;
}

.branch-card.selected {
    border-color: var(--primary);
    background: #fff5f6;
}

.branch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.branch-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--dark);
}

.branch-radio-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
}

.branch-card.selected .branch-radio-dot {
    border-color: var(--primary);
    background: var(--primary);
}

.branch-card.selected .branch-radio-dot::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}

.branch-address {
    font-size: 12.5px;
    color: var(--text-muted);
}

.branch-hours {
    font-size: 11.5px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Form Fields */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 13.5px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    color: var(--dark);
    outline: none;
    transition: all 0.2s;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(209, 0, 49, 0.1);
}

/* Payment Selector */
.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.payment-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-card:hover {
    border-color: var(--border-hover);
}

.payment-card.selected {
    border-color: var(--primary);
    background: #fff5f6;
}

.payment-icon {
    font-size: 20px;
}

.payment-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}

/* Order Summary Box */
.checkout-summary-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.summary-row.total-row {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.summary-row.total-row span:last-child {
    color: var(--primary);
    font-size: 19px;
}

/* Checkout Footer */
.checkout-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.btn-order-submit {
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(209, 0, 49, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.btn-order-submit:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(209, 0, 49, 0.45);
}

.btn-order-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   UPLOAD PROGRESS MODAL
   ========================================================================== */
.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upload-progress-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.progress-spinner {
    font-size: 40px;
    animation: rotateSpinner 2s linear infinite;
}

@keyframes rotateSpinner {
    100% {
        transform: rotate(360deg);
    }
}

.progress-bar-wrap {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, #ff4d6d 100%);
    border-radius: 50px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
}

.progress-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-wake-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 3px 10px;
    border-radius: 20px;
}

.upload-progress-card.has-error .progress-bar-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.upload-progress-card.has-error .progress-spinner {
    animation: none;
}

.upload-error-box {
    width: 100%;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    margin-top: 4px;
}

.upload-error-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #9f1239;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-error-msg {
    font-size: 12.5px;
    color: #881337;
    line-height: 1.45;
    margin-bottom: 12px;
}

.upload-error-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.upload-btn-retry {
    background: var(--primary, #D10031);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.upload-btn-retry:hover {
    background: #b5002a;
}

.upload-btn-cancel {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.upload-btn-cancel:hover {
    background: #f1f5f9;
}

/* ==========================================================================
   SUCCESS MODAL
   ========================================================================== */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.success-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    max-width: 540px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.success-icon-badge {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.success-order-pill {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    padding: 8px 18px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.success-order-num {
    font-size: 18px;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: 0.5px;
}

.success-details-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    width: 100%;
    text-align: left;
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}

.btn-success-action {
    background: var(--dark);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-success-action:hover {
    background: var(--primary);
}

@media (max-width: 640px) {
    .branch-grid, .form-grid-2, .payment-grid, .delivery-segmented-control {
        grid-template-columns: 1fr;
    }

    .checkout-body {
        padding: 16px;
    }
}

/* ==========================================================================
   EMBEDDED MODE (Divi / WordPress / iFrames: ?embed=1)
   ========================================================================== */
html.is-embedded,
body.is-embedded {
    background: transparent !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

body.is-embedded .print-header,
body.is-embedded .print-intro,
body.is-embedded .print-footer {
    display: none !important;
}

body.is-embedded #print-main-screen {
    flex: none !important;
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    max-width: 100% !important;
    padding: 15px 15px 35px 15px !important;
    margin: 0 auto !important;
}

body.is-embedded .print-bottom-bar {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 30px !important;
    border-radius: 16px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.is-embedded .checkout-modal-overlay,
body.is-embedded .editor-modal-overlay,
body.is-embedded .upload-progress-overlay,
body.is-embedded .success-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important;
}

/* ==========================================================================
   PRODUCT SELECTION TILES & ONBOARDING WIZARD
   ========================================================================== */
.product-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0 40px;
}

@media (min-width: 1280px) {
    .product-selection-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-tile-card {
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.product-tile-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 16px 32px rgba(209, 0, 49, 0.12);
}

.product-tile-card.selected {
    border-color: var(--primary);
    background: #fffcfc;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.product-tile-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-tile-card:hover .product-tile-img {
    transform: scale(1.06);
}

.product-tile-icon-fallback {
    display: none;
    font-size: 54px;
    line-height: 1;
}

.product-tile-media.fallback-mode .product-tile-icon-fallback {
    display: block;
}

.product-tile-media.fallback-mode .product-tile-img {
    display: none;
}

.product-tile-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    padding: 5px 11px;
    border-radius: 20px;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 2;
}

.product-tile-body {
    padding: 20px 24px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-tile-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: -0.4px;
}

.product-tile-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.product-tile-price {
    font-size: 13px;
    color: var(--text-muted);
}

.product-tile-price strong {
    font-size: 18px;
    color: var(--dark);
    font-weight: 800;
    margin-left: 2px;
}

.btn-product-select {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.product-tile-card:hover .btn-product-select {
    background: var(--primary);
}

/* Wizard View Container */
.wizard-container {
    max-width: 960px;
    margin: 20px auto 40px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.wizard-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.wizard-header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-wizard-back {
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-wizard-back:hover {
    background: #e2e8f0;
}

.btn-wizard-cart-return {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.btn-wizard-cart-return:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #14532d;
}

.wizard-step-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.wizard-step-sub {
    font-size: 14.5px;
    color: var(--text-muted);
    margin-bottom: 26px;
}

.wizard-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 400px));
    gap: 20px;
    margin-bottom: 30px;
}

.wizard-option-card {
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 20px 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 440px;
    width: 100%;
    box-sizing: border-box;
}

.wizard-option-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.wizard-option-card.active {
    border-color: var(--primary);
    background: #fffcfc;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.wizard-option-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.wizard-option-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.wizard-option-card:hover .wizard-option-thumb {
    transform: scale(1.06);
}

.wizard-option-icon-fallback {
    display: none;
    font-size: 34px;
    line-height: 1;
}

.wizard-option-thumb-wrap.fallback-mode .wizard-option-icon-fallback {
    display: block;
}

.wizard-option-thumb-wrap.fallback-mode .wizard-option-thumb {
    display: none;
}

.wizard-option-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.wizard-option-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.wizard-option-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}



/* Format Quick-Chips in Wizard */
.wizard-formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.wizard-format-chip {
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.wizard-format-chip:hover {
    background: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.wizard-format-chip.active {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.wizard-format-chip-size {
    font-size: 15px;
    font-weight: 800;
    color: var(--dark);
}

.wizard-format-chip-price {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    margin-top: 3px;
}

/* Rich Format Cards for Wall Art (Canvas, Poster, Foam) */
.wizard-formats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.wizard-format-card-rich {
    background: #ffffff;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.wizard-format-card-rich:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.wizard-format-card-rich.active {
    border-color: var(--primary, #D10031);
    background: #fffcfc;
    box-shadow: 0 0 0 2px rgba(209, 0, 49, 0.15), 0 8px 24px rgba(209, 0, 49, 0.08);
}

.wizard-format-card-rich.promoted {
    border-color: rgba(209, 0, 49, 0.35);
}

.wf-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.wf-visual-box {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wizard-format-card-rich:hover .wf-visual-box {
    transform: scale(1.05);
}

.wf-visual-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.wf-visual-frame.wf-type-canvas {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 3.5px solid #d97706; /* Echtholz-Look */
    box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.15);
}

.wf-visual-frame.wf-type-poster {
    width: 42px;
    height: 52px;
    background: #ffffff;
    border: 2px solid #0284c7; /* Poster Fineart Look */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.wf-visual-frame.wf-type-foam {
    width: 44px;
    height: 50px;
    background: #ffffff;
    border: 3px solid #64748b; /* 5mm White Foam Edge */
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.12);
}

.wf-frame-inner {
    font-size: 10px;
    font-weight: 800;
    color: #475569;
    letter-spacing: -0.2px;
}

.wf-card-details {
    flex: 1;
    min-width: 0;
}

.wf-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 3px;
}

.wf-card-sub {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.35;
}

.wf-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.wf-card-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary, #D10031);
}

.wf-card-check {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    transition: color 0.2s;
}

.wizard-format-card-rich.active .wf-card-check {
    color: var(--primary, #D10031);
}

/* ==========================================================================
   WIZARD STICKY BOTTOM ACTION BAR (Option 1)
   ========================================================================== */
.wizard-sticky-bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
    padding: 16px 28px;
    margin-top: 35px;
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: -35px;
    border-radius: 0 0 19px 19px;
    transition: all 0.25s ease;
}

.wizard-sticky-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wizard-sticky-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wizard-sticky-icon {
    font-size: 24px;
    line-height: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wizard-sticky-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.wizard-sticky-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.wizard-sticky-val {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.btn-wizard-continue {
    padding: 13px 34px;
    font-size: 15.5px;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(209, 0, 49, 0.35);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-wizard-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(209, 0, 49, 0.45);
}

@media (max-width: 640px) {
    .wizard-sticky-bottom-bar {
        padding: 12px 16px;
        margin-left: -16px;
        margin-right: -16px;
        margin-bottom: -24px;
        border-radius: 0;
    }
    .wizard-sticky-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .wizard-sticky-summary {
        justify-content: flex-start;
    }
    .btn-wizard-continue {
        width: 100%;
        justify-content: center;
    }
}

/* Active Preset Banner in Upload Workspace */
.active-preset-banner {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.active-preset-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.active-preset-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.active-preset-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
}

.active-preset-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-pill {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.active-preset-tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.preset-tab-btn {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.preset-tab-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--dark);
}

.preset-tab-btn.active {
    background: #1e293b;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.preset-active-dot {
    background: #22c55e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 2px;
}

.btn-change-preset {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--dark);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-change-preset:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-add-another-product {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.btn-add-another-product:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.btn-upload-more-products {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-upload-more-products:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: var(--shadow-sm);
}

.card-product-tag {
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    letter-spacing: 0.2px;
}

.card-field-product select {
    font-weight: 700;
    color: #0f172a;
    background-color: #f8fafc;
}

@media (max-width: 640px) {
    .product-selection-grid {
        grid-template-columns: 1fr;
    }
    .wizard-container {
        padding: 24px 18px;
        border-radius: 14px;
    }
    .wizard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ==========================================================================
   VOLUME DISCOUNT PROGRESS BAR BANNER
   ========================================================================== */

.volume-discount-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.volume-discount-banner.unlocked {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
    box-shadow: 0 4px 15px rgba(22, 101, 52, 0.08);
}

.discount-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.discount-banner-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--dark);
}

.discount-banner-icon {
    font-size: 18px;
    line-height: 1;
}

.discount-banner-text {
    font-weight: 600;
}

.discount-banner-text strong {
    color: var(--primary);
}

.volume-discount-banner.unlocked .discount-banner-text strong {
    color: #166534;
}

.discount-banner-pill {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    white-space: nowrap;
}

.volume-discount-banner.unlocked .discount-banner-pill {
    background: #166534;
    color: #ffffff;
    border-color: #166534;
}

.discount-progress-track {
    width: 100%;
    height: 9px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.discount-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d10031 0%, #ff4d6d 100%);
    border-radius: 20px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.volume-discount-banner.unlocked .discount-progress-fill {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

/* ==========================================================================
   SMARTPHONE LIVE QR-SYNC & MOBILE COMPANION
   ========================================================================== */

.btn-upload-qr {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--dark);
    font-size: 14.5px;
    font-weight: 700;
    padding: 11px 22px;
    border-radius: 50px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    margin-left: 8px;
}

.btn-upload-qr:hover {
    border-color: var(--dark);
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Hide smartphone sync button when accessed directly from smartphones / tablets */
@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
    .btn-upload-qr {
        display: none !important;
    }
}

/* Sync Modal (Desktop) */
.sync-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.sync-modal-card {
    background: #ffffff;
    border-radius: 20px;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sync-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sync-modal-body {
    padding: 24px;
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px;
    align-items: center;
}

.sync-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sync-qrcode-container {
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 180px;
}

.sync-qrcode-container img,
.sync-qrcode-container canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.sync-status-pill {
    margin-top: 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sync-status-pill.connected {
    background: #eff6ff;
    color: #0284c7;
    border: 1px solid #bfdbfe;
}

.sync-status-pill.uploading {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.sync-status-pill.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.sync-instructions h4 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--dark);
}

.sync-instructions ol {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
}

.sync-instructions ol li {
    margin-bottom: 6px;
}

.sync-modal-footer {
    padding: 14px 24px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 580px) {
    .sync-modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    .sync-instructions ol {
        text-align: left;
    }
}

/* Mobile Companion Screen */
.mobile-sync-screen {
    max-width: 500px;
    margin: 20px auto;
    padding: 0 16px;
}

.mobile-sync-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 24px 20px;
}

.mobile-sync-header {
    text-align: center;
    margin-bottom: 22px;
}

.mobile-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.mobile-sync-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.mobile-sync-header p {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.btn-mobile-pick {
    width: 100%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(209, 0, 49, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-mobile-pick:active {
    transform: scale(0.98);
}

.mobile-thumbs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.mobile-thumb-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}

.mobile-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-mobile-send {
    width: 100%;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 15px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-mobile-send:active {
    transform: scale(0.98);
}

/* ==========================================================================
   VOUCHER / DISCOUNT CODE IN CHECKOUT
   ========================================================================== */
.checkout-voucher-section {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 16px;
}

.voucher-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.voucher-input-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
}

.voucher-input {
    flex: 1;
    padding-left: 36px !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.btn-voucher-apply {
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-voucher-apply:hover {
    background: var(--primary);
}

.voucher-status-msg {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
    line-height: 1.4;
}

.voucher-status-msg.success {
    color: #16a34a;
}

.voucher-status-msg.error {
    color: #dc2626;
}

/* ==========================================================================
   WALL PREVIEW MODAL (LIVE-WANDVORSCHAU)
   ========================================================================== */
.wall-preview-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.wall-preview-modal-card {
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 1040px;
    height: 92vh;
    max-height: 820px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: zoomIn 0.25s ease;
}

.wall-modal-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.wall-modal-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wall-modal-icon {
    font-size: 26px;
}

.wall-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--dark);
}

.wall-modal-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.wall-modal-controls {
    padding: 10px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wall-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wall-control-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.wall-format-pills, .wall-frame-pills, .wall-room-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wall-pill-btn, .wall-room-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.wall-pill-btn:hover, .wall-room-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff5f6;
}

.wall-pill-btn.active, .wall-room-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(209, 0, 49, 0.3);
}

/* Wall Stage & Room */
.wall-stage {
    flex: 1;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f1f5f9;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: background-image 0.25s ease-in-out;
}

.wall-lighting-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.08) 100%);
    pointer-events: none;
}

.wall-artwork-container {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wall-artwork-frame {
    position: relative;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35), 0 6px 14px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wall-artwork-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Frame Types */
.wall-artwork-frame.frame-none {
    border: none;
    border-radius: 2px;
}

.wall-artwork-frame.frame-canvas {
    border: none;
    border-radius: 2px;
    box-shadow: 6px 18px 38px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.wall-artwork-frame.frame-black {
    border: 12px solid #111827;
    border-radius: 3px;
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.42), inset 0 0 0 1px #374151;
}

.wall-artwork-frame.frame-white {
    border: 13px solid #ffffff;
    border-radius: 3px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 1px #e2e8f0;
}

.wall-artwork-frame.frame-wood {
    border: 13px solid #c29b68;
    border-radius: 3px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), inset 0 0 0 1px #9c7340;
}

.wall-artwork-dimension-tag {
    margin-top: 10px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.wall-modal-footer {
    padding: 12px 20px;
    background: #ffffff;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.wall-footer-price-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wall-footer-format {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
}

.wall-footer-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.wall-footer-actions {
    display: flex;
    gap: 10px;
}

.btn-wall-apply {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-wall-apply:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(209, 0, 49, 0.3);
}

.btn-wall-close {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-wall-close:hover {
    background: #e2e8f0;
    color: var(--dark);
}

/* Card Wall Preview Trigger Button */
.btn-card-wall {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.btn-card-wall:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 640px) {
    .wall-preview-modal-card {
        height: 95vh;
        max-height: 95vh;
    }

    .wall-modal-controls {
        padding: 8px 12px;
        gap: 8px;
    }

    .wall-artwork-container {
        top: 36%;
    }

    .wall-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-wall-apply {
        justify-content: center;
    }
}

/* ==========================================================================
   24FOTO RICH FOOTER (PHOTO HUBER & PHOTO ZENTRUM - LIGHT THEME)
   ========================================================================== */
.print-footer {
    background: #f8fafc;
    color: #475569;
    border-top: 1px solid #e2e8f0;
    margin-top: 60px;
    padding-top: 45px;
    font-size: 13.5px;
    line-height: 1.6;
    position: relative;
    z-index: 10;
}

.print-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 1fr 0.9fr;
    gap: 36px 30px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col-brand {
    gap: 14px;
}

.footer-brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-logo-24foto {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

.footer-brand-divider {
    width: 1px;
    height: 32px;
    background: #cbd5e1;
}

.footer-logo-filialen {
    height: 34px;
    width: auto;
    display: block;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.footer-desc {
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
}

.footer-trust-pills {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    background: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    width: fit-content;
}

.footer-col-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-location-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.footer-location-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.location-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    display: block;
    margin-bottom: 2px;
}

.location-address {
    color: #475569;
    font-size: 12.5px;
    margin-bottom: 5px;
}

.location-contact {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
    color: #64748b;
}

.location-contact a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.location-contact a:hover {
    color: #1e293b;
    text-decoration: underline;
}

.location-hours {
    font-size: 11.5px;
    color: #64748b;
}

.footer-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
}

.footer-info-list li strong {
    color: #0f172a;
}

.footer-list-icon {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.footer-list-icon:empty {
    display: none;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-nav-list li a {
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    padding: 2px 0;
}

.footer-nav-list li a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-bottom-bar {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
}

.footer-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.footer-bottom-inner strong {
    color: #334155;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-legal-links .sep {
    color: #cbd5e1;
}

@media (max-width: 1100px) {
    .print-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .print-footer {
        margin-top: 40px;
        padding-top: 30px;
    }

    .print-footer-inner {
        grid-template-columns: 1fr;
        padding: 0 16px 25px;
        gap: 24px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* =========================================================================
   24FOTO TOP PROMOTION & FLASH SALES BAR
   ========================================================================= */

.promotion-top-bar {
    background: linear-gradient(135deg, #b91c1c 0%, #D10031 50%, #991b1b 100%);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(209, 0, 49, 0.25);
    position: relative;
    z-index: 999;
}

body.is-embedded .promotion-top-bar {
    display: none !important;
}

.promo-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.promo-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.promo-pill-badge {
    background: #ffffff;
    color: #D10031;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.promo-bar-text {
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.promo-countdown-box {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.promo-countdown-box strong {
    font-family: monospace, sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #fef08a;
    letter-spacing: 0.5px;
}

.btn-promo-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1;
}

.btn-promo-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Product Tiles & Format Chips Promotion Badges and Strike-Throughs */
.strike-price {
    color: #94a3b8;
    font-weight: 500;
    font-size: 13px;
    margin-right: 4px;
    text-decoration: line-through;
}

.promo-price {
    color: #D10031;
    font-weight: 800;
    font-size: 16px;
}

.product-tile-badge.promo-badge {
    background: linear-gradient(135deg, #D10031, #b91c1c);
    color: #ffffff;
    font-weight: 800;
    border: none;
    animation: promoPulse 2s infinite ease-in-out;
}

@keyframes promoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.product-tile-card.has-promotion {
    border-color: rgba(209, 0, 49, 0.35);
}

.product-tile-card.has-promotion:hover {
    border-color: #D10031;
    box-shadow: 0 12px 30px rgba(209, 0, 49, 0.15);
}

/* Format Chips in Wizard */
.chip-strike-price {
    color: #94a3b8;
    font-weight: 500;
    font-size: 11px;
    margin-right: 4px;
    text-decoration: line-through;
}

.chip-promo-price {
    color: #D10031;
    font-weight: 800;
}

.wizard-format-chip.promoted {
    border-color: rgba(209, 0, 49, 0.3);
}

@media (max-width: 768px) {
    .promo-bar-inner {
        flex-direction: row;
    }
    .promo-bar-content {
        font-size: 12px;
        gap: 8px;
    }
    .promo-bar-text {
        font-size: 12px;
    }
    .promo-pill-badge {
        font-size: 10px;
        padding: 2px 7px;
    }
    .promo-countdown-box {
        font-size: 11px;
    }
}

/* ==========================================================================
   RETRO PRINTS, POLAROID 600 & PHOTOSTRIP STYLES
   ========================================================================== */

/* Font Families for Live Retro Text */
.font-marker {
    font-family: 'Caveat', cursive, sans-serif !important;
    font-size: 20px !important;
    letter-spacing: 0.3px;
    font-weight: 700;
}
.font-typewriter {
    font-family: 'Courier Prime', monospace !important;
    font-size: 14px !important;
    letter-spacing: -0.2px;
}
.font-clean {
    font-family: var(--font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}
.font-serif {
    font-family: 'Georgia', 'Gelasio', 'Times New Roman', serif !important;
    font-size: 14px !important;
    letter-spacing: 0.2px;
}

/* Polaroid 600 Card */
.photo-card.card-retro-pola {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    padding: 14px 14px 16px 14px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.photo-card.card-retro-pola:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12);
}
.photo-card.card-retro-pola.retro-black {
    background: #18181b;
    border-color: #27272a;
    color: #f8fafc;
}

/* 1:1 Square Photo Container */
.photo-card.card-retro-pola .card-preview-wrap {
    aspect-ratio: 1 / 1;
    width: 100%;
    background: #ffffff;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.12);
}
.photo-card.card-retro-pola.retro-black .card-preview-wrap {
    background: #18181b;
    border: 1px solid #27272a;
}
.photo-card.card-retro-pola .card-img-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Polaroid Chin display on card */
.pola-card-chin {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    cursor: pointer;
    text-align: center;
    border-radius: 4px;
    transition: background 0.15s;
    padding: 3px 8px;
    box-sizing: border-box;
}
.pola-card-chin:hover {
    background: rgba(0, 0, 0, 0.04);
}
.photo-card.card-retro-pola.retro-black .pola-card-chin:hover {
    background: rgba(255, 255, 255, 0.06);
}
.pola-card-chin.has-text {
    font-size: 13.5px;
    color: #1e293b;
    word-break: break-word;
}
.photo-card.card-retro-pola.retro-black .pola-card-chin.has-text {
    color: #f8fafc;
}

/* 4er-Fotostreifen Card & Visualizer */
.photo-card.card-retro-strip {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}
.photo-card.card-retro-strip.retro-black {
    background: #18181b;
    border-color: #27272a;
    color: #f8fafc;
}

/* Compact, authentic 4er-Streifen preview */
.card-preview-wrap.photostrip-card-preview {
    aspect-ratio: auto;
    height: 250px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px;
    box-sizing: border-box;
}
.photo-card.card-retro-strip.retro-black .photostrip-card-preview {
    background: #09090b;
    border-color: #27272a;
}

.photostrip-mini-strip {
    display: flex;
    flex-direction: column;
    width: 95px;
    background: #ffffff !important;
    border-radius: 4px;
    padding: 6px 5px 8px 5px;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    box-sizing: border-box;
}
.photostrip-mini-strip.strip-black {
    background: #18181b !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
    border: 1px solid #27272a;
}
.photostrip-card-preview:hover .photostrip-mini-strip {
    transform: scale(1.04);
}
.photostrip-mini-strip .photostrip-slot {
    aspect-ratio: 16 / 10;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photostrip-mini-strip.strip-black .photostrip-slot {
    background: #18181b;
}
.photostrip-mini-strip .photostrip-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photostrip-mini-caption {
    font-size: 8.5px;
    line-height: 1.1;
    text-align: center;
    color: #1e293b;
    padding-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 600;
}
.photostrip-mini-strip.strip-black .photostrip-mini-caption {
    color: #f8fafc;
}

/* 9er-Quadrat-Grid Card */
.photo-card.card-retro-grid {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}
.photo-card.card-retro-grid.retro-black {
    background: #18181b;
    border-color: #27272a;
    color: #f8fafc;
}
.card-preview-wrap.grid9-card-preview {
    aspect-ratio: auto;
    background: transparent;
    padding: 0;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
    display: block;
}
.grid9-matrix-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: #ffffff !important;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.photo-card.card-retro-grid.retro-black .grid9-matrix-wrap {
    background: #18181b !important;
    border-color: #27272a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
}
.grid9-tile-slot {
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-card.card-retro-grid.retro-black .grid9-tile-slot {
    background: #18181b;
}
.grid9-tile-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.retro-card-chin {
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
    color: #1e293b;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    word-break: break-word;
    transition: background 0.15s;
}
.retro-card-chin:hover {
    background: rgba(0, 0, 0, 0.04);
}
.photo-card.card-retro-grid.retro-black .retro-card-chin {
    color: #f8fafc;
}
.photo-card.card-retro-grid.retro-black .retro-card-chin:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   RETRO LIVE EDITOR FRAMES & MEDIA TRAY
   ========================================================================== */

/* 1. Authentic Polaroid 600 Editor Frame */
.editor-pola-frame {
    background: #ffffff !important;
    border-radius: 8px;
    padding: 16px 14px 18px 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.2s, box-shadow 0.2s;
    user-select: none;
    max-width: 90%;
    max-height: 88vh;
    box-sizing: border-box;
}
.editor-pola-frame.pola-black {
    background: #18181b !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px #27272a;
}
.editor-pola-slot {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-radius: 2px;
}
.editor-pola-frame.pola-black .editor-pola-slot {
    background: #18181b;
    border: 1px solid #27272a;
}
.editor-pola-chin {
    width: 100%;
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
}
.editor-pola-caption-input {
    width: 100%;
    background: transparent;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    padding: 7px 12px;
    text-align: center;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.editor-pola-caption-input:hover {
    border-color: rgba(148, 163, 184, 0.65);
}
.editor-pola-frame.pola-black .editor-pola-caption-input,
.editor-strip-frame.strip-black .editor-pola-caption-input,
.editor-grid-frame.grid-black .editor-pola-caption-input {
    border-color: #3f3f46;
    color: #f8fafc;
}
.editor-pola-caption-input:focus {
    border-style: solid;
    border-color: var(--primary, #D10031);
    background: rgba(209, 0, 49, 0.04);
}
.editor-pola-frame.pola-black .editor-pola-caption-input:focus,
.editor-strip-frame.strip-black .editor-pola-caption-input:focus,
.editor-grid-frame.grid-black .editor-pola-caption-input:focus {
    background: rgba(255, 255, 255, 0.06);
}
.editor-pola-caption-input::placeholder {
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
    font-family: var(--font);
}

/* 2. Authentic 4er-Fotostreifen Editor Frame */
.editor-strip-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 86vh;
    justify-content: center;
    padding-bottom: 75px;
}
.editor-strip-frame {
    background: #ffffff !important;
    border-radius: 8px;
    padding: 12px 10px 14px 10px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 230px;
    transition: all 0.2s;
    box-sizing: border-box;
}
.editor-strip-frame.strip-black {
    background: #18181b !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px #27272a;
}
.editor-strip-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.editor-strip-slot {
    width: 210px;
    height: 128px;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.editor-strip-frame.strip-black .editor-strip-slot {
    background: #18181b;
}
.editor-strip-slot:hover {
    border-color: var(--primary, #D10031);
}
.editor-strip-slot.active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 3px rgba(209, 0, 49, 0.4);
}
.editor-strip-slot.drag-over {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.02);
}
.editor-strip-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.slot-crop-mount {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    display: flex;
}
.editor-strip-slot .crop-workspace,
.editor-grid-slot .crop-workspace,
.editor-pola-slot .crop-workspace {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    height: 100% !important;
    cursor: grab !important;
    background: #ffffff !important;
}
.editor-pola-frame.pola-black .crop-workspace,
.editor-strip-frame.strip-black .crop-workspace,
.editor-grid-frame.grid-black .crop-workspace {
    background: #18181b !important;
}
.editor-strip-slot .crop-workspace:active,
.editor-grid-slot .crop-workspace:active,
.editor-pola-slot .crop-workspace:active {
    cursor: grabbing !important;
}
.editor-pola-frame:not(.pola-black) .crop-grid-lines,
.editor-strip-frame:not(.strip-black) .crop-grid-lines,
.editor-grid-frame:not(.grid-black) .crop-grid-lines {
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 1px, transparent 1px) !important;
}
.editor-strip-slot .crop-handle,
.editor-grid-slot .crop-handle,
.editor-pola-slot .crop-handle,
.editor-strip-slot .crop-white-border-overlay,
.editor-grid-slot .crop-white-border-overlay,
.editor-pola-slot .crop-white-border-overlay {
    display: none !important;
}
.slot-active-hint {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 6;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    letter-spacing: 0.2px;
}
.editor-strip-chin {
    width: 100%;
    margin-top: 10px;
}

/* 3. Authentic 9er-Quadrat-Grid Editor Frame */
.editor-grid-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 86vh;
    justify-content: center;
    padding-bottom: 75px;
}
.editor-grid-frame {
    background: #ffffff !important;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s;
    box-sizing: border-box;
}
.editor-grid-frame.grid-black {
    background: #18181b !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px #27272a;
}

/* Guard: Root crop-workspace must never render as orphan sibling next to retro frames */
.editor-canvas-stage:has(.editor-strip-wrapper:not([style*="display: none"])) > #crop-workspace,
.editor-canvas-stage:has(.editor-grid-wrapper:not([style*="display: none"])) > #crop-workspace,
.editor-canvas-stage:has(.editor-pola-frame:not([style*="display: none"])) > #crop-workspace {
    display: none !important;
}
.editor-grid-matrix {
    display: grid;
    grid-template-columns: repeat(3, 115px);
    grid-template-rows: repeat(3, 115px);
    gap: 6px;
}
.editor-grid-slot {
    width: 115px;
    height: 115px;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.editor-grid-frame.grid-black .editor-grid-slot {
    background: #18181b;
}
.editor-grid-slot:hover {
    border-color: var(--primary, #D10031);
}
.editor-grid-slot.active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 3px rgba(209, 0, 49, 0.4);
}
.editor-grid-slot.drag-over {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.03);
}
.editor-grid-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.editor-grid-chin {
    width: 100%;
    margin-top: 12px;
}

/* Slot Badges & Reorder Controls */
.slot-badge-num {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 5;
    pointer-events: none;
}
.slot-actions-bar {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
    z-index: 6;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    padding: 2px;
}
.slot-ctrl-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 10px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background 0.15s;
}
.slot-ctrl-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}
.slot-ctrl-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.slot-empty-notice {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 4px;
}

/* 4. Media Tray (All Available Photos) */
.editor-media-tray {
    position: absolute;
    bottom: 12px;
    left: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.media-tray-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.media-tray-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #cbd5e1;
}
.btn-tray-upload {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-tray-upload:hover {
    background: var(--primary, #D10031);
    border-color: var(--primary, #D10031);
}
.media-tray-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 6px 2px;
}
.media-tray-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: grab;
    border: 2px solid transparent;
    position: relative;
    transition: transform 0.15s, border-color 0.15s;
    background: #0f172a;
}
.media-tray-thumb:hover {
    transform: scale(1.1);
    border-color: var(--primary, #D10031);
}
.media-tray-thumb.active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 2px rgba(209, 0, 49, 0.5);
}
.media-tray-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* 5. Editor Retro Sidebar Panel */
.editor-retro-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 14px 14px 10px 14px;
    flex-shrink: 0;
}
.pola-color-toggle-big {
    display: flex;
    gap: 8px;
}
.btn-color-choice {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 8px 6px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}
.btn-color-choice:hover {
    background: rgba(255, 255, 255, 0.15);
}
.btn-color-choice.active {
    border-color: var(--primary, #D10031);
    background: rgba(209, 0, 49, 0.2);
    color: #ffffff;
}
.pola-font-grid {
    display: flex;
    gap: 6px;
}
.btn-font-choice {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 7px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.btn-font-choice:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.btn-font-choice.active {
    border-color: var(--primary, #D10031);
    background: var(--primary, #D10031);
    color: #ffffff;
}
.sidebar-text-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}
.sidebar-text-input:focus {
    border-color: var(--primary, #D10031);
    background: rgba(0, 0, 0, 0.55);
}

/* Compact Laptop / Small Screen Height Optimization */
@media (max-height: 760px) {
    .editor-tab-content {
        padding: 12px 14px 40px 14px;
        gap: 12px;
    }
    .editor-retro-panel,
    .editor-mug-panel {
        padding: 10px 12px;
        margin: 10px 10px 8px 10px;
    }
    .pola-font-grid,
    .mug-layout-grid {
        gap: 6px;
    }
    .btn-font-choice {
        padding: 5px 6px;
        font-size: 11px;
    }
    .btn-color-choice {
        padding: 6px 4px;
        font-size: 11px;
    }
    .tool-group-title {
        margin-bottom: 5px;
        font-size: 11px;
    }
    .tool-btn {
        padding: 8px 6px;
        font-size: 11px;
    }
}

/* ==========================================================================
   FOTOTASSEN & SUBLIMATIONSDRUCK (3D-MOCKUP & GALLERIE)
   ========================================================================== */
.font-serif {
    font-family: 'Georgia', 'Gelasio', 'Times New Roman', serif !important;
}

/* Card Mockup in Galerie */
.card-mug-preview-wrap {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}
.card-mug-mockup {
    width: 155px;
    height: 165px;
    position: relative;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.12));
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-mug-preview-wrap:hover .card-mug-mockup {
    transform: scale(1.06) translateY(-2px);
}
.mug-inner-rim {
    position: absolute;
    top: 0;
    left: 12px;
    width: 108px;
    height: 24px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid rgba(0, 0, 0, 0.08);
    z-index: 2;
    box-shadow: inset 0 4px 6px rgba(0,0,0,0.15);
    transition: background 0.2s;
}
.mug-body-preview {
    position: absolute;
    top: 11px;
    left: 12px;
    width: 108px;
    height: 140px;
    border-radius: 0 0 16px 16px;
    background: #ffffff;
    overflow: hidden;
    z-index: 3;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.mug-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mug-gloss-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.08) 25%, transparent 50%, rgba(0,0,0,0.05) 75%, rgba(0,0,0,0.18) 100%);
    border-radius: 0 0 16px 16px;
}
.mug-handle-preview {
    position: absolute;
    right: 8px;
    top: 30px;
    width: 30px;
    height: 80px;
    border: 11px solid #e2e8f0;
    border-left: none;
    border-radius: 0 28px 28px 0;
    z-index: 1;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.08);
    transition: border-color 0.2s;
}
.mug-preview-caption {
    position: absolute;
    bottom: 8px;
    left: 6px;
    right: 6px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(2px);
    border-radius: 4px;
    padding: 1px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* In-Editor 3D Studio Stage & Sublimation Workspace */
.editor-canvas-stage.is-mug-mode {
    background: radial-gradient(circle at 50% 38%, #ffffff 0%, #f8fafc 52%, #e2e8f0 100%) !important;
    box-shadow: inset 0 0 80px rgba(15, 23, 42, 0.06);
}

.editor-mug-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 10px 16px;
    box-sizing: border-box;
}

.mug-stage-view-toggle {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.08);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 10;
}

.btn-mug-view {
    background: transparent;
    border: none;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-mug-view:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.8);
}

.btn-mug-view.active {
    background: var(--primary, #D10031);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(209, 0, 49, 0.35);
}

.mug-3d-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    animation: fadeInMug 0.35s ease;
}

@keyframes fadeInMug {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.mug-3d-canvas-wrap {
    width: 100%;
    max-width: min(720px, 92%, calc(100vh - 210px));
    height: min(520px, calc(100vh - 210px));
    position: relative;
    border-radius: 14px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mug-3d-canvas-wrap:active {
    cursor: grabbing;
}

.mug-3d-canvas-wrap canvas {
    border-radius: 14px;
    outline: none;
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 14px 28px rgba(15, 23, 42, 0.14));
}

.mug-3d-hint-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    pointer-events: none;
    transition: opacity 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    white-space: nowrap;
    z-index: 5;
}

.mug-3d-controls-bar {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.btn-mug-3d-ctrl {
    background: rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-mug-3d-ctrl:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.btn-mug-3d-ctrl.is-spinning {
    background: var(--primary, #D10031);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(209, 0, 49, 0.35);
}

/* Flat Photorealistic Ceramic Mug Stage & Printable Frame */
.mug-flat-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    animation: fadeInMug 0.35s ease;
}

.mug-canvas-stage-wrap {
    width: 100%;
    max-width: 1300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
}

.mug-printable-top-hints {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    pointer-events: none;
    z-index: 5;
}

.mug-printable-top-hints span {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 3px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    letter-spacing: 0.2px;
}

.mug-mockup-frame {
    position: relative;
    width: 100%;
    max-width: min(1200px, 96%, calc((100vh - 175px) * (972 / 343)));
    max-width: min(1200px, 96%, calc((100dvh - 175px) * (972 / 343)));
    aspect-ratio: 972 / 343;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.16));
}

.mug-mockup-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 1;
}

/* Exact Printable Zone (210 x 90 mm) with thin dashed border */
.mug-printable-zone {
    position: absolute;
    left: 9.5%;
    top: 11.5%;
    width: 63.4%;
    height: 77.0%;
    z-index: 2;
    overflow: hidden;
    border: 2px dashed rgba(209, 0, 49, 0.65);
    border-radius: 4px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.06);
    background: #ffffff;
    cursor: grab;
}

.mug-printable-zone:active {
    cursor: grabbing;
}

/* Clean up crop workspace inside mug mode */
.editor-canvas-stage.is-mug-mode .crop-workspace {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
}

.editor-canvas-stage.is-mug-mode .crop-handle {
    display: none !important;
}

.mug-printable-hints {
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 14px;
    pointer-events: none;
    z-index: 5;
    font-size: 11px;
    font-weight: 700;
    color: rgba(100, 116, 139, 0.9);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
}

.mug-hint-label.center {
    color: var(--primary, #D10031);
}

.mug-flat-workspace {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Interactive Draggable Text Box on the Flat Mug */
.mug-draggable-textbox {
    position: absolute;
    left: 50%;
    top: 80%;
    transform: translate(-50%, -50%);
    z-index: 8;
    cursor: grab;
    user-select: none;
    touch-action: none;
    padding: 6px 16px;
    border-radius: 8px;
    border: 1.5px dashed transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    white-space: nowrap;
}

.mug-draggable-textbox:hover,
.mug-draggable-textbox.is-active,
.mug-draggable-textbox.is-dragging {
    border-color: var(--primary, #D10031);
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.mug-draggable-textbox.is-dragging {
    cursor: grabbing !important;
    transform: translate(-50%, -50%) scale(1.03);
    z-index: 12;
}

/* Background styles */
.mug-draggable-textbox.bg-white {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mug-draggable-textbox.bg-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.mug-draggable-textbox.bg-none,
.mug-draggable-textbox.bg-none:hover,
.mug-draggable-textbox.bg-none.is-active,
.mug-draggable-textbox.bg-none.is-dragging {
    background: transparent;
    box-shadow: none;
}

.mug-textbox-text {
    display: inline-block;
    line-height: 1.25;
    pointer-events: none;
    font-weight: 700;
    transition: font-size 0.15s ease, color 0.15s ease;
}

/* Text Sizes */
.mug-draggable-textbox.size-sm .mug-textbox-text { font-size: 13px; }
.mug-draggable-textbox.size-md .mug-textbox-text { font-size: 17px; }
.mug-draggable-textbox.size-lg .mug-textbox-text { font-size: 22px; }
.mug-draggable-textbox.size-xl .mug-textbox-text { font-size: 28px; }

/* Corner Resize Handle on bottom-right of the Text Box */
.mug-textbox-resize {
    position: absolute;
    bottom: -9px;
    right: -9px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--primary, #D10031);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: nwse-resize;
    touch-action: none;
    opacity: 0;
    pointer-events: auto;
    transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    z-index: 10;
}

.mug-textbox-resize::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #D10031);
}

.mug-textbox-resize:hover,
.mug-draggable-textbox.is-resizing .mug-textbox-resize {
    transform: scale(1.25);
    background: var(--primary, #D10031);
}

.mug-textbox-resize:hover::after,
.mug-draggable-textbox.is-resizing .mug-textbox-resize::after {
    background: #ffffff;
}

.mug-textbox-del {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    opacity: 0;
    pointer-events: auto;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.mug-textbox-del:hover {
    transform: scale(1.15);
    background: #dc2626;
}

.mug-draggable-textbox:hover .mug-textbox-resize,
.mug-draggable-textbox:hover .mug-textbox-del,
.mug-draggable-textbox.is-active .mug-textbox-resize,
.mug-draggable-textbox.is-active .mug-textbox-del,
.mug-draggable-textbox.is-dragging .mug-textbox-resize,
.mug-draggable-textbox.is-dragging .mug-textbox-del,
.mug-draggable-textbox.is-resizing .mug-textbox-resize,
.mug-draggable-textbox.is-resizing .mug-textbox-del {
    opacity: 1;
}

/* Sidebar Text Color Picker */
.mug-text-color-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 2px 0;
}

.mug-text-color-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.mug-text-color-btn:hover {
    transform: scale(1.18);
    border-color: #ffffff;
}

.mug-text-color-btn.active {
    transform: scale(1.22);
    border-color: #ffffff;
    box-shadow: 0 0 0 2.5px var(--primary, #D10031), 0 3px 8px rgba(0, 0, 0, 0.35);
}

/* Quick Toolbar under the Mug (like Tassendruck reference) */
.mug-quick-toolbar {
    position: relative;
    z-index: 25;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 7px 16px;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.10);
    border: 1px solid #cbd5e1;
}

.mug-tb-btn {
    border: none;
    background: transparent;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    transition: all 0.15s ease;
}

.mug-tb-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.mug-tb-btn .tb-label {
    font-size: 11.5px;
}

.mug-tb-zoom-display {
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    min-width: 44px;
    text-align: center;
}

.mug-tb-divider {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    margin: 0 4px;
}

/* Horizontal segmented grid for Text Background & Font Size */
.mug-text-bg-toggle {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
}

.mug-text-size-toggle {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
}

.mug-text-bg-toggle .tool-btn,
.mug-text-size-toggle .tool-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 4px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
    transition: all 0.15s ease !important;
    width: auto !important;
}

.mug-text-bg-toggle .tool-btn:hover,
.mug-text-size-toggle .tool-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.mug-text-bg-toggle .tool-btn.active,
.mug-text-size-toggle .tool-btn.active {
    background: var(--primary, #D10031) !important;
    border-color: var(--primary, #D10031) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(209, 0, 49, 0.35) !important;
}

/* Dedicated Fototassen Sidebar Panel with 3 Clear Tabs */
.editor-mug-panel {
    background: transparent;
    padding: 14px 16px 40px 16px;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.mug-sidebar-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mug-sidebar-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.2px;
    transition: all 0.18s ease;
}

.mug-sidebar-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.mug-sidebar-tab.active {
    background: var(--primary, #D10031);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(209, 0, 49, 0.35);
}

.mug-tab-pane {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mug-photo-thumb-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mug-sidebar-thumb-img {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mug-photo-thumb-meta {
    flex: 1;
    min-width: 0;
}

.mug-photo-thumb-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.btn-change-photo {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-change-photo:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.mug-tool-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s;
}

.mug-tool-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.mug-tool-label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.mug-color-palette {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 4px 0;
}

.mug-color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.mug-color-btn:hover {
    transform: scale(1.15);
    border-color: #ffffff;
}

.mug-color-btn.active {
    transform: scale(1.18);
    border-color: #ffffff;
    box-shadow: 0 0 0 3px var(--primary, #D10031), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Mug Font Dropdown */
.mug-select-wrapper {
    position: relative;
    width: 100%;
}

.mug-font-select {
    width: 100%;
    background-color: #1e293b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 10px 38px 10px 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.mug-font-select:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background-color: #243044;
}

.mug-font-select:focus {
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 3px rgba(209, 0, 49, 0.25);
    background-color: #1e293b;
}

.mug-font-select option {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 10px 14px;
    font-size: 14px;
}

/* Multi-Photo Mug Layer & Controls */
.btn-add-mug-photo {
    background: rgba(209, 0, 49, 0.15);
    border: 1px solid var(--primary, #D10031);
    color: #fecdd3;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-add-mug-photo:hover {
    background: var(--primary, #D10031);
    color: #ffffff;
}

.mug-photos-tray,
.shirt-photos-tray {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px;
    scrollbar-width: thin;
}

.mug-tray-item {
    position: relative;
    flex: 0 0 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    background: #0f172a;
    transition: all 0.15s ease;
}

.mug-tray-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mug-tray-item.active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 2px rgba(209, 0, 49, 0.4);
    transform: scale(1.05);
}

.mug-tray-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1;
}

/* Mug Photos Canvas Layer */
.mug-photos-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: auto;
}

.mug-photo-layer-item {
    position: absolute;
    box-sizing: border-box;
    cursor: grab;
    touch-action: none;
    user-select: none;
    z-index: 4;
}

.mug-photo-layer-item.is-dragging {
    cursor: grabbing !important;
    z-index: 10 !important;
}

.mug-photo-layer-item.is-full {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    border: 2px solid transparent;
    cursor: grab !important;
}

.mug-photo-layer-item.is-full.is-dragging-crop {
    cursor: grabbing !important;
}

.mug-photo-layer-item.is-full.is-active {
    border-color: var(--primary, #D10031);
}

.mug-photo-layer-item:not(.is-full) {
    border: 2px solid transparent;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mug-photo-layer-item:not(.is-full):hover {
    border-color: rgba(209, 0, 49, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.mug-photo-layer-item:not(.is-full).is-active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 6px 22px rgba(0, 0, 0, 0.35);
}

.mug-photo-item-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.mug-photo-item-inner img {
    position: absolute;
    pointer-events: none;
    display: block;
}

/* Corner Resize Handle for Photo */
.mug-photo-resize {
    position: absolute;
    bottom: -9px;
    right: -9px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--primary, #D10031);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: nwse-resize;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.mug-photo-resize::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--primary, #D10031);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.mug-photo-del {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 6;
}

.mug-photo-layer-item:hover .mug-photo-resize,
.mug-photo-layer-item:hover .mug-photo-del,
.mug-photo-layer-item.is-active .mug-photo-resize,
.mug-photo-layer-item.is-active .mug-photo-del {
    opacity: 1;
}

.mug-photo-layer-item.is-full .mug-photo-resize,
.mug-photo-layer-item.is-full .mug-photo-del {
    display: none;
}

/* =========================================================================
   Ausschnitt-Modus (Canva-Prinzip: Doppelklick / Ausschnitt anpassen)
   ========================================================================= */
.mug-photo-layer-item.is-cropping {
    cursor: move !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    z-index: 25 !important;
}

.mug-photo-layer-item.is-cropping.is-dragging-crop {
    cursor: grabbing !important;
}

.mug-photo-layer-item.is-cropping .mug-photo-resize,
.mug-photo-layer-item.is-cropping .mug-photo-del {
    display: none !important;
}

/* Feine Drittel-Regel-Rasterlinien im Ausschnittmodus */
.mug-photo-layer-item.is-cropping::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    pointer-events: none;
    z-index: 8;
    background: 
        linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.45) 33.33%, rgba(255, 255, 255, 0.45) calc(33.33% + 0.5px), transparent calc(33.33% + 1px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.45) 66.66%, rgba(255, 255, 255, 0.45) calc(66.66% + 0.5px), transparent calc(66.66% + 1px)),
        linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.45) 33.33%, rgba(255, 255, 255, 0.45) calc(33.33% + 0.5px), transparent calc(33.33% + 1px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.45) 66.66%, rgba(255, 255, 255, 0.45) calc(66.66% + 0.5px), transparent calc(66.66% + 1px));
}

/* Schwebende Toolbar im Foto (immer sichtbar, kann nie unter den Rand geschoben werden) */
.mug-crop-floating-bar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 5px 6px 5px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 50;
    pointer-events: auto;
    animation: fadeInCropBar 0.15s ease;
}

@keyframes fadeInCropBar {
    from { opacity: 0; transform: translate(-50%, 6px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.mug-crop-floating-bar .mug-crop-hint {
    color: #94a3b8;
    user-select: none;
}

.mug-crop-done-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mug-crop-done-btn:hover {
    background: #1d4ed8;
}

/* Schwebender Hinweis-Pill bei vollflächigem Panorama */
.mug-full-pan-hint-pill {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.70);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.92);
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 9.5px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
    transition: all 0.2s ease;
    animation: fadeInCropBar 0.2s ease;
    white-space: nowrap;
    opacity: 0.85;
}

.mug-full-pan-hint-pill .pan-hint-moving {
    display: none;
}

.mug-photo-layer-item.is-dragging-crop .mug-full-pan-hint-pill {
    background: rgba(37, 99, 235, 0.90);
    opacity: 1;
}

.mug-photo-layer-item.is-dragging-crop .mug-full-pan-hint-pill .pan-hint-idle {
    display: none;
}

.mug-photo-layer-item.is-dragging-crop .mug-full-pan-hint-pill .pan-hint-moving {
    display: inline;
}

/* Zieher & Hinweis in der rechten Ecke zum Wechseln auf Einzelfoto */
.mug-full-shrink-corner {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 25;
    cursor: nwse-resize;
    pointer-events: auto;
    user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    animation: fadeInCropBar 0.25s ease;
    opacity: 0.85;
}

.mug-full-shrink-corner:hover {
    transform: scale(1.04);
    opacity: 1;
}

.mug-full-shrink-corner:active {
    transform: scale(0.97);
}

.mug-shrink-hint-tag {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 500;
    padding: 2.5px 7px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.1px;
    transition: all 0.15s ease;
}

.mug-shrink-handle-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary, #D10031);
    border: 1.5px solid var(--primary, #D10031);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: nwse-resize;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.mug-full-shrink-corner:hover .mug-shrink-handle-icon {
    background: var(--primary, #D10031);
    color: #ffffff;
    border-color: #ffffff;
    transform: scale(1.1);
}

.mug-full-shrink-corner:hover .mug-shrink-hint-tag {
    background: #0f172a;
    border-color: var(--primary, #D10031);
    color: #ffffff;
}

/* ==========================================================================
   6. FOTO-T-SHIRTS (TEXTILDRUCK & T-SHIRT DESIGNER)
   ========================================================================== */

/* Flat Photorealistic T-Shirt Stage & Chest Printable Frame */
.editor-shirt-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    animation: fadeInMug 0.35s ease;
}

.shirt-canvas-stage-wrap {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
}

/* Permanent Chest-Focus Viewport */
.shirt-mockup-viewport {
    position: relative;
    width: 100%;
    max-width: min(800px, 96%, calc(100vh - 170px));
    max-width: min(800px, 96%, calc(100dvh - 170px));
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 36%, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .shirt-mockup-viewport {
    background: radial-gradient(circle at 50% 36%, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shirt-mockup-frame {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transform: scale(1.42);
    transform-origin: 50% 38%;
}

.shirt-mockup-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.08));
}

/* Exact Realistic Printable Chest Zone (30 x 40 cm, ratio 3:4 = 0.75) */
.shirt-printable-zone {
    position: absolute;
    left: 35.0%;
    top: 25.0%;
    width: 30.0%;
    height: 40.0%; /* 30.0 / 40.0 = 0.75 (exact 3:4 ratio!) */
    z-index: 2;
    overflow: hidden;
    border: 2px dashed rgba(209, 0, 49, 0.75);
    border-radius: 4px;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.08);
    background: transparent;
    cursor: grab;
}

.shirt-printable-zone:active {
    cursor: grabbing;
}

.shirt-printable-hints {
    position: absolute;
    left: 35.0%;
    top: calc(25.0% - 24px);
    width: 30.0%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}

.shirt-hint-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(209, 0, 49, 0.35);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary, #D10031);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.shirt-flat-workspace {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.shirt-photo-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================================
   T-SHIRT PHOTO LAYER (Vollflächig vs. Frei positionierbar & Skalierbar)
   ========================================================================= */
.shirt-photo-layer-item {
    position: absolute;
    user-select: none;
    touch-action: none;
    box-sizing: border-box;
    cursor: move;
}

.shirt-photo-layer-item.is-dragging {
    cursor: grabbing !important;
    z-index: 10 !important;
}

.shirt-photo-layer-item.is-full {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    border: 2px solid transparent;
    cursor: grab !important;
}

.shirt-photo-layer-item.is-full.is-dragging-crop {
    cursor: grabbing !important;
}

.shirt-photo-layer-item.is-full.is-active {
    border-color: var(--primary, #D10031);
}

.shirt-photo-layer-item:not(.is-full) {
    border: 2px solid transparent;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shirt-photo-layer-item:not(.is-full):hover {
    border-color: rgba(209, 0, 49, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.shirt-photo-layer-item:not(.is-full).is-active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 6px 22px rgba(0, 0, 0, 0.35);
}

.shirt-photo-item-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.shirt-photo-item-inner img {
    position: absolute;
    pointer-events: none;
    display: block;
}

/* Corner Resize Handle for Shirt Photo */
.shirt-photo-resize {
    position: absolute;
    bottom: -9px;
    right: -9px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--primary, #D10031);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: nwse-resize;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.shirt-photo-resize::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--primary, #D10031);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.shirt-photo-del {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all 0.15s ease;
}

.shirt-photo-layer-item:hover .shirt-photo-del,
.shirt-photo-layer-item.is-active .shirt-photo-del {
    display: flex;
}

.shirt-photo-del:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.1);
}

.shirt-photo-layer-item.is-cropping .shirt-photo-del {
    display: none !important;
}

.shirt-photo-layer-item:hover .shirt-photo-resize,
.shirt-photo-layer-item.is-active .shirt-photo-resize {
    opacity: 1;
}

.shirt-photo-layer-item.is-full .shirt-photo-resize {
    display: none;
}

/* Ausschnitt-Modus (Doppelklick) */
.shirt-photo-layer-item.is-cropping {
    cursor: move !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    z-index: 25 !important;
}

.shirt-photo-layer-item.is-cropping.is-dragging-crop {
    cursor: grabbing !important;
}

.shirt-photo-layer-item.is-cropping .shirt-photo-resize {
    display: none !important;
}

/* Rasterlinien im Ausschnittmodus */
.shirt-photo-layer-item.is-cropping::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    pointer-events: none;
    z-index: 8;
    background: 
        linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.45) 33.33%, rgba(255, 255, 255, 0.45) calc(33.33% + 0.5px), transparent calc(33.33% + 1px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.45) 66.66%, rgba(255, 255, 255, 0.45) calc(66.66% + 0.5px), transparent calc(66.66% + 1px)),
        linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.45) 33.33%, rgba(255, 255, 255, 0.45) calc(33.33% + 0.5px), transparent calc(33.33% + 1px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.45) 66.66%, rgba(255, 255, 255, 0.45) calc(66.66% + 0.5px), transparent calc(66.66% + 1px));
}

/* Schwebende Toolbar im Foto */
.shirt-crop-floating-bar {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.90);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 3px 4px 3px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 50;
    pointer-events: auto;
    animation: fadeInCropBar 0.15s ease;
}

.shirt-crop-floating-bar .shirt-crop-hint {
    color: #94a3b8;
    font-size: 10px;
    user-select: none;
}

.shirt-crop-done-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.shirt-crop-done-btn:hover {
    background: #1d4ed8;
}

/* Schwebender Hinweis-Pill bei vollflächigem Motiv */
.shirt-full-pan-hint-pill {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.70);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.92);
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 9.5px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.shirt-photo-layer-item.is-dragging-crop .shirt-full-pan-hint-pill {
    opacity: 1;
    background: rgba(37, 99, 235, 0.90);
}

.shirt-photo-layer-item.is-dragging-crop .shirt-full-pan-hint-pill .pan-hint-idle {
    display: none;
}
.shirt-photo-layer-item:not(.is-dragging-crop) .shirt-full-pan-hint-pill .pan-hint-moving {
    display: none;
}

/* Schwebender Shrink-Handle in der Ecke unten rechts bei Vollfläche */
.shirt-full-shrink-corner {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 12px;
    padding: 2.5px 7px 2.5px 8px;
    font-size: 9.5px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 22;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    opacity: 0.85;
}

.shirt-full-shrink-corner:hover {
    opacity: 1;
    background: var(--primary, #D10031);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.04);
}

/* Draggable Text Box on the Shirt */
.shirt-draggable-textbox {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    cursor: move;
    user-select: none;
    z-index: 10;
    padding: 6px 14px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1.5px dashed rgba(209, 0, 49, 0.7);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.15s ease;
}

.shirt-draggable-textbox:not(.is-active) {
    cursor: pointer;
    box-shadow: none;
    border-color: transparent;
}
.shirt-draggable-textbox:not(.is-active) .shirt-textbox-del,
.shirt-draggable-textbox:not(.is-active) .shirt-textbox-resize {
    display: none !important;
}
.shirt-draggable-textbox:not(.is-active):hover {
    border-color: rgba(209, 0, 49, 0.45);
    background: rgba(209, 0, 49, 0.08);
}

.shirt-draggable-textbox.is-active {
    border-color: var(--primary, #D10031);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.shirt-draggable-textbox.is-active .shirt-textbox-del {
    display: flex !important;
}
.shirt-draggable-textbox.is-active .shirt-textbox-resize {
    display: block !important;
}

.shirt-draggable-textbox .shirt-textbox-text {
    pointer-events: none;
    font-weight: 700;
    line-height: 1.25;
}

.shirt-draggable-textbox.bg-none {
    background: transparent;
}
.shirt-draggable-textbox.bg-white {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.shirt-draggable-textbox.bg-dark {
    background: rgba(24, 24, 27, 0.88);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.shirt-textbox-del {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.shirt-textbox-resize {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--primary, #D10031);
    border: 1.5px solid #ffffff;
    cursor: nwse-resize;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Quick Toolbar under Shirt */
.shirt-quick-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 30px;
    padding: 6px 14px;
    margin-top: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.shirt-tb-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--dark, #0f172a);
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.shirt-tb-btn:hover {
    background: var(--primary, #D10031);
    border-color: var(--primary, #D10031);
    color: #ffffff;
}

.shirt-tb-btn.active {
    background: var(--primary, #D10031);
    border-color: var(--primary, #D10031);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(209, 0, 49, 0.35);
}

.shirt-tb-zoom-display {
    font-size: 13px;
    font-weight: 800;
    color: var(--dark, #0f172a);
    min-width: 44px;
    text-align: center;
}

.shirt-tb-divider {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 4px;
}

/* Gallery Photo Card: Shirt Preview */
.card-shirt-preview-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.card-shirt-mockup {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-shirt-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-shirt-chest-print {
    position: absolute;
    left: 35.0%;
    top: 25.0%;
    width: 30.0%;
    height: 40.0%;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.card-shirt-photo,
.shirt-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-shirt-caption {
    position: absolute;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dedicated T-Shirt Design Panel in Editor Sidebar */
.editor-shirt-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shirt-sidebar-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shirt-sidebar-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.2px;
    transition: all 0.18s ease;
}

.shirt-sidebar-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.shirt-sidebar-tab.active {
    background: var(--primary, #D10031);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(209, 0, 49, 0.35);
}

.shirt-tab-pane {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shirt-size-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.shirt-size-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.shirt-size-btn:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.shirt-size-btn.active {
    background: rgba(209, 0, 49, 0.15);
    border-color: var(--primary, #D10031);
    box-shadow: 0 0 0 2px rgba(209, 0, 49, 0.25);
}

.shirt-size-btn .size-name {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}

.shirt-size-btn.active .size-name {
    color: #ffffff;
}

.shirt-size-btn .size-dim {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 3px;
}

/* ==========================================================================
   RETRO & FOTOSTREIFEN: ENHANCED DOUBLE-CLICK CROP & SLOTS MANAGER
   ========================================================================== */
.retro-crop-floating-bar {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 4px 6px 4px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    z-index: 50;
    pointer-events: auto;
}

.retro-crop-floating-bar .retro-crop-hint {
    color: #cbd5e1;
    user-select: none;
    font-size: 11px;
}

.retro-crop-done-btn {
    background: var(--primary, #D10031);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.retro-crop-done-btn:hover {
    background: #b5002a;
    transform: scale(1.04);
}

.slot-crop-hover-hint {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.18s ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.editor-strip-slot:hover .slot-crop-hover-hint,
.editor-grid-slot:hover .slot-crop-hover-hint,
.editor-pola-slot:hover .slot-crop-hover-hint {
    opacity: 1;
}

.editor-strip-slot.is-cropping .slot-crop-hover-hint,
.editor-grid-slot.is-cropping .slot-crop-hover-hint,
.editor-pola-slot.is-cropping .slot-crop-hover-hint {
    display: none !important;
}

.editor-strip-slot.is-cropping,
.editor-grid-slot.is-cropping,
.editor-pola-slot.is-cropping {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.45) !important;
}

.btn-retro-add-photos {
    background: rgba(209, 0, 49, 0.18);
    border: 1px solid rgba(209, 0, 49, 0.4);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-retro-add-photos:hover {
    background: var(--primary, #D10031);
    border-color: var(--primary, #D10031);
}

.btn-strip-add-photo-top {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-strip-add-photo-top:hover {
    background: var(--primary, #D10031);
    border-color: var(--primary, #D10031);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(209, 0, 49, 0.35);
}

.retro-sidebar-slots-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.retro-sidebar-slot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.retro-sidebar-slot-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.retro-sidebar-slot-row.active {
    border-color: var(--primary, #D10031);
    background: rgba(209, 0, 49, 0.12);
}

.retro-sidebar-slot-row.cropping {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.15);
}

.retro-slot-row-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.retro-slot-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.retro-slot-row-num {
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: 9px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0 4px;
    border-radius: 3px;
    line-height: 1.2;
}

.retro-slot-row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.retro-slot-row-label {
    font-size: 12px;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.retro-slot-row-sub {
    font-size: 10.5px;
    color: #94a3b8;
}

.retro-slot-row-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.slot-mini-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #ffffff;
    font-size: 11px;
    padding: 4px 6px;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    flex-shrink: 0;
}

.slot-mini-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.slot-mini-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dedicated Retro Actions Bar in Sidebar */
.retro-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: stretch;
}

.retro-actions-row .tool-btn {
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    min-height: 40px;
    box-sizing: border-box;
    white-space: nowrap;
}

.retro-actions-row .tool-btn span {
    font-size: 14px;
    line-height: 1;
}

.retro-actions-row .tool-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.retro-actions-row .tool-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
}

.retro-actions-row .tool-btn.active {
    background: var(--primary, #D10031);
    border-color: var(--primary, #D10031);
    color: #ffffff;
}

/* ==========================================================================
   MULTI-TEXT LAYER STYLES (Puzzle, Shirt, Fototassen)
   ========================================================================== */
.text-layers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.btn-add-text-layer {
    background: rgba(209, 0, 49, 0.12);
    border: 1px solid var(--primary, #D10031);
    color: var(--primary, #D10031);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-add-text-layer:hover {
    background: var(--primary, #D10031);
    color: #ffffff;
}

.text-layers-tray {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.btn-text-layer-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 140px;
}

.btn-text-layer-item .text-preview-trunc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-text-layer-item.active {
    border-color: var(--primary, #D10031);
    background: rgba(209, 0, 49, 0.08);
    color: var(--primary, #D10031);
    font-weight: 700;
}

.btn-text-layer-item .btn-del-layer {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    padding: 0;
    margin-left: 2px;
    line-height: 1;
    cursor: pointer;
}

.btn-text-layer-item .btn-del-layer:hover {
    color: #ef4444;
}

/* ==========================================================================
   EDITOR-FIRST: EMPTY CANVAS PLACEHOLDERS & CART ACTIONS
   ========================================================================== */

.mug-empty-photo-placeholder,
.shirt-empty-photo-placeholder {
    position: absolute;
    inset: 16px;
    border: 2px dashed rgba(209, 0, 49, 0.45);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    padding: 24px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    user-select: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.mug-empty-photo-placeholder:hover,
.shirt-empty-photo-placeholder:hover,
.mug-empty-photo-placeholder.drag-over,
.shirt-empty-photo-placeholder.drag-over {
    border-color: var(--primary, #d10031);
    background: rgba(254, 242, 242, 0.96);
    transform: scale(1.01);
    box-shadow: 0 8px 28px rgba(209, 0, 49, 0.18);
}

.mug-empty-title,
.shirt-empty-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.mug-empty-sub,
.shirt-empty-sub {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    max-width: 320px;
    line-height: 1.4;
}

.btn-card-duplicate {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-card-duplicate:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
}

.btn-add-gift-item {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--primary, #d10031);
    background: rgba(209, 0, 49, 0.06);
    color: var(--primary, #d10031);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-add-gift-item:hover {
    background: var(--primary, #d10031);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(209, 0, 49, 0.25);
}

/* ==========================================================================
   DEDICATED SHOPPING CART SCREEN & HEADER CART PILL
   ========================================================================== */

/* Header Cart Button */
.btn-header-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.btn-header-cart:hover {
    border-color: var(--primary, #D10031);
    color: var(--primary, #D10031);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(209, 0, 49, 0.15);
}

.header-cart-icon {
    font-size: 16px;
    line-height: 1;
}

.header-cart-badge {
    background: var(--primary, #D10031);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Cart Screen Container */
.cart-screen {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 24px 16px 80px;
    animation: fadeInCart 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInCart {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1.5px solid #e2e8f0;
}

.cart-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.btn-cart-add-product {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
    font-size: 13.5px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.btn-cart-add-product:hover {
    border-color: var(--primary, #D10031);
    color: var(--primary, #D10031);
    background: #fff5f5;
    transform: translateY(-1px);
}

/* Empty Cart State */
.cart-empty-box {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 60px 24px;
    text-align: center;
    max-width: 540px;
    margin: 40px auto;
}

.cart-empty-icon {
    font-size: 54px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.06));
}

.cart-empty-box h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}

.cart-empty-box p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px;
    line-height: 1.5;
}

.btn-cart-empty-action {
    background: var(--primary, #D10031);
    color: #ffffff;
    border: none;
    font-size: 14.5px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(209, 0, 49, 0.28);
}

.btn-cart-empty-action:hover {
    background: #b9002b;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(209, 0, 49, 0.35);
}

/* Two Column Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.cart-items-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cart Item Card (for configured gifts, posters, canvas, puzzle, shirts, mugs) */
.cart-item-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.cart-item-thumb-box {
    width: 120px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cart-item-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.cart-item-product-tag {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1.2;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.cart-item-pill {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.cart-item-details-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12.5px;
    color: #64748b;
}

.cart-item-details-list span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cart-item-caption-snippet {
    font-size: 12px;
    font-style: italic;
    color: #3b82f6;
    background: #eff6ff;
    border-left: 2.5px solid #3b82f6;
    padding: 2px 8px;
    border-radius: 0 4px 4px 0;
    margin-top: 2px;
    max-width: 450px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.btn-cart-act {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-cart-act:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-cart-act.edit:hover {
    color: #D10031;
    border-color: #D10031;
    background: #fff5f5;
}

.btn-cart-act.del:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

/* Right price & qty in item card */
.cart-item-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 130px;
}

.cart-item-total {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.cart-item-unit-calc {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
}

/* Bundle Card for Bulk Prints */
.cart-bundle-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 22px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.cart-bundle-thumb-stack {
    width: 140px;
    height: 105px;
    position: relative;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bundle-stack-img {
    position: absolute;
    width: 76px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.14);
    background: #ffffff;
}

.bundle-stack-img:nth-child(1) { transform: translate(-22px, -8px) rotate(-6deg); z-index: 1; }
.bundle-stack-img:nth-child(2) { transform: translate(-2px, 0px) rotate(2deg); z-index: 2; }
.bundle-stack-img:nth-child(3) { transform: translate(18px, 6px) rotate(7deg); z-index: 3; }

.cart-bundle-badge {
    position: absolute;
    bottom: -6px;
    right: 4px;
    z-index: 4;
    background: var(--primary, #D10031);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(209, 0, 49, 0.35);
}

.cart-bundle-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-bundle-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-bundle-formats-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
}

.cart-bundle-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    width: fit-content;
}

.btn-bundle-view-photos {
    background: rgba(209, 0, 49, 0.08);
    border: 1.5px solid var(--primary, #D10031);
    color: var(--primary, #D10031);
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-bundle-view-photos:hover {
    background: var(--primary, #D10031);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(209, 0, 49, 0.25);
}

.cart-items-bottom-action {
    margin-top: 10px;
    text-align: center;
}

.btn-cart-add-more-items {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    color: #475569;
    font-size: 13.5px;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: 12px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cart-add-more-items:hover {
    border-color: var(--primary, #D10031);
    color: var(--primary, #D10031);
    background: #fffafa;
}

/* Summary Column & Sticky Card */
.cart-summary-col {
    position: relative;
}

.cart-summary-card {
    position: sticky;
    top: 90px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cart-summary-heading {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.cart-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: #475569;
}

.cart-summary-row.promo,
.cart-summary-row.volume,
.cart-summary-row.voucher {
    color: #047857;
    font-weight: 600;
}

.cart-summary-row .discount {
    color: #047857;
    font-weight: 700;
}

.cart-voucher-box {
    margin: 16px 0;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.cart-voucher-input-group {
    display: flex;
    gap: 6px;
}

.cart-voucher-input-group input {
    flex: 1;
    padding: 7px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    text-transform: uppercase;
    font-weight: 700;
}

.cart-voucher-input-group button {
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cart-voucher-input-group button:hover {
    background: var(--primary, #D10031);
}

.cart-voucher-status {
    font-size: 11.5px;
    margin-top: 6px;
    font-weight: 600;
}

.cart-voucher-status.success { color: #047857; }
.cart-voucher-status.error { color: #dc2626; }

.cart-summary-total-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 16px 0;
}

.cart-summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.cs-total-label-wrap {
    display: flex;
    flex-direction: column;
}

.cs-total-label {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.cs-tax-hint {
    font-size: 11px;
    color: #94a3b8;
}

.cs-total-val {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary, #D10031);
}

.btn-cart-checkout {
    width: 100%;
    background: var(--primary, #D10031);
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: 800;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(209, 0, 49, 0.32);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-cart-checkout:hover {
    background: #b9002b;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(209, 0, 49, 0.42);
}

.cart-trust-badges {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.ct-badge {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.35;
}

/* Mobile Responsiveness for Cart */
@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cart-item-card,
    .cart-bundle-card {
        grid-template-columns: 90px 1fr;
        gap: 14px;
    }

    .cart-item-thumb-box,
    .cart-bundle-thumb-stack {
        width: 90px;
        height: 75px;
    }

    .bundle-stack-img {
        width: 55px;
        height: 44px;
    }

    .cart-item-pricing {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f1f5f9;
        padding-top: 10px;
        width: 100%;
    }

    .cart-summary-card {
        position: static;
    }
}







