/* === T-Shirt designer — light workspace (reference: soft gray canvas, dark icon rail) === */
.designer-root {
    --shirt-body: #3d4048;
    --shirt-neck: #2a2d34;
    --shirt-neck-deep: #181a1e;
    --shirt-body-light: #4a4f5a;
    --designer-product-banner-height: 88px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Catalog style has no back mockup: hide Back view UI (desktop rail + mobile overlay). */
.designer-root.designer-mockup-front-only #sideBack,
.designer-root.designer-mockup-front-only label[for="sideBack"] {
    display: none !important;
}

.designer-root.designer-mockup-front-only .mobile-view-option[data-side="back"] {
    display: none !important;
}

.designer-body {
    margin: 0;
    min-height: 100vh;
    background: #e8e9ec;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    padding-bottom: var(--designer-product-banner-height);
}

body.designer-body {
    margin-bottom: 0 !important;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
}

.designer-header-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 1rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
    font-size: 0.875rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

    .designer-header-mini a {
        color: #0d6efd;
        text-decoration: none;
        font-weight: 500;
    }

        .designer-header-mini a:hover {
            text-decoration: underline;
        }

/* Small anchored callouts (quote cart confirmation, Add Products prompts, …) — fixed positioning, no jitter */
.designer-anchored-bubble {
    position: fixed;
    z-index: 2201;
    max-width: min(280px, calc(100vw - 16px));
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    color: #212529;
    font-size: 0.8125rem;
    line-height: 1.35;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.designer-anchored-bubble--show {
    opacity: 1;
    transform: translateY(0);
}

.designer-anchored-bubble__title {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.designer-anchored-bubble__sub {
    display: block;
    color: #6c757d;
    font-weight: 400;
    font-size: 0.76rem;
}

@media (prefers-reduced-motion: reduce) {
    .designer-anchored-bubble {
        transition: none;
        transform: none;
    }

    .designer-anchored-bubble--show {
        transform: none;
    }
}

/* Transparent hit target over Sizes and Quote while it is disabled — disabled native buttons skip clicks */
.designer-apply-sizes-slot {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.designer-apply-sizes-invite-hit {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    z-index: 3;
}

    .designer-apply-sizes-invite-hit:focus {
        outline: none;
    }

    .designer-apply-sizes-invite-hit:focus-visible {
        opacity: 1;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.45);
    }

.designer-shell {
    display: grid;
    grid-template-columns: 4.25rem minmax(17rem, 26rem) minmax(0, 1fr) 5rem;
    grid-template-rows: 1fr;
    min-height: calc(100vh - 38px);
    max-width: 100vw;
    overflow: hidden;
    background: #e8e9ec;
}

@media (max-width: 1199.98px) {
    .designer-shell {
        grid-template-columns: 4rem minmax(14rem, 1fr) 1fr;
        grid-template-rows: auto 1fr;
    }

    .designer-view-rail {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row !important;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        padding: 0.5rem !important;
        border-left: none !important;
        border-top: 1px solid #dee2e6;
    }

        .designer-view-rail .btn-group-vertical {
            flex-direction: row !important;
        }

    .garment-color-inline,
    .garment-color-dropdown {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    :root {
        --mobile-designer-header-h: 38px;
        --mobile-designer-top-controls-h: 56px;
        --mobile-designer-floating-top: calc(var(--mobile-designer-header-h) + env(safe-area-inset-top) + var(--mobile-designer-top-controls-h) + 8px);
    }

    .designer-header-mini {
        position: sticky;
        top: 0;
        z-index: 1055;
    }

    .designer-stage {
        padding-top: 56px; /* reserve space for floating mobile top controls */
        overflow-x: clip;
        max-width: 100%;
    }

    .designer-shell {
        display: flex;
        flex-direction: column;
        min-height: auto;
        overflow: visible;
        padding-bottom: 86px;
    }

    /* Mobile: remove redundant top toolbar (undo/redo + print size) */
    .stage-toolbar {
        display: none !important;
    }

    /* Mobile: saved action lives in the "Saved" tab */
    .designer-save-fab {
        display: none !important;
    }

    body.designer-body {
        overflow-x: hidden;
        max-width: 100%;
    }

    .stage-canvas-wrap {
        min-height: auto;
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
        overflow-y: visible;
        justify-content: center;
    }

    /* Mobile: top controls (color + key actions) live above the shirt */
    .mobile-top-controls {
        position: fixed;
        left: 0;
        right: 0;
        top: calc(var(--mobile-designer-header-h) + env(safe-area-inset-top)); /* directly below mini header */
        z-index: 1054;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid #dee2e6;
        backdrop-filter: saturate(140%) blur(4px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }

    .mobile-top-controls .mobile-color-select-wrap {
        flex: 1 1 auto;
        min-width: 0;
    }

    .mobile-top-controls .mobile-color-trigger {
        width: 100%;
    }

    .mobile-top-controls .btn {
        white-space: nowrap;
        padding: 0.35rem 0.55rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    /* Make these two a bit smaller than default */
    .mobile-top-controls #btnApplySizesLine {
        padding: 0.35rem 0.55rem;
        font-size: 0.85rem;
    }

    /* Mobile: zoom is applied via JS transform; clip overflow so in-app browsers cannot pan sideways */
    .mockup-zoom-wrap {
        padding-top: 0.75rem;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        transform-origin: top center;
    }

    /* 100% not 100vw — vw often exceeds the visible viewport in FB/Snap in-app browsers */
    .shirt-scene {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Keep print/canvas scale consistent on mobile */
    .shirt-print-area {
        --print-scale: 0.19;
    }

    .designer-rail {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 8px;
        z-index: 1050;
        flex-direction: row !important;
        justify-content: space-between;
        align-items: stretch;
        border-right: none !important;
        border-bottom: none;
        border-radius: 14px;
        background: rgba(13, 13, 13, 0.92);
        backdrop-filter: blur(8px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
        padding: 0.35rem 0.25rem;
        gap: 0.15rem;
    }

        .designer-rail .rail-btn {
            flex: 1;
            min-width: 0;
            border-radius: 10px;
            padding: 0.45rem 0.15rem;
            font-size: 0.58rem;
        }

            .designer-rail .rail-btn .rail-icon {
                font-size: 1.15rem;
            }

        /* Mobile-only: put AI in the middle and tint it blue. */
        #toolRailUpload { order: 1; }
        #toolRailText { order: 2; }
        #toolRailArt { order: 3; }
        #toolRailAi { order: 4; }
        #toolRailProduct { order: 5; }
        #toolRailNames { order: 6; }
        #toolRailSaved { order: 7; }

        #toolRailAi .rail-label,
        #toolRailAi .rail-icon {
            color: #4da3ff;
        }

        /* Keep active state readable on mobile even with blue tint */
        #toolRailAi.rail-btn--active .rail-label,
        #toolRailAi.rail-btn--active .rail-icon {
            color: #ffffff;
        }

    .designer-context {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 80px;
        z-index: 1051;
        max-height: 55vh;
        overflow-y: auto;
        border-right: none !important;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        max-width: none !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
        display: none;
    }

        .designer-context.mobile-open {
            display: block;
        }

        /* Mobile floating tool sheet: title + explicit close (matches tapping the active nav tab). */
        .designer-context-mobile-bar {
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.65rem;
            padding: 0.55rem 0.65rem;
            margin: -1rem -1rem 0.75rem -1rem;
            border-bottom: 1px solid #e9ecef;
            background: #fff;
            position: sticky;
            top: -1rem;
            z-index: 3;
            border-radius: 11px 11px 0 0;
        }

        .designer-context.mobile-open .designer-context-mobile-bar {
            display: flex !important;
        }

        .designer-context-mobile-bar__text {
            flex: 1 1 auto;
            min-width: 0;
        }

        .designer-context-mobile-bar__title {
            display: block;
            font-size: 1rem;
            font-weight: 700;
            color: #111827;
            line-height: 1.25;
        }

        .designer-context-mobile-bar__hint {
            display: block;
            font-size: 0.72rem;
            line-height: 1.35;
            margin-top: 0.2rem;
        }

        .designer-context-mobile-bar__close {
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
        }

    .designer-view-rail {
        display: none !important;
    }

    .mobile-overlay-controls {
        position: static;
    }

    .mobile-fab-btn {
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 999px;
        background: rgba(60, 64, 72, 0.88);
        color: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        position: fixed;
        top: var(--mobile-designer-floating-top);
        z-index: 1035;
    }

    .mobile-fab-btn--right {
        right: 12px;
    }

    .mobile-fab-btn--left {
        left: 12px;
    }

    .mobile-fab-btn--left-top {
        top: var(--mobile-designer-floating-top);
    }

    .mobile-fab-btn--left-bottom {
        top: calc(var(--mobile-designer-floating-top) + 52px);
    }

    .mobile-overlay-panel {
        position: fixed;
        right: 12px;
        top: calc(var(--mobile-designer-floating-top) + 52px);
        width: min(220px, 62vw);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
        z-index: 1045;
        overflow: hidden;
        border: 1px solid #e5e7eb;
    }

    .mobile-overlay-panel__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.35rem;
        padding: 0.45rem 0.5rem 0.4rem;
        border-bottom: 1px solid #e9ecef;
        background: rgba(255, 255, 255, 0.98);
    }

    .mobile-overlay-panel__title {
        font-size: 0.78rem;
        font-weight: 700;
        color: #111827;
        letter-spacing: 0.02em;
    }

    .mobile-overlay-panel__close {
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }

    .mobile-view-option {
        width: 100%;
        border: 0;
        border-bottom: 1px solid #eceff3;
        background: transparent;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        padding: 10px;
        color: #1f2937;
    }

        .mobile-view-option:last-child {
            border-bottom: 0;
        }

        .mobile-view-option img {
            width: 58px;
            height: 58px;
            border-radius: 6px;
            border: 1px solid #e5e7eb;
            object-fit: cover;
            background: #f3f4f6;
            flex: 0 0 auto;
        }

    .mobile-view-option__sleeve {
        padding-left: 68px;
    }

    .mobile-layer-option {
        justify-content: flex-start;
        font-weight: 500;
    }

    .mobile-view-option__sleeve {
        padding-left: 68px;
    }

    .mobile-layer-option i {
        width: 20px;
        text-align: center;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .mobile-overlay-controls,
    .mobile-overlay-panel {
        display: none !important;
    }
}

/* Icon rail — black strip */
.designer-rail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.6rem 0.25rem;
    background: #0d0d0d;
    border-right: 1px solid #1a1a1a;
}

.designer-rail__spacer {
    display: none;
}

.designer-rail__divider {
    display: none;
}

.rail-btn--ai {
    background: rgba(13, 110, 253, 0.14);
    border: 1px solid rgba(13, 110, 253, 0.35);
}

    .rail-btn--ai:hover {
        background: rgba(13, 110, 253, 0.22);
    }

@media (min-width: 768px) {
    /* Desktop: push AI to the bottom and visually separate it without risking clipping. */
    .designer-rail__spacer {
        display: none;
    }

    .designer-rail__divider {
        display: block;
        margin-top: auto;
        height: 1px;
        margin: 0.35rem 0.35rem 0.25rem;
        background: rgba(255, 255, 255, 0.12);
    }
}

.rail-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.2rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #e8e8e8;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

    .rail-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

.rail-btn--active {
    background: #0d6efd;
    color: #fff;
}

    .rail-btn--active:hover {
        background: #0b5ed7;
        color: #fff;
    }

.rail-btn .rail-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.rail-label {
    line-height: 1.1;
    font-weight: 500;
}

/* AI modal polish */
.ai-modal {
    border-radius: 16px;
    overflow: hidden;
}

.ai-modal .modal-header {
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.08), rgba(13, 110, 253, 0.0));
}

.ai-modal__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.14);
    border: 1px solid rgba(13, 110, 253, 0.22);
}

