:root {
    --iber-bg: #ffffff;
    --iber-surface: #ffffff;
    --iber-muted: #f5f6f8;
    --iber-border: #e6e8ec;
    --iber-text: #111111;
    --iber-subtext: #5f6673;
    --iber-accent: #ef4825;
    --iber-accent-soft: #fff1ec;
}

body.app-page {
    background: var(--iber-bg) !important;
    color: var(--iber-text) !important;
}

#editor-nav {
    position: relative;
    z-index: var(--z-top-nav);
}

#editor-info-bar {
    position: relative;
    z-index: var(--z-top-info);
}

#editor-body-layout {
    position: relative;
    z-index: auto;
}

#resize-handles {
    position: fixed !important;
    inset: 0 !important;
    z-index: var(--z-resize-handles) !important;
    pointer-events: none !important;
}

#editor-nav {
    background: var(--iber-surface) !important;
    border-bottom: 1px solid var(--iber-border) !important;
    box-shadow: none !important;
}

#editor-nav button:not(#add-to-cart-btn),
#editor-nav a[title="Fechar editor"],
#close-editor-btn {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
}

#editor-nav button:not(#add-to-cart-btn):hover,
#editor-nav a[title="Fechar editor"]:hover,
#close-editor-btn:hover {
    border-color: var(--iber-accent) !important;
    color: var(--iber-accent) !important;
    background: var(--iber-accent-soft) !important;
}

#add-to-cart-btn {
    background: var(--iber-accent) !important;
    border: 1px solid var(--iber-accent) !important;
    border-radius: 10px !important;
    color: #fff !important;
    box-shadow: none !important;
}

#add-to-cart-btn:hover {
    filter: brightness(0.96);
}

.editor-exit-modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-cart);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 17, 17, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.editor-exit-modal.hidden {
    display: none !important;
}

.editor-exit-modal__dialog {
    width: min(460px, 100%);
    border: 1px solid var(--iber-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
    padding: 16px;
}

.editor-exit-modal__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--iber-text);
}

.editor-exit-modal__header p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--iber-subtext);
}

.editor-exit-modal__actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.editor-exit-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--iber-border);
    background: #fff;
    color: var(--iber-text);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
}

.editor-exit-btn--primary {
    border-color: var(--iber-accent);
    background: var(--iber-accent);
    color: #fff;
}

.editor-exit-btn--danger {
    color: #b42318;
    background: #fff;
}

.editor-exit-btn--ghost {
    background: #f9fafb;
}

#editor-info-bar {
    background: var(--iber-surface) !important;
    border-bottom: 1px solid var(--iber-border) !important;
    color: var(--iber-text) !important;
}

.editor-info-name,
.editor-info-price {
    color: var(--iber-text) !important;
}

.editor-body-layout {
    background: #f7f8fa !important;
    gap: 12px !important;
    padding: 12px !important;
}

.editor-sidebar-left,
.editor-sidebar-right {
    background: var(--iber-surface) !important;
    border: 1px solid var(--iber-border) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

.sidebar-shell,
.sidebar-section {
    background: transparent !important;
}

.drawer-grip {
    background: var(--iber-border) !important;
}

.elements-group-title,
.section-title {
    color: #1f232b !important;
    letter-spacing: 0.08em !important;
}

.tool-tile,
.shape-btn {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
}

.tool-tile__icon {
    border-radius: 8px !important;
    background: #f8f9fb !important;
    color: var(--iber-text) !important;
}

.tool-tile:hover,
.shape-btn:hover {
    border-color: var(--iber-accent) !important;
    background: var(--iber-accent-soft) !important;
    color: var(--iber-accent) !important;
    box-shadow: none !important;
}

.layer-item {
    margin: 0 !important;
    padding: 0.55rem 0.62rem !important;
    border: 1px solid var(--iber-border) !important;
    border-left: 2px solid transparent !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
    cursor: pointer;
}

.layer-item:hover {
    border-left-color: var(--iber-accent) !important;
    background: #fff !important;
}

.layer-item.is-selected,
.layer-item.bg-blue-50 {
    background: var(--iber-accent-soft) !important;
    border-left-color: var(--iber-accent) !important;
}

.layer-item.is-drag-over {
    border-color: var(--iber-accent) !important;
    background: var(--iber-accent-soft) !important;
}

.layer-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
}

.layer-item-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.layer-item-icon {
    width: 0.9rem;
    height: 0.9rem;
    flex: 0 0 auto;
    color: #1f232b;
}

.layer-item-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layer-item-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.08rem;
}

.layer-item-action {
    width: 1.28rem;
    height: 1.28rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1f232b;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.layer-item-action:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.06);
}

