/* Estilos encapsulados para no alterar la maquetación de WordPress */
    #sr-studio-app {
        --bg: #f4f4f6; 
        --panel: #ffffff; 
        --accent: #1a1a1a;
        --gold: #c5a059; 
        --text: #222; 
        --muted: #888; 
        --border: #e2e2e8;

        display: flex;
        flex-direction: row;
        width: 100%;
        min-height: 680px;
        background: var(--bg);
        border-radius: 12px;
        border: 1px solid var(--border);
        overflow: hidden;
        position: relative;
        margin: 20px 0;
        box-sizing: border-box;
        font-family: 'Inter', system-ui, sans-serif;
        color: var(--text);
    }

    #sr-studio-app * { 
        box-sizing: border-box; 
    }

    #sr-studio-app .sidebar { 
        width: 320px; 
        min-width: 320px; 
        background: var(--panel); 
        padding: 24px 18px; 
        border-right: 1px solid var(--border); 
        display: flex; 
        flex-direction: column;
        overflow-y: auto; 
        max-height: 750px;
    }

    #sr-studio-app .brand h2 { margin: 0 0 4px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; font-size: 1.1rem; text-align: center; }
    #sr-studio-app .brand p { margin: 0 0 20px; font-size: 9px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; text-align: center; }

    #sr-studio-app .section-title { 
        font-size: 9px; text-transform: uppercase; font-weight: 800; color: var(--muted); 
        letter-spacing: 2px; margin: 16px 0 10px; display: flex; align-items: center; gap: 8px;
    }
    #sr-studio-app .section-title::after { content: ""; flex-grow: 1; height: 1px; background: #eee; }

    #sr-studio-app .control-group { margin-bottom: 14px; }
    #sr-studio-app .label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
    #sr-studio-app label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
    #sr-studio-app .val { font-family: monospace; font-size: 10px; color: #c68642; font-weight: 700; }

    #sr-studio-app input[type="range"] { -webkit-appearance: none; width: 100%; height: 3px; background: #e0e0e0; border-radius: 2px; outline: none; }
    #sr-studio-app input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
    #sr-studio-app input[type="text"], #sr-studio-app input[type="number"] { width: 100%; padding: 8px 10px; font-size: 11px; border: 1px solid var(--border); border-radius: 6px; outline: none; font-weight: 600; }

    #sr-studio-app .workspace { 
        flex-grow: 1; 
        display: grid; 
        grid-template-columns: 1fr; 
        gap: 15px; 
        padding: 15px; 
        overflow-y: auto; 
        background: var(--bg);
    }

    #sr-studio-app .card { 
        background: var(--panel); 
        border-radius: 12px; 
        padding: 15px; 
        display: flex; 
        flex-direction: column; 
        border: 1px solid var(--border); 
        height: 100%;
        min-height: 480px;
    }
    #sr-studio-app .card h3 { margin: 0 0 15px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); text-align: center; }

    #sr-studio-app .svg-wrap { 
        flex-grow: 1; 
        width: 100%; 
        height: 540px; 
        min-height: 420px; 
        display: flex; 
        justify-content: center; 
        align-items: center; 
    }
    #sr-studio-app .svg-wrap svg { width: 100%; height: 100%; overflow: visible; display: block; }

    /* Estilos de trazado para SVG */
    #sr-studio-app .corte { fill: #fff; stroke: #111; stroke-width: 0.6; }
    #sr-studio-app .agujero-maestro { fill: none; stroke: #e63946; stroke-width: 0.8; }
    #sr-studio-app .agujero-seguidor { fill: none; stroke: #e63946; stroke-width: 0.6; stroke-dasharray: 2,1; }
    #sr-studio-app .linea-doblez { fill: none; stroke: #457b9d; stroke-width: 0.5; stroke-dasharray: 4,3; }
    #sr-studio-app .puntos-costura { fill: #2a9d8f; stroke: none; }

    #sr-studio-app .cuero { stroke-width: 1.0; stroke: rgba(0,0,0,0.3); transition: fill 0.3s ease; }
    #sr-studio-app .laton { fill: #c5a059; stroke: #8e6d2d; stroke-width: 0.4; }
    #sr-studio-app .hilo-costura { stroke: #e9c46a; stroke-width: 0.8; stroke-dasharray: 2,1.5; fill: none; }
    #sr-studio-app .sr-logo { font-size: 7px; font-weight: 900; fill: #ffffff; text-anchor: middle; pointer-events: none; letter-spacing: 1px; }

    #sr-studio-app .btn { border: none; padding: 12px; border-radius: 8px; cursor: pointer; width: 100%; font-weight: 800; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-top: 8px; transition: 0.2s; }
    #sr-studio-app .btn-prime { background: var(--accent); color: white; }
    #sr-studio-app .btn-prime:hover { background: #333; }
    #sr-studio-app .btn-sec { background: transparent; color: var(--text); border: 1px solid var(--border); }
    #sr-studio-app .btn-sec:hover { background: #f0f0f5; }

    #sr-studio-app .colors { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
    #sr-studio-app .swatch { padding: 0; appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
    #sr-studio-app .swatch.active { transform: scale(1.15); box-shadow: 0 0 0 2px var(--accent); }

    #sr-studio-app .price-box { background: #f9f9fb; border: 1px dashed var(--border); border-radius: 10px; padding: 10px; margin-top: 10px; text-align: center; }
    #sr-studio-app .price-title { font-size: 8px; text-transform: uppercase; font-weight: 800; color: var(--muted); letter-spacing: 1px; }
    #sr-studio-app .price-val { font-size: 18px; font-weight: 900; color: var(--accent); margin-top: 2px; }

    #sr-studio-app #errorLog { position: absolute; bottom: 20px; left: 20px; background: #fff0f0; color: #d90429; padding: 12px; border-radius: 8px; font-family: monospace; font-size: 10px; display: none; border: 1px solid #ffccd5; z-index: 100; }

    /* Adaptabilidad a dispositivos móviles */
    @media (max-width: 900px) {
        #sr-studio-app { flex-direction: column; height: auto; }
        #sr-studio-app .sidebar { width: 100%; min-width: 100%; max-height: none; }
        #sr-studio-app .workspace { grid-template-columns: 1fr; }
    }
