/* Editorul. Produsul e în centru, pe același fundal ca magazinul; uneltele și comanda stau retrase pe laterale. */
.studio-page .site-main{background:var(--z-ground)}
/* În editor nu există subsol: pagina e o unealtă, nu un document. */
.studio-page .z-footer{display:none}
.st{--st-line:#d6dfe3;display:grid;grid-template-columns:minmax(300px,340px) minmax(0,1fr) minmax(280px,320px);grid-template-rows:minmax(0,1fr);gap:0;min-height:calc(100vh - 76px);color:var(--z-ink);font-family:var(--z-font)}
.st h2{font:800 22px/1.1 var(--z-font);margin:0 0 12px;letter-spacing:-.02em}
.st h3{font:700 14px/1.2 var(--z-font);margin:18px 0 8px}
.st h3 span{font-weight:400}
.st button{font-family:inherit}
.st :focus-visible{outline:3px solid var(--z-green);outline-offset:2px}

.st-tools{display:grid;grid-template-columns:72px minmax(0,1fr);background:#fff;border-right:1.5px solid var(--st-line)}
.st-rail{display:flex;flex-direction:column;gap:4px;padding:12px 8px;background:#fff;border-right:1.5px solid var(--st-line)}
.st-rail button{display:grid;justify-items:center;gap:3px;padding:10px 2px;border:0;border-radius:12px;background:none;color:var(--z-muted);font-size:12px;font-weight:600;cursor:pointer;transition:background .15s,color .15s}
.st-rail button:hover{background:var(--z-ground-2);color:var(--z-ink)}
.st-rail button[aria-selected=true]{background:var(--z-green);color:#fff}
.st-rail button[hidden]{display:none}
.st-rail .icon{width:22px;height:22px}
.st-only-mobile{display:none!important}
.st-panel{padding:20px 18px;overflow:auto;max-height:calc(100vh - 76px);overscroll-behavior:contain}
.st-note{font-size:13px;color:var(--z-muted);margin:8px 0 0}
.st-error{color:#b3261e;font-size:14px}
.st-primary,.st-secondary,.st-buy{display:flex;width:100%;align-items:center;justify-content:center;min-height:48px;padding:10px 20px;border-radius:999px;font-weight:600;font-size:16px;cursor:pointer;border:1.5px solid var(--z-ink);transition:background .15s}
.st-primary{background:var(--z-green);color:#fff;border-color:var(--z-green)}
.st-secondary{background:#fff;color:var(--z-ink);margin-top:10px}
.st-buy{min-height:56px;background:var(--z-green);border-color:var(--z-green);color:#fff;font-size:18px}
.st-buy:hover:not(:disabled),.st-primary:hover{background:var(--z-green-2);border-color:var(--z-green-2)}
.st-secondary:hover{background:var(--z-ground-2)}
.st-buy:disabled{opacity:.6;cursor:progress}
.st-link{border:0;background:none;color:var(--z-green);font-weight:600;font-size:14px;padding:8px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.st textarea,.st select,body.aurora .st input[type=number]{width:100%;font:inherit;font-size:16px;color:inherit;background:#fff;border:1.5px solid var(--st-line);border-radius:10px;padding:9px 11px}
.st-field{display:grid;gap:4px;margin-top:12px;font-size:14px;font-weight:600}
.st-field>span{display:flex;justify-content:space-between}
.st-field output{font-weight:400;color:var(--z-muted)}
.st input[type=range]{width:100%;accent-color:var(--z-green)}
#st-order input[type=number]{background:#fff}
.st-form{margin-bottom:16px}
.st-form .st-primary,.st-form .st-secondary{margin-top:8px}
.st-fonts{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px;max-height:190px;overflow:auto}
.st-fonts button{padding:8px 2px;border:1.5px solid var(--st-line);border-radius:9px;background:#fff;font-size:18px;line-height:1.2;cursor:pointer;color:var(--z-ink);white-space:nowrap;overflow:hidden}
.st-fonts button[aria-pressed=true],.st-toggles button[aria-pressed=true]{border-color:var(--z-green);box-shadow:inset 0 0 0 1px var(--z-green);background:var(--z-ground-2)}
.st-toggles{display:flex;gap:6px;margin-top:12px}
.st-toggles button{width:44px;height:40px;border:1.5px solid var(--st-line);border-radius:9px;background:#fff;font-weight:800;cursor:pointer;color:var(--z-ink)}
.st-swatches,.st-colors{display:flex;flex-wrap:wrap;gap:7px}
.st-swatches button,.st-colors button{width:32px;height:32px;border-radius:50%;border:1.5px solid rgba(10,43,42,.25);cursor:pointer;padding:0}
.st-colors button{width:36px;height:36px}
.st-swatches button[aria-pressed=true],.st-colors button[aria-pressed=true]{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--z-green)}
.st-swatches input[type=color]{width:32px;height:32px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer}
.st-drop{position:relative;display:grid;gap:4px;place-items:center;text-align:center;padding:26px 14px;border:1.5px dashed #9fb2b4;border-radius:16px;cursor:pointer;background:var(--z-ground-2)}
.st-drop.over{border-color:var(--z-green);background:var(--z-tint)}
.st-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}
.st-drop span{font-size:13px;color:var(--z-muted)}
.st-quality{display:flex;justify-content:space-between;gap:8px;margin:12px 0 0;padding:9px 11px;border-radius:10px;font-size:14px}
.st-quality span{white-space:nowrap}
.st-quality.good{background:#dcf6ec;color:#0a5c44}
.st-quality.mid{background:#fff3c9;color:#6b5100}
.st-quality.bad{background:#ffe0e5;color:#94172f}
.st-notes{margin:10px 0;padding-left:18px;font-size:14px}
.st-stickers{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.st-stickers.big{grid-template-columns:repeat(2,1fr)}
.st-stickers.big button{padding:6px;background:var(--z-ground-2)}
.st-stickers button{aspect-ratio:1;padding:10px;border:1.5px solid var(--st-line);border-radius:12px;background:#fff;cursor:pointer}
.st-stickers button:hover{border-color:var(--z-green)}
.st-stickers img{width:100%;height:100%;display:block}
.st-idea{display:grid;gap:4px;width:100%;margin-bottom:8px;padding:10px 12px;text-align:left;border:1.5px solid var(--st-line);border-radius:12px;background:#fff;cursor:pointer;color:inherit}
.st-idea b{font-size:20px;line-height:1.15;color:var(--idea,var(--z-ink))}
.st-idea span{font-size:13px;color:var(--z-muted)}

.st-stage{position:relative;display:flex;flex-direction:column;min-width:0;padding:14px 20px;background:var(--z-ground)}
.st-topbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.st-topbar .st-views{margin-right:auto}
.st-views,.st-actions,.st-zoom{display:flex;gap:2px;padding:4px;background:#fff;border-radius:999px}
.st-views button,.st-actions button,.st-zoom button{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 14px;border:0;border-radius:999px;background:none;color:var(--z-ink);font-weight:600;font-size:14px;cursor:pointer}
.st-views button[aria-pressed=true]{background:var(--z-green);color:#fff}
.st-views i{width:8px;height:8px;border-radius:50%;background:var(--z-green)}
.st-actions button[aria-pressed=true]{background:var(--z-tint)}
.st-actions button:disabled{opacity:.35;cursor:default}
.st-actions .icon{width:20px;height:20px}
#st-clean .icon{width:18px;height:18px}
.st-zoom button{min-width:36px;justify-content:center;padding:6px 10px;font-size:18px}
.st-zoom #st-zoom-fit{min-width:62px;font-size:13px;font-variant-numeric:tabular-nums}
.st-zoom output{pointer-events:none}
/* Starea salvării: etichetă mică peste colțul zonei de lucru, în afara barei, ca butoanele să nu se miște când se schimbă textul. */
.st-saved{position:absolute;left:24px;top:58px;z-index:5;display:inline-flex;align-items:center;gap:6px;margin:0;padding:3px 10px 3px 8px;border-radius:999px;background:rgba(255,255,255,.88);font-size:12px;line-height:18px;color:var(--z-muted);white-space:nowrap;pointer-events:auto;cursor:help}
.st-saved:empty{display:none}
.st-saved::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--z-green)}
.st-saved[data-state=pending]::before{background:#c9a400}
.st-saved[data-state=local]::before{background:#b3261e}
.st-views button,.st-actions button,.st-zoom button{white-space:nowrap}
/* Fereastra de lucru: produsul se mărește cu rotița și se mută trăgând de fundal; canvasul acoperă toată fereastra. */
.st-canvaswrap{position:relative;flex:1;min-height:0;width:100%;margin:6px 0 0;overflow:hidden;touch-action:none;user-select:none}
.st-canvaswrap.can-pan{cursor:grab}
.st-canvaswrap.panning,.st-canvaswrap.panning .upper-canvas{cursor:grabbing!important}
.st-garment,.st-shade{position:absolute;left:0;top:0;width:0;height:0}
.st-garment svg,.st-shade svg{position:absolute;inset:0;width:100%;height:100%}
.st-canvaswrap .canvas-container{position:absolute!important;left:0;top:0;z-index:1}
.st-zone{position:absolute;z-index:3;pointer-events:none;outline:1.5px dashed rgba(43,43,212,.65);outline-offset:0}
.st-zone.on-dark{outline-color:rgba(255,255,255,.75)}
.st-zone.full{outline:none}
.st-zone.clean{outline-color:transparent}
.st-shade{z-index:2;pointer-events:none}
.st-zone.clean .st-zonelabel{display:none}
.st-zone.snapped::before{content:"";position:absolute;left:50%;top:0;bottom:0;width:0;border-left:1.5px solid var(--z-green);z-index:2;pointer-events:none}
.st-zonelabel{position:absolute;left:0;top:-22px;font-size:12px;font-weight:600;color:var(--z-muted);white-space:nowrap}
.st-floating{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);display:flex;gap:2px;padding:4px;background:#fff;border-radius:999px;box-shadow:0 8px 24px rgba(10,43,42,.2);z-index:4}
.st-floating[hidden]{display:none}
.st-floating button{width:40px;height:38px;display:grid;place-items:center;border:0;border-radius:50%;background:none;color:var(--z-ink);cursor:pointer}
.st-floating button:hover{background:var(--z-ground-2)}
.st-floating .danger{color:#b3261e}
.st-floating .icon{width:20px;height:20px}
.st-hint{min-height:22px;margin:6px 0 0;text-align:center;font-size:14px;color:var(--z-muted)}
.st-keys{margin:2px 0 0;text-align:center;font-size:12px;color:var(--z-muted)}

/* Poziție și mărime la milimetru, pentru elementul ales */
.st-geo{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;margin:0 0 18px;padding:12px;border:1.5px solid var(--st-line);border-radius:12px;background:var(--z-ground-2)}
.st-geo h3{grid-column:1/-1;margin:0;display:flex;justify-content:space-between;align-items:baseline}
.st-geo h3 small{font-weight:400;font-size:12px;color:var(--z-muted)}
.st-geo label{display:grid;gap:3px;font-size:12px;font-weight:600;color:var(--z-muted)}
.st-num{display:flex;align-items:center;background:#fff;border:1.5px solid var(--st-line);border-radius:9px}
.st-num:focus-within{border-color:var(--z-green)}
body.aurora .st .st-num input[type=number]{border:0;background:transparent;padding:7px 2px 7px 9px;font-size:15px;min-width:0;font-variant-numeric:tabular-nums;-moz-appearance:textfield}
.st-num input::-webkit-inner-spin-button,.st-num input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}
.st-num span{padding:0 9px 0 2px;font-size:13px;color:var(--z-muted)}
.st-geo-actions{grid-column:1/-1;display:flex;gap:6px}
.st-geo-actions button{flex:1;min-height:34px;border:1.5px solid var(--st-line);border-radius:9px;background:#fff;font-size:13px;font-weight:600;color:var(--z-ink);cursor:pointer}
.st-geo-actions button:hover{border-color:var(--z-green)}

.st-order{padding:18px 18px 0;background:#fff;border-left:1.5px solid var(--st-line);overflow:auto;max-height:calc(100vh - 76px);overscroll-behavior:contain}
.st-checkout{position:sticky;bottom:0;z-index:2;margin:0 -18px;padding:10px 18px 14px;background:#fff;box-shadow:0 -10px 14px -12px rgba(10,43,42,.35)}
.st-checkout .st-total{margin:0 0 8px}
.st-order>div:last-child{padding-bottom:18px}
.st-order h3:first-child{margin-top:0}
.st-models{display:grid;gap:4px}
.st-models a{padding:7px 10px;border-radius:9px;color:var(--z-ink);font-size:14px;text-decoration:none}
.st-models a:hover{background:var(--z-ground-2)}
.st-models a[aria-current]{background:var(--z-tint);color:var(--z-ink);font-weight:600}
.st-seg{display:flex;border:1.5px solid var(--st-line);border-radius:10px;overflow:hidden}
.st-seg button{flex:1;min-height:40px;border:0;background:#fff;cursor:pointer;font-weight:600;color:var(--z-ink)}
.st-seg button[aria-pressed=true]{background:var(--z-green);color:#fff}
.st-line{display:grid;grid-template-columns:minmax(0,1fr) 68px auto;gap:6px;margin-bottom:6px;align-items:center}
.st-line button{border:0;background:none;font-size:20px;cursor:pointer;color:var(--z-muted);padding:0 4px}
.st-price{margin-top:14px;padding-top:12px;border-top:1.5px solid var(--st-line)}
.st-price ul{list-style:none;margin:0;padding:0;font-size:13px}
.st-price li{display:flex;justify-content:space-between;gap:10px;padding:3px 0}
.st-price li b{white-space:nowrap;font-weight:600}
.st-price li.save b{color:#0a7a5a}
.st-total{display:flex;justify-content:space-between;align-items:baseline;margin:10px 0}
.st-total output{font:800 28px/1 var(--z-font);letter-spacing:-.02em}
.st-pricebar{display:none}

.st-dialog{width:min(620px,calc(100vw - 32px));max-height:calc(100vh - 32px);border:0;border-radius:18px;padding:22px;color:var(--z-ink);font-family:var(--z-font);box-shadow:0 18px 60px rgba(10,43,42,.3)}
.st-dialog::backdrop{background:rgba(10,43,42,.55)}
.st-dialog h2{font:800 24px/1.1 var(--z-font);margin:0 0 12px}
.st-previews{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.st-previews img{width:100%;border-radius:12px;display:block}
.st-warnings{margin:14px 0 0;padding:0;list-style:none;font-size:14px}
.st-warnings li{padding:9px 11px;border-radius:10px;background:#fff3c9;color:#6b5100;margin-bottom:6px}
.st-warnings li.bad{background:#ffe0e5;color:#94172f}
.st-check{display:flex;gap:8px;align-items:flex-start;margin-top:12px;font-size:14px}
.st-check input{margin-top:3px;flex:none;accent-color:var(--z-green)}
.st-dialog :focus-visible{outline:3px solid var(--z-green);outline-offset:2px}
.st-final{display:flex;justify-content:space-between;align-items:baseline;margin:14px 0 0;font-size:15px}
.st-final b{font:800 24px/1 var(--z-font)}
.st-dialog-actions{display:flex;gap:10px;margin-top:18px}
.st-dialog-actions>*{margin:0;flex:1}
.st-toast{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);z-index:50;max-width:calc(100vw - 32px);padding:10px 14px;border-radius:12px;background:var(--z-ink);color:#fff;font:600 14px var(--z-font);text-align:center}
.st-toast.error{background:#94172f}

/* Pe ecran mare pagina e fixă: doar panourile laterale derulează, rotița pe produs înseamnă mărire. */
@media (min-width:761px){
  /* Editorul are nevoie de loc: antet scund, coloane laterale înguste, ajutorul peste produs, nu sub el. */
  .studio-page .z-header-in{min-height:54px;gap:20px}
  .studio-page .z-logo{font-size:25px}
  .studio-page .z-nav{gap:24px}
  .st{grid-template-columns:auto minmax(0,1fr) auto}
  .st-tools{width:288px;grid-template-columns:62px minmax(0,1fr);transition:width .18s ease}
  .st-tools.collapsed{width:62px}
  .st-tools.collapsed .st-panel{display:none}
  .st-rail{padding:8px 6px}
  .st-rail button{padding:8px 2px;font-size:11px}
  .st-panel{padding:14px 14px 20px}
  .st h2{font-size:19px;margin-bottom:10px}
  .st-order{width:272px;padding:12px 14px 0}
  .st-checkout{margin:0 -14px;padding:10px 14px 12px}
  .st-order h3{margin:12px 0 6px}
  .st-models{grid-template-columns:1fr 1fr;gap:4px}
  .st-models a{padding:6px 8px;font-size:13px;text-align:center;border:1.5px solid var(--st-line)}
  .st-models a[aria-current]{border-color:var(--z-green)}
  .st-colors{gap:6px}
  .st-colors button{width:30px;height:30px}
  .st-stage{padding:8px 12px}
  .st-topbar{flex-wrap:nowrap;gap:8px}
  .st-saved{top:52px;left:18px}
  .st-actions{order:2}
  .st-zoom{order:3}
  .st-views button,.st-actions button,.st-zoom button{min-height:32px;font-size:13px}
  .st-canvaswrap{margin-top:6px}
  .st-hint{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);z-index:4;max-width:calc(100% - 40px);min-height:0;margin:0;padding:6px 14px;border-radius:999px;background:rgba(255,255,255,.92);font-size:13px;pointer-events:none}
  .st-hint:empty{display:none}
  .st-keys{display:none}
  body.studio-page{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
  body.studio-page>.site-main{flex:1;min-height:0;display:flex;flex-direction:column}
  .studio-page .st{flex:1;min-height:0}
  .st-tools,.st-stage,.st-order{min-height:0}
  .st-panel,.st-order{max-height:none}
}
@media (min-width:1600px) and (min-height:940px){
  .st-tools{width:330px}
  .st-order{width:310px}
  .st-keys{display:none}
}
@media (min-width:761px) and (max-width:1100px){
  #st-clean span{display:none}
  .st{grid-template-columns:auto minmax(0,1fr)}
  .st-order{display:none}
  .st-only-mobile{display:grid!important}
  .st{padding-bottom:0}
  .st-stage{padding-bottom:76px}
  .st-panel{padding-bottom:90px}
  .st-hint{bottom:90px}
  .st-pricebar{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:10px 20px;background:#fff;border-top:1.5px solid var(--st-line)}
  .st-pricebar small{display:block;font-size:12px;color:var(--z-muted)}
  .st-pricebar output{font:800 21px/1 var(--z-font)}
  .st-pricebar .st-buy{width:auto;min-height:48px;font-size:16px}
}
@media (max-width:760px){
  .st{display:flex;flex-direction:column;min-height:0;padding-bottom:72px}
  .studio-page .z-header{position:static}
  /* produsul rămâne pe ecran cât timp derulezi uneltele de sub el */
  .st-stage{order:1;position:sticky;top:0;z-index:5;padding:6px 10px;background-color:var(--z-ground);border-bottom:1.5px solid var(--st-line)}
  .st-canvaswrap{height:44svh;width:100%;margin-top:4px;flex:none}
  /* o singură bară sus; mărirea stă peste produs, în colț */
  .st-topbar{flex-wrap:nowrap;gap:6px}
  .st-views button,.st-actions button{min-height:34px;padding:6px 11px;font-size:13px}
  .st-zoom{position:absolute;right:8px;top:52px;z-index:6;flex-direction:column;padding:3px;border-radius:14px;box-shadow:0 4px 14px rgba(10,43,42,.18)}
  .st-zoom button{min-width:34px;min-height:32px;padding:2px 4px;border-radius:10px}
  .st-zoom #st-zoom-fit{min-width:34px;font-size:10px}

  .st-keys,.st-saved{display:none}
  .st-tools{order:2;display:block;border:0;border-top:1.5px solid var(--st-line)}
  .st-rail{flex-direction:row;overflow-x:auto;padding:6px}
  .st-rail button{flex:1 1 0;min-width:50px;padding:8px 2px}
  .st-only-mobile{display:grid!important}
  .st-panel{max-height:none}
  .st-order{display:none}
  .st-pricebar{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:#fff;border-top:1.5px solid var(--st-line)}
  .st-pricebar small{display:block;font-size:12px;color:var(--z-muted)}
  .st-pricebar output{font:800 21px/1 var(--z-font)}
  .st-pricebar .st-buy{width:auto;min-height:48px;font-size:16px}
  .st-hint{display:none}
  .st-zonelabel{display:none}
}
@media (max-width:480px){
  #st-clean span{display:none}
  .st-actions button{padding:6px 9px}
}
/* Ecrane duble (Surface Duo, pliabile deschise pe lat): uneltele pe ecranul din stânga, produsul pe cel din dreapta, nimic sub balama. */
@media (horizontal-viewport-segments:2){
  .st{grid-template-columns:env(viewport-segment-width 0 0,50%) env(viewport-segment-width 1 0,50%);column-gap:calc(env(viewport-segment-left 1 0,50%) - env(viewport-segment-right 0 0,50%))}
  .st-tools{width:auto}
  .st-order{display:none}
  .st-only-mobile{display:grid!important}
  .st-stage{padding-bottom:76px}
  .st-panel{padding-bottom:24px}
  .st-hint{bottom:90px}
  .st-pricebar{position:fixed;left:env(viewport-segment-left 1 0,50%);right:0;bottom:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 20px;background:#fff;border-top:1.5px solid var(--st-line)}
  .st-pricebar small{display:block;font-size:12px;color:var(--z-muted)}
  .st-pricebar output{font:800 21px/1 var(--z-font)}
  .st-pricebar .st-buy{width:auto;min-height:48px;font-size:16px}
}
@media (prefers-reduced-motion:reduce){.st-buy{transition:none}}
/* câmpurile în mm încap și cu valori de 4 cifre */
body.aurora .st .st-num input[type=number]{padding:7px 0 7px 8px;font-size:14px}
.st-num span{padding:0 7px 0 1px;font-size:12px}