.layer-item-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.layer-item-action-icon {
    width: 0.78rem;
    height: 0.78rem;
}

.action-btn {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
}

.action-btn:hover {
    border-color: var(--iber-accent) !important;
    background: var(--iber-accent-soft) !important;
    color: var(--iber-accent) !important;
}

.properties-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.properties-toolbar-row::-webkit-scrollbar {
    display: none;
}

.toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
}

.toolbar-group.hidden,
.desktop-selection-toolbar.hidden,
.desktop-context-group.hidden,
.desktop-inline-fit-group.hidden {
    display: none !important;
}

.toolbar-group--context {
    gap: 8px;
}

.desktop-selection-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

.desktop-context-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.desktop-inline-select {
    min-width: 140px;
    max-width: 185px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: #f5f6f8;
    color: var(--iber-text);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
}

.desktop-inline-size {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 34px;
    padding: 0 6px;
    border: 0;
    border-radius: 6px;
    background: #f5f6f8;
}

.desktop-inline-step {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--iber-text);
    font-weight: 700;
    line-height: 1;
}

.desktop-inline-step:hover {
    color: var(--iber-text);
    background: #e7eaef;
}

.desktop-inline-size-value {
    min-width: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--iber-text);
}

.desktop-inline-font-btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--iber-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.desktop-image-fit-btn {
    width: 32px;
    min-width: 32px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--iber-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.desktop-inline-font-btn:hover,
.desktop-image-fit-btn:hover,
.desktop-inline-font-btn.active,
.desktop-inline-font-btn[aria-pressed="true"],
.desktop-image-fit-btn.active,
.desktop-image-fit-btn[aria-pressed="true"] {
    background: #eceff3;
    color: var(--iber-accent);
}

.desktop-inline-font-btn:disabled,
.desktop-inline-font-btn.is-disabled,
.desktop-image-fit-btn:disabled,
.desktop-image-fit-btn.is-disabled,
.desktop-inline-select:disabled,
.desktop-inline-step:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.desktop-inline-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--iber-subtext);
}

.desktop-inline-range {
    width: 118px;
    accent-color: var(--iber-accent);
}

.desktop-inline-value {
    min-width: 38px;
    text-align: right;
    font-size: 11px;
    font-weight: 700;
    color: var(--iber-text);
}

.desktop-inline-fit-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#no-selection,
#text-properties,
#image-properties,
#shape-properties {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

#properties-panel input:not([type="range"]):not([type="color"]),
#properties-panel select,
#properties-panel textarea {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
}

#properties-panel input[type="range"] {
    accent-color: var(--iber-accent) !important;
}

/* Slide Button Style */
.slide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
    padding: 0;
    box-shadow: none;
}

.slide-button:focus-visible {
    outline: 2px solid rgba(239, 72, 37, 0.28);
    outline-offset: 2px;
}

.slide-button.active {
    background: #eceff3;
    color: var(--iber-accent);
    box-shadow: none;
}

.slide-button:hover {
    background: #f0f2f5;
}

.slide-button-toggle,
.slide-button-track,
.slide-button-label {
    display: none !important;
}

.editor-main {
    border-radius: 12px !important;
    background: #fff !important;
}

.canvas-container {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

#canvas-stage {
    position: relative;
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

#canvas-stage.is-camera-panning,
body.is-camera-panning #canvas-stage {
    cursor: grabbing !important;
}

.editor-bottom-bar {
    border-top: 1px solid var(--iber-border) !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
}

.context-action {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
}

.context-action:hover,
.context-action.active,
.context-action[aria-pressed="true"] {
    border-color: var(--iber-accent) !important;
    color: var(--iber-accent) !important;
    background: var(--iber-accent-soft) !important;
}

.context-popover {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.quick-font-textarea,
.quick-font-select {
    border: 1px solid var(--iber-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
}

.quick-font-action {
    border: 1px solid var(--iber-border) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
}

.quick-font-action:hover,
.quick-font-action.active {
    border-color: var(--iber-accent) !important;
    color: var(--iber-accent) !important;
    background: var(--iber-accent-soft) !important;
}

.editor-mobile-tabs {
    border-top: 1px solid var(--iber-border) !important;
    background: #fff !important;
    position: relative;
    z-index: var(--z-mobile-tabs);
}

.editor-mobile-tab {
    color: var(--iber-subtext) !important;
}

.editor-mobile-tab.active {
    color: var(--iber-accent) !important;
}

#editor-loading {
    z-index: var(--z-loading) !important;
}

@media (max-width: 1023px) {
    .slide-button {
        width: 34px;
        height: 34px;
        padding: 0;
        flex: 0 0 auto;
    }
}

.editor-main {
    position: relative;
}

.editor-floating-context-bar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-floating-context);
    width: max-content;
    max-width: calc(100% - 20px);
    padding: 6px 8px;
    border: 1px solid var(--iber-border) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: var(--iber-text) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden;
    pointer-events: auto;
}