.ai-modal__prompt {
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    font-size: 1rem;
    line-height: 1.45;
    color: #111827;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
    /* Site.css caps textareas at ~280px; override so this can be full width. */
    width: 100% !important;
    max-width: none !important;
    display: block;
}

.ai-modal__prompt::placeholder {
    color: rgba(17, 24, 39, 0.55);
}

.ai-modal__prompt:focus {
    border-color: rgba(13, 110, 253, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
}

.ai-modal__card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 0.85rem;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.ai-modal__fineprint {
    line-height: 1.2;
}

/* Full-page AI generation busy (spinner + rotating copy; z-index above Bootstrap modals) */
.ai-generate-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: saturate(140%) blur(4px);
    -webkit-backdrop-filter: saturate(140%) blur(4px);
}

.ai-generate-busy-overlay.d-none {
    display: none !important;
}

.ai-generate-busy-overlay__panel {
    max-width: 26rem;
    width: 100%;
}

.ai-generate-busy-overlay__spinner {
    width: 3rem;
    height: 3rem;
    border-width: 0.2rem;
    display: block;
    margin: 0 auto 1.25rem;
}

.ai-generate-busy-overlay__message {
    font-size: clamp(1.15rem, 4vw, 1.5rem);
    line-height: 1.5;
    font-weight: 600;
    text-wrap: balance;
}

