/* Serigarcia · Estudio de personalización */
body.studio { background: var(--paper-2); }
body.studio::before { opacity: .2; }
.studio-wrap { width: min(1480px, 100% - 24px); margin: 0 auto; padding: 100px 0 30px; display: grid; grid-template-columns: 250px minmax(0, 1fr) 360px; gap: 14px; min-height: 100svh; }
.studio-wrap > * { min-width: 0; }
.panel { background: var(--card); border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 10px; }
.panel-h h2 { font-size: 20px; letter-spacing: -.02em; }
.panel-h small { font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* Productos */
.plist { display: grid; gap: 6px; padding: 6px 10px 12px; max-height: calc(100svh - 190px); overflow: auto; }
.pitem { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 2px; border: 0; background: transparent; cursor: pointer; text-align: left; transition: background .25s, transform .35s var(--ease-out); }
.pitem:hover { background: var(--paper); transform: translateX(3px); }
.pitem.on { background: var(--ink); color: var(--paper); }
.pitem .pi { width: 54px; height: 54px; border-radius: 2px; background: var(--paper-2); }
.pitem.on .pi { background: rgba(255,255,255,.14); }
.pitem b { display: block; font-size: 14px; line-height: 1.2; } .pitem small { font: 500 11.5px/1 var(--mono); opacity: .6; }

/* Escenario */
.stage-panel { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; border-radius: 2px; background: var(--paper-2); position: relative; }
.seg button { position: relative; z-index: 1; height: 38px; padding: 0 16px; border: 0; background: none; border-radius: 2px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); transition: color .3s; display: inline-flex; align-items: center; gap: 8px; }
.seg button.on { color: var(--paper); }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; border-radius: 2px; background: var(--ink); transition: left .45s var(--ease-out), width .45s var(--ease-out); }
.seg button svg { width: 16px; height: 16px; }
.canvas-box { position: relative; flex: 1; display: grid; place-items: center; padding: 10px 14px 20px; min-height: 420px; background:
  radial-gradient(circle at 50% 42%, #fff 0, rgba(255,255,255,0) 60%), radial-gradient(rgba(22,19,15,.09) 1px, transparent 1.3px) 0 0 / 16px 16px; }
#cv { width: min(100%, 640px, calc(100svh - 230px)); aspect-ratio: 1; touch-action: none; cursor: default; border-radius: 2px; }
#cv.grab { cursor: grab; } #cv.grabbing { cursor: grabbing; }
.drop-hint { position: absolute; inset: 16px; border-radius: 2px; border: 2px dashed var(--magenta); background: rgba(229,0,126,.06); display: grid; place-items: center; font: 700 22px var(--display); color: var(--magenta); opacity: 0; pointer-events: none; transition: opacity .25s; }
.canvas-box.drag .drop-hint { opacity: 1; }
.float-tools { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 2px; background: rgba(22,19,15,.9); color: var(--paper); box-shadow: var(--shadow-lg); transition: opacity .3s, transform .4s var(--ease-out); }
.float-tools.off { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
.float-tools button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.float-tools button:hover { background: rgba(243,239,230,.14); }
.float-tools button.danger:hover { background: var(--bad); }
.float-tools svg { width: 18px; height: 18px; }

/* Vista 3D */
.view3d { position: absolute; inset: 66px 0 0; display: grid; grid-template-rows: 1fr auto; background: radial-gradient(ellipse at 50% 35%, #fff 0, var(--paper) 55%, var(--paper-2) 100%); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.view3d.on { opacity: 1; pointer-events: auto; }
.v3-stage { position: relative; perspective: 1400px; display: grid; place-items: center; cursor: grab; touch-action: none; user-select: none; }
.v3-stage:active { cursor: grabbing; }
.v3-floor { position: absolute; left: 50%; bottom: 9%; width: 46%; height: 26px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(22,19,15,.28), transparent); transition: width .1s; }
.turntable { position: relative; width: min(74%, 520px, calc(100svh - 300px)); aspect-ratio: 1; transform-style: preserve-3d; will-change: transform; }
.turntable .face, .turntable .slice { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.turntable .face img, .turntable .slice img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.turntable .slice { backface-visibility: visible; -webkit-backface-visibility: visible; }
.turntable .face.back { transform: rotateY(180deg) translateZ(var(--depth)); }
.turntable .face.front { transform: translateZ(var(--depth)); }
.turntable .shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; border-radius: 30%; }
.side-bb { position: absolute; left: 50%; top: 50%; width: min(74%, 520px, calc(100svh - 300px)); aspect-ratio: 1; translate: 0 -50%; pointer-events: none; opacity: 0; transform-origin: center; }
.side-bb img { width: 100%; height: 100%; }
.v3-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 14px 18px; flex-wrap: wrap; }
.v3-angle { font: 600 13px/1 var(--mono); min-width: 60px; text-align: center; color: var(--muted); }
.v3-help { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--muted); display: flex; gap: 8px; align-items: center; pointer-events: none; }
.v3-help svg { width: 18px; height: 18px; animation: sway 2.4s ease-in-out infinite; }
@keyframes sway { 50% { transform: translateX(8px); } }

/* Controles */
.ctrl { display: flex; flex-direction: column; max-height: calc(100svh - 114px); position: sticky; top: 100px; }
.ctrl-scroll { overflow: auto; padding: 0 18px 10px; flex: 1; }
.ctrl-sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ctrl-sec:last-child { border-bottom: 0; }
.ctrl-sec h3 { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: flex; justify-content: space-between; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors .sw-dot { width: 30px; height: 30px; }
.drop { display: grid; place-items: center; gap: 6px; text-align: center; padding: 20px 14px; border-radius: 2px; border: 1.5px dashed var(--line-2); cursor: pointer; transition: border-color .3s, background .3s, transform .4s var(--ease-out); }
.drop:hover { border-color: var(--magenta); background: rgba(229,0,126,.04); transform: translateY(-2px); }
.drop svg { width: 30px; height: 30px; color: var(--magenta); }
.drop b { font-size: 15px; } .drop small { color: var(--muted); font-size: 12.5px; }
.stickers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.stickers button { aspect-ratio: 1; border-radius: 2px; border: 0; background: var(--paper); cursor: pointer; padding: 6px; transition: transform .35s var(--ease-out), background .2s; }
.stickers button:hover { transform: scale(1.08) rotate(-4deg); background: var(--paper-2); }
.text-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.text-row .input { height: 46px; }
.mini-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.mini-row .select { height: 42px; font-size: 14px; flex: 1; }
.ink-dots { display: flex; gap: 5px; }
.ink-dots button { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.ink-dots button.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.layers { display: grid; gap: 6px; }
.layer-it { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px 6px 6px; border-radius: 2px; background: var(--paper); cursor: pointer; transition: background .2s, box-shadow .2s; font-size: 13.5px; }
.layer-it.on { box-shadow: inset 0 0 0 1.5px var(--ink); }
.layer-it .lt { width: 38px; height: 38px; border-radius: 2px; background: #fff center/contain no-repeat; display: grid; place-items: center; font: 700 15px var(--display); overflow: hidden; }
.layer-it span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-it .x { border: 0; background: none; cursor: pointer; color: var(--muted); width: 28px; height: 28px; border-radius: 50%; }
.layer-it .x:hover { background: var(--bad); color: #fff; }
.no-layers { font-size: 13px; color: var(--muted); padding: 6px 0; }
.slider { display: grid; grid-template-columns: 70px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; margin-top: 8px; }
.slider output { font: 500 12px var(--mono); text-align: right; color: var(--muted); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--paper-3); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); cursor: pointer; box-shadow: 0 0 0 4px rgba(229,0,126,.15); transition: transform .2s; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--ink); cursor: pointer; }
.sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.sizes button { min-width: 44px; height: 40px; padding: 0 10px; border-radius: 2px; border: 1px solid var(--line-2); background: none; cursor: pointer; font: 600 13px var(--mono); transition: all .25s; }
.sizes button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ctrl-foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--card); border-radius: 2px; }
.sum-line { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; }
.sum-total b { font: 700 30px/1 var(--display); letter-spacing: -.03em; }
.qty.big { margin: 0; } .qty.big button { width: 38px; height: 38px; } .qty.big input { width: 56px; }

@media (max-width: 1180px) {
  .studio-wrap { grid-template-columns: minmax(0, 1fr) 340px; }
  .studio-wrap > .plist-panel { grid-column: 1 / -1; order: -1; }
  .plist { display: flex; overflow-x: auto; max-height: none; padding-bottom: 14px; }
  .pitem { grid-template-columns: 46px auto; flex: none; } .pitem .pi { width: 46px; height: 46px; }
}
@media (max-width: 860px) {
  .studio-wrap { grid-template-columns: 1fr; padding-top: 84px; }
  .ctrl { position: static; max-height: none; }
  .canvas-box { min-height: 0; }
  #cv { width: 100%; }
  .turntable { width: 82%; }
}
