/* ===== CONTENEDOR EXTERIOR ===== */
.blom-visualizador-max {
    border-radius: 14px;
    border: 1px solid #444;
    background: #090B22;
}

/* ===== CABECERA ===== */
.blom-visualizador-header {
    padding: 9px 23px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #444;
}
.blom-visualizador-header-title {
    color: #FFF;
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 40px;
}

/* ===== WRAPPER PRINCIPAL ===== */
.blom-visualizador-wrapper {
    display: flex;
    gap: 0; /* anulado, usamos bordes sin superposición */
    width: 100%;
    background-color: #090B22;
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    padding: 20px;
    box-sizing: border-box;
    align-items: flex-start;
    border-radius: 16px;
}

/* Columnas */
.blom-vis-col-izq {
    flex: 0 0 70%;
    min-width: 0;
    border-right: none; /* evita doble borde */
}
.blom-vis-col-der {
    flex: 1;
    min-width: 250px;
}

/* Stage */
.blom-vis-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    border: 1px dashed #444;
    background: #101128;
    overflow: hidden;
}
.blom-vis-fondo {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay escritorio */
.blom-vis-upload-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: color 0.2s;
    text-align: center;
    padding: 20px;
    width: 100%;
    height: 100%;
}
.blom-vis-upload-overlay:hover {
    color: #F00078;
}
.blom-vis-upload-icon {
    width: 48px;
    height: 48px;
}
.blom-vis-upload-overlay span {
    font-size: 1rem;
    font-weight: 500;
}
.blom-vis-upload-formato {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* Overlay mobile */
.blom-vis-upload-overlay-mobile {
    display: none;
}
.blom-vis-btn-subir-mobile {
    display: none;
}

.blom-vis-input-file-hidden {
    display: none;
}

/* Máquina */
.blom-vis-maquina {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    max-width: 60%;
    max-height: 60%;
    pointer-events: none;
    transition: none;
}

/* Columna derecha */
.blom-vis-col-der {
    padding: 20px;
}
.blom-vis-info-maquina {
    border-radius: 9px;
    border: 1px solid #444;
    background: #101128;
    padding: 20px;
    margin-bottom: 20px;
}
.blom-vis-nombre-maquina {
    color: #F00078;
    font-family: 'Syne', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 23px;
    margin: 0 0 5px;
}
.blom-vis-subtitulo-maquina {
    color: #9CA3B0;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
    text-transform: uppercase;
    margin: 0;
}

.blom-vis-control-group {
    margin-bottom: 24px;
    border: 1px solid rgb(49, 49, 77);
    border-radius: 10px;
    padding: 16px;
    background: rgba(255,255,255,0.02);
}
.blom-vis-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #ccc;
}

/* Fondos grid */
.blom-vis-fondos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.blom-vis-fondo-thumb {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s;
}
.blom-vis-fondo-thumb:hover {
    border-color: #F00078;
    transform: scale(1.03);
}
.blom-vis-fondo-thumb.activo {
    border-color: #F00078;
    box-shadow: 0 0 0 2px rgba(240,0,120,0.3);
}

/* Sliders */
.blom-vis-slider-group {
    margin-bottom: 14px;
}
.blom-vis-slider-group span {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
}
.blom-vis-slider-group strong {
    color: #F00078;
}
.blom-vis-slider-group input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgb(49, 49, 77);
    border-radius: 2px;
    outline: none;
}
.blom-vis-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(90deg, #C3259F 0%, #F00078 100%);
    cursor: pointer;
}

/* Controles mobile (fuera del stage) */
.blom-vis-controles-mobile {
    display: none;
}

/* Botones */
.blom-vis-btn-reset,
.blom-vis-btn-cambiar {
    background: transparent;
    border: 1px solid rgb(49, 49, 77);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 8px;
}
.blom-vis-btn-reset:hover,
.blom-vis-btn-cambiar:hover {
    border-color: #F00078;
    color: #F00078;
}

/* WhatsApp CTA */
.btn-whatsapp {
    background: linear-gradient(90deg, #C3259F 0%, #F00078 100%) !important;
    border: none !important;
    border-radius: 26px !important;
    padding: 16px 24px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: 'Manrope', sans-serif !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
    text-decoration: none !important;
    display: inline-block !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 8px !important;
}
.btn-whatsapp:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 4px 16px rgba(240, 0, 120, 0.4) !important;
    color: #ffffff !important;
}
.btn-whatsapp.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* ========== RESPONSIVE (mobile: hasta 768px) ========== */
@media (max-width: 768px) {
    .blom-visualizador-wrapper {
        flex-direction: column;
        gap: 0;
        padding: 12px;
    }
    .blom-vis-col-izq {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
    }
    .blom-vis-col-der {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        order: -1; /* columna derecha arriba */
        margin-bottom: 16px;
        padding: 0!important;
    }

    .blom-vis-stage {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        min-height: 350px;
    }

    /* Overlay escritorio oculto */
    .blom-vis-upload-overlay {
        display: none !important;
    }
    /* Overlay mobile visible */
    .blom-vis-upload-overlay-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        text-align: center;
        padding: 20px;
        width: 100%;
        height: 100%;
    }
    .blom-vis-upload-formato-mobile {
        font-size: 0.9rem;
        color: rgba(255,255,255,0.7);
    }
    /* Botón subir mobile (fuera del stage) */
    .blom-vis-btn-subir-mobile {
        display: block;
        width: 100%;
        margin-top: 12px;
        background: linear-gradient(90deg, #C3259F 0%, #F00078 100%);
        border: none;
        border-radius: 26px;
        padding: 12px 24px;
        color: #ffffff;
        font-size: 15px;
        font-weight: 700;
        font-family: 'Manrope', sans-serif;
        cursor: pointer;
    }

    /* Fondos scroll horizontal */
    .blom-vis-fondos-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .blom-vis-fondo-thumb {
        flex: 0 0 120px;
        height: 80px;
        aspect-ratio: auto;
    }

    .blom-vis-controles-mobile {
        display: block;
        margin-top: 16px;
        padding: 16px;
        border: 1px solid rgb(49, 49, 77);
        border-radius: 10px;
        background: rgba(255,255,255,0.02);
    }

    /* Ocultar controles de escritorio en mobile */
    .blom-vis-col-der #blomVisControles {
        display: none !important;
    }
    .blom-vis-col-der #blomVisCambiarFondo {
        display: block !important;
    }

    .blom-vis-maquina {
        max-width: 80%;
        max-height: 80%;
    }
}