#camitex-editor {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

#camitex-canvas {
    border: 1px solid #ccc;
    max-width: 90vw;
}

/*botón personalizar */

#camitex-open-editor {
    background: #e0002a;
    color: #fff;
    border: 2px solid #e0002a;
    padding: 13px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.18s ease, color 0.18s ease;
}
#camitex-open-editor:hover {
    background: #fff;
    color: #e0002a;
}

#camitex-editor-modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:white;
z-index:9999;
padding:40px;
overflow:auto;
}

#camitex-editor{
display:flex;
gap:40px;
align-items:flex-start;
justify-content:center;
margin-top:40px;
}

#camitex-toolbar{
display:flex;
flex-direction:column;
gap:15px;
align-self:flex-start;
}

/* duplicate removed — see main .camitex-btn below */

#camitex-sides{
display:flex;
gap:10px;
margin-bottom:20px;
}

/* duplicate removed — see main .camitex-side below */

#camitex-editor{
max-width:1200px;
margin:auto;
padding:40px 20px;
}

#camitex-layout{
display:flex;
gap:40px;
align-items:stretch;
}

#camitex-tools{
width:260px;
min-height:800px;
background:#f7f7f7;
padding:25px;
border-radius:12px;
box-shadow:0 10px 25px rgba(0,0,0,0.08);
display:flex;
flex-direction:column;
gap:18px;
}

#camitex-tools hr{
border:none;
border-top:1px solid #ddd;
margin:10px 0;
}

#camitex-canvas-area{
flex:1;
display:flex;
justify-content:center;
align-items:flex-start;
}

#camitex-canvas{
background:white;
border:1px solid #e5e5e5;
}

/* ── Botones secundarios ─────────────────────────────────────────── */
.camitex-btn {
    background: #e0002a;
    color: #fff;
    border: 2px solid #e0002a;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
}

/* Fila undo/redo desktop — dos botones en una sola línea */
#camitex-undo-redo-row {
    display: flex;
    gap: 8px;
    width: 100%;
}
.camitex-icon-btn {
    flex: 1;
    padding: 10px 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.camitex-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.camitex-icon-btn svg { display: block; }

/* Aviso costuras desktop */
#camitex-seam-notice {
    margin-top: 10px;
    padding: 9px 12px;
    background: #f5f5f5;
    border-left: 3px solid #e0002a;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.5;
    color: #555;
}

.camitex-btn:hover {
    background: #fff;
    color: #e0002a;
    border-color: #e0002a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(224, 0, 42, 0.18);
}

.camitex-btn:active {
    transform: scale(0.98);
}

#camitex-tools label{
font-size:14px;
font-weight:600;
}

#camitex-tools select,
#camitex-tools input[type="color"]{
width:100%;
padding:6px;
}

.camitex-sides{
margin-top:20px;
display:flex;
flex-direction:column;
gap:8px;
}

/* ── Botones de lado (frontal, espalda…) ─────────────────────────── */
.camitex-side {
    background: #f3f3f3;
    border: 2px solid transparent;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    transition: all 0.18s ease;
    text-align: center;
}

.camitex-side:hover {
    background: #fff0f2;
    border-color: #e0002a;
    color: #e0002a;
}

.camitex-side.active {
    background: #e0002a;
    border-color: #e0002a;
    color: #fff;
    box-shadow: 0 3px 10px rgba(224, 0, 42, 0.25);
}
/* ── Precio en tiempo real ───────────────────────────────────────── */
#camitex-price-box {
    width: 200px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

#camitex-price-box .camitex-price-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 2px;
}

#camitex-price-box .camitex-price-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

#camitex-price-box .camitex-price-total {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 2px;
}

#camitex-price-box .camitex-price-total-value {
    font-size: 22px;
    font-weight: 700;
    color: #e0002a;
}

#camitex-total-price,
#camitex-design-price,
#camitex-base-price {
    font-variant-numeric: tabular-nums;
}
/* ── Validación de calidad ───────────────────────────────────────── */
/* warnings vive fuera de #camitex-right-col, como hijo directo de #camitex-layout */
#camitex-warnings {
    width: 200px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    box-sizing: border-box;
}

#camitex-warnings:empty {
    display: none;
}

/* ── Loading overlay ─────────────────────────────────────────────── */
#camitex-loading {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#camitex-loading.cld-visible {
    opacity: 1;
    pointer-events: all;
}

#camitex-loading.cld-hidden {
    opacity: 0;
    pointer-events: none;
}

