@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   EDITOR DE FURGONETAS CAMPER - ESTÉTICA WABI SABI
   ========================================================================== */

.wabi-editor-container {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e2d24;
    width: 100%;
    margin: 0 auto;
    background: #fbfbf8;
    padding: 20px;
    border-radius: 12px;
    box-sizing: border-box;
}

.wabi-editor-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   1. BARRA SUPERIOR DE PROYECTO
   ========================================================================== */
.wabi-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eae8e1;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.wabi-top-bar .project-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wabi-top-bar label {
    font-size: 11px;
    font-weight: 800;
    color: #5b655d;
    letter-spacing: 0.5px;
}

.wabi-top-bar input[type="text"] {
    background: #ffffff;
    border: 1px solid #dcd7cc;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    color: #1e2d24;
    font-size: 13px;
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   2. ENCABEZADO Y MODOS DE VISTA
   ========================================================================== */
.wabi-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    width: 100%;
}

.wabi-editor-header h2 {
    font-size: 28px;
    margin: 0 0 4px 0;
    color: #1e2d24;
    font-weight: 800;
    line-height: 1.2;
}

.wabi-editor-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.wabi-view-modes {
    display: flex;
    background: #e5e3db;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.wabi-view-modes button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #4a544c;
    transition: all 0.15s ease;
}

.wabi-view-modes button.active {
    background: #1e2d24;
    color: #ffffff;
}

.wabi-view-modes button:hover:not(.active) {
    background: #dcd7cc;
    color: #1e2d24;
}

/* ==========================================================================
   3. BARRA DE DIMENSIONES
   ========================================================================== */
.wabi-dimensions-bar {
    display: flex;
    gap: 12px;
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e0;
    align-items: flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.wabi-dimensions-bar .input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.wabi-dimensions-bar .select-preset-group {
    max-width: 320px;
    flex-shrink: 1;
}

.wabi-dimensions-bar label {
    font-size: 12px;
    font-weight: 700;
    color: #1e2d24;
    display: flex;
    align-items: center;
}

.wabi-dimensions-bar input, 
.wabi-dimensions-bar select {
    padding: 6px 10px;
    border: 1px solid #dcd7cc;
    border-radius: 6px;
    background: #fbfbf8;
    font-size: 13px;
    color: #1e2d24;
    height: 36px;
    outline: none;
    font-weight: 600;
}

.wabi-dimensions-bar input:focus, 
.wabi-dimensions-bar select:focus {
    border-color: #1e2d24;
}

.wabi-dimensions-bar input[type="number"] {
    width: 90px;
    text-align: center;
}

/* ==========================================================================
   4. LAYOUT PRINCIPAL
   ========================================================================== */
.wabi-editor-layout {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 20px;
    width: 100%;
}

@media (max-width: 992px) {
    .wabi-editor-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   5. ÁREA DEL LIENZO Y DETALLES DE FURGONETA COMPLETA (CALIBRADO EXACTO)
   ========================================================================== */
.wabi-canvas-area {
    background: #ffffff;
    border: 1px solid #e5e5e0;
    padding: 18px;
    border-radius: 8px;
    width: 100%;
}

.canvas-header-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    color: #8c968e;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.wabi-viewport {
    position: relative;
    background: #edf1ee; /* Fondo verde grisáceo de la referencia */
    padding: 65px 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: visible;
    min-height: 440px;
    border: 1px solid #e2e0d7;
}

.camper-exterior-wrapper {
    position: relative;
    display: inline-block;
}

/* Cotas de Medida Exterior */
.camper-dimension-top {
    position: absolute;
    top: -38px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #2b4736;
    pointer-events: none;
    z-index: 5;
}

.camper-dimension-top .dim-line-left,
.camper-dimension-top .dim-line-right {
    flex: 1;
    height: 1px;
    background: #2b4736;
    position: relative;
}

.camper-dimension-top .dim-line-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: -5px;
    width: 1px;
    height: 11px;
    background: #2b4736;
}

.camper-dimension-top .dim-line-right::after {
    content: '';
    position: absolute;
    right: 0;
    top: -5px;
    width: 1px;
    height: 11px;
    background: #2b4736;
}

.camper-dimension-top .dim-text {
    padding: 0 10px;
    white-space: nowrap;
}

.camper-dimension-left {
    position: absolute;
    left: -44px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #2b4736;
    pointer-events: none;
    z-index: 5;
}

.camper-dimension-left .dim-line-top,
.camper-dimension-left .dim-line-bottom {
    flex: 1;
    width: 1px;
    background: #2b4736;
    position: relative;
}