/* Welcome / empty-canvas guidance */
.designer-welcome-modal {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.designer-welcome-modal .modal-header .btn-close {
    margin-top: 0.15rem;
}

.designer-welcome-modal__cta {
    border-radius: 14px;
    padding: 0.85rem 1rem;
    text-align: left;
}

.designer-welcome-modal__cta i {
    font-size: 1.35rem;
}

.designer-welcome-dropzone {
    border: 2px dashed rgba(13, 110, 253, 0.35);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.08), rgba(13, 110, 253, 0.03));
    padding: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
    user-select: none;
}

.designer-welcome-dropzone__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.designer-welcome-dropzone__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 1.25rem;
}

.designer-welcome-dropzone__title {
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.designer-welcome-dropzone__sub {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.15;
    margin-top: 2px;
}

.designer-welcome-dropzone:hover {
    border-color: rgba(13, 110, 253, 0.65);
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.14);
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.10), rgba(13, 110, 253, 0.03));
}

.designer-welcome-dropzone.is-dragover {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.10);
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.18);
}

.designer-welcome-dropzone:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18);
}

@media (max-width: 575.98px) {
    .designer-welcome-modal__cta {
        padding: 0.85rem 0.85rem;
    }

    .designer-welcome-dropzone__sub {
        font-size: 0.85rem;
    }
}

/* Context — white card */
.designer-context {
    background: #fff;
    border-right: 1px solid #e0e2e6;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem 1rem 1.25rem;
    max-width: 26rem;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
}

/* Mobile-only header row inside aside; hidden in desktop sidebar (see max-width rules for .mobile-open). */
.designer-context-mobile-bar {
    display: none !important;
}

    .designer-context .btn-sm {
        padding: 0.25rem 0.55rem;
        font-size: 0.8125rem;
        border-radius: 6px;
    }

.hub-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.hub-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
    font-size: 0.75rem;
    font-weight: 600;
    color: #212529;
}

    .hub-tile:hover {
        border-color: #0d6efd;
        color: #0d6efd;
        box-shadow: 0 2px 8px rgba(13, 110, 253, 0.12);
    }

.hub-tile__icon {
    font-size: 1.75rem;
    color: #0d6efd;
    opacity: 0.95;
}

.hub-tile:hover .hub-tile__icon {
    color: #0d6efd;
}

.hub-tip {
    line-height: 1.45;
}

.context-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #1a1a1a;
}

.context-subtitle {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.context-lead {
    margin-bottom: 0.65rem;
    line-height: 1.45;
}

.context-panel {
    animation: contextFade 0.2s ease;
}

@keyframes contextFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.edit-upload-block {
    padding-top: 0.5rem;
    border-top: 1px dashed #ced4da;
}

.designer-inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

/* Stage — soft gray workspace */
.designer-stage {
    display: flex;
    flex-direction: column;
    background: #e4e5e8;
    overflow: auto;
    min-height: 0;
}

.stage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.25rem 1rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    z-index: 25;
}

.stage-undo-redo {
    display: flex;
    gap: 0.35rem;
}

.designer-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.garment-color-inline {
    padding-left: 0.75rem;
    border-left: 1px solid #e9ecef;
}

.shirt-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.shirt-swatch {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    padding: 0;
    transition: transform 0.1s;
}

    .shirt-swatch:hover {
        transform: scale(1.08);
    }

    .shirt-swatch.is-active {
        box-shadow: 0 0 0 2px #0d6efd;
    }

.shirt-color-input {
    width: 2rem !important;
    height: 2rem !important;
    padding: 0.1rem;
    cursor: pointer;
}

.stage-canvas-wrap {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 0;
    min-height: calc(100vh - 70px);
    border-radius: 0;
    transition: outline 0.15s ease;
}

.designer-save-fab {
    position: absolute;
    left: 1.25rem;
    top: 2.5rem;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(13, 110, 253, 0.25);
    background: #0d6efd;
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(13, 110, 253, 0.24), 0 8px 16px rgba(0, 0, 0, 0.14);
    z-index: 200;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

    .designer-save-fab:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(13, 110, 253, 0.28), 0 10px 18px rgba(0, 0, 0, 0.18);
    }

    .designer-save-fab:active {
        transform: translateY(0);
        box-shadow: 0 10px 22px rgba(13, 110, 253, 0.22), 0 7px 14px rgba(0, 0, 0, 0.16);
    }

    .designer-save-fab:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

.stage-canvas-wrap--drag {
    outline: 2px dashed #0d6efd;
    outline-offset: -6px;
    background: rgba(13, 110, 253, 0.04);
}

.mockup-zoom-wrap {
    transform-origin: top center;
    transition: transform 0.15s ease;
    padding-top: 2rem;
    margin-top: 0;
}

.shirt-scene {
    position: relative;
    width: clamp(400px, 70vw, 800px);
    max-width: 100%;
    margin: 0 auto;
}

.shirt-mockup-container {
    position: relative;
    width: 100%;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.12));
    background-color: var(--shirt-body, #3d4048);
}