.cld-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 48px;
    min-width: 300px;
    max-width: 380px;
    text-align: center;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.18),
        0 4px 16px rgba(0,0,0,0.10);
    animation: cldSlideUp 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes cldSlideUp {
    from { transform: translateY(24px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.cld-icon {
    margin-bottom: 20px;
}

/* El círculo gira, el check aparece estático */
.cld-spin {
    transform-origin: center;
    animation: cldRotate 2s linear infinite;
}

.cld-check {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: cldDraw 0.5s 0.3s ease forwards;
}

@keyframes cldRotate {
    to { transform: rotate(360deg); }
}

@keyframes cldDraw {
    to { stroke-dashoffset: 0; }
}

.cld-text {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.cld-track {
    background: #f0f0f0;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

.cld-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #e0002a 0%, #ff4d6d 100%);
    box-shadow: 0 0 8px rgba(224,0,42,0.4);
}

.cld-sub {
    font-size: 12px;
    color: #999;
    letter-spacing: 0.01em;
}
/* ── Pack de tallas ───────────────────────────────────────────────── */
#camitex-pack-panel {
    width: 100%;
    flex-shrink: 0;
    align-self: flex-start;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    box-sizing: border-box;
    margin-top: 12px;       /* separación respecto al price-box */
}

.cpack-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 6px;
    flex-shrink: 0;
}

/* Cada fila: talla | precio | [− n +] en una sola línea */
.cpack-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;           /* reducido para caber más filas */
    border-bottom: 1px solid #f5f5f5;
    gap: 4px;
    flex-shrink: 0;           /* las filas no se encogen entre sí */
}

.cpack-size {
    font-weight: 700;
    font-size: 12px;
    color: #333;
    min-width: 28px;
}

.cpack-price {
    flex: 1;
    font-size: 10px;
    color: #bbb;
    white-space: nowrap;
}

.cpack-ctrl {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.cpack-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    transition: background 0.12s;
}

.cpack-minus {
    border: 1px solid #ddd;
    background: #f7f7f7;
    color: #555;
}
.cpack-minus:hover { background: #e8e8e8; }

.cpack-plus {
    border: none;
    background: #e0002a;
    color: #fff;
}
.cpack-plus:hover { background: #b50021; }

.cpack-inp {
    width: 44px;
    text-align: center;
    border: none !important;
    border-radius: 6px;
    padding: 4px 2px;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    background: #f5f5f5;
}
.cpack-inp:focus {
    outline: none;
    border-color: #e0002a;
    box-shadow: 0 0 0 2px rgba(224,0,42,0.12);
}
.cpack-inp::-webkit-inner-spin-button,
.cpack-inp::-webkit-outer-spin-button { -webkit-appearance: none; }
.cpack-inp { -moz-appearance: textfield; }

/* Fila agotada */
.cpack-row-agotado { opacity: 0.45; }
.cpack-row-agotado .cpack-size  { color: #999; }
.cpack-row-agotado .cpack-price { color: #bbb; }
.cpack-agotado-badge {
    font-size: 10px;
    font-weight: 700;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cpack-summary {
    margin-top: 4px;
    font-size: 10px;
    color: #999;
    padding-top: 5px;
    border-top: 1px solid #f0f0f0;
    line-height: 1.3;
    flex-shrink: 0;
}

/* ── Columna derecha: price-box + pack ───────────────────────────── */
#camitex-right-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    width: 200px;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    max-height: 800px;
    overflow: hidden;
}

/* Serigrafía: scroll para que el pack no se comprima */
#camitex-right-col.cmx-serigrafia {
    overflow-y: auto;
}

/* price-box y pack dentro del wrapper: sin sticky propio */
#camitex-right-col #camitex-price-box,
#camitex-right-col #camitex-pack-panel {
    position: static;
    width: 100%;
    box-sizing: border-box;
}

/* price-box no crece ilimitado */
#camitex-right-col #camitex-price-box {
    flex-shrink: 0;
}

/* Pack: espacio restante — comprimido en DTF/digital, scroll en serigrafía */
#camitex-right-col #camitex-pack-panel {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#camitex-right-col.cmx-serigrafia #camitex-pack-panel {
    flex: none;
    overflow: visible;
}

/* Contenedor de filas: se estira para llenar el espacio disponible
   y distribuye las filas uniformemente sin scroll */
.cpack-rows-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    min-height: 0;
}
#camitex-right-col.cmx-serigrafia .cpack-rows-wrap {
    flex: none;
    justify-content: flex-start;
    overflow: visible;
}

