.edit-toggle{position:fixed;bottom:24px;right:24px;z-index:9999;display:none;gap:0;border-radius:10px;overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,.5);border:1px solid var(--border2)}
.edit-toggle-btn{padding:10px 20px;font-size:13px;font-weight:600;border:none;cursor:pointer;font-family:'DM Sans',sans-serif;transition:all .15s}
.edit-toggle-btn.active{background:var(--red);color:#fff}
.edit-toggle-btn:not(.active){background:var(--dark2);color:var(--text2)}
.edit-toggle-btn:hover:not(.active){background:var(--dark3);color:var(--text)}
body[data-edit] [data-editable]{outline:2px dashed rgba(230,57,70,.3);outline-offset:2px;cursor:text;min-height:1em;border-radius:4px;transition:outline-color .15s}
body[data-edit] [data-editable]:hover{outline-color:rgba(230,57,70,.6)}
body[data-edit] [data-editable]:focus{outline-color:var(--red);outline-style:solid;background:rgba(230,57,70,.05)}
body[data-edit] .editable-img{position:relative;cursor:pointer}
body[data-edit] .editable-img::after{content:'Click to change image';position:absolute;bottom:8px;right:8px;background:rgba(0,0,0,.8);color:#fff;font-size:11px;padding:4px 10px;border-radius:6px;opacity:0;transition:opacity .2s;pointer-events:none}
body[data-edit] .editable-img:hover::after{opacity:1}
body[data-edit] .img-change-btn{position:absolute;top:10px;left:10px;z-index:50;background:rgba(13,13,13,.85);color:#fff;border:1px solid var(--border2);border-radius:8px;padding:6px 14px;font-size:12px;font-weight:600;cursor:pointer;backdrop-filter:blur(8px);display:none;font-family:'DM Sans',sans-serif}
body[data-edit] section:hover .img-change-btn,body[data-edit] div:hover>.img-change-btn{display:block}
.nav-edit-btn{background:transparent;border:1px solid var(--red);color:var(--red);border-radius:8px;padding:6px 14px;font-size:12px;font-weight:600;cursor:pointer;display:none;font-family:'DM Sans',sans-serif;transition:all .15s}
.nav-edit-btn:hover{background:var(--red);color:#fff}
.dot.editing{width:8px;height:8px;border-radius:50%;background:#f59e0b;display:inline-block;margin-right:4px;animation:pulse-dot 2s infinite}
@keyframes pulse-dot{0%,100%{opacity:1}50%{opacity:.4}}
.cms-save-indicator{position:fixed;bottom:24px;left:24px;z-index:9999;background:var(--dark2);border:1px solid var(--border2);border-radius:8px;padding:8px 14px;font-size:12px;color:var(--text2);display:none;font-family:'DM Sans',sans-serif}
.text-toolbar{position:fixed;z-index:9998;display:none;align-items:center;gap:2px;background:rgba(20,20,20,.95);backdrop-filter:blur(14px);border:1px solid var(--border2);border-radius:10px;padding:6px;box-shadow:0 8px 32px rgba(0,0,0,.5)}
.text-toolbar.visible{display:flex}
.text-toolbar button,.text-toolbar select{background:transparent;border:1px solid transparent;color:var(--text2);font-size:13px;padding:6px 10px;border-radius:6px;cursor:pointer;transition:all .15s;font-family:'DM Sans',sans-serif}
.text-toolbar button:hover,.text-toolbar select:hover{background:var(--dark3);color:var(--text)}
.text-toolbar button.active{background:var(--dark4);color:var(--text);border-color:var(--border2)}
.text-toolbar select{background:var(--dark2);font-size:12px;padding:4px 6px}
.text-toolbar .sep{width:1px;height:20px;background:var(--border2);margin:0 4px}
.text-toolbar input[type="color"]{width:28px;height:28px;border:none;padding:0;cursor:pointer;background:transparent;border-radius:4px}
.img-edit-popover{background:var(--dark2);border:1px solid var(--border2);border-radius:14px;padding:20px;width:360px;box-shadow:0 12px 40px rgba(0,0,0,.6);z-index:10000}
.img-edit-popover input[type="text"]{width:100%;padding:8px 12px;border-radius:8px;border:1px solid var(--border2);background:var(--dark3);color:var(--text);font-size:12px;font-family:'DM Sans',sans-serif;margin-top:6px}
.img-edit-popover .preview{width:100%;height:100px;object-fit:cover;border-radius:8px;margin-top:10px;border:1px solid var(--border)}
/* Image repositioning */
.img-repo-section{margin-top:14px;border-top:1px solid var(--border);padding-top:14px}
.img-repo-section h5{font-family:'DM Sans',sans-serif;font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.08em;margin-bottom:10px}
.img-repo-preview{position:relative;width:100%;height:180px;border-radius:8px;border:1px solid var(--border2);overflow:hidden;cursor:crosshair;user-select:none;-webkit-user-select:none}
.img-repo-preview img{width:100%;height:100%;object-fit:contain;position:absolute;inset:0;pointer-events:none;background:var(--dark3)}
.img-repo-crosshair{position:absolute;width:12px;height:12px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.5),0 2px 8px rgba(0,0,0,.4);transform:translate(-50%,-50%);pointer-events:none;z-index:2}
.img-repo-sliders{display:flex;gap:10px;margin-top:10px}
.img-repo-sliders label{font-size:11px;color:var(--text2);min-width:14px}
.img-repo-sliders input[type="range"]{flex:1;height:4px;-webkit-appearance:none;background:var(--dark4);border:none;border-radius:2px;cursor:pointer}
.img-repo-sliders input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--red);cursor:pointer}
.img-repo-sliders .repo-val{font-size:10px;color:var(--text3);min-width:30px;text-align:right}
.cms-undo-bar{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:9999;display:none;gap:6px;align-items:center;background:rgba(20,20,20,.95);backdrop-filter:blur(14px);border:1px solid var(--border2);border-radius:10px;padding:6px;box-shadow:0 4px 20px rgba(0,0,0,.5)}
.cms-undo-bar button{background:transparent;border:1px solid transparent;color:var(--text2);font-size:12px;padding:6px 12px;border-radius:6px;cursor:pointer;font-family:'DM Sans',sans-serif;transition:all .15s}
.cms-undo-bar button:hover{background:var(--dark3);color:var(--text)}
.cms-undo-bar button:disabled{opacity:.3;cursor:default}
/* Block toolbar — inline inside selected block */
.block-toolbar{position:absolute;top:8px;right:8px;z-index:100;display:none;align-items:center;gap:4px;background:rgba(20,20,20,.95);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--border2);border-radius:10px;padding:6px;box-shadow:0 8px 32px rgba(0,0,0,.5);font-family:'DM Sans',sans-serif}
.block-toolbar.visible{display:flex}
.block-toolbar button{background:var(--dark3);border:1px solid var(--border2);color:var(--text2);font-size:12px;padding:6px 12px;border-radius:6px;cursor:pointer;font-family:'DM Sans',sans-serif;transition:all .15s;white-space:nowrap}
.block-toolbar button:hover{background:var(--dark4);color:var(--text);border-color:var(--text3)}
.block-toolbar button.danger:hover{background:rgba(230,57,70,.15);color:var(--red);border-color:rgba(230,57,70,.3)}
.block-toolbar .tb-sep{width:1px;height:20px;background:var(--border2);margin:0 2px}
.block-toolbar .tb-label{font-size:11px;color:var(--text3);padding:0 6px;font-weight:600;letter-spacing:.04em}
body[data-edit] .hero-logo{position:relative;cursor:default}
body[data-edit] .hero-logo:hover .logo-style-btn{display:flex}
.logo-style-btn{display:none;position:absolute;top:-4px;right:calc(50% - 52px);width:24px;height:24px;border-radius:50%;background:var(--dark2);border:1px solid var(--border2);color:var(--text2);font-size:12px;cursor:pointer;align-items:center;justify-content:center;z-index:10;box-shadow:0 2px 8px rgba(0,0,0,.4);transition:all .15s;line-height:1}
.logo-style-btn:hover{background:var(--red);color:#fff;border-color:var(--red)}
body[data-edit] .hero-badge{position:relative}
.badge-style-btn{display:none;position:absolute;top:-8px;right:-8px;width:24px;height:24px;border-radius:50%;background:var(--dark2);border:1px solid var(--border2);color:var(--text2);font-size:12px;cursor:pointer;align-items:center;justify-content:center;z-index:10;box-shadow:0 2px 8px rgba(0,0,0,.4);transition:all .15s;line-height:1}
.badge-style-btn:hover{background:var(--red);color:#fff;border-color:var(--red)}
body[data-edit] .hero-badge:hover .badge-style-btn,body[data-edit] .hero-badge:focus-within .badge-style-btn{display:flex}
body[data-edit] [data-block-id]{position:relative;transition:outline .15s;cursor:pointer}
body[data-edit] [data-block-id]:hover{outline:2px dashed rgba(230,57,70,.2);outline-offset:-2px}
body[data-edit] [data-block-id].block-selected{outline:2px dashed rgba(230,57,70,.5);outline-offset:-2px}
/* Block picker overlay */
.block-picker-overlay{position:fixed;inset:0;z-index:10001;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center}
.block-picker{background:var(--dark2);border:1px solid var(--border2);border-radius:16px;padding:28px;width:90%;max-width:480px}
.block-picker h3{font-family:'Barlow Condensed',sans-serif;font-size:22px;font-weight:700;color:var(--text);margin-bottom:20px;text-align:center}
.block-picker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.block-picker-item{background:var(--dark3);border:1px solid var(--border);border-radius:12px;padding:20px 12px;text-align:center;cursor:pointer;transition:all .2s;font-family:'DM Sans',sans-serif}
.block-picker-item:hover{border-color:var(--red);background:var(--dark4);transform:translateY(-2px)}
.block-picker-item .bpi-icon{font-size:28px;margin-bottom:8px}
.block-picker-item .bpi-label{font-size:12px;font-weight:600;color:var(--text2)}
/* Delete undo toast */
.cms-toast{position:fixed;bottom:80px;left:50%;transform:translateX(-50%);z-index:10000;background:var(--dark2);border:1px solid var(--border2);border-radius:10px;padding:12px 20px;display:flex;align-items:center;gap:12px;box-shadow:0 8px 32px rgba(0,0,0,.5);font-family:'DM Sans',sans-serif;font-size:13px;color:var(--text2);animation:toastIn .3s ease}
.cms-toast button{background:var(--red);border:none;color:#fff;font-size:12px;font-weight:600;padding:6px 16px;border-radius:6px;cursor:pointer;font-family:'DM Sans',sans-serif}
.cms-toast button:hover{background:var(--red-d)}
@keyframes toastIn{from{opacity:0;transform:translateX(-50%) translateY(20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
/* Element style popover */
.el-style-popover{position:fixed;z-index:10001;background:var(--dark2);border:1px solid var(--border2);border-radius:14px;padding:20px;width:280px;box-shadow:0 12px 40px rgba(0,0,0,.6);font-family:'DM Sans',sans-serif}
.el-style-popover h4{font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--text3);text-transform:uppercase;margin:0 0 10px}
.el-style-popover .esp-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.el-style-popover .esp-row label{font-size:11px;color:var(--text2);flex:1;white-space:nowrap}
.el-style-popover .esp-row input[type="color"]{width:28px;height:28px;border:1px solid var(--border2);border-radius:6px;background:none;cursor:pointer;padding:0;-webkit-appearance:none}
.el-style-popover .esp-row input[type="color"]::-webkit-color-swatch-wrapper{padding:2px}
.el-style-popover .esp-row input[type="color"]::-webkit-color-swatch{border-radius:4px;border:none}
.el-style-popover .esp-row select,.el-style-popover .esp-row input[type="range"]{background:var(--dark3);border:1px solid var(--border2);color:var(--text);font-size:12px;padding:4px 8px;border-radius:6px;font-family:'DM Sans',sans-serif}
.el-style-popover .esp-row input[type="range"]{flex:1;height:4px;-webkit-appearance:none;background:var(--dark4);border:none;border-radius:2px;cursor:pointer}
.el-style-popover .esp-row input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--red);cursor:pointer}
.el-style-popover .esp-row .range-val{font-size:11px;color:var(--text3);width:32px;text-align:right}
.el-style-popover .esp-close{position:absolute;top:12px;right:12px;background:none;border:none;color:var(--text3);font-size:16px;cursor:pointer;padding:0}
.el-style-popover .esp-close:hover{color:var(--text)}
.el-style-popover .esp-sides{display:flex;gap:6px;margin-bottom:10px}
.el-style-popover .esp-side-btn{flex:1;padding:6px;border-radius:6px;border:1px solid var(--border2);background:var(--dark3);color:var(--text2);font-size:11px;font-weight:600;cursor:pointer;font-family:'DM Sans',sans-serif;text-align:center;transition:all .15s}
.el-style-popover .esp-side-btn.active{background:var(--red);border-color:var(--red);color:#fff}
.el-style-popover .esp-side-btn:hover:not(.active){background:var(--dark4);color:var(--text)}
.cms-color-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.cms-color-row label{font-size:11px;color:var(--text2);flex:1;white-space:nowrap}
.cms-color-row input[type="color"]{width:28px;height:28px;border:1px solid var(--border2);border-radius:6px;background:none;cursor:pointer;padding:0;-webkit-appearance:none}
.cms-color-row input[type="color"]::-webkit-color-swatch-wrapper{padding:2px}
.cms-color-row input[type="color"]::-webkit-color-swatch{border-radius:4px;border:none}
.img-change-btn{display:none}
.img-edit-modal{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center}
.img-edit-box{background:var(--dark2);border:1px solid var(--border2);border-radius:14px;padding:24px;width:90%;max-width:440px}