.shirt-mockup-bg {
    display: none;
}

.shirt-mockup-img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    z-index: 2;
    mix-blend-mode: normal;
}

.shirt-color-overlay {
    display: none;
}

.shirt-scene__svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.12));
}

/* Left chest guide removed */

/* Left chest guide - 5" × 5" area on right side (left when worn) */
.left-chest-guide {
    position: absolute;
    top: 24px;
    right: 96px;
    width: 480px;
    height: 480px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 4px;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.print-stack:hover .left-chest-guide {
    opacity: 1;
}

.left-chest-guide__label {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.8), 0 0 3px rgba(0, 0, 0, 1);
    line-height: 1;
}

.shirt-print-area {
    --print-scale: 0.19;
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 600px;
    aspect-ratio: 16 / 24;
    z-index: 5;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    overflow: hidden;
    background: transparent;
    transition: border-color 0.2s, background 0.2s;
}

    .shirt-print-area:hover {
        border-color: rgba(13, 110, 253, 0.3);
        background: rgba(255, 255, 255, 0.05);
    }

    .shirt-print-area::before {
        content: attr(data-print-label);
        position: absolute;
        top: -1.5rem;
        left: 0;
        font-size: 0.7rem;
        color: #ffffff;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 700;
        z-index: 2;
        pointer-events: none;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 1);
        line-height: 1;
    }

.print-stack-clip {
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -672px;
    width: 1344px;
    height: 2304px;
    transform-origin: top center;
    transform: scale(var(--print-scale));
}

.print-stack {
    position: relative;
    width: 1344px;
    height: 2304px;
}

    .print-stack .canvas-container {
        position: relative;
        z-index: 1;
    }

.inch-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.08) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
    background-size: 96px 96px;
    background-position: -1px -1px;
}

.clipart-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.clipart-results--home {
    margin-top: 10px;
    max-height: 240px;
}

.clipart-results--stack {
    max-height: min(52vh, 520px);
}

.clipart-simple-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.clipart-browse-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.25rem;
    margin: 0 -0.25rem 0.35rem;
    border-bottom: 1px solid #eef2f6;
}

.clipart-browse-title {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clipart-browse-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.clipart-browse-icon-btn:hover {
    background: #f3f4f6;
}

.clipart-browse-search .input-group-text {
    border-color: #cfe2ff;
}

.clipart-browse-search .form-control {
    border-color: #cfe2ff;
}

.clipart-cats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (min-width: 992px) {
    .clipart-cats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.clipart-cats-tile {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    user-select: none;
    min-height: 108px;
}

.clipart-cats-tile:hover {
    border-color: #b6d4fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.10);
    transform: translateY(-1px);
}

.clipart-cats-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 1.8rem;
}

.clipart-cats-label {
    font-weight: 700;
    color: #111827;
    text-align: center;
    font-size: 0.95rem;
}

.clipart-cats-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.clipart-cats-list-item {
    border: 0;
    border-bottom: 1px solid #eef2f6;
    background: #fff;
    padding: 12px 6px;
    text-align: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #111827;
}

.clipart-cats-list-item:hover {
    background: #f8fafc;
}

.clipart-cats-list-item--empty {
    cursor: default;
    color: #6b7280;
    text-align: center;
}

.clipart-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}

    .clipart-thumb:hover {
        border-color: #0d6efd;
    }

    .clipart-thumb.is-busy {
        opacity: 0.5;
        pointer-events: none;
    }

.recent-uploads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    overflow-y: auto;
    align-content: start;
}

@media (max-width: 767.98px) {
    .recent-uploads-grid {
        max-height: 180px;
    }
}

/* Desktop: fill sidebar height under Upload & Edit instead of a tall empty band below thumbnails */
@media (min-width: 768px) {
    .designer-context {
        display: flex;
        flex-direction: column;
        min-height: 0;
        height: 100%;
    }

    .designer-context > .context-panel:not(.d-none) {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #uploadFilesSection.upload-files-layout:not(.d-none) {
        flex: 1 1 auto;
        min-height: 0;
        display: flex !important;
        flex-direction: column;
    }

    /* Edit tools sit above uploads; sticky so they stay visible while scrolling thumbnails */
    #uploadFilesSection.upload-files-layout:not(.d-none) .edit-upload-block:not(.d-none) {
        flex: 0 0 auto;
        position: sticky;
        top: 0;
        z-index: 2;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        background: #fff;
        border-bottom: 1px solid #e9ecef;
        box-shadow: 0 8px 16px rgba(255, 255, 255, 0.95);
    }

    #uploadFilesSection.upload-files-layout:not(.d-none) .upload-files-recent-block {
        order: 2;
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #uploadFilesSection.upload-files-layout:not(.d-none) .upload-files-recent-block .recent-uploads-grow-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }

    #uploadFilesSection.upload-files-layout:not(.d-none) .upload-files-recent-block .recent-uploads-grid {
        flex: 1 1 auto;
        min-height: 120px;
        max-height: none;
    }

    #uploadFilesSection.upload-files-layout:not(.d-none) > hr {
        display: none;
    }
}

.recent-upload-item {
    position: relative;
    min-width: 0;
}

.recent-upload-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    z-index: 2;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(33, 37, 41, 0.82);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.recent-upload-item:hover .recent-upload-remove,
.recent-upload-item:focus-within .recent-upload-remove {
    opacity: 1;
}

.recent-upload-remove:hover {
    background: #dc3545;
}

@media (hover: none) {
    .recent-upload-remove {
        opacity: 0.92;
    }
}

.recent-upload-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f8f9fa;
    transition: border-color 0.15s, transform 0.15s;
}

    .recent-upload-thumb:hover {
        border-color: #0d6efd;
        transform: scale(1.02);
    }

    .recent-upload-thumb.is-busy {
        opacity: 0.5;
        pointer-events: none;
    }

/* View rail — light */
.designer-view-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    background: #f4f5f7;
    border-left: 1px solid #dee2e6;
    color: #212529;
}

.view-rail-label {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.35rem;
    width: 100%;
    text-align: center;
}