/* Con justify-content: space-between las filas no necesitan padding propio */
.cpack-rows-wrap .cpack-row {
    padding: 0;
    flex: 1;
    max-height: 32px;
}
#camitex-right-col.cmx-serigrafia .cpack-rows-wrap .cpack-row {
    flex: none;
    max-height: none;
    padding: 3px 0;
}

/* ── Botón CTA principal: Finalizar diseño ───────────────────────── */
#camitex-save-design {
    width: 100%;
    padding: 15px 14px;
    margin-top: 16px;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #fff;
    color: #e0002a;
    border: 2px solid #e0002a;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(224, 0, 42, 0.15);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease,
                transform 0.15s ease, box-shadow 0.18s ease;
}

#camitex-save-design:hover {
    background: #e0002a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224, 0, 42, 0.35);
}

#camitex-save-design:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(224, 0, 42, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — móvil y tablet
   Desktop queda EXACTAMENTE igual (todo dentro de media queries).
   El canvas de Fabric (800×800) se escala visualmente con CSS
   transform — las coordenadas internas no cambian.
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — todo dentro de media queries, desktop sin cambios
   ═══════════════════════════════════════════════════════════════ */

/* Evitar recuadro azul táctil en todo el editor (desktop+móvil) */
#camitex-editor-modal,
#camitex-canvas-area,
#camitex-canvas-area .canvas-container,
#camitex-canvas-area canvas,
#camitex-canvas {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
/* touch-action: none permite a Fabric gestionar todos los gestos táctiles.
   Se aplica solo a los elementos del canvas, no al panel de tools. */
#camitex-canvas-area .canvas-container {
    touch-action: none;
}
#camitex-canvas-area canvas {
    touch-action: none;
}

/* ── Tablet horizontal 901–1100px ────────────────────────────────── */
@media (min-width: 901px) and (max-width: 1100px) {
    #camitex-right-col { width: 170px; }
    #camitex-tools     { width: 220px; }
    #camitex-layout    { gap: 20px; }
}

/* ══════════════════════════════════════════════════════════════════
   MÓVIL ≤ 900px
   Layout: tools (orden 2, abajo) — canvas-area (orden 1, arriba)
   El canvas 800×800 se escala con transform:scale via JS.
   No se toca nada del sistema de coordenadas interno.
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

    /* Evitar overflow horizontal global */
    body, html {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Modal: pantalla completa fija — solo cuando está abierto (JS pone display:block) */
    #camitex-editor-modal[style*="display: block"],
    #camitex-editor-modal[style*="display:block"] {
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Editor: ocupa todo el modal */
    #camitex-editor {
        padding: 0 !important;
        margin: 0 !important;
        flex: 1 !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }

    /* Layout: columna, sin desbordamiento horizontal */
    #camitex-layout {
        flex-direction: column !important;
        flex: 1 !important;
        gap: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        align-items: stretch !important;
        max-width: 100% !important;
    }

    /* ORDEN: canvas arriba (1), tools abajo (2) */
    #camitex-canvas-area { order: 1; }
    #camitex-tools        { order: 2; }

    /* Precio, validación y columna derecha: ocultos en móvil */
    #camitex-right-col,
    #camitex-warnings { display: none !important; }

    /* Pack panel: visible en móvil dentro de #camitex-tools */
    #camitex-tools #camitex-pack-panel {
        display: flex !important;
        flex-direction: column;
        width: 100% !important;
        margin-top: 0 !important;
        box-shadow: none !important;
        border: 1px solid #eee !important;
        border-radius: 8px !important;
        padding: 10px 12px !important;
        flex-shrink: 0;
    }

    /* Canvas area: width 100vw, altura fijada por JS */
    #camitex-canvas-area {
        width: 100vw !important;
        max-width: 100vw !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        background: #ebebeb;
        display: block !important;
        padding: 0 !important;
        position: relative;
    }

    /* Fabric .canvas-container: scale desde top-left */
    #camitex-canvas-area .canvas-container {
        transform-origin: top left !important;
        flex-shrink: 0 !important;
        display: block !important;
        position: relative !important;
    }

    /* Tools: ocupa espacio restante, scroll interno */
    #camitex-tools {
        flex: 1 !important;
        min-height: 120px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 14px 16px !important;
        border-radius: 0 !important;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        /* Ocultar scrollbar lateral visible */
        scrollbar-width: none;
    }
    #camitex-tools::-webkit-scrollbar { display: none; }

    /* Fila de 3 botones de acción (agrupados por JS) */
    #camitex-tools-actions {
        display: flex !important;
        gap: 6px !important;
        width: 100% !important;
        flex-shrink: 0 !important;
    }
    #camitex-tools-actions .camitex-btn {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 10px 4px !important;
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Selector de lados: fila horizontal scrollable sin scrollbar */
    .camitex-sides {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
        gap: 6px !important;
        margin-top: 0 !important;
        flex-shrink: 0 !important;
        padding-bottom: 2px;
    }
    .camitex-sides::-webkit-scrollbar { display: none; }

    .camitex-side {
        flex-shrink: 0 !important;
        padding: 8px 12px !important;
        font-size: 11px !important;
        border-radius: 20px !important;
        white-space: nowrap !important;
        min-height: 34px !important;
    }

    /* Botón finalizar */
    #camitex-save-design {
        width: 100% !important;
        padding: 14px !important;
        font-size: 14px !important;
        margin-top: 2px !important;
        flex-shrink: 0 !important;
    }

    /* Controles de texto */
    #camitex-tools hr {
        margin: 2px 0 !important;
        flex-shrink: 0;
    }
    #camitex-tools label {
        font-size: 12px !important;
        display: block;
        margin-bottom: 1px;
    }
    #camitex-tools select,
    #camitex-tools input[type="color"],
    #camitex-tools input[type="range"] {
        width: 100% !important;
        font-size: 16px !important; /* evita zoom iOS */
        box-sizing: border-box !important;
    }
}