.camper-dimension-left .dim-line-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    height: 1px;
    width: 11px;
    background: #2b4736;
}

.camper-dimension-left .dim-line-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5px;
    height: 1px;
    width: 11px;
    background: #2b4736;
}

.camper-dimension-left .dim-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 8px 0;
    white-space: nowrap;
}

/* Ruedas Exteriores (en color verde oscuro del contorno) */
.camper-wheel {
    position: absolute;
    width: 60px;
    height: 16px;
    background: #2b4736;
    border-radius: 4px;
    z-index: 2;
}

.wheel-top-rear {
    top: -8px;
    left: 110px;
}

.wheel-top-front {
    top: -8px;
    right: 55px;
}

.wheel-bottom-rear {
    bottom: -8px;
    left: 110px;
}

.wheel-bottom-front {
    bottom: -8px;
    right: 55px;
}

/* Chasis Exterior con PADDING para separar la chapa del suelo */
.camper-shell {
    display: flex;
    flex-direction: row-reverse;
    border: 3px solid #2b4736;
    border-radius: 26px 80px 80px 26px; /* Curvatura trasera y morro aerodinámico */
    background: #edf1ee; /* Espacio perimetral visible entre el chasis y el suelo */
    padding: 12px 14px 12px 12px; /* Margen de chapa idéntico a la foto original */
    position: relative;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    z-index: 3;
    box-sizing: border-box;
}

/* Cabina Ilustrada */
.camper-cabina {
    width: 160px;
    position: relative;
    background: #edf1ee;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex-shrink: 0;
    border-radius: 0 65px 65px 0;
    overflow: hidden;
}

.cabina-label {
    font-size: 11px;
    font-weight: 800;
    color: #2b4736;
    letter-spacing: 1px;
    z-index: 4;
}

/* Luna Parabrisas */
.cabina-windshield {
    position: absolute;
    right: 12px;
    top: 15%;
    width: 24px;
    height: 70%;
    background: #9ab4bd;
    border: 2px solid #5d7e8a;
    border-radius: 4px 22px 22px 4px;
    z-index: 2;
}

/* Volante (Círculo estricto que no se deforma nunca) */
.cabina-steering-wheel {
    position: absolute;
    right: 48px;
    top: 18%; /* Frente al asiento del conductor */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    aspect-ratio: 1 / 1 !important;
    border: 4px solid #2b4736;
    border-radius: 50% !important;
    box-sizing: border-box;
    z-index: 3;
    flex-shrink: 0;
}

/* Asientos Conductor y Acompañante */
.cabina-seat {
    position: absolute;
    right: 94px;
    width: 38px;
    height: 48px;
    background: #5f7a69;
    border: 2px solid #2b4736;
    border-radius: 8px 4px 4px 8px;
    z-index: 3;
    box-sizing: border-box;
}

.seat-top {
    top: 15%;
}

.seat-bottom {
    bottom: 15%;
}

/* Suelo Interior con Borde Fino y Textura de Madera */
.camper-interior {
    position: relative;
    border: 1px solid #b8a690;
    border-radius: 3px;
    background-color: #dfcbb4;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWep6qXpKSUo6KUo6KTo6OUo6KUo6KTo6OUo6KTo6KUo6KUo6KTo6KUo6KTo6KUo6KUo6KTo6KUo6KTo6KUo6KTo6KUo6KUo6KTo6KUo6L///9kC07fAAAAGnRSTlMAAAAAAgMEBQUGBwgJCgsMDQ4PEBESExQVFheXk3GSAAAAZUlEQVR42u3TMRKAIAxEUXAiouK+97/V2p3Z4R8yM0qj2Fh5aZkEw7s6d5u3rK7n3vO5a14f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4f4V4/4V07q1kO5n4gYVAAAAAASUVORK5CYII=');
    background-repeat: repeat;
    background-size: 42px 42px;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.05);
    box-sizing: content-box;
}

/* Pasos de Rueda Interiores ("RUEDA") */
.wheel-arch {
    position: absolute;
    width: 95px;
    height: 24px;
    background: #b2c4ba;
    border: 1.5px solid #2b4736;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #2b4736;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 4;
    box-sizing: border-box;
}

.wheel-arch-top {
    top: 0;
    left: 95px;
    border-radius: 0 0 8px 8px;
    border-top: none;
}

