/* Editor styles — Camiseta.Studio */
:root {
  --bg: #0a0a0a;
  --panel: #111827;
  --panel-2: #1f2937;
  --border: #374151;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #f97316;
  --success: #10b981;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
.editor-shell { display: grid; grid-template-rows: 60px 1fr auto; height: 100vh; }
.editor-top { display:flex; align-items:center; justify-content:space-between; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--border); }
.editor-top a.brand { display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; font-weight:700; }
.editor-top a.brand img { height:42px; }
.editor-top .brand-text { background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 18px; font-weight: 900; }
.editor-top .right { display:flex; align-items:center; gap:8px; }
.editor-top .right a { color: var(--muted); text-decoration:none; font-size:13px; padding:6px 10px; border-radius:6px; }
.editor-top .right a:hover { color: var(--text); background: var(--panel-2); }
.editor-main { display:grid; grid-template-columns: 260px 1fr 320px; min-height:0; overflow: hidden; }
.panel { background: var(--panel); border-right: 1px solid var(--border); overflow-y: auto; padding: 16px; }
.panel.right { border-right: 0; border-left: 1px solid var(--border); }
.panel h3 { margin:0 0 8px 0; font-size:12px; text-transform:uppercase; letter-spacing:2px; color: var(--muted); font-weight:700; }
.panel h4 { margin: 16px 0 6px 0; font-size:11px; text-transform:uppercase; letter-spacing:1.5px; color:#6b7280; font-weight:700; }
.tool-btn { display:flex; align-items:center; gap:10px; width:100%; padding:10px 12px; margin-bottom:6px; background: var(--panel-2); border: 1px solid var(--border); border-radius:8px; color:var(--text); cursor:pointer; font-size:13px; transition: all .15s; text-align:left; }
.tool-btn:hover { border-color: var(--primary); background: #1a2434; }
.tool-btn i { width:20px; text-align:center; color: var(--primary); }
.canvas-area { display:flex; align-items:center; justify-content:center; background: repeating-linear-gradient(45deg, #0a0a0a, #0a0a0a 10px, #0f1318 10px, #0f1318 20px); position:relative; overflow:auto; padding:20px; }
.canvas-wrap { position:relative; box-shadow: 0 20px 60px rgba(0,0,0,0.8); }
.product-tshirt-bg { position:absolute; inset:0; pointer-events:none; }
.print-area-guide { position: absolute; border: 2px dashed rgba(99,102,241,0.5); pointer-events:none; z-index:2; }
.canvas-zoom-controls { position: absolute; bottom: 16px; left:16px; display:flex; gap:6px; z-index:10; }
.zoom-btn { background: var(--panel); border:1px solid var(--border); color:var(--text); width:36px; height:36px; border-radius:6px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.zoom-btn:hover { border-color: var(--primary); }
.form-row { margin-bottom: 10px; }
.form-row label { display:block; font-size:11px; color: var(--muted); margin-bottom:4px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-row input[type="text"], .form-row input[type="number"], .form-row select, .form-row textarea { width:100%; padding:8px 10px; background: var(--panel-2); border:1px solid var(--border); border-radius:6px; color: var(--text); font-size:13px; font-family: inherit; }
.form-row input[type="color"] { width:48px; height:36px; border: 1px solid var(--border); border-radius:6px; cursor:pointer; background: transparent; padding:2px; }
.form-row input[type="range"] { width:100%; accent-color: var(--primary); }
.swatches { display:flex; flex-wrap: wrap; gap:6px; }
.swatch { width:32px; height:32px; border-radius:50%; border: 2px solid transparent; cursor: pointer; transition: all .15s; }
.swatch.active { border-color: var(--primary); transform: scale(1.1); }
.btn { padding: 10px 16px; background: var(--primary); color: white; border: 0; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; transition: all .15s; }
.btn:hover { background: var(--primary-hover); }
.btn.secondary { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.btn.secondary:hover { border-color: var(--primary); }
.btn.danger { background: var(--danger); }
.btn.accent { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.btn.accent:hover { filter: brightness(1.1); }
.btn-block { width: 100%; }
.editor-bottom { display: grid; grid-template-columns: 1fr auto; gap:16px; align-items:center; padding: 14px 20px; background: var(--panel); border-top: 1px solid var(--border); }
.product-info { display:flex; align-items:center; gap: 14px; flex-wrap:wrap; }
.product-info .name { font-weight:700; font-size:14px; }
.product-info .price { color: var(--accent); font-weight: 700; font-size:16px; }
.product-info .price-original { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.size-selector { display:flex; gap:4px; flex-wrap:wrap; }
.size-btn { padding: 6px 12px; background: var(--panel-2); border:1px solid var(--border); border-radius:6px; font-size:12px; cursor:pointer; color: var(--muted); }
.size-btn.active { background: var(--primary); border-color: var(--primary); color: white; font-weight:700; }
.template-grid { display:grid; grid-template-columns: 1fr 1fr; gap:6px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
.template-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #fff; border-radius: 4px; cursor:pointer; border: 1px solid var(--border); transition: all .15s; }
.template-grid img:hover { border-color: var(--primary); transform: scale(1.03); }
.template-grid .tpl-svg { background: white; padding: 4px; }
.layers-list { max-height: 200px; overflow-y: auto; }
.layer-item { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:6px 8px; background: var(--panel-2); border:1px solid var(--border); border-radius:6px; margin-bottom:4px; font-size:12px; }
.layer-item.active { border-color: var(--primary); background: rgba(99,102,241,0.1); }
.layer-item .name { flex:1; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-item button { background: transparent; border: 0; color: var(--muted); cursor:pointer; padding: 2px 6px; border-radius: 4px; }
.layer-item button:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.badge { display:inline-block; padding: 2px 6px; background: var(--accent); color: white; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.upload-drop { border: 2px dashed var(--border); border-radius: 8px; padding: 18px; text-align: center; cursor: pointer; transition: all .15s; }
.upload-drop:hover, .upload-drop.dragover { border-color: var(--primary); background: rgba(99,102,241,0.05); }
.upload-drop i { font-size: 24px; color: var(--muted); margin-bottom: 6px; display:block; }
.upload-drop p { margin: 4px 0 0 0; font-size: 11px; color: var(--muted); }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 90px; right: 20px; background: var(--success); color: white; padding: 10px 16px; border-radius: 8px; z-index: 9999; animation: slide-in .3s; font-size: 13px; }
@keyframes slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (max-width: 1024px) {
  .editor-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .panel, .panel.right { border: 0; border-bottom: 1px solid var(--border); max-height: 180px; }
  .editor-bottom { flex-direction: column; }
}
