/* IMPRESIONO · personalización y diseñador — negro #0B0B0B, amarillo #FFD20A, blanco */
.icd-custom {
	--icd-black: #0b0b0b; --icd-yellow: #ffd20a; --icd-white: #fff; --icd-line: #2c2c2c; --icd-soft: #161616;
	margin: 1.25em 0; padding: 18px; background: var(--icd-soft); color: var(--icd-white);
	border: 1px solid var(--icd-line); border-left: 4px solid var(--icd-yellow); border-radius: 10px; max-width: 520px; clear: both;
}
.icd-custom.is-on { border-color: var(--icd-yellow); }
.icd-custom__title { margin: 0 0 2px; color: var(--icd-yellow); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: 1em; }
.icd-custom__sub, .icd-custom__note { margin: 0 0 12px; color: #bdbdbd; font-size: .85em; line-height: 1.4; }
.icd-custom__note { margin: 10px 0 0; }
.icd-custom__zones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .icd-custom__zones { grid-template-columns: 1fr; } }
.icd-zone { position: relative; display: grid; grid-template-columns: 22px 1fr auto; grid-template-areas: "box name price" "box size price";
	column-gap: 10px; align-items: center; padding: 10px 12px; background: var(--icd-black); border: 1px solid var(--icd-line); border-radius: 8px; cursor: pointer; margin: 0; transition: border-color .15s, background .15s; }
