body {
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.top-band,
.equip-band,
.equip-main,
.gallery-section,
.modal-overlay {
  position: relative;
  z-index: 1;
}

header {
  z-index: 2;
}

/* ── BANDA ── */
.equip-band {
  flex-shrink: 0;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 2rem 0.8rem;
  height: clamp(80px, 12vw, 160px);
}
.equip-band h1 {
  font-family: "BebasNeue", sans-serif;
  font-size: clamp(2.5rem, 9vw, 8rem);
  color: var(--pink);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  position: relative;
  top: 0.06em;
}

/* ── LAYOUT PRINCIPAL ── */
.equip-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem 2.5rem 3rem;
  max-width: 70%;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
}

/* ── PANEL IZQUIERDO ── */
.left-panel {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
}

/* ── SIDEBAR: barra vertical + pinceles ── */
.tools-sidebar {
  display: flex;
  flex-direction: row;
  gap: 0.4rem;
  align-items: flex-start;
  padding-top: 0;
}

/* La barra empieza al nivel de los botones, no del label */
.size-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
  /* el ancho del contenedor = alto del slider rotado */
  width: 20px;
  height: 160px;
  justify-content: center;
}

.size-slider-v {
  -webkit-appearance: none;
  appearance: none;
  /* ancho real = altura visual deseada */
  width: 160px;
  height: 4px;
  background: var(--orange, #fd7145);
  border-radius: 2px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  /* rotar en su sitio: origen central */
  transform: rotate(-90deg);
  transform-origin: center center;
}

.size-slider-v::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink, #ff3773);
  border: none;
  cursor: pointer;
  /* sin transform: el thumb ya queda centrado sobre el track */
}

.size-slider-v::-moz-range-track {
  height: 4px;
  background: var(--orange, #fd7145);
  border-radius: 2px;
}

.size-slider-v::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink, #ff3773);
  border: none;
  cursor: pointer;
}

/* ── COLUMNA DE PINCELES ── */
.tools-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.tools-label {
  font-family: "Outreque", sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.1rem;
  font-weight: bold;
  align-self: flex-start;
  white-space: nowrap;
}

.tool-btn {
  width: 52px;
  height: 52px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  line-height: 1;
  opacity: 0.3;
  transition: opacity 0.15s, transform 0.15s;
  border-radius: 8px;
}

.tool-btn:hover {
  opacity: 0.65;
  transform: scale(1.1);
}

.tool-btn.active {
  opacity: 1;
}

.tool-icon {
  font-size: 3rem;
  pointer-events: none;
  line-height: 1;
  display: block;
}


/* ── STAMP (PNG logo) ── */
.stamp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.stamp-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  /* hereda la opacidad del .tool-btn padre */
}

/* ── ÁREA CAMISETA ── */
.shirt-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.shirt-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.shirt-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

#paintCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: crosshair;
}

.shirt-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
}

/* ── PALETA DE COLORES ── */
.palette-area {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.colors-block {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.palette-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.palette-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  align-items: center;
}

.color-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 0;
}
.color-btn:hover {
  transform: scale(1.1);
}
.color-btn.active {
  box-shadow: 0 0 0 3px var(--pink);
  transform: scale(1.08);
}

.action-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.btn-action {
  font-family: "Outreque", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--cream);
  border: 0;
  border-radius: 14px;
  padding: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  font-weight: bold;
  color: var(--ink);
}
.btn-action:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* ── PANEL DERECHO ── */
.right-panel {
  background: var(--pink);
  border-radius: 18px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  min-width: 0;
}

.field-nombre {
  background: #fd5e96;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
}
.field-nombre input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: "Outreque", sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
}
.field-nombre input::placeholder {
  color: #ffd9ba;
}

.field-desc {
  background: var(--cream);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  flex: 1;
  min-width: 0;
}
.field-desc-label {
  font-family: "Outreque", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  font-weight: bold;
  color: var(--pink);
  margin-bottom: 0.4rem;
}
.field-desc textarea {
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: "Outreque", sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
}
.field-desc textarea::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.submit-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.btn-x {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange, #fd7145);
  border: none;
  color: white;
  font-family: "Outreque", sans-serif;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.btn-x:hover {
  opacity: 0.85;
}
.btn-submit {
  flex: 1;
  background: #fd5e96;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  font-family: "Outreque", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-submit:hover {
  background: #ff90c0;
}

/* ── GALERÍA ── */
.gallery-section {
  padding: 0 2.5rem 3rem;
  max-width: 70%;
  margin: 0 auto;
  width: 100%;
}
.gallery-empty {
  font-family: "Outreque", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  padding: 1rem 0;
}
.gallery-grid {
  display: grid;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--pink);
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-radius: 18px;
}
.shirt-card {
  cursor: pointer;
  transition: transform 0.15s;
}
.shirt-card:hover {
  transform: translateY(-3px);
}
.shirt-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
}
.shirt-card .card-title {
  font-family: "Outreque", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.7rem;
  color: var(--cream);
}
.shirt-card .card-desc {
  font-family: "Outreque", sans-serif;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink);
  margin-top: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: var(--cream);
  border-radius: 18px;
  padding: 2rem;
  max-width: 360px;
  width: 90%;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--ink);
}
.modal-img {
  width: 100%;
  display: block;
  margin-bottom: 1rem;
}
.modal-num {
  font-family: "Outreque", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 0.2rem;
}
.modal-title {
  font-family: "Outreque", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: var(--pink);
}
.modal-desc {
  font-family: "Outreque", sans-serif;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.5rem;
  line-height: 1.6;
  color: var(--ink);
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .equip-main {
    max-width: 90%;
  }
  .gallery-section {
    max-width: 90%;
  }
}

@media (max-width: 1024px) {
  .equip-main {
    grid-template-columns: 1fr;
    padding: 1.2rem;
    max-width: 100%;
  }
  .left-panel {
    grid-template-columns: 60px 1fr;
    max-width: 600px;
  }
  .shirt-area {
    display: flex;
    flex-direction: column;
  }
  .palette-area {
    width: 100%;
  }
  .gallery-section {
    max-width: 100%;
    padding: 0 1.2rem 3rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .left-panel {
    grid-template-columns: 1fr;
  }

  /* sidebar: columna — barra arriba, pinceles debajo */
  .tools-sidebar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0;
    width: 100%;
  }

  /* barra de tamaño: ocupa todo el ancho */
  .size-vertical {
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: auto;
    padding-top: 0;
    gap: 0;
  }

  .size-slider-v {
    width: 100%;
    height: 4px;
    transform: none;
  }

  /* pinceles en fila */
  .tools-col {
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
    width: 100%;
  }

  .tools-label {
    display: none;
  }

  .tool-btn {
    width: 40px;
    height: 40px;
    flex: 1;
  }

  .tool-icon {
    font-size: 1.6rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    padding: 1.2rem;
  }
}

@media (max-width: 480px) {
  .tool-btn {
    width: 36px;
    height: 36px;
  }
  .tool-icon {
    font-size: 1.4rem;
  }
  .colors-block {
    flex-direction: column;
  }
  .action-col {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .equip-main {
    padding: 0.8rem;
  }
}