.designer-zoom-btns .btn {
    min-width: 2.5rem;
}

.view-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem;
    margin-bottom: 0.35rem;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    color: #495057;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.view-thumb__shirt {
    display: block;
    width: 56px;
    height: 72px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(165deg, var(--shirt-body-light), var(--shirt-body));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-thumb:hover {
    border-color: #adb5bd;
}

.btn-check:checked + .view-thumb {
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.25);
    color: #0d6efd;
}

kbd {
    font-size: 0.75em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: #e9ecef;
}

/* Text Editing Section */
#textEditSection {
    padding-top: 0.75rem;
    border-top: 1px solid #e0e2e6;
    margin-top: 0.75rem;
}

    #textEditSection .form-label {
        margin-bottom: 0.35rem;
    }

    #textEditSection .designer-text-editor {
        resize: vertical;
        min-height: 92px;
        line-height: 1.35;
    }

/* Compact "text content + focus" row */
.designer-text-edit-top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.designer-text-edit-focus {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex: 0 0 auto;
}

.designer-text-edit-top .designer-text-editor {
    flex: 1 1 auto;
    min-height: 86px;
}

    #textEditSection .btn-group {
        border-radius: 6px;
        overflow: hidden;
    }

    #textEditSection .btn-outline-secondary {
        border-color: #dee2e6;
    }

    #textEditSection .btn-check:checked + .btn-outline-secondary {
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: #fff;
    }

/* When editing an existing text object, hide "Add text" UI to save room. */
#panelText.is-editing-text #textAddSection {
    display: none !important;
}

/* Mobile: let the Text panel show more without feeling "scroll-hidden". */
@media (max-width: 767.98px) {
    /* The mobile sheet already has a header title ("Text") */
    .designer-context.mobile-open #panelText .context-title {
        display: none !important;
    }

    /* Tighten vertical rhythm so controls are visible immediately */
    .designer-context.mobile-open #panelText .form-label {
        margin-bottom: 0.25rem;
    }

    .designer-context.mobile-open #panelText .mb-2 {
        margin-bottom: 0.5rem !important;
    }

    .designer-context.mobile-open #panelText.is-editing-text {
        padding-bottom: 0.25rem;
    }
}

.form-control-color {
    width: 3rem;
    height: 2.25rem;
    padding: 0.25rem;
    border-radius: 6px;
}

/* Saved Designs */
.saved-design-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
}
.saved-design-item.saved-design-item--account {
    background: #f4f8ff;
    border-color: #d7e4ff;
}