.wheel-arch-bottom {
    bottom: 0;
    left: 95px;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

/* ==========================================================================
   6. ABERTURAS Y BOTONES + CENTRADOS EXACTOS
   ========================================================================== */
.abertura-element {
    position: absolute;
    z-index: 15;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

.abertura-element.puerta-style {
    background: #d35400 !important;
    border: 1px solid #a04000 !important;
}

.abertura-element.ventana-style {
    background: #2980b9 !important;
    border: 1px solid #1b4f72 !important;
}

/* Paredes horizontales (Superior e Inferior) */
.abertura-element.pared-superior {
    top: -14px;
    height: 14px;
    flex-direction: row;
}

.abertura-element.pared-inferior {
    bottom: -14px;
    height: 14px;
    flex-direction: row;
}

/* Pared Trasera (Izquierda Vertical) - Con relleno sólido y medidas estrictas */
.abertura-element.pared-trasera {
    left: -14px;
    width: 14px;
    flex-direction: column;
}

.element-title {
    font-size: 8px;
    color: #ffffff;
    font-weight: 800;
    pointer-events: none;
    padding: 0 2px;
    line-height: 1;
    text-align: center;
}

/* Texto vertical limpio para pared trasera */
.abertura-element.pared-trasera .element-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 2px 0;
}

/* Manijas para paredes horizontales (Superior e Inferior) */
.abertura-element.pared-superior .handle-min,
.abertura-element.pared-superior .handle-max,
.abertura-element.pared-inferior .handle-min,
.abertura-element.pared-inferior .handle-max {
    width: 6px;
    height: 100%;
    background: #ffffff;
    border: 1px solid #333333;
    cursor: ew-resize;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Manijas para pared trasera (Vertical: arriba y abajo) */
.abertura-element.pared-trasera .handle-min,
.abertura-element.pared-trasera .handle-max {
    width: 100%;
    height: 6px;
    background: #ffffff;
    border: 1px solid #333333;
    cursor: ns-resize;
    border-radius: 2px;
    flex-shrink: 0;
}

.handle-min:hover, .handle-max:hover {
    background: #1e2d24;
}

/* Botones + Cuadrados Alejados y Centrados Exactos */
.btn-add-abertura {
    position: absolute;
    display: flex;
    gap: 6px;
    z-index: 25;
}

.group-outer-superior {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
}

.group-outer-inferior {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
}

.group-outer-trasera {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    flex-direction: column;
}

.btn-add-door-sq, .btn-add-win-sq {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: transform 0.1s, filter 0.1s;
}

.btn-add-door-sq { background: #d35400; }
.btn-add-win-sq { background: #2980b9; }

.btn-add-door-sq:hover, .btn-add-win-sq:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
}

.btn-add-door-sq:hover,
.btn-add-door-sq:focus,
.btn-add-door-sq:active {
    background: #b84300 !important; /* Naranja más oscuro */
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
    transform: scale(1.08);
}

.btn-add-win-sq { 
    background: #2980b9 !important; 
    color: #ffffff !important;
}

.btn-add-win-sq:hover,
.btn-add-win-sq:focus,
.btn-add-win-sq:active {
    background: #1f6391 !important; /* Azul más oscuro */
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
    transform: scale(1.08);
}

/* ==========================================================================
   7. OBJETOS Y MANIJAS
   ========================================================================== */
.canvas-module-item {
    position: absolute;
    border: 1px solid rgba(0,0,0,0.25);
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transform-origin: center center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.canvas-module-item.selected {
    border: 2px solid #1e2d24;
    box-shadow: 0 0 10px rgba(30, 45, 36, 0.4);
    z-index: 10;
}

.mod-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.mod-label {
    font-size: 11px;
    font-weight: 700;
    color: #1e2d24;
    text-shadow: 0 0 3px #ffffff;
    text-align: center;
    line-height: 1.2;
}

.mod-dims-tag {
    font-size: 9px;
    color: #4a544c;
    font-weight: 600;
    text-shadow: 0 0 2px #ffffff;
}

.obj-resize-handle {
    position: absolute;
    background: #1e2d24;
    border: 1px solid #ffffff;
    z-index: 12;
}

.obj-resize-handle.handle-e { right: -5px; top: 50%; transform: translateY(-50%); width: 8px; height: 14px; cursor: ew-resize; border-radius: 2px; }
.obj-resize-handle.handle-w { left: -5px; top: 50%; transform: translateY(-50%); width: 8px; height: 14px; cursor: ew-resize; border-radius: 2px; }
.obj-resize-handle.handle-s { bottom: -5px; left: 50%; transform: translateX(-50%); width: 14px; height: 8px; cursor: ns-resize; border-radius: 2px; }
.obj-resize-handle.handle-n { top: -5px; left: 50%; transform: translateX(-50%); width: 14px; height: 8px; cursor: ns-resize; border-radius: 2px; }

/* ==========================================================================
   8. BARRA LATERAL DERECHA (CON SCROLL MAS AMPLIO)
   ========================================================================== */
.wabi-sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-widget {
    background: #ffffff;
    padding: 16px;
    border: 1px solid #e5e5e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.sidebar-widget h4 {
    margin: 0 0 10px 0;
    border-bottom: 1px solid #f0eee6;
    padding-bottom: 6px;
    color: #1e2d24;
    font-size: 15px;
    font-weight: 800;
}

.widget-desc {
    font-size: 11px;
    color: #7a857c;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.add-module-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.add-module-row select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #dcd7cc;
    border-radius: 6px;
    font-size: 13px;
    background: #fbfbf8;
    font-weight: 600;
}

.layer-widget-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid #f5f4ef;
    font-size: 13px;
    color: #1e2d24;
}

.layer-widget-row.muted {
    opacity: 0.4;
}

.layer-widget-row .layer-title {
    flex: 1;
    font-weight: 600;
}

.layer-widget-row .layer-count {
    font-size: 11px;
    color: #8c968e;
    margin-right: 8px;
}

.btn-bulb-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
}

.btn-bulb-toggle:hover,
.btn-bulb-toggle:focus,
.btn-bulb-toggle:active {
    background: #e2e7e0 !important; /* Verde crema suave Wabi Sabi */
    outline: none !important;
    box-shadow: none !important;
    transform: scale(1.1);
}

.add-layer-input-group {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.add-layer-input-group input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #dcd7cc;
    border-radius: 4px;
    font-size: 12px;
}

/* MARGEN MAS ALTO EN SCROLLBARS DEL SIDEBAR (350px) */
.aberturas-sidebar-list {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e8e6df;
    max-height: 350px;
    overflow-y: auto;
}

.aberturas-title {
    font-size: 11px;
    font-weight: 800;
    color: #1e2d24;
    margin-bottom: 6px;
}

.abertura-sidebar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    background: #fbfbfa;
    border: 1px solid #f0eee6;
    font-size: 12px;
    margin-bottom: 4px;
}

.ab-badge { width: 8px; height: 8px; border-radius: 2px; }
.ab-badge.puerta { background: #d35400; }
.ab-badge.ventana { background: #2980b9; }

.ab-name { flex: 1; font-weight: 600; color: #1e2d24; }
.ab-size { font-size: 10px; color: #7a857c; }

.placed-objects-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 350px;
    overflow-y: auto;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e8e6df;
}

.placed-object-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    background: #fbfbfa;
    border: 1px solid #f0eee6;
    font-size: 13px;
    cursor: pointer;
}

.placed-object-row:hover {
    background: #f0eedf;
}

.placed-object-row.selected {
    background: #eef3ed;
    border-color: #1e2d24;
}

.placed-object-row .obj-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.placed-object-row .obj-title {
    flex: 1;
    font-weight: 600;
    color: #1e2d24;
}

.placed-object-row .obj-dims {
    color: #8c968e;
    font-size: 11px;
}

.btn-quick-delete {
    background: #c0392b;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
}

.btn-quick-delete:hover {
    background: #e74c3c;
}

/* Panel de Propiedades */
.property-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.property-row label {
    font-size: 12px;
    font-weight: 700;
    color: #1e2d24;
}

.property-row input, 
.property-row select {
    padding: 6px 10px;
    border: 1px solid #dcd7cc;
    border-radius: 6px;
    font-size: 13px;
    background: #fbfbf8;
    font-weight: 600;
}

.property-row.inline {
    flex-direction: row;
    gap: 8px;
}

.property-row.inline > div {
    flex: 1;
}

.property-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.property-actions button {
    flex: 1;
}

.property-actions button:hover {
    filter: brightness(1.05);
}


.product-links {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn-link {
    font-size: 12px;
    color: #27ae60;
    text-decoration: none;
    font-weight: 700;
}

/* ==========================================================================
   9. CATÁLOGO INFERIOR DE OBJETOS
   ========================================================================== */
.wabi-objects-selector {
    margin-top: 28px;
    border-top: 1px solid #e8e6df;
    padding-top: 18px;
    width: 100%;
}

.wabi-objects-selector h3 {
    margin: 0 0 4px 0;
    color: #1e2d24;
    font-size: 20px;
    font-weight: 800;
}

.wabi-objects-selector p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #7a857c;
}

.objects-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 10px 4px;
    width: 100%;
}

.object-catalog-card {
    background: #eef3ed;
    border: 1px solid #d3dec3;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    min-width: 125px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.object-catalog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.object-catalog-card.selected {
    border: 2px solid #1e2d24;
    box-shadow: 0 0 10px rgba(30, 45, 36, 0.2);
    background: #e4e9e2;
}

.thumb-preview {
    width: 100%;
    height: 55px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.thumb-img {
    max-width: 100%;
    height: 55px;
    object-fit: contain;
    margin-bottom: 8px;
}

.object-catalog-card h5 {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #1e2d24;
    font-weight: 700;
}

.card-capa {
    font-size: 10px;
    color: #7a857c;
}

.card-dims {
    font-size: 11px;
    font-weight: 700;
    color: #1e2d24;
}

.catalog-link {
    font-size: 11px;
    color: #27ae60;
    text-decoration: none;
    margin-top: 6px;
    font-weight: 700;
}

/* ==========================================================================
   10. POPUP / MODAL PARA GUARDAR PRESETS
   ========================================================================== */
.wabi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 45, 36, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.wabi-modal-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid #e8e6df;
}

.wabi-modal-card h3 {
    margin: 0 0 6px 0;
    color: #1e2d24;
    font-size: 18px;
    font-weight: 800;
}

.wabi-modal-card p {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #7a857c;
}

.modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.modal-form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #1e2d24;
}

.modal-form-group input {
    padding: 8px 12px;
    border: 1px solid #dcd7cc;
    border-radius: 6px;
    font-size: 14px;
}

.modal-dims-summary {
    background: #f4f3ef;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
    color: #1e2d24;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ==========================================================================
   11. MENÚ CONTEXTUAL FLOTANTE (CLIC DERECHO)
   ========================================================================== */
.wabi-context-menu {
    position: absolute;
    background: #ffffff;
    border: 1px solid #dcd7cc;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    padding: 6px 0;
    min-width: 160px;
    z-index: 9999;
}

.wabi-context-menu .ctx-header {
    padding: 6px 12px;
    font-size: 11px;
    color: #7a857c;
    border-bottom: 1px solid #f0eee6;
}

.wabi-context-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: none;
    border: none;
    font-size: 13px;
    color: #1e2d24;
    cursor: pointer;
    font-weight: 600;
}

.wabi-context-menu button:hover {
    background: #f4f3ef;
}

.wabi-context-menu button.danger {
    color: #c0392b;
}

.wabi-context-menu button.danger:hover {
    background: #fadbd8;
}

/* ==========================================================================
   12. TOOLTIPS DE AYUDA (?)
   ========================================================================== */
.wabi-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e8e6df;
    color: #1e2d24;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    margin-left: 4px;
    cursor: help;
    position: relative;
}