/* ── Teléfonos muy pequeños ≤ 380px ─────────────────────────────── */
@media (max-width: 380px) {
    #camitex-tools-actions .camitex-btn {
        font-size: 10px !important;
        padding: 9px 2px !important;
    }
    .camitex-side {
        font-size: 10px !important;
        padding: 7px 8px !important;
    }
}
/* ── Panel de capas desktop ──────────────────────────────────── */
#camitex-layers-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    background: #fff;
    border: 1.5px solid #e0002a;
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    color: #e0002a;
    transition: background 0.15s;
}
#camitex-layers-btn:hover { background: #fff0f2; }

#camitex-layers-panel {
    position: absolute;
    top: 48px;
    left: 10px;
    z-index: 30;
    width: 220px;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#camitex-layers-panel.cmx-open { display: flex; }

#camitex-layers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
#camitex-layers-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}
#camitex-layers-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px 0;
}
.cmx-layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    border-left: 3px solid transparent;
    transition: background 0.1s;
    user-select: none;
}
.cmx-layer-item:hover { background: #fafafa; }
.cmx-layer-item.cmx-layer-active {
    background: #fff0f2;
    border-left-color: #e0002a;
    font-weight: 700;
    color: #e0002a;
}
.cmx-layer-icon { font-size: 14px; flex-shrink: 0; }
.cmx-layer-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmx-layer-actions { display: flex; gap: 2px; flex-shrink: 0; }
.cmx-layer-up, .cmx-layer-down {
    background: none;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    padding: 0;
}
.cmx-layer-up:hover, .cmx-layer-down:hover {
    background: #f5f5f5;
    border-color: #e0002a;
    color: #e0002a;
}

/* Quitar outline negro en el editor */
*:focus { outline: none !important; }
*:focus-visible { outline: none !important; }

/* Quitar border de Astra (--ast-border-color) en elementos del plugin */
.cpack-rows-wrap li,
.cpack-row,
#camitex-right-col li,
#camitex-editor-modal li {
  border: none !important;
}

/* ── Botón lápiz desktop ─────────────────────────────────────── */
#camitex-text-edit-btn {
    position: absolute;
    z-index: 30;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    display: none;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.15s;
}
#camitex-text-edit-btn:hover { background: #e0002a; }
#camitex-text-edit-btn.visible { display: flex; }

/* Panel de controles de texto — visible al pulsar lápiz */
#camitex-text-controls {
    display: none;
    flex-direction: column;
    gap: 8px;
}
#camitex-text-controls.cmx-tc-open {
    display: flex;
}

/* ── Botones de alineación de texto ─────────────────────────── */
#camitex-text-align-btns,
#cmx-text-align-btns {
    display: flex;
    gap: 6px;
}
.cmx-align-btn {
    flex: 1;
    padding: 7px;
    background: #f5f5f5;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.cmx-align-btn svg {
    width: 18px;
    height: 18px;
    color: #555;
    display: block;
}
.cmx-align-btn:hover {
    border-color: #e0002a;
    background: #fff0f2;
}
.cmx-align-btn.active {
    background: #e0002a;
    border-color: #e0002a;
}
.cmx-align-btn.active svg { color: #fff; }