.editor-floating-context-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
}

.editor-floating-context-inner::-webkit-scrollbar {
    display: none;
}

.editor-floating-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-width: max-content;
}

.editor-floating-btn {
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--iber-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.keep-aspect-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0;
    line-height: 0;
    font-style: normal;
}

.keep-aspect-icon-stack {
    position: relative;
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.keep-aspect-base-icon {
    width: 16px;
    height: 16px;
}

.keep-aspect-state-icon {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    color: currentColor;
}

.editor-floating-btn:hover {
    background: var(--iber-accent-soft);
    color: var(--iber-accent);
    border-color: rgba(239, 72, 37, 0.24);
}

.editor-floating-btn.active,
.editor-floating-btn[aria-pressed="true"] {
    background: var(--iber-accent-soft);
    color: var(--iber-accent);
    border-color: rgba(239, 72, 37, 0.32);
}

.editor-floating-btn--danger:hover {
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.3);
    background: #fff1ef;
}

.editor-floating-btn:disabled,
.editor-floating-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--iber-subtext);
    border-color: transparent;
    background: transparent;
}

.editor-floating-text-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--iber-border);
    flex: 0 0 auto;
    min-width: max-content;
}

.top-font-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
}

#top-shape-group {
    gap: 8px;
}

.editor-floating-text-group.hidden {
    display: none !important;
}

#top-image-group .desktop-inline-range {
    width: 120px;
    min-width: 120px;
}

#top-image-group .desktop-inline-value {
    min-width: 44px;
}

#top-image-group {
    gap: 8px;
}

.editor-floating-actions--compact {
    gap: 3px;
}

.editor-floating-btn--icon-only {
    width: 32px;
    min-width: 32px;
    padding: 0;
}

.editor-floating-opacity-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.editor-floating-qr-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.editor-floating-inline-input {
    width: 180px;
    min-width: 180px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--iber-border);
    border-radius: 6px;
    background: #fff;
    color: var(--iber-text);
    font-size: 12px;
    font-weight: 600;
    outline: none;
}

.editor-floating-inline-input::placeholder {
    color: var(--iber-subtext);
}

.editor-floating-size {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--iber-border);
    border-radius: 6px;
    background: #fff;
}

.editor-floating-step {
    width: 20px;
    height: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--iber-text);
    font-weight: 700;
    line-height: 1;
}

.editor-floating-step:hover {
    color: var(--iber-accent);
    border-color: rgba(239, 72, 37, 0.24);
    background: var(--iber-accent-soft);
}

.editor-floating-step.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.editor-floating-size-value {
    min-width: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--iber-text);
}

.editor-floating-context-bar .quick-font-select {
    min-width: 170px;
    height: 34px;
    min-height: 34px;
    border: 1px solid var(--iber-border) !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: var(--iber-text) !important;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: none !important;
}

.editor-floating-font-btn {
    height: 34px;
    min-height: 34px;
    min-width: 34px;
    padding: 0 8px;
    border: 1px solid var(--iber-border);
    border-radius: 6px;
    background: #fff;
    color: var(--iber-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.editor-floating-font-btn:hover,
.editor-floating-font-btn.active,
.editor-floating-font-btn[aria-pressed="true"] {
    border-color: rgba(239, 72, 37, 0.32);
    background: var(--iber-accent-soft);
    color: var(--iber-accent);
}

.editor-floating-font-btn:disabled,
.editor-floating-font-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#editor-bottom-context-bar.hidden {
    display: none !important;
}

#editor-bottom-context-bar {
    margin-top: 10px;
}

#editor-floating-context-bar.hidden {
    display: none !important;
}