/* Transparent background modal */
.bgremove-preview-wrap {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    max-height: min(52vh, 420px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    background-image:
        linear-gradient(45deg, #ced4da 25%, transparent 25%),
        linear-gradient(-45deg, #ced4da 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ced4da 75%),
        linear-gradient(-45deg, transparent 75%, #ced4da 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.bgremove-preview-canvas {
    display: block;
    max-width: 100%;
    max-height: min(52vh, 420px);
    width: auto;
    height: auto;
    cursor: crosshair;
}

.bgremove-preview-busy {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
}

.bgremove-swatch {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    background: #fff;
}

.bgremove-manual-accordion .accordion-button {
    font-size: 0.875rem;
    font-weight: 600;
}

.bgremove-manual-accordion .accordion-button:not(.collapsed) {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.06);
}

.bgremove-compare-toggle .btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.saved-design-info {
    flex: 1;
    min-width: 0;
}

.saved-design-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-design-date {
    font-size: 0.75rem;
    color: #6c757d;
}
.saved-design-source {
    font-size: 0.72rem;
    color: #355b93;
}

.saved-design-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

    .saved-design-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .saved-design-actions .btn-primary {
        min-width: 50px;
    }

/* Prevent mobile pull-to-refresh/scroll interference while dragging on design canvas */
.canvas-container,
.canvas-container canvas,
.upper-canvas,
.lower-canvas {
    touch-action: manipulation;
    overscroll-behavior: contain;
}

.stage-canvas-wrap {
    touch-action: pan-y;
    overscroll-behavior: contain;
}

/* Mobile color select dropdown (shown in banner on small screens) */
.mobile-color-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.mobile-color-select-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
    margin: 0;
}

/* Custom dropdown trigger button */
.mobile-color-trigger {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #212529;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
}

    .mobile-color-trigger:focus {
        outline: none;
        border-color: #0d6efd;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
    }

    .mobile-color-trigger .color-swatch-dot {
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        border-radius: 3px;
        border: 1px solid rgba(0,0,0,0.15);
        display: inline-block;
        background-size: cover;
        background-position: center;
    }

    .mobile-color-trigger .color-trigger-name {
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-color-trigger .color-trigger-caret {
        flex-shrink: 0;
        font-size: 0.65rem;
        color: #6c757d;
        margin-left: 0.2rem;
    }

/* Dropdown list */
.mobile-color-dropdown-list {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
    z-index: 1100;
    display: none;
    flex-direction: column;
    min-width: 0;
    max-height: 280px;
}

    .mobile-color-dropdown-list.is-open {
        display: flex;
    }

.mobile-color-search-wrap {
    flex-shrink: 0;
    padding: 0.45rem 0.5rem 0.35rem;
    border-bottom: 1px solid #e9ecef;
}

.mobile-color-search-wrap .shirt-color-filter-input {
    font-size: 0.8rem;
}

.mobile-color-options-inner {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 220px;
    overflow-y: auto;
}

/* Desktop toolbar: searchable color dropdown next to swatches */
.stage-toolbar-color-select {
    flex: 0 1 min(260px, 32vw);
    min-width: 180px;
}

.stage-toolbar-color-select .mobile-color-dropdown-list {
    bottom: auto;
    top: calc(100% + 6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    max-height: min(320px, 70vh);
}

.stage-toolbar-color-select .mobile-color-options-inner {
    max-height: min(240px, 55vh);
}

/* When the mobile color control is in the top bar, open the dropdown downward */
@media (max-width: 767.98px) {
    .mobile-top-controls .mobile-color-dropdown-list {
        bottom: auto;
        top: calc(100% + 6px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    }
}

.sizes-add-color-wrap {
    flex: 0 0 auto;
}

.sizes-add-color-wrap .mobile-color-trigger {
    flex: 0 0 auto;
    height: 34px;
    padding: 0.35rem 0.6rem;
}

/* Quantity panel: always open downward (mobile + desktop) so the list is not clipped
   above the scroll area / panel header when space is tight. */
.sizes-add-color-wrap .mobile-color-dropdown-list {
    bottom: auto;
    top: calc(100% + 6px);
    left: auto;
    right: 0;
    width: min(320px, 70vw);
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.sizes-add-color-wrap .mobile-color-trigger .color-trigger-caret {
    display: inline-block;
    transition: transform 0.15s ease;
}

.sizes-add-color-wrap .mobile-color-trigger[aria-expanded="true"] .color-trigger-caret {
    transform: rotate(180deg);
}

.mobile-color-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    color: #212529;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

    .mobile-color-option:hover,
    .mobile-color-option.is-highlighted {
        background: #f1f3f5;
    }

    .mobile-color-option.is-active {
        background: #e8f0fe;
        font-weight: 600;
    }

    .mobile-color-option .color-swatch-dot {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        border-radius: 3px;
        border: 1px solid rgba(0,0,0,0.15);
        display: inline-block;
        background-size: cover;
        background-position: center;
    }

/* Bottom product banner */
.designer-product-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1042;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
    backdrop-filter: saturate(140%) blur(4px);
}

.designer-product-banner__add {
    white-space: nowrap;
}

/* Quote action (right side of banner) */
.designer-product-banner__quote-action {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    min-width: 0;
}

.designer-product-banner__quote-hint {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.designer-product-banner__thumbs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-right: 0.75rem;
    border-right: 1px solid #e5e7eb;
}

.designer-product-banner__thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f8f9fa;
    opacity: 0.75;
}

    .designer-product-banner__thumb.is-active {
        opacity: 1;
        border-color: #0d6efd;
    }

.designer-product-banner__info {
    min-width: 0;
}

.designer-product-banner__name {
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.designer-product-banner__meta {
    margin-top: 0.2rem;
    font-size: 0.92rem;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

@media (max-width: 767.98px) {
    .designer-product-banner {
        flex-wrap: wrap;
        gap: 0.65rem;
        padding: 0.65rem 0.75rem;
        padding-bottom: 84px;
    }

    .designer-product-banner__name {
        font-size: 0.95rem;
    }

    .designer-product-banner__meta {
        font-size: 0.85rem;
    }

    /* Mobile: the hint text pushes the color dropdown out of alignment. Hide it. */
    .designer-product-banner__quote-hint {
        display: none !important;
    }
}

/* Add products picker modal */
.designer-picker-modal-dialog {
    max-width: min(1460px, 96vw);
}

.designer-picker-modal {
    min-height: 72vh;
}

.designer-picker-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
}

.designer-picker-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.designer-picker-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.designer-picker-search-wrap {
    width: min(420px, 100%);
}

.designer-picker-results-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.designer-picker-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* puts search + sort on the right */
    gap: 0.45rem;
    flex: 0 0 420px;
    width: min(420px, 100%);
    max-width: 44%;
}

.designer-picker-controls .designer-picker-search-wrap {
    width: 280px;
    max-width: 100%;
    margin-left: auto;
}

.designer-picker-controls .designer-picker-search-wrap .form-control {
    width: 100%;
}

.designer-picker-sort-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    justify-content: flex-end;
}

.designer-picker-sort-wrap select {
    width: auto;
    min-width: 150px;
}

.designer-picker-clear-all {
    text-decoration: none;
    white-space: nowrap;
}

/* Filter chips (selected brands, etc.) */
.designer-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.designer-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.22rem 0.5rem 0.22rem 0.65rem;
    font-size: 0.82rem;
    line-height: 1.2;
}

.designer-picker-chip > span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.designer-picker-chip button {
    border: 0;
    background: rgba(29, 78, 216, 0.08);
    color: inherit;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0;
    flex: 0 0 auto;
    transition: background-color 0.12s ease, transform 0.12s ease;
}

.designer-picker-chip button:hover {
    background: rgba(29, 78, 216, 0.14);
    transform: translateY(-0.5px);
}

.designer-picker-chip button:active {
    transform: translateY(0);
}

/* Product preview modal: show "Add to Design" at top on mobile only */
#btnConfirmAddProductTop {
    display: none;
}

@media (max-width: 767.98px) {
    #btnConfirmAddProductTop {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* Mobile: avoid duplicate primary CTA in footer */
    #modalPickerProductPreview .modal-footer #btnConfirmAddProduct {
        display: none !important;
    }
}

.designer-picker-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
}

.designer-picker-sidebar {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

/* Picker sidebar spacing + section separation */
.designer-picker-filter-title {
    padding: 0.75rem 0.85rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.designer-picker-category-select-wrap {
    padding: 0 0.85rem 0.85rem;
}

.designer-picker-category-select-wrap .form-select {
    border-radius: 10px;
}

.designer-picker-filter-block {
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 0.85rem;
}

.designer-picker-filter-details {
    margin: 0;
}

.designer-picker-filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: #1f2937;
    padding: 0.15rem 0 0.55rem;
}

.designer-picker-filter-summary::-webkit-details-marker {
    display: none;
}

.designer-picker-filter-summary::after {
    content: "\25BE";
    color: #6b7280;
    font-size: 0.85rem;
    transition: transform 0.15s ease;
}

.designer-picker-filter-details:not([open]) > .designer-picker-filter-summary::after {
    transform: rotate(-90deg);
}

.designer-picker-filter-list {
    display: grid;
    align-content: start;
    gap: 0.45rem;
    max-height: calc(100vh - 315px);
    overflow-y: auto;
    padding-right: 0.15rem;
}

/* Brand filter rows: prevent label text from hugging checkbox */
.designer-picker-filter-item label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.25;
}

.designer-picker-filter-item input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 0.25rem;
}

.designer-picker-filter-item span {
    flex: 1 1 auto;
    min-width: 0;
}