.icd-zone:hover { border-color: #5a5a5a; }
.icd-zone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.icd-zone__box { grid-area: box; width: 20px; height: 20px; border: 2px solid #8a8a8a; border-radius: 4px; background: transparent; }
.icd-zone input:checked ~ .icd-zone__box { background: var(--icd-yellow); border-color: var(--icd-yellow);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230b0b0b' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E"); background-size: 16px; background-position: center; background-repeat: no-repeat; }
.icd-zone input:focus-visible ~ .icd-zone__box { outline: 2px solid var(--icd-white); outline-offset: 2px; }
.icd-zone:has(input:checked) { border-color: var(--icd-yellow); background: #1d1a08; }
.icd-zone__name { grid-area: name; font-weight: 700; color: var(--icd-white); line-height: 1.2; }
.icd-zone__size { grid-area: size; font-size: .78em; color: #a8a8a8; }
.icd-zone__price { grid-area: price; color: var(--icd-yellow); font-weight: 800; white-space: nowrap; font-size: .95em; }
.icd-zone__price .amount, .icd-zone__price bdi { color: inherit; }
.icd-zone__price small { color: #a8a8a8; font-weight: 400; margin-left: 2px; }
.icd-custom__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.icd-custom__extra { margin: 8px 0 0; color: var(--icd-yellow); font-weight: 700; }
.icd-custom__extra:empty { display: none; }
.icd-custom__state { font-size: .85em; display: inline-flex; align-items: center; gap: 8px; }
.icd-custom__state.is-ok { color: #9be39b; }
.icd-custom__state.is-warn { color: var(--icd-yellow); }
.icd-custom__thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--icd-yellow); background: #fff; }

.icd-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 2px solid var(--icd-yellow, #ffd20a); border-radius: 8px;
	font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: .85em; cursor: pointer; line-height: 1.1; text-decoration: none; }
.icd-btn--design { background: transparent; color: #ffd20a; }
.icd-btn--design:hover, .icd-btn--design:focus-visible { background: #ffd20a; color: #0b0b0b; }
.icd-btn--save { background: #ffd20a; color: #0b0b0b; width: 100%; justify-content: center; margin-top: 10px; }
.icd-btn--save:hover { background: #fff; border-color: #fff; }
.icd-btn--save:disabled { opacity: .6; cursor: wait; }
.icd-btn--upload { background: #0b0b0b; color: #fff; border-color: #fff; }
.icd-btn--upload:hover { background: #ffd20a; color: #0b0b0b; border-color: #ffd20a; }
.icd-cart-thumb { border-radius: 6px; background: #fff; }

/* ── Ventana del diseñador ── */
html.icd-noscroll { overflow: hidden; }
.icd-modal { position: fixed; inset: 0; z-index: 999999; display: none; }
.icd-modal.is-open { display: block; }
.icd-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); }
.icd-dialog { position: relative; margin: 3vh auto; width: min(1040px, 96vw); max-height: 94vh; overflow: auto; background: #0b0b0b; color: #fff;
	border: 1px solid #2c2c2c; border-top: 4px solid #ffd20a; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); font-size: 15px; }
.icd-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #222; }
.icd-dialog__head h2 { margin: 0; font-size: 1.2em; color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.icd-dialog__head h2::before { content: ""; display: inline-block; width: 10px; height: 10px; background: #ffd20a; margin-right: 10px; border-radius: 2px; }
.icd-close { background: transparent; border: 0; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; padding: 0 6px; }
.icd-close:hover { color: #ffd20a; }
.icd-dialog__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding: 20px; }
@media (max-width: 820px) { .icd-dialog__body { grid-template-columns: 1fr; } .icd-dialog { margin: 0; width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; } }
.icd-stagewrap { text-align: center; }
.icd-tabs { display: inline-flex; background: #161616; border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.icd-tab { background: transparent; border: 0; color: #fff; padding: 8px 20px; border-radius: 999px; font-weight: 700; cursor: pointer; text-transform: uppercase; font-size: .8em; letter-spacing: .04em; }
.icd-tab.is-active { background: #ffd20a; color: #0b0b0b; }
.icd-tab:disabled { opacity: .35; cursor: not-allowed; }
.icd-stage { width: 100%; max-width: 560px; height: auto; aspect-ratio: 1; background: #fff; border-radius: 10px; touch-action: none; display: block; margin: 0 auto; }
.icd-colorname { margin: 10px 0 0; font-weight: 700; color: #ffd20a; }
.icd-hint { margin: 4px 0 0; color: #9a9a9a; font-size: .8em; }
.icd-panel h3 { margin: 0 0 8px; font-size: .85em; color: #ffd20a; text-transform: uppercase; letter-spacing: .05em; }
.icd-panel h3 + * { margin-bottom: 6px; }
.icd-panel h3:not(:first-child) { margin-top: 18px; }
.icd-upload { display: flex; align-items: center; gap: 12px; }
.icd-file { position: absolute; opacity: 0; width: 1px; height: 1px; }
.icd-file:focus-visible + .icd-logoprev, .icd-btn--upload:focus-within { outline: 2px solid #ffd20a; }
.icd-logoprev img { max-width: 70px; max-height: 50px; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 10px 10px; border-radius: 4px; display: block; }
.icd-small { color: #9a9a9a; font-size: .78em; }
.icd-mzones { display: grid; gap: 8px; }
.icd-mzone { background: #161616; border: 1px solid #2c2c2c; border-radius: 8px; padding: 10px 12px; }
.icd-mzone.is-on { border-color: #ffd20a; }
.icd-mzone__head { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "cb name price" "cb size price"; column-gap: 10px; align-items: center; cursor: pointer; margin: 0; }
.icd-mzone__head input { grid-area: cb; accent-color: #ffd20a; width: 18px; height: 18px; }
.icd-mzone__head strong { grid-area: name; color: #fff; }
.icd-mzone__head .icd-small { grid-area: size; }
.icd-mzone__price { grid-area: price; color: #ffd20a; font-weight: 800; }
.icd-mzone__opts { margin-top: 10px; display: grid; gap: 8px; }
.icd-segs { display: inline-flex; border: 1px solid #3a3a3a; border-radius: 6px; overflow: hidden; justify-self: start; }
.icd-seg { background: transparent; color: #fff; border: 0; padding: 6px 14px; cursor: pointer; font-weight: 700; font-size: .8em; }
.icd-seg.is-active { background: #ffd20a; color: #0b0b0b; }
.icd-textrow { display: flex; gap: 8px; }
.icd-text { flex: 1; background: #0b0b0b; color: #fff; border: 1px solid #3a3a3a; border-radius: 6px; padding: 8px 10px; }
.icd-text:focus, .icd-notes:focus { outline: 2px solid #ffd20a; border-color: transparent; }
.icd-color { width: 42px; height: 38px; padding: 0; border: 1px solid #3a3a3a; border-radius: 6px; background: #0b0b0b; }
.icd-sizerow { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; font-size: .8em; color: #bdbdbd; margin: 0; }
.icd-range { accent-color: #ffd20a; width: 100%; }
.icd-notes { width: 100%; margin-top: 14px; background: #161616; color: #fff; border: 1px solid #2c2c2c; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .9em; resize: vertical; box-sizing: border-box; }
.icd-msg { color: #ff8a80; margin: 8px 0 0; min-height: 1em; font-size: .85em; }

/* ── Diseñador v2 (estilo tarjetas por pasos) ── */
.icd-dialog { width: min(1120px, 96vw); padding-bottom: 8px; border-top: 0; background: #0b0b0b; }
.icd-dialog > .icd-close { position: absolute; top: 12px; right: 14px; z-index: 3; }
.icd-dialog__head { display: block; text-align: center; border-bottom: 0; padding: 26px 20px 6px; }
.icd-kicker { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffd20a; border: 1px solid rgba(255,210,10,.55); background: rgba(255,210,10,.08); padding: 6px 14px; border-radius: 999px; margin-bottom: 10px; }
.icd-dialog__head h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: .03em; margin: 0 0 6px; }
.icd-dialog__head h2::before { display: none; }
.icd-dialog__head p { margin: 0; color: #a8a8a8; font-size: .9em; }
.icd-dialog__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 20px 24px 24px; align-items: start; }
@media (max-width: 860px) { .icd-dialog__body { grid-template-columns: 1fr; padding: 14px; } }
.icd-stagewrap { background: #141414; border: 1px solid #262626; border-radius: 16px; padding: 14px; position: sticky; top: 0; }
@media (max-width: 860px) { .icd-stagewrap { position: static; } }
.icd-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: transparent; padding: 0; margin-bottom: 12px; width: 100%; }
.icd-tab { background: #222; border-radius: 10px; padding: 11px 10px; font-size: .85em; }
.icd-tab.is-active { background: #ffd20a; color: #0b0b0b; }
.icd-stagebox { border: 1px solid #2c2c2c; border-radius: 12px; padding: 8px; background: repeating-conic-gradient(#1a1a1a 0 25%, #151515 0 50%) 0 0 / 22px 22px; }
.icd-stage { border-radius: 8px; }
.icd-hint { text-align: left; background: rgba(255,210,10,.08); border: 1px solid rgba(255,210,10,.25); color: #e6e6e6; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: .82em; line-height: 1.45; }
.icd-colorname { text-align: center; }
.icd-panel { display: grid; gap: 12px; }
.icd-summary { border: 1px solid #ffd20a; background: rgba(255,210,10,.06); border-radius: 12px; padding: 12px 14px; font-size: .86em; }
.icd-summary p { margin: 0 0 2px; color: #cfcfcf; }
.icd-summary strong { color: #fff; }
.icd-editing { background: #ffd20a; color: #0b0b0b; text-align: center; font-weight: 800; border-radius: 12px; padding: 12px; font-size: .9em; }
.icd-step { background: #141414; border: 1px solid #262626; border-radius: 14px; padding: 14px 16px; }
.icd-step__title { display: flex; align-items: center; gap: 10px; color: #fff !important; font-size: .95em !important; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px !important; }
.icd-step__num { width: 26px; height: 26px; border-radius: 50%; background: #ffd20a; color: #0b0b0b; display: grid; place-items: center; font-weight: 900; font-size: 13px; flex: none; }
.icd-mzone { position: relative; }
.icd-mzone.is-active { border-color: #ffd20a; box-shadow: inset 0 0 0 1px #ffd20a; }
.icd-mzone__edit { margin-top: 8px; background: transparent; border: 1px dashed #5a5a5a; color: #cfcfcf; border-radius: 8px; padding: 5px 10px; font-size: .78em; cursor: pointer; }
.icd-mzone__edit:hover { border-color: #ffd20a; color: #ffd20a; }
.icd-upload { display: block; }
.icd-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; border: 2px dashed #ffd20a; border-radius: 12px; background: rgba(255,210,10,.05); cursor: pointer; text-align: center; transition: background .2s; }
.icd-drop:hover { background: rgba(255,210,10,.12); }
.icd-drop strong { color: #ffd20a; font-size: .95em; }
.icd-drop small { color: #9a9a9a; font-size: .75em; }
.icd-logoprev:not(:empty) { margin-top: 10px; display: flex; justify-content: center; }
.icd-logoprev img { max-width: 120px; max-height: 70px; }
.icd-ctl { display: grid; gap: 10px; margin-top: 12px; }
.icd-ctl .icd-sizerow { grid-template-columns: 110px 1fr; }
.icd-field { display: grid; gap: 6px; color: #bdbdbd; font-size: .8em; }
.icd-field .icd-text { width: 100%; box-sizing: border-box; padding: 10px 12px; }
.icd-field .icd-color { width: 100%; height: 40px; }
.icd-btn-soft { background: #222; color: #fff; border: 1px solid #333; border-radius: 10px; padding: 10px 12px; font-weight: 700; cursor: pointer; font-size: .85em; }
.icd-btn-soft:hover { border-color: #ffd20a; color: #ffd20a; }
.icd-step--save .icd-notes { margin-top: 0; }
.icd-step--save .icd-btn--save { margin-top: 10px; padding: 14px; font-size: .95em; }
.icd-dialog__head p { letter-spacing: normal; text-transform: none; }

/* Móvil: el botón «Guardar diseño» siempre a la vista */
@media (max-width: 860px) {
	.icd-dialog { height: 100vh; height: 100dvh; max-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
	.icd-step--save { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -10px 24px rgba(0,0,0,.7); border-color: #ffd20a; }
	.icd-step--save .icd-notes { display: none; }
	.icd-step--save.show-notes .icd-notes { display: block; }
	.icd-dialog__body { padding-bottom: 0; }
}

/* Botones Frontal / Trasera encima de «Zonas de marcaje» */
.icd-panel > .icd-tabs { margin: 0 0 12px; }

/* Subir imagen debajo de la camiseta; resumen del producto debajo de «Texto personalizado» */
.icd-leftcol { display: grid; gap: 12px; min-width: 0; }
.icd-leftcol .icd-stagewrap { position: static; }
.icd-leftcol .icd-step--logo { text-align: left; }
.icd-panel > .icd-summary { margin: 0; }