@media (max-width: 767px) {
    #editor-bottom-context-bar {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #editor-floating-context-bar {
        top: 8px;
        width: auto;
        max-width: calc(100% - 12px);
        padding: 6px;
    }

    #editor-floating-context-bar .editor-floating-context-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        width: min(356px, calc(100vw - 24px));
        max-width: 100%;
        min-width: 0;
        margin-inline: auto;
        overflow: visible;
        align-items: center;
        justify-items: center;
    }

    #editor-floating-context-bar[data-mobile-context="text"] .editor-floating-context-inner {
        width: max-content;
        max-width: calc(100vw - 24px);
        grid-template-columns: max-content 118px;
        align-items: start;
        justify-items: stretch;
        column-gap: 6px;
    }

    #editor-floating-context-bar[data-mobile-context="image"] .editor-floating-context-inner {
        display: grid;
        grid-template-columns: max-content max-content;
        grid-template-rows: auto auto;
        width: max-content;
        max-width: calc(100vw - 24px);
        min-width: 0;
        justify-items: center;
        align-items: center;
        column-gap: 6px;
        row-gap: 6px;
        touch-action: none;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] .editor-floating-context-inner {
        width: min(304px, calc(100vw - 24px));
    }

    #editor-floating-context-bar[data-mobile-context="shape"] .editor-floating-context-inner {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: max-content;
        max-width: calc(100vw - 24px);
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] .editor-floating-context-inner::-webkit-scrollbar {
        display: none;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] .editor-floating-actions {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: max-content;
        min-width: max-content;
        max-width: none;
        margin-inline: 0;
    }

    #editor-floating-context-bar .editor-floating-actions {
        display: grid;
        grid-template-columns: repeat(5, 30px);
        gap: 4px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        justify-content: center;
        margin-inline: auto;
    }

    #editor-floating-context-bar[data-mobile-context="text"] .editor-floating-actions,
    #editor-floating-context-bar[data-mobile-context="qr"] .editor-floating-actions {
        grid-template-columns: repeat(4, 30px);
    }

    #editor-floating-context-bar[data-mobile-context="text"] .editor-floating-actions {
        grid-column: 1;
        grid-row: 1;
        width: max-content;
        margin-inline: 0;
        align-self: center;
    }

    #editor-floating-context-bar .editor-floating-actions .editor-floating-btn {
        width: 30px;
        min-width: 30px;
        height: 30px;
        min-height: 30px;
        border: 0 !important;
        border-radius: 6px;
        padding: 0;
        background: transparent;
        box-shadow: none !important;
    }

    #editor-floating-context-bar .editor-floating-actions .editor-floating-btn > span {
        display: none !important;
    }

    #editor-floating-context-bar .editor-floating-actions .editor-floating-btn i,
    #editor-floating-context-bar .editor-floating-actions .editor-floating-btn svg {
        width: 14px;
        height: 14px;
    }

    #top-font-group,
    #top-shape-group,
    #top-image-group,
    #top-qr-group {
        min-width: 0;
        max-width: 100%;
        padding-left: 0;
        border-left: 0;
        overflow: visible;
        justify-self: center;
    }

    #editor-floating-context-bar[data-mobile-context="none"] #top-font-group,
    #editor-floating-context-bar[data-mobile-context="none"] #top-shape-group,
    #editor-floating-context-bar[data-mobile-context="none"] #top-image-group,
    #editor-floating-context-bar[data-mobile-context="none"] #top-qr-group,
    #editor-floating-context-bar[data-mobile-context="none"] #top-keep-aspect-btn {
        display: none !important;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-shape-group,
    #editor-floating-context-bar[data-mobile-context="text"] #top-image-group,
    #editor-floating-context-bar[data-mobile-context="text"] #top-qr-group,
    #editor-floating-context-bar[data-mobile-context="text"] #top-keep-aspect-btn {
        display: none !important;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-font-group {
        display: contents;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-font-select {
        grid-column: 2;
        grid-row: 1;
        width: 118px;
        min-width: 118px;
        max-width: 118px;
        height: 30px;
        min-height: 30px;
        padding: 0 8px;
        font-size: 13px;
        border-radius: 6px;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-font-group .top-font-controls {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-columns: 68px repeat(4, 24px) 56px;
        align-items: center;
        width: 100%;
        min-width: 0;
        gap: 6px;
        justify-content: center;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-font-group .top-font-controls .editor-floating-size {
        width: 68px;
        min-width: 68px;
        height: 30px;
        padding: 0 4px;
        justify-content: space-between;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-font-group .top-font-controls .editor-floating-font-btn {
        width: 24px;
        min-width: 24px;
        height: 30px;
        min-height: 30px;
        padding: 0;
        border: 0;
        border-radius: 6px;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-font-group .top-font-controls .top-inline-color-control {
        width: 56px;
        justify-content: flex-end;
        gap: 4px;
    }

    #editor-floating-context-bar[data-mobile-context="text"] #top-font-group .top-font-controls .top-inline-color-wrap,
    #editor-floating-context-bar[data-mobile-context="text"] #top-font-group .top-font-controls .top-inline-color {
        width: 22px;
        height: 22px;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-font-group,
    #editor-floating-context-bar[data-mobile-context="image"] #top-shape-group,
    #editor-floating-context-bar[data-mobile-context="image"] #top-qr-group {
        display: none !important;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-image-group {
        display: contents;
    }

    #editor-floating-context-bar[data-mobile-context="image"] .editor-floating-actions {
        grid-column: 1;
        grid-row: 1;
        width: max-content;
        min-width: max-content;
        margin-inline: 0;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-image-group #top-image-edit-actions {
        grid-column: 2;
        grid-row: 1;
        display: grid;
        grid-template-columns: repeat(3, 30px);
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-image-group .editor-floating-opacity-control {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: min(286px, calc(100vw - 36px));
        min-width: 0;
        gap: 6px;
        align-items: center;
        margin-inline: auto;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-image-group .desktop-inline-range {
        width: 100%;
        min-width: 0;
        touch-action: none;
        pointer-events: auto;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-image-group .desktop-inline-value {
        min-width: 40px;
        text-align: right;
        font-size: 12px;
        font-weight: 700;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px;
        min-height: 30px;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 6px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 0;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn > span {
        display: none !important;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn .keep-aspect-base-icon {
        width: 16px !important;
        height: 16px !important;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn .keep-aspect-state-icon {
        width: 11px !important;
        height: 11px !important;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn[aria-pressed="false"],
    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn[aria-pressed="false"] {
        background: #f8fafc !important;
        color: #64748b !important;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn[aria-pressed="true"],
    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn[aria-pressed="true"] {
        background: var(--iber-accent) !important;
        color: #ffffff !important;
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn[aria-pressed="true"] .keep-aspect-state-icon,
    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn[aria-pressed="true"] .keep-aspect-state-icon {
        background: #ffffff;
        color: var(--iber-accent);
    }

    #editor-floating-context-bar[data-mobile-context="image"] #top-keep-aspect-btn[aria-pressed="false"] .keep-aspect-state-icon,
    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn[aria-pressed="false"] .keep-aspect-state-icon {
        background: #ffffff;
        color: #64748b;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] #top-font-group,
    #editor-floating-context-bar[data-mobile-context="shape"] #top-image-group,
    #editor-floating-context-bar[data-mobile-context="shape"] #top-qr-group {
        display: none !important;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] #top-shape-group {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: max-content;
        min-width: 0;
        gap: 6px;
        flex: 0 0 auto;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] #top-shape-group .top-inline-color-control {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: auto;
        margin-inline: auto;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px;
        min-height: 30px;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 6px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 0;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn > span {
        display: none !important;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn .keep-aspect-base-icon {
        width: 16px !important;
        height: 16px !important;
    }

    #editor-floating-context-bar[data-mobile-context="shape"] #top-keep-aspect-btn .keep-aspect-state-icon {
        width: 11px !important;
        height: 11px !important;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] #top-font-group,
    #editor-floating-context-bar[data-mobile-context="qr"] #top-shape-group,
    #editor-floating-context-bar[data-mobile-context="qr"] #top-image-group,
    #editor-floating-context-bar[data-mobile-context="qr"] #top-keep-aspect-btn {
        display: none !important;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] #top-qr-group {
        display: contents;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] #top-qr-content {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        height: 30px;
        min-height: 30px;
        font-size: 12px;
        order: 2;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] #top-qr-group .top-inline-color-control {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        width: auto;
        margin-left: auto;
        order: 1;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] .editor-floating-context-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
        justify-items: stretch;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] .editor-floating-actions {
        grid-column: 1;
        margin-inline: 0;
    }

    #editor-floating-context-bar[data-mobile-context="qr"] #top-qr-group .top-inline-color-wrap,
    #editor-floating-context-bar[data-mobile-context="qr"] #top-qr-group .top-inline-color {
        width: 24px;
        height: 24px;
    }

    #top-keep-aspect-btn {
        border-radius: 6px;
    }

    #editor-floating-context-bar #top-keep-aspect-btn.hidden {
        display: none !important;
    }

    #top-keep-aspect-btn:focus,
    #top-keep-aspect-btn:focus-visible {
        outline: none !important;
        box-shadow: none !important;
    }

    #quick-keep-aspect-btn .keep-aspect-base-icon {
        width: 15px;
        height: 15px;
    }

    #quick-keep-aspect-btn .keep-aspect-state-icon {
        width: 11px;
        height: 11px;
        top: -4px;
        right: -4px;
    }

    #quick-keep-aspect-btn[aria-pressed="true"] {
        background: var(--iber-accent-soft) !important;
        color: var(--iber-accent) !important;
        border-color: rgba(239, 72, 37, 0.38) !important;
    }

    .editor-floating-opacity-control,
    .editor-floating-qr-group {
        gap: 6px;
    }

}