/* Mobile filter list polish (checkbox alignment + dense scrolling) */
.designer-picker-sidebar .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0;
}

.designer-picker-sidebar .form-check-input {
    margin-top: 0.25rem;
    flex: 0 0 auto;
}

.designer-picker-sidebar .form-check-label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}

.designer-picker-sidebar .form-check-label,
.designer-picker-sidebar label {
    user-select: none;
}

@media (max-width: 767.98px) {
    /* Make the drawer feel like a real mobile sheet */
    .designer-picker-sidebar {
        border-radius: 14px;
    }
}

.designer-picker-cats-toggle {
    border-radius: 10px;
}

.designer-picker-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    z-index: 1055; /* within modal */
}

.designer-picker-sidebar-backdrop.is-open {
    display: block !important;
}

.designer-picker-sidebar.is-open {
    transform: translateX(0);
}

.designer-picker-category-list {
    max-height: 62vh;
    overflow-y: auto;
}

.designer-picker-category-btn {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0.72rem 0.85rem;
    color: #374151;
}

    .designer-picker-category-btn:hover,
    .designer-picker-category-btn.is-active {
        background: #eef6ff;
        color: #0d6efd;
    }

.designer-picker-results {
    min-width: 0;
}

.designer-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.85rem;
}

.designer-picker-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 0.65rem;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .designer-picker-card:hover,
    .designer-picker-card.is-active {
        border-color: #7fb9f8;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.12);
    }

    .designer-picker-card img {
        width: 100%;
        height: 132px;
        object-fit: contain;
        background: #f8fafc;
        border: 1px solid #eef2f6;
        border-radius: 6px;
        margin-bottom: 0.45rem;
    }

.designer-picker-card__style {
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.designer-picker-card__brand {
    color: #6b7280;
    font-size: 0.88rem;
}

.designer-picker-card__starting {
    margin-top: 0.35rem;
    color: #111827;
}

.designer-picker-card__starting-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    line-height: 1.1;
    margin-bottom: 1px;
}

.designer-picker-card__starting-price {
    font-size: 0.92rem;
    font-weight: 400;
    color: #111827;
    line-height: 1.2;
}

.designer-picker-card__swatches {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.45rem;
    flex-wrap: wrap;
}

.designer-picker-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background-color: #fff;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.designer-picker-swatch-more {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 600;
    margin-left: 0.1rem;
}

@media (max-width: 991.98px) {
    .designer-picker-layout {
        grid-template-columns: 1fr;
    }

    .designer-picker-category-list {
        max-height: 30vh;
    }

    .designer-picker-heading {
        font-size: 1.45rem;
    }

    .designer-picker-results-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .designer-picker-controls {
        align-items: stretch;
        flex-basis: auto;
        max-width: none;
        width: 100%;
    }

    .designer-picker-sort-wrap {
        justify-content: space-between;
    }

    /* already stacked; keep for clarity */
    .designer-picker-header { }
}

/* Mobile: categories become a hamburger drawer so results can use full width */
@media (max-width: 767.98px) {
    .designer-picker-search-wrap {
        width: 100%;
    }

    .designer-picker-layout {
        position: relative;
        grid-template-columns: 1fr;
    }

    .designer-picker-sidebar {
        position: fixed;
        top: 74px; /* approx modal header height; keeps close button visible */
        left: 12px;
        bottom: 12px;
        width: min(320px, 86vw);
        max-height: none;
        z-index: 1060;
        box-shadow: 0 16px 40px rgba(0,0,0,0.22);
        transform: translateX(calc(-100% - 20px));
        transition: transform 0.18s ease;
    }

    .designer-picker-category-list {
        max-height: 100%;
    }
}

/* Product chips inside bottom banner */
.designer-product-banner__list {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
}

.designer-product-chip {
    border: 1px solid #dbe3eb;
    border-radius: 10px;
    background: #fff;
    padding: 0.25rem 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
}

    .designer-product-chip.is-active {
        border-color: #0d6efd;
        box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.12);
    }

.designer-product-chip__img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #eef2f6;
}

.designer-product-chip__label {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.84rem;
    color: #374151;
}

.designer-product-chip__remove {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9aa3af;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1;
    transition: background-color .12s ease, color .12s ease;
}

    .designer-product-chip__remove:hover {
        background: #fee2e2;
        color: #b91c1c;
    }

#pickerPreviewImage {
    min-height: 220px;
    object-fit: contain;
    width: 100%;
}

@media (max-width: 767.98px) {
    .designer-product-banner__list {
        order: 3;
        width: 100%;
    }

    .designer-product-chip__label {
        max-width: 120px;
    }
}

/* Apply Sizes / Quantity Slide-out Panel */
.designer-sizes-panel {
    width: 640px;
    background: #fff;
    border-left: 1px solid #e0e2e6;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1040;
    max-width: 100vw;
    max-height: calc(100vh - 38px);
    --sizes-footer-height: 140px;
}

/* Mobile scroll cue: centered circle above sticky footer (lives outside scroll body). */
.sizes-panel-scroll-sentinel {
    width: 100%;
    height: 1px;
    pointer-events: none;
    visibility: hidden;
}

.sizes-panel-scroll-hint {
    display: none;
}

@media (max-width: 767.98px) {
    .sizes-panel-scroll-hint {
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(var(--sizes-footer-height, 140px) + 10px);
        z-index: 5;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    .sizes-panel-scroll-hint.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .sizes-panel-scroll-hint__btn {
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.96);
        color: #495057;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
        line-height: 1;
        font-size: 1.15rem;
    }

    .sizes-panel-scroll-hint.is-visible .sizes-panel-scroll-hint__btn {
        animation: sizes-panel-scroll-hint-bounce 1.5s ease-in-out infinite;
    }

    @keyframes sizes-panel-scroll-hint-bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(5px); }
    }

    @media (prefers-reduced-motion: reduce) {
        .sizes-panel-scroll-hint.is-visible .sizes-panel-scroll-hint__btn {
            animation: none;
        }
    }
}

.sizes-panel-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.sizes-panel-body {
    flex: 1;
    overflow-y: auto;
}

