/* ==========================================================================
   ESTILOS DEL PERSONALIZADOR - MÓDULO DE POLOS
   ========================================================================== */

.customizer-section {
  padding: 2.5rem 0;
  background-color: #f8fafc;
  min-height: 80vh;
}

.customizer-header {
  text-align: center;
  margin-bottom: 2rem;
}

.customizer-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 0.3rem;
}

.customizer-header .highlight-text {
  color: #0284c7;
}

.customizer-wrapper {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   PANEL IZQUIERDO: HERRAMIENTAS DE DISEÑO
   -------------------------------------------------------------------------- */
.customizer-tools {
  flex: 1;
  min-width: 280px;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tool-group {
  margin-bottom: 1.2rem;
}

.tool-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.customizer-tools select,
.customizer-tools input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  background-color: #fff;
  color: #0f172a;
}

.customizer-tools select:focus,
.customizer-tools input[type="text"]:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.view-buttons-wrapper {
  display: flex;
  gap: 6px;
}

.btn-view {
  flex: 1;
  padding: 0.5rem 0.2rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-view:hover {
  background: #e2e8f0;
}

.btn-view.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.product-color-picker {
  display: flex;
  gap: 8px;
}

.color-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}

.color-btn:hover {
  transform: scale(1.1);
}

.color-btn.active {
  border-color: #0284c7;
  transform: scale(1.15);
  box-shadow: 0 0 5px rgba(2, 132, 199, 0.4);
}

.text-input-wrapper {
  display: flex;
  gap: 6px;
}

.file-input-custom {
  font-size: 0.82rem;
  color: #64748b;
}

.btn-add-text {
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 0 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add-text:hover {
  background: #0369a1;
}

.btn-clear-canvas {
  width: 100%;
  padding: 0.65rem;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}

.btn-clear-canvas:hover {
  background: #dc2626;
}


/* --------------------------------------------------------------------------
   PANEL CENTRAL: PREVISUALIZADOR Y ACOPLAMIENTO DE TELAS
   -------------------------------------------------------------------------- */
.customizer-preview-container {
  flex: 1.5;
  width: 100%;
  min-height: 520px;
  background: #ffffff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-mockup-frame {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 500px;
  background-color: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-color-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: background-color 0.3s ease;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Área de Canvas Interactiva - Respeta colores originales del cliente */
.canvas-overlay {
  position: absolute;
  z-index: 2;
  /* Eliminamos mix-blend-mode para que no altere los colores originales de la imagen */
  opacity: 0.95; /* Sutil integración natural */
}

.mockup-img-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.product-mockup-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.black-texture-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  display: none;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  mix-blend-mode: screen;
  opacity: 0.38;
  filter: invert(1) contrast(180%);
  pointer-events: none;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}


/* --------------------------------------------------------------------------
   PANEL DERECHO: FINALIZAR Y ENVIAR
   -------------------------------------------------------------------------- */
.customizer-checkout {
  flex: 1;
  min-width: 280px;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.customizer-checkout h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.customizer-checkout p {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.customizer-checkout .form-group {
  margin-bottom: 0.9rem;
}

.customizer-checkout label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.3rem;
}

.customizer-checkout input {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
}

.customizer-checkout input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.btn-send-custom {
  width: 100%;
  background: #22c55e;
  color: #ffffff;
  font-weight: 800;
  border: none;
  padding: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  transition: background 0.2s;
}

.btn-send-custom:hover {
  background: #16a34a;
}


/* --------------------------------------------------------------------------
   PANEL AVANZADO DE TIPOGRAFÍA Y ESTILOS DE TEXTO
   -------------------------------------------------------------------------- */
.advanced-text-controls {
  margin-top: 0.8rem;
  padding: 0.8rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.control-row {
  display: flex;
  gap: 8px;
  margin-bottom: 0.6rem;
  align-items: center;
}

.control-col {
  flex: 1;
}

.control-col-mini {
  width: 45px;
}

.sub-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.advanced-text-controls select {
  font-size: 0.8rem;
  padding: 0.4rem;
}

.advanced-text-controls input[type="range"] {
  width: 100%;
  accent-color: #0284c7;
}

.advanced-text-controls input[type="color"] {
  width: 100%;
  height: 32px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
}

.format-btn-row {
  margin-bottom: 0;
  justify-content: flex-start;
}

.btn-fmt {
  width: 32px;
  height: 32px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.82rem;
  transition: all 0.15s;
}

.btn-fmt:hover {
  background: #e2e8f0;
}

.btn-fmt.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}