@media (max-width: 420px) {
    #add-to-cart-btn {
        max-width: min(58vw, 200px);
    }

    #add-to-cart-btn .editor-cart-text {
        font-size: 13px;
    }
}

/* ============================================================
   PROPERTIES PANEL REWORK (clean 2026)
   ============================================================ */
#properties-panel {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px 14px !important;
    overflow: visible !important;
}

#properties-panel .section-title {
    display: none !important;
}

.properties-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--iber-border);
}

.properties-panel-title {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--iber-subtext);
}

.properties-panel-close {
    display: none;
    width: 30px;
    height: 30px;
    border: 1px solid var(--iber-border);
    border-radius: 4px;
    background: #fff;
    color: var(--iber-text);
    align-items: center;
    justify-content: center;
}

#properties-panel .properties-toolbar-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

#properties-panel .properties-toolbar-row::-webkit-scrollbar {
    display: none;
}

#properties-panel .properties-toolbar-row:focus,
#properties-panel .properties-toolbar-row:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

#properties-panel .properties-toolbar-row .toolbar-btn:focus,
#properties-panel .properties-toolbar-row .toolbar-btn:focus-visible,
#properties-panel .properties-toolbar-row .desktop-inline-font-btn:focus,
#properties-panel .properties-toolbar-row .desktop-inline-font-btn:focus-visible,
#properties-panel .properties-toolbar-row .desktop-image-fit-btn:focus,
#properties-panel .properties-toolbar-row .desktop-image-fit-btn:focus-visible,
#properties-panel .properties-toolbar-row .desktop-inline-step:focus,
#properties-panel .properties-toolbar-row .desktop-inline-step:focus-visible,
#properties-panel .properties-toolbar-row .desktop-inline-select:focus,
#properties-panel .properties-toolbar-row .desktop-inline-select:focus-visible,
#properties-panel .properties-toolbar-row .desktop-inline-color:focus,
#properties-panel .properties-toolbar-row .desktop-inline-color:focus-visible,
#properties-panel .properties-toolbar-row #keep-aspect-ratio:focus,
#properties-panel .properties-toolbar-row #keep-aspect-ratio:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-style: solid !important;
}

