/* KIMU SPORT — personalizador de prendas (sección oscura) */
.cz { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.cz > *, .cz-top > * { min-width: 0; }
.cz-products { max-width: 100%; }
.cz button { font-family: inherit; }

/* Barra superior */
.cz-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.cz-products { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cz-products::-webkit-scrollbar { display: none; }
.cz-prod { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px 0 10px; border-radius: var(--r-pill); border: 1.5px solid var(--k-dark-line); background: var(--k-dark-2); color: #D8D8D8; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.cz-prod svg { width: 28px; height: 28px; }
.cz-prod[aria-pressed="true"] { background: var(--k-green); border-color: var(--k-green); color: #000; }
.cz-hist { display: flex; gap: 8px; }
.cz-ic { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--k-dark-line); background: var(--k-dark-2); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cz-ic svg { width: 20px; height: 20px; }
.cz-ic:disabled { opacity: .35; cursor: default; }
.cz-reset { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--k-dark-2); border: 1px solid var(--k-amber); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; }
.cz-reset span { flex: 1 1 200px; }

.cz-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1024px) { .cz-main { grid-template-columns: minmax(0, 1fr) 360px; } }

/* Escenario */
.cz-stage-wrap { display: grid; gap: 12px; min-width: 0; }
.cz-sides { display: inline-flex; justify-self: center; background: var(--k-dark-2); border-radius: var(--r-pill); padding: 4px; }
.cz-sides button { min-height: 40px; padding: 0 22px; border: 0; border-radius: var(--r-pill); background: transparent; color: #CFCFCF; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.cz-sides button[aria-pressed="true"] { background: #fff; color: #000; }
.cz-sides .cnt:not(:empty) { min-width: 20px; height: 20px; border-radius: 10px; background: var(--k-blue); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.cz-stage { position: relative; width: 100%; max-width: 560px; justify-self: center; aspect-ratio: 400 / 440; border-radius: var(--r-xl); background: radial-gradient(circle at 50% 42%, #A6A6A6 0%, #7A7A7A 55%, #565656 100%); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.cz-stage.drop { outline: 3px dashed var(--k-green); outline-offset: -8px; }
.cz-garment, .cz-garment svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Capa de elementos: cubre toda la prenda, sin área de impresión fija */
.cz-area { position: absolute; }

/* Vista 2D / 3D */
.cz-modes { display: inline-flex; justify-self: end; gap: 4px; padding: 4px; border-radius: 999px; background: #1c1c1c; }
.cz-modes button { min-width: 48px; padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: #fff; font-weight: 700; cursor: pointer; }
.cz-modes button[aria-pressed="true"] { background: var(--k-green); color: #000; }
.cz-modes button:disabled { opacity: .4; cursor: not-allowed; }
.cz-3d { position: absolute; inset: 0; }
.cz-3d canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.cz-3d-msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #fff; font-weight: 600; pointer-events: none; }
.cz-stage.is-3d .cz-garment, .cz-stage.is-3d .cz-area, .cz-stage.is-3d .cz-sel { visibility: hidden; }
.cz-el { position: absolute; cursor: grab; outline: none; z-index: 1; }
.cz-el img, .cz-el svg { width: 100%; height: 100%; display: block; object-fit: fill; pointer-events: none; }
.cz-el:focus-visible { outline: 2px solid var(--k-blue); }
.cz-stage.dragging .cz-el, .cz-stage.dragging .cz-box { cursor: grabbing; }

/* Capa de selección (sin recorte) */
.cz-sel { position: absolute; pointer-events: none; }
.cz-box { position: absolute; border: 2px solid var(--k-green); box-shadow: 0 0 0 1px rgba(0,0,0,.6); pointer-events: auto; cursor: grab; }
.cz-h { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid #000; border-radius: 50%; pointer-events: auto; touch-action: none; }
.cz-h::after { content: ''; position: absolute; inset: -10px; } /* área táctil ampliada */
.cz-h.nw { left: -10px; top: -10px; cursor: nwse-resize; }
.cz-h.ne { right: -10px; top: -10px; cursor: nesw-resize; }
.cz-h.sw { left: -10px; bottom: -10px; cursor: nesw-resize; }
.cz-h.se { right: -10px; bottom: -10px; cursor: nwse-resize; }
.cz-hint { text-align: center; font-size: 12px; color: var(--k-muted-dark); margin: 0; }

/* Panel */
.cz-panel { background: var(--k-dark-1); border: 1px solid var(--k-dark-line); border-radius: var(--r-xl); padding: 18px; display: grid; gap: 14px; min-width: 0; }
.cz-add { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 480px) and (max-width: 1023px) { .cz-add { grid-template-columns: 1fr 1fr; } }
.cz-upload { cursor: pointer; }
.cz-small { font-size: 12px; color: var(--k-muted-dark); margin: 0; }
.cz-msg { font-size: 13px; color: #FF8A80; margin: 0; }
.cz-block { border-top: 1px solid var(--k-dark-line); padding-top: 14px; display: grid; gap: 10px; }
.cz-block h3 { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--k-muted-dark); margin: 0; }
.cz-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 210px; overflow-y: auto; }
.cz-layer { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: var(--r-md); border: 1.5px solid transparent; background: var(--k-dark-2); color: #E6E6E6; cursor: pointer; text-align: left; font-size: 13px; }
.cz-layer.on { border-color: var(--k-green); }
.cz-layer .th { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 8px; background: repeating-conic-gradient(#2c2c2c 0 25%, #222 0 50%) 0 0 / 12px 12px; display: flex; align-items: center; justify-content: center; padding: 4px; }
.cz-layer .th img, .cz-layer .th svg { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.cz-layer .th svg { width: 100%; }
.cz-layer .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cz-layer .nm strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.cz-layer .nm small { display: block; color: #B8D99A; font-size: 12px; margin-top: 3px; }
.cz-select, .cz-input { width: 100%; min-height: 44px; border: 1.5px solid var(--k-dark-line); border-radius: var(--r-md); padding: 10px 12px; color: #fff; background: var(--k-dark-2); font: inherit; font-size: 14px; color-scheme: dark; }
.cz-select:focus-visible, .cz-input:focus-visible { outline: 2px solid var(--k-green); outline-offset: 2px; }
.cz-empty { font-size: 13px; color: var(--k-muted-dark); }
.cz-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: #E6E6E6; margin-top: 4px; }
.cz-row output { font-variant-numeric: tabular-nums; color: var(--k-green); }
#czSize { width: 100%; accent-color: var(--k-green); height: 28px; }
#czText { width: 100%; min-height: 42px; border-radius: var(--r-md); border: 1.5px solid var(--k-dark-line); background: var(--k-dark-2); color: #fff; padding: 0 12px; font-size: 15px; margin: 6px 0; }
#czText:focus { outline: none; border-color: var(--k-green); }
.cz-tcolors, .cz-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.cz-pick { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cz-pick input[type="color"] { width: 40px; height: 34px; padding: 0; border: 2px solid #444; border-radius: 8px; background: none; cursor: pointer; }
.cz-pick output { font-family: monospace; font-size: 12px; opacity: .75; }
.cz-sw {width: 34px; height: 34px; border-radius: 50%; border: 2px solid #444; cursor: pointer; padding: 0; }
.cz-sw[aria-pressed="true"] { outline: 3px solid var(--k-green); outline-offset: 2px; }
.cz-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cz-btn { min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 1.5px solid var(--k-dark-line); background: var(--k-dark-2); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.cz-btn:hover:not(:disabled) { border-color: #fff; }
.cz-btn:disabled { opacity: .35; cursor: default; }
.cz-btn.danger { color: #FF8A80; border-color: rgba(255,138,128,.4); }
.cz-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: var(--r-pill); background: var(--k-dark-2); border: 1.5px solid var(--k-dark-line); color: #DADADA; font-size: 12px; cursor: pointer; }
.cz-chip.on { border-color: var(--k-green); }
.cz-chip { max-width: 100%; flex-wrap: wrap; overflow-wrap: anywhere; text-align: left; padding-block: 5px; }
.cz-chip i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #666; display: inline-block; }
.cz-chip b { color: #fff; }
.cz-quote { width: 100%; }
.cz-quote:disabled { opacity: .45; cursor: default; transform: none; }