.wabi-tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e2d24;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 99;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ==========================================================================
   13. BOTONES GENERALES Y AVISOS
   ========================================================================== */
.btn-primary-green {
    background: #1e2d24;
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: background 0.15s;
}

.btn-primary-green:hover {
    background: #2d4033;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #dcd7cc;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #1e2d24;
    transition: background 0.15s;
}

.btn-secondary:hover {
    background: #f5f4ef;
    color: black;
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-danger {
    background: #c0392b;
    color: #ffffff;
    border: none;
    padding: 8px;
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 700;
}

.btn-danger:hover {
    background: #e74c3c;
}

.wabi-alerts-panel {
    margin-top: 20px;
    background: #fff5e6;
    border-left: 4px solid #f39c12;
    padding: 12px;
    border-radius: 4px;
    width: 100%;
}

.wabi-alerts-panel h5 {
    margin: 0 0 6px 0;
    color: #d35400;
    font-weight: 700;
}

.wabi-alerts-panel ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
}

.wabi-editor-footer-notice {
    margin-top: 28px;
    padding: 14px;
    background: #fff5e6;
    border-left: 4px solid #f39c12;
    font-size: 12px;
    line-height: 1.5;
    color: #667067;
    width: 100%;
}

/* ==========================================================================
   14. VISTA 3D
   ========================================================================== */
.wabi-viewport-3d {
    position: relative;
    width: 100%;
    height: 560px;
    background: #edf1ee;
    border: 1px solid #e2e0d7;
    border-radius: 8px;
    overflow: hidden;
}

.wabi-viewport-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

.wabi-3d-toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.wabi-3d-toolbar button {
    background: #ffffff;
    border: 1px solid #dcd7cc;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #1e2d24;
}

.wabi-3d-toolbar button:hover { background: #f5f4ef; }

.wabi-3d-hint {
    font-size: 11px;
    color: #5b655d;
    background: rgba(255,255,255,0.7);
    padding: 4px 8px;
    border-radius: 6px;
}