#properties-panel .toolbar-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

#properties-panel .toolbar-group.hidden,
#properties-panel .desktop-selection-toolbar.hidden,
#properties-panel .desktop-context-group.hidden,
#properties-panel .desktop-inline-fit-group.hidden,
#properties-panel .properties-toolbar-row .toolbar-btn.hidden {
    display: none !important;
}

#properties-panel .toolbar-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 6px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--iber-text) !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#properties-panel .toolbar-btn--zoom {
    min-width: 34px;
    width: 34px;
    padding: 0 !important;
}

#properties-panel .toolbar-zoom-level {
    min-width: 54px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: #f3f4f6;
    color: var(--iber-text);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#keep-aspect-ratio.slide-button {
    width: 34px !important;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 6px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--iber-text);
}

#keep-aspect-ratio.slide-button:hover {
    background: #f0f2f5 !important;
}

#keep-aspect-ratio.active {
    background: #eceff3 !important;
    color: var(--iber-accent) !important;
}

#properties-panel .toolbar-btn:hover,
#properties-panel .desktop-inline-font-btn:hover,
#properties-panel .desktop-image-fit-btn:hover {
    background: #f0f2f5 !important;
    color: var(--iber-text) !important;
}

#properties-panel .toolbar-btn.active,
#properties-panel .toolbar-btn[aria-pressed="true"],
#properties-panel .desktop-inline-font-btn.active,
#properties-panel .desktop-inline-font-btn[aria-pressed="true"],
#properties-panel .desktop-image-fit-btn.active,
#properties-panel .desktop-image-fit-btn[aria-pressed="true"] {
    background: #eceff3 !important;
    color: var(--iber-accent) !important;
}

#keep-aspect-ratio:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.desktop-inline-color-wrap {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.desktop-inline-color {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 4px;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.top-inline-color-control {
    gap: 5px;
}

.top-inline-color-wrap {
    width: 24px;
    height: 24px;
    border-radius: 999px;
}

.top-inline-color {
    width: 24px;
    height: 24px;
    border-radius: 999px;
}

.top-inline-color::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 999px;
}

.top-inline-color::-webkit-color-swatch {
    border: 0;
    border-radius: 999px;
}

.top-inline-color::-moz-color-swatch {
    border: 0;
    border-radius: 999px;
}