.sizes-panel-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

/* Site.css caps all textareas at 280px — allow full width in the quantity panel (desktop). */
.designer-sizes-panel #quoteClientNotes {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* CTA button (inside Sizes panel footer) */
.designer-floating-cta {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-weight: 600;
}

.quote-password-rules .text-success {
    font-weight: 600;
}

/* Ensure quote auth modal overlays the full-screen sizes panel on mobile */
.modal.modal-quote-auth {
    z-index: 2000;
}

.modal-backdrop.modal-backdrop-quote-auth {
    z-index: 1990;
}

/* When the full-screen Sizes panel is open on mobile, ensure any confirmation modals sit on top. */
body.sizes-open .modal {
    z-index: 2000;
}

body.sizes-open .modal-backdrop {
    z-index: 1990;
}

@media (max-width: 767.98px) {
    .designer-sizes-panel {
        max-height: 100vh;
    }
}

.sizes-product-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sizes-product-card-header {
    display: flex;
    gap: 0.75rem;
}

.sizes-remove-color-line {
    flex-shrink: 0;
    line-height: 1;
    text-decoration: none;
    opacity: 0.85;
}

.sizes-remove-color-line:hover {
    opacity: 1;
    text-decoration: none;
}

.sizes-product-thumb {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.sizes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 42px;
}

.size-input-label {
    font-size: 0.75rem;
    color: #495057;
    margin-bottom: 0.2rem;
}

.size-input-control {
    width: 100%;
    text-align: center;
    padding: 0.25rem;
    font-size: 0.875rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    appearance: textfield;
    -moz-appearance: textfield; /* Firefox */
}

/* Prevent iOS Safari auto-zoom on focus (font-size must be >= 16px) */
@media (max-width: 767.98px) {
    input,
    select,
    textarea,
    .form-control,
    .size-input-control,
    .form-select {
        font-size: 16px !important;
    }
}

/* Chrome, Safari, Edge, Opera */
.size-input-control::-webkit-outer-spin-button,
.size-input-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.size-input-control:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* Quote cart mobile polish: preserve desktop layout, optimize touch readability on phones. */
@media (max-width: 767.98px) {
    #modalShopFirstQuoteCart .modal-dialog {
        margin: 0.5rem;
        max-width: none;
    }

    #modalShopFirstQuoteCart .modal-content {
        border-radius: 14px;
    }

    #modalShopFirstQuoteCart .modal-header,
    #modalShopFirstQuoteCart .modal-body,
    #modalShopFirstQuoteCart .modal-footer {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-tools {
        align-items: stretch !important;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-tools__actions {
        width: 100%;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-tools__actions .btn {
        flex: 1 1 0;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row {
        padding: 0.625rem !important;
        border-radius: 10px !important;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row__top {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row .js-quote-cart-check {
        margin-top: 0.25rem !important;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row__summary {
        min-width: 0;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row__meta {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row__actions {
        margin-left: 1.55rem; /* align under title block after checkbox */
        width: calc(100% - 1.55rem);
        justify-content: flex-end;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row__actions .btn {
        min-height: 34px;
        padding: 0.2rem 0.55rem;
        white-space: nowrap;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-row__details {
        margin-left: 0 !important;
        padding-left: 0 !important;
        border-left: 0 !important;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-product {
        margin-bottom: 0.5rem !important;
    }

    #modalShopFirstQuoteCart .quote-cart-size-card {
        padding: 0.65rem;
        border-radius: 10px;
    }

    #modalShopFirstQuoteCart .sizes-product-card-header {
        gap: 0.5rem;
    }

    #modalShopFirstQuoteCart .sizes-product-thumb {
        width: 56px;
        height: 56px;
    }

    #modalShopFirstQuoteCart .quote-cart-sizes-grid {
        gap: 0.4rem;
    }

    #modalShopFirstQuoteCart .quote-cart-sizes-grid .size-input-group {
        width: 44px;
    }

    #modalShopFirstQuoteCart .quote-cart-sizes-grid .size-input-label {
        font-size: 0.72rem;
    }

    #modalShopFirstQuoteCart .quote-cart-sizes-grid .size-input-control {
        min-height: 34px;
        padding: 0.2rem;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-footer {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-footer__left {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem !important;
    }

    #modalShopFirstQuoteCart .designer-quote-cart-footer .btn {
        width: 100%;
    }

    #modalShopFirstQuoteCart #btnShopFirstSubmitQuote {
        order: -1;
    }
}

/* Designer Shell overrides for open Sizes Panel */
body.sizes-open {
    padding-bottom: 0 !important;
}

body.sizes-open .designer-product-banner {
    display: none !important;
}

body.sizes-open .designer-rail,
body.sizes-open .designer-context,
body.sizes-open .designer-view-rail,
body.sizes-open .stage-toolbar,
body.sizes-open .mobile-overlay-controls {
    display: none !important;
}

/* Packaging overlay shown during mockup capture/zip save */
.packaging-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.72);
    z-index: 2147483000 !important; /* above Bootstrap modal/backdrop; JS also sets inline z-index */
    pointer-events: auto;
}

/* When busy, block page scroll behind full-screen overlay */
body.is-packaging {
    overflow: hidden !important;
    touch-action: none;
}

.packaging-overlay__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-align: center;
    max-width: 92vw;
}

.packaging-overlay__text {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.packaging-overlay__subtext {
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (min-width: 1200px) {
    .designer-shell.designer-shell--sizes-open {
        grid-template-columns: minmax(0, 1fr) 640px !important;
    }
}
@media (max-width: 1199.98px) {
    .designer-shell.designer-shell--sizes-open {
        grid-template-columns: minmax(0, 1fr) 640px !important;
    }
}
@media (max-width: 767.98px) {
    /* Cart project name label crowds the compact mobile header; keep it desktop-only. */
    #activeCartProjectName {
        display: none !important;
    }

    .designer-shell.designer-shell--sizes-open .designer-sizes-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        max-width: none;
        z-index: 1060;
    }
}

.ora-google-signin-highlight {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.35);
    border-color: #dc3545 !important;
}
