.hpDesigner{ padding: 24px 0; }
.hpD-wrap{ width:min(1200px, calc(100% - 32px)); margin:0 auto; }

.hpD-head{ text-align:center; margin-bottom:18px; }
.hpD-title{
  margin:0;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing:-0.02em;
  background: linear-gradient(90deg, #4909f3, #a855f7);
  -webkit-background-clip: text;
  background-clip:text;
  color: transparent;
}
.hpD-sub{ margin:8px 0 0; color:#64748b; font-size:15px; }

.hpD-grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap:22px;
  align-items:start;
}
@media (max-width: 980px){
  .hpD-grid{ grid-template-columns:1fr; }
}

.hpD-preview{
  background: #f8fafc;
  border:1px solid #e5e7eb;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}

.hpD-stage{
  position:relative;
  width:100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow:hidden;
  background: #ffffff;
  display:grid;
  place-items:center;
}

.hpD-avatar{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  z-index:1;
}

/* Capa de color: NO debe afectar fondo, solo se verá "a través" de la camiseta PNG */
.hpD-colorLayer{
  position:absolute;
  inset:0;
  z-index:2;
  background:#4909f3;
  opacity:.92;
}

/* Camiseta PNG transparente: arriba del color para que se vea real */
.hpD-shirtPng{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  z-index:3;
  pointer-events:none;
}

/* Logo circular */
.hpD-logoWrap{
  position:absolute;
  z-index:4;
  width:150px;
  height:150px;
  left:50%;
  top:50%;
  transform: translate(-50%, -10%);
  border-radius: 999px;
  overflow:hidden;
  background: rgba(255,255,255,.9);
  border: 2px dashed rgba(148,163,184,.9);
  display:none;
}
.hpD-logoImg{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius: 999px;
}

/* Botón seleccionar logo */
.hpD-pick{
  position:absolute;
  z-index:5;
  width:150px;
  height:150px;
  left:50%;
  top:50%;
  transform: translate(-50%, -10%);
  border-radius:999px;
  border:2px dashed rgba(148,163,184,.9);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  color:#0f172a;
  font-weight:700;
  line-height:1.05;
  cursor:pointer;
}
.hpD-pick:hover{ background: rgba(255,255,255,.95); }

.hpD-tip{ margin:12px 2px 0; color:#64748b; font-size:14px; }

.hpD-panel .hpD-card{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius: 22px;
  padding:18px;
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}

.hpD-cardTitle{ margin:0; font-size:22px; }
.hpD-cardSub{ margin:6px 0 14px; color:#64748b; font-size:14px; }

.hpD-row{ display:grid; gap:8px; margin:12px 0; }
.hpD-label{ font-weight:700; color:#0f172a; }

.hpD-colorInput{
  width: 54px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0;
  background: transparent;
}

.hpD-palette{ display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }
.hpD-swatch{
  width:40px; height:40px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  cursor:pointer;
}
.hpD-swatch[data-c="#ffffff"]{ background:#ffffff; }
.hpD-swatch[data-c="#111827"]{ background:#111827; }
.hpD-swatch[data-c="#2563eb"]{ background:#2563eb; }
.hpD-swatch[data-c="#4909f3"]{ background:#4909f3; }
.hpD-swatch[data-c="#a855f7"]{ background:#a855f7; }
.hpD-swatch[data-c="#ef4444"]{ background:#ef4444; }
.hpD-swatch[data-c="#f59e0b"]{ background:#f59e0b; }
.hpD-swatch[data-c="#16a34a"]{ background:#16a34a; }

.hpD-swatch:focus{ outline:3px solid rgba(73,9,243,.25); outline-offset:2px; }

.hpD-upload{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.hpD-btn{
  border:1px solid rgba(73,9,243,.25);
  background: rgba(73,9,243,.08);
  color:#2b1bb8;
  padding:10px 12px;
  border-radius: 12px;
  font-weight:700;
  cursor:pointer;
}
.hpD-btn:hover{ background: rgba(73,9,243,.12); }
.hpD-muted{ color:#64748b; font-size:13px; }

.hpD-range{ display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
.hpD-range input[type="range"]{ width:100%; }
.hpD-val{ color:#64748b; font-weight:700; min-width:56px; text-align:right; }

.hpD-cta{
  width:100%;
  margin-top: 12px;
  border:0;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight:800;
  font-size:16px;
  color:#fff;
  background: linear-gradient(90deg, #4909f3, #a855f7);
  cursor:pointer;
  opacity:.55;
}
.hpD-cta:disabled{ cursor:not-allowed; }
.hpD-cta:not(:disabled){ opacity:1; }

.hpD-foot{ margin:10px 2px 0; color:#64748b; font-size:13px; }