.desktop-inline-color-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.color-eyedropper-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 0;
    border-radius: 4px;
    background: #f3f4f6;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.color-eyedropper-btn:hover {
    background: var(--iber-accent-soft);
    color: var(--iber-accent);
}

.color-eyedropper-btn:disabled,
.color-eyedropper-btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

#properties-panel .properties-advanced-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid var(--iber-border);
}

#properties-panel .properties-order-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#properties-panel .properties-order-actions .action-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0 !important;
    border-radius: 4px !important;
}

#properties-panel .properties-nudge-grid {
    display: grid;
    grid-template-columns: repeat(3, 34px);
    grid-template-rows: repeat(2, 34px);
    gap: 4px;
    justify-content: end;
}

#properties-panel .properties-nudge-grid #nudge-up-btn {
    grid-column: 2;
    grid-row: 1;
}

#properties-panel .properties-nudge-grid #nudge-left-btn {
    grid-column: 1;
    grid-row: 2;
}

#properties-panel .properties-nudge-grid #nudge-right-btn {
    grid-column: 3;
    grid-row: 2;
}

#properties-panel .properties-nudge-grid #nudge-down-btn {
    grid-column: 2;
    grid-row: 2;
}

#properties-panel .properties-nudge-grid .action-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0 !important;
    border-radius: 4px !important;
}

#properties-panel #no-selection,
#properties-panel #text-properties,
#properties-panel #image-properties,
#properties-panel #shape-properties {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid var(--iber-border) !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: none !important;
    padding: 12px !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

#properties-panel #no-selection {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 76px;
}

#properties-panel #no-selection i {
    margin: 0 !important;
}

#properties-panel h3 {
    margin: 0 0 8px !important;
    font-size: 13px !important;
    color: var(--iber-text) !important;
}

#properties-panel .property-fit-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#properties-panel .property-fit-row .action-btn {
    justify-content: center;
    gap: 6px;
    height: 40px;
    border-radius: 4px !important;
}

#properties-panel .action-btn.active,
#properties-panel .action-btn[aria-pressed="true"],
#properties-panel #prop-image-fit-contain.active,
#properties-panel #prop-image-fit-cover.active,
#properties-panel #prop-image-fit-fill.active,
#properties-panel #prop-text-bold.active,
#properties-panel #prop-text-italic.active,
#properties-panel #prop-text-underline.active,
#properties-panel #prop-text-caps.active {
    border-color: rgba(239, 72, 37, 0.32) !important;
    color: var(--iber-accent) !important;
    background: var(--iber-accent-soft) !important;
}

#properties-panel .properties-toolbar-row .toolbar-btn.active,
#properties-panel .properties-toolbar-row .toolbar-btn[aria-pressed="true"],
#properties-panel .properties-toolbar-row .desktop-inline-font-btn.active,
#properties-panel .properties-toolbar-row .desktop-inline-font-btn[aria-pressed="true"],
#properties-panel .properties-toolbar-row .desktop-image-fit-btn.active,
#properties-panel .properties-toolbar-row .desktop-image-fit-btn[aria-pressed="true"] {
    border: 0 !important;
    background: #eceff3 !important;
    color: var(--iber-accent) !important;
}

#properties-panel .properties-toolbar-row .toolbar-btn:hover,
#properties-panel .properties-toolbar-row .desktop-inline-font-btn:hover,
#properties-panel .properties-toolbar-row .desktop-image-fit-btn:hover {
    border: 0 !important;
    background: #f0f2f5 !important;
    color: var(--iber-text) !important;
}

#properties-panel .action-btn.is-disabled,
#properties-panel button.is-disabled,
#properties-panel button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#editor-sidebar-right #properties-panel,
#editor-sidebar-right #no-selection,
#editor-sidebar-right #text-properties,
#editor-sidebar-right #image-properties,
#editor-sidebar-right #shape-properties {
    overflow: visible !important;
}

@media (min-width: 1024px) {
    #editor-body-layout {
        position: relative;
        grid-template-rows: minmax(0, 1fr) !important;
    }

    .editor-sidebar-left {
        grid-row: 1 !important;
    }

    .editor-main {
        grid-row: 1 !important;
    }

    #editor-sidebar-right {
        position: relative !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: stretch;
        align-self: start;
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 10px 0 0 !important;
        margin: 0;
        display: flex;
        justify-content: center;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: var(--z-desktop-toolbar);
        pointer-events: none;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 180ms ease, transform 180ms ease;
    }

    #editor-sidebar-right .sidebar-shell {
        width: fit-content;
        max-width: calc(100% - 8px);
        border: 1px solid var(--iber-border) !important;
        border-radius: 10px !important;
        background: #ffffff !important;
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1) !important;
        pointer-events: auto;
    }

    #editor-sidebar-right .drawer-grip {
        display: none !important;
    }

    #editor-sidebar-right.toolbar-visible {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    #editor-sidebar-right:not(.toolbar-visible) .sidebar-shell {
        visibility: hidden;
    }

    #properties-panel {
        padding: 8px 12px !important;
        gap: 0 !important;
    }

    #properties-panel .properties-panel-header,
    #properties-panel .properties-advanced-row,
    #properties-panel #no-selection,
    #properties-panel #text-properties,
    #properties-panel #image-properties,
    #properties-panel #shape-properties {
        display: none !important;
    }

    #properties-panel .properties-toolbar-row {
        margin: 0 !important;
        width: max-content !important;
        max-width: calc(100vw - 56px) !important;
    }
}

@media (max-width: 1023px) {
    #editor-nav > div {
        flex: 1 1 auto !important;
        min-width: 0;
        justify-content: flex-end;
        gap: 0.35rem !important;
    }

    #add-to-cart-btn {
        min-width: 0;
        max-width: min(62vw, 230px);
        padding: 0.36rem 0.62rem !important;
    }

    #add-to-cart-btn .editor-cart-text {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #close-editor-btn {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        padding: 0 !important;
        margin: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 34px;
    }

    #close-editor-btn i,
    #close-editor-btn svg {
        width: 16px;
        height: 16px;
    }

    .editor-exit-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .editor-exit-modal__dialog {
        width: 100%;
        border-radius: 12px;
        padding: 14px;
    }

    .editor-exit-modal__actions {
        flex-wrap: wrap;
    }

    .editor-exit-btn {
        flex: 1 1 calc(50% - 4px);
    }

    .editor-exit-btn--primary {
        flex-basis: 100%;
    }

    .editor-mobile-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin-top: auto;
    }

    #editor-bottom-context-bar {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #editor-sidebar-right {
        width: 100% !important;
        max-width: 100vw !important;
        max-height: none !important;
        height: calc(100dvh - 3.1rem - env(safe-area-inset-top, 0px)) !important;
        border-radius: 10px 10px 0 0 !important;
        transition: transform 0.28s ease, height 0.24s ease !important;
    }

    #editor-sidebar-right.panel-expanded {
        height: calc(100dvh - 3.1rem - env(safe-area-inset-top, 0px)) !important;
    }

    #editor-sidebar-right.panel-compact {
        height: min(68dvh, calc(100dvh - 6.3rem - env(safe-area-inset-bottom, 0px))) !important;
    }

    #editor-sidebar-right .sidebar-shell {
        overflow: visible !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    }

    #editor-sidebar-right .drawer-grip {
        display: block !important;
        margin: 10px auto 6px !important;
        background: #d0d5dd !important;
        cursor: grab;
    }

    #editor-sidebar-left .drawer-grip {
        display: block !important;
        margin: 10px auto 6px !important;
        background: #d0d5dd !important;
        cursor: grab;
    }

    #editor-sidebar-left.is-dragging .drawer-grip {
        cursor: grabbing;
    }

    #editor-sidebar-right.is-dragging .drawer-grip {
        cursor: grabbing;
    }

    .properties-panel-close {
        display: inline-flex;
    }

    #properties-panel .toolbar-btn,
    #properties-panel .property-fit-row .action-btn {
        min-height: 42px;
        border-radius: 6px !important;
    }

    #properties-panel .toolbar-btn .action-btn__label {
        display: none !important;
    }

    #properties-panel .toolbar-zoom-level {
        min-width: 52px;
        height: 42px;
    }

    #keep-aspect-ratio.slide-button {
        width: 100% !important;
        min-width: 0;
    }

    #properties-panel .property-fit-row .action-btn {
        width: 100%;
        min-width: 0;
        padding: 0 8px !important;
        gap: 6px;
    }

    #properties-panel .property-fit-row .action-btn__label {
        display: inline !important;
        font-size: 11px;
        font-weight: 700;
    }

    #properties-panel #text-properties,
    #properties-panel #image-properties,
    #properties-panel #shape-properties {
        padding: 14px !important;
    }

    #properties-panel #image-properties label,
    #properties-panel #text-properties label,
    #properties-panel #shape-properties label {
        display: block;
        margin-bottom: 8px;
    }

    #properties-panel input[type="range"] {
        margin-top: 4px;
        margin-bottom: 10px;
    }
}

/* Personalizador sem painel direito: fica sempre oculto */
#editor-sidebar-right {
    display: none !important;
}
