

/* ========== RESET Y FUENTES BASE ========== */

/* Fuente general */
body {
  margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    overflow-y: hidden; /* Quita el scroll vertical global pilas quitar si ahy errores */
  }
  /* Sub Menu segundo nav*/
  html, body {
  margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
  }
  .main-container {
  display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
  }
  .submenu-panel {
  width: 320px;
    background-color: #1f1f1f;
    height: 100vh;
    color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .submenu-content {
  display: none;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
  }
  .submenu-content.active {
  display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
  }
  html, body {
  height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
  }
  .layout {
  display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
  }
  .submenu {
    width: 320px;
    background-color: #1c1c1ce0;
    color: white;
    height: 100vh;
    overflow: hidden;
    padding: 16px 20px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(8px);
  }
  .submenu-header {
    display: none;
  }
  .submenu-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.5;
  }
  /* lang-switch legacy eliminado */
  .formas-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 4px;
    box-sizing: border-box;
  }
  .formas-container {
  -ms-overflow-style: none;  /* IE y Edge */
    scrollbar-width: none;     /* Firefox */
  }
  /* ── Panel Textos ── */
  .text-editor-panel {
    color: #fff;
    padding: 2px 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12px;
  }
  .tx-sec {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
  }
  .tx-sec-title {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
  }
  .tx-row { display: flex; gap: 8px; }
  .tx-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: background 0.15s;
    min-width: 0;
  }
  .tx-input:focus { background: #3d3d3d; }
  select.tx-input { cursor: pointer; }
  .tx-styles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  #panel-textos .style-btn {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 0;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
  }
  #panel-textos .style-btn:hover { background: #454545; }
  .tx-colores {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .tx-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
  }
  .tx-color-item span { font-size: 10px; color: rgba(255,255,255,0.5); }
  .tx-color-item input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255,255,255,0.18);
    border-radius: 50%;
    padding: 0;
    background: none;
    cursor: pointer;
  }
  .tx-color-item input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
  .tx-color-item input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
  .tx-color-item input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }
  .tx-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
  }
  .tx-field label {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tx-sliders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
  }
  #panel-textos input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    outline: none;
    padding: 0;
    margin: 7px 0;
    height: 12px;
  }
  #panel-textos input[type="range"]::-webkit-slider-runnable-track {
    height: 3px;
    background: #4a4a4a;
    border-radius: 3px;
  }
  #panel-textos input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%);
    cursor: pointer;
    margin-top: -4.5px;
  }
  #panel-textos input[type="range"]::-moz-range-track {
    height: 3px;
    background: #4a4a4a;
    border-radius: 3px;
  }
  #panel-textos input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%);
    border: none;
    cursor: pointer;
  }
  /* Quita scroll vertical global si aplica */
  html, body {
  overflow-y: hidden;
    height: 100%;
    margin: 0;
    padding: 0;
  }
  /* Contenedor de los diseños */
  .disenos-grid {
  display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px; /* separa cada imagen */
    padding: 10px 4px; /* separa de los bordes laterales */
    box-sizing: border-box;
    overflow-y: hidden;
  }
  
  
  /* ========== CONTENEDOR PRINCIPAL Y LAYOUT ========== */
  
  /* Estructura principal */
  .main-container {
  display: flex;
    height: 100vh;
  }
  
  
  /* ========== SIDEBAR Y MENÚ ========== */
  
  /* Sidebar izquierdo */
  .sidebar {
  width: 60px;
    background-color: #1c1c1c;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
  }
  .menu {
  list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
  }
  .menu li {
  display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .menu li:hover {
  opacity: 0.7;
  }
  .menu img {
    width: 22px;
    height: 22px;
    margin-bottom: 3px;
  }
  .menu span {
    font-size: 8px;
    display: block;
  }
  /* Soporte al final del menú */
  .soporte {
  position: relative;
    text-align: center;
    font-size: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding-bottom: 40px;
  }
  .soporte img {
  width: 24px;
    height: 24px;
  }
  .sidebar {
  width: 60px;
    background-color: #1c1c1c;
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
  }
  .sidebar .logo {
    text-align: center;
    padding: 20px 0;
    font-size: 6px;
    font-weight: 300;
    color: #aaa;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }
  .menu {
  list-style: none;
    padding: 0;
    margin: 0;
  }
  .menu li {
  padding: 10px 10px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
  }
  .menu li:hover {
  background-color: #333;
  }
  .submenu-content.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
  }
  .submenu-content.active::-webkit-scrollbar { width: 4px; }
  .submenu-content.active::-webkit-scrollbar-track { background: transparent; }
  .submenu-content.active::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
  #panel-textos.submenu-content.active {
    overflow-y: auto;
    scrollbar-width: none;
  }
  #panel-textos.submenu-content.active::-webkit-scrollbar { display: none; }
  .btn-agregar-texto {
    width: 100%;
    padding: 9px 0;
    background: #3b3b3b;
    color: #A78BFA;
    border: 1px solid #17c385;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 2px;
  }
  .btn-agregar-texto:hover { background: #2a2a2a; }
  .btn-continuar-global {
    flex-shrink: 0;
    width: 100%;
    padding: 14px 0;
    background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
    transition: opacity 0.2s ease;
  }
  .btn-continuar-global:hover { opacity: 0.88; }
  .sidebar {
  width: 60px;
    background-color: #1c1c1c;
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .menu {
  list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
  }
  .menu li {
  text-align: center;
    padding: 10px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
  }
  .menu li:hover {
  background: #2a2a2a;
  }
  .submenu-content {
  display: none;
  }
  .submenu-content.active {
  display: flex;
  flex-direction: column;
  }
  
  
  /* ========== TOPBAR Y ACCIONES ========== */
  
  .topbar {
  display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 30px;
    background-color: #ffffff;
  }
  .topbar-actions {
  display: flex;
    gap: 10px;
  }
  .topbar-actions button {
    background: none;
    border: none;
    cursor: pointer;
  }
  .price-tag {
  background-color: #1c1c1c;
    color: #ff3d3d;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 10px;
  }
  .topbar {
  display: flex;
    justify-content: flex-end;
    padding: 15px 30px;
    background: white;
  }
  .topbar-actions {
  display: flex;
    gap: 10px;
  }
  .price-tag {
  background-color: #1c1c1c;
    color: #ff3d3d;
    font-weight: 500;
    border-radius: 10px;
    padding: 6px 14px;
    border: none;
  }
  .topbar {
  padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    background: white;
  }
  .topbar-actions {
  display: flex;
    gap: 10px;
  }
  .price-tag {
  background: #1c1c1c;
    color: #ff3d3d;
    border-radius: 10px;
    padding: 6px 14px;
    border: none;
    font-weight: 500;
  }
  
  
  /* ========== ÁREA DE TRABAJO / EDITOR ========== */
  
  .logo {
    font-size: 6px;
    font-weight: 300;
    text-align: center;
    margin-bottom: 20px;
    color: #aaa;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  /* Área principal */
  .editor {
  flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
  }
  /* Área de trabajo blanco */
  .workspace-wrapper {
  display: flex;
    justify-content: center;
    height: 100%;
  }
  .workspace {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
  }
  











  







  .editor {
  flex: 1;
    background-color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .workspace {
  flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  .logo {
  font-size: 18px;
    font-weight: 300;
    margin: 20px 0;
  }
  .editor {
  flex: 1;
    background: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
  }
  .workspace {
  flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .slider {
  position: absolute;
    cursor: pointer;
    background-color: #444444;
    border-radius: 30px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: background-color 0.3s ease;
  }
  .slider::before {
  content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: transform 0.3s ease;
    border-radius: 50%;
    z-index: 2;
  }
  /* Íconos */
  .slider .icon {
  position: absolute;
    font-size: 12px;
    top: 6px;
    z-index: 1;
  }
  .slider .sun {
  left: 8px;
    color: #f5d000;
  }
  .slider .moon {
  right: 8px;
    color: #b3b3b3;
  }
  .lang-icon {
  font-size: 16px;
    color: white;
    pointer-events: none;
  }
  .text-inline-group {
    display: flex;
    gap: 8px;
  }
  .text-style-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
  }
  
  
  /* ========== ZOOM Y MOCKUP / CANVAS ========== */
  
  .canvas-container {
  position: relative;
    width: 400px;
    height: 500px;
  }
  .mockup {
  width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .zoom-floating {
  position: absolute;
    bottom: 20px;
    right: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    border: 1px solid #ddd;
  }
  .zoom-floating button {
  background: none;
    border: 1px solid #ccc;
    color: #333;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .zoom-floating button:hover {
  background-color: #f2f2f2;
  }
  .zoom-floating input[type="range"] {
  appearance: none;
    width: 90px;
    height: 2px;
    background: #ccc;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0 6px;
  }
  /* Eliminar el color azul en Chrome */
  .zoom-floating input[type="range"]::-webkit-slider-thumb {
  appearance: none;
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    cursor: pointer;
    margin-top: -0px;
  }
  .zoom-floating input[type="range"]::-moz-range-thumb {
  width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    border: 1px solid #fff;
    cursor: pointer;
  }
  .mockup {
  max-width: 90%;
    max-height: 90%;
  }
  .align-btn.center-canvas {
  font-size: 14px;
  }
  
  #zoomOut {
    display: none;
  }
  
  /* ========== SUBMENÚS LATERALES ========== */
  
  
  
  /* toggle de tema legacy eliminado */
  
  
  /* ========== BOTONES Y ACCIONES GENERALES ========== */
  
  /* Botón principal */
  .boton-cambiar {
    background: transparent;
    border: 1px solid #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    color: #acacac;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 400;
    width: 100%;
  }
  .boton-cambiar img {
    margin-bottom: 0;
    display: block;
    flex-shrink: 0;
  }
  .boton-cambiar:hover {
  background: #000;
    color: white;
    border-color: #000;
  }
  .talla-btn {
  padding: 10px 16px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
    color: #ffffff;
  }
  .talla-btn:hover,
  .talla-btn.active {
  background: #000;
    color: #fff;
    border-color: #c40000;
  }

  
  .btn-continuar {
  width: 100%;
    padding: 14px 0;
    background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 0;
  }
  .btn-continuar:hover { opacity: 0.88; }
  .boton-subir {
  margin-bottom: 0px;
  }
  .btn-subir {
  display: inline-block;
    padding: 10px 20px;
  
    background: transparent;
    border: 1px solid #fff;
    color: #acacac;
    font-size: 13px;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.3s;
    width: 80%;
  }
  .btn-subir:hover {
  background: #000;
    color: white;
    border-color: #000;
  }
  .btn-vista {
  padding: 6px 14px;
    font-size: 10px;
    border: 0.5px solid #ccc;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    color: #757474;
    transition: all 0.2s ease;
    margin-top: 0;
  }
  .btn-vista:hover {
  border-color: #3b3b3b;
    color: #535353;
  }
  .btn-vista.active {
  border-color: #444444;
    color: #000;
    font-weight: 300;
  }
  .style-btn,
  .align-btn,
  .effect-btn,
  .transform-btn {
  background: #3b3b3b;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .style-btn:hover,
  .align-btn:hover,
  .effect-btn:hover,
  .transform-btn:hover {
  background: #4e4e4e;
  }
  .style-btn.bold {
  font-weight: bold;
  }
  .style-btn.italic {
  font-style: italic;
  }
  .style-btn.underline {
  text-decoration: underline;
  }
  .style-btn.uppercase {
  text-transform: uppercase;
  }
  .align-btn.rotate-90 {
  transform: rotate(0deg);
  }
  /* Botón verde moderno */
  .btn-verde {
  width: 100%;
      padding: 14px 0;
      background-color: #A78BFA;
      color: white;
      border: none;
      border-radius: 50px;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      transition: background-color 0.3s ease;
      margin-top: 30px;
  }
  .btn-verde:hover {
  background: #27ae60;
  }
  
  
  /* ========== MODAL Y FONDO ========== */
  
  /* Modal fondo */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(36px) saturate(0.5);
    -webkit-backdrop-filter: blur(36px) saturate(0.5);
    background: rgba(0, 0, 0, 0.55);
    z-index: 20000;
    justify-content: center;
    align-items: center;
  }
  /* Contenido modal */
  .modal-contenido {
    position: relative;
    padding: 30px 40px 24px;
    max-width: 90vw;
    width: 100%;
    box-sizing: border-box;
  }
  /* Botón X */
  .cerrar-x {
  position: absolute;
    top: 0px;
    right: -300px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #2c2c2c;
    transition: 0.2s;
  }
  .cerrar-x:hover {
  color: #000;
  }
  
  
  /* ========== CARDS Y PRODUCTOS ========== */

  .fila-productos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px 2px;
    padding: 16px 0 8px;
  }
  
  
  /* ========== COLORES Y TALLAS ========== */
  
  .colores-wrapper {
  margin-top: 70px;
  }
  .label-color {
  display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 12px;
  }
  .color-opciones {
  display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .color-circle {
  width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ccc;
    transition: transform 0.2s;
    position: relative;
  }
  .color-circle:hover {
  transform: scale(1.1);
    border-color: #000;
  }
  .color-circle.selected::after {
  content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 1px #000;
  }
  .tallas-wrapper {
  margin-top: 50px;
  }
  .label-talla {
  display: block;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
  }
  .tallas-opciones {
  display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  .cantidad-wrapper {
    margin-top: 30px;
  }
  .cantidad-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 18px;
  }
  .cantidad-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    line-height: 1;
  }
  .cantidad-btn:hover {
    background: #000;
    border-color: #c40000;
  }
  .cantidad-num {
    min-width: 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
  }
  
  
  /* ========== RESUMEN DE PRECIO ========== */
  
  /* ── Panel Precios: card estilo burbuja ── */
  .precio-wrapper {
    margin-top: 0;
  }
  .precio-detalles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.10);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .precio-item,
  .precio-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
  }
  .precio-item .label { color: #888; font-weight: 400; }
  .precio-item .valor { color: #333; font-weight: 500; }
  .precio-total {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 4px;
  }
  .precio-total .label { color: #111; font-size: 13px; font-weight: 600; }
  .precio-total .valor { color: #A78BFA; font-size: 15px; font-weight: 700; }
  .precio-divisor {
    height: 1px;
    background: #f0f0f0;
    margin: 2px 0;
  }
  #precio-contador {
    font-size: 11px;
    color: #aaa;
    margin: 0;
  }
  #lista-elementos-precio {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  #lista-elementos-precio li {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #555;
  }
  #lista-elementos-precio .elem-tipo { color: #777; }
  #lista-elementos-precio .elem-precio { font-weight: 500; color: #333; }
  
  
  /* ========== ZONA DE IMÁGENES ========== */
  
  .imagenes-wrapper {
  margin-top: 0px;
    padding: 0 0px; /* mismo margen que las otras secciones */
  }
  .imagenes-wrapper h3 {
  font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 16px;
  }
  /* Dropzone mejorado */
  .dropzone {
  border: 1.2px dashed #444;
    margin-top: 20px;
    border-radius: 10px;
    padding: 30px 16px;
    text-align: center;
    background: #2c2c2c;
    color: #aaa;
    transition: border-color 0.3s, background 0.3s;
    cursor: pointer;
  }
  .dropzone:hover {
  border-color: #d82b00;
    background: #1e1e1e;
  }
  .dropzone svg {
  margin-bottom: 12px;
    stroke: #888;
    width: 42px;
    height: 42px;
  }
  .dropzone-contenido p {
  font-size: 13px;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
  }

  
/* Galería de miniaturas */
.galeria-miniaturas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.galeria-miniaturas img {
  width: 60px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.galeria-miniaturas img:hover {
  transform: scale(1.05);
}
  
  
  /* ========== SELECTOR DE VISTA FRONTAL/TRASERA ========== */
  
  .vista-selector {
  display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0px 0 20px; /* 🔼 esto los sube más cerca del componente anterior */
  }
  
  
  /* ========== FORMAS PREDISEÑADAS ========== */
  
  .texto-formato {
  display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #afafaf;
  }
  .formas-container::-webkit-scrollbar {
  display: none;
  }
  .figura {
  background: transparent;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .figura:hover {
  transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  }
  .figura img {
  width: 80%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
  }
  .figura-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    border-radius: 8px;
  }
  
  .figura-item:hover {
    transform: scale(1.07);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* ========== EDITOR DE TEXTO ========== */
  
  .text-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
  }
  .text-section label {
    font-size: 10px;
    font-weight: 400;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .text-section input,
  .text-section select {
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    background: #3b3b3b;
    color: #fff;
    font-size: 12px;
    font-weight: 300;
  }
  /* Sliders minimalistas */
  .text-section input[type="range"] {
  width: 100%;
    -webkit-appearance: none;
    height: 2px;
    background: #555;
    border-radius: 2px;
    outline: none;
    padding: 0;
    margin: 0;
  }
  .text-section input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 1px solid #888;
    margin-top: -5px;
    transition: background 0.3s;
  }
  .text-section input[type="range"]::-webkit-slider-thumb:hover {
  background: #ddd;
  }
  .text-section input[type="range"]::-moz-range-thumb {
  height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #888;
    cursor: pointer;
  }
  .text-section input[type="range"]::-moz-range-track {
  height: 2px;
    background: #555;
    border-radius: 2px;
  }
  
  
  /* ========== DISEÑOS PREDISEÑADOS ========== */
  
  /* Estilo individual de los diseños */
  .diseno-item {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    background: #1e1e1e;
    padding: 6px;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .diseno-item:hover {
  transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
  }
  

/* botones wpp y instagram */
.floating-buttons {
  position: fixed;
  bottom: 100px;
  right: 40px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-circle {
  width: 61px;
  height: 61px;
  border-radius: 50%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-circle + .btn-circle {
  margin-top: 10px;
}

.btn-circle img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.whatsapp {
  background-color: #25D366;
}

.instagram {
  background-color: #080700;
}


/* ========== TOPBAR GENERAL ========== */
.topbar-text-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-family: 'Poppins', sans-serif;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
  background: none;
  border: none;
}
.topbar-text-btn:hover { color: #111; }

.lang-toggle {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: #555;
  cursor: pointer;
  padding: 4px 4px;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}
.lang-toggle:hover { color: #111; }

/* ========== TOPBAR restructurado ========== */
.topbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  padding: 12px 20px !important;
  background: white;
}

.topbar-logo {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #bbb;
}

.topbar-isla {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #efefef;
  border-radius: 50px;
  padding: 5px 10px;
}

.topbar-icon-btn {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.15s ease;
}
.topbar-icon-btn:hover {
  color: #111;
  transform: scale(1.1);
}

/* ========== BARRA VERTICAL DE HERRAMIENTAS ========== */
.herramientas-verticales {
  position: absolute;
  left: 32px;
  top: 42%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: #111;
  border-radius: 20px;
  padding: 10px 6px;
  z-index: 9999;
  pointer-events: all;
  box-sizing: border-box;
}

.herramienta-btn {
  position: relative;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
  padding: 0;
  flex-shrink: 0;
}
.herramienta-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.herramienta-btn:disabled {
  color: rgba(255,255,255,0.2);
  cursor: default;
  background: none;
}
.herramienta-btn.activo {
  color: #A78BFA;
}
.herramienta-peligro:hover {
  color: #ef4444 !important;
  background: rgba(239,68,68,0.12) !important;
}

/* Tooltip ultra-pequeño */
.herramienta-btn::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,15,15,0.92);
  color: rgba(255,255,255,0.88);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.4px;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 99999;
}
.herramienta-btn:hover::after {
  opacity: 1;
}
.herramienta-btn:disabled::after {
  display: none;
}

.herramienta-sep {
  width: 18px;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 4px 0;
  flex-shrink: 0;
}

#btn-guias.activo {
  color: #A78BFA !important;
}

/* ========== OVERLAYS DE GUÍAS ========== */
.overlay-guia {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 4;
}
.overlay-guia.visible { opacity: 1; }

#overlay-cuadricula {
  background-image:
    linear-gradient(rgba(0,0,0,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 10% 10%;
}

#overlay-centros {
  background-image:
    linear-gradient(to bottom, rgba(220,60,60,0.4) 0, rgba(220,60,60,0.4) 100%),
    linear-gradient(to right,  rgba(220,60,60,0.4) 0, rgba(220,60,60,0.4) 100%);
  background-size: 1px 100%, 100% 1px;
  background-position: 50% 0, 0 50%;
  background-repeat: no-repeat;
}

/* ========== BOTTOM CONTROLS: isla acciones + girar en misma fila ========== */
.bottom-controls {
  position: absolute;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  pointer-events: all;
  white-space: nowrap;
}

.acciones-flotantes {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  background: #111;
  border-radius: 50px;
  padding: 10px 20px;
}

.accion-sep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  margin: 0 12px;
}

.accion-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.15s ease;
}

.accion-btn:hover {
  color: #fff;
  transform: scale(1.15);
}

.accion-btn.favorito-activo {
  color: #ef4444;
}
.accion-btn.favorito-activo svg {
  fill: #ef4444;
  stroke: #ef4444;
}


/* Boton girar camiseta */
@keyframes giro-idle {
  0%   { transform: perspective(120px) rotateY(0deg); }
  40%  { transform: perspective(120px) rotateY(180deg); }
  60%  { transform: perspective(120px) rotateY(180deg); }
  100% { transform: perspective(120px) rotateY(360deg); }
}

.stamp-area-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
}
.ruler-corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  background: #1a1a1a;
  border-right: 1px solid #2e2e2e;
  border-bottom: 1px solid #2e2e2e;
  z-index: 20;
  pointer-events: none;
  /* Aligns with the vertical ruler inside workspace */
}
.ruler-h {
  display: block;
  width: 100%;
  height: 18px;
  flex-shrink: 0;
  z-index: 19;
  pointer-events: none;
}
.ruler-v {
  position: absolute;
  top: 18px;
  left: 0;
  width: 18px;
  bottom: 0;
  height: calc(100% - 18px);
  display: block;
  z-index: 100;
  pointer-events: none;
}

.btn-girar-camiseta {
  box-sizing: border-box;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #444;
  font-size: 11px;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: background 0.2s;
}

.btn-girar-camiseta:hover {
  background: #f0f0f0;
}










/* Área donde se aplicará el color */
/* Máscara encima que tapa los bordes */
#stamp-area {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 3/4;
  overflow: hidden;

}
  

#camiseta-container {
  perspective: 1000px;
  width: 100%;
  height: 100%;
  max-width: 600px;
  aspect-ratio: 3/4;
  margin: 0 auto;
}

#camiseta-rotador {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.25s ease;
}

.cara {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  isolation: isolate;
}

.cara-frontal {
  display: flex;
}

.cara-trasera {
  display: none;
}

/* Reaprovechamos estilos existentes */
.color-layer, .camiseta-base, .mascara-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

/* Color-layer encima de la camiseta, recortado al shape del shirt */
.color-layer {
  z-index: 2;
  mix-blend-mode: multiply;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}

.cara-frontal .color-layer {
  mask-image: url('../img/mascara-frente-1024.png');
  -webkit-mask-image: url('../img/mascara-frente-1024.png');
}

.cara-trasera .color-layer {
  mask-image: url('../img/mascara-atras-1024.png');
  -webkit-mask-image: url('../img/mascara-atras-1024.png');
}



.camiseta-base {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
  filter: url('#shirt-boost-alpha');
}

.mascara-overlay {
  display: none;
}







/* ========== CONTROLES DE ELEMENTO ========== */

.controlador {
  position: absolute;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  border: 1.5px solid transparent;
  border-radius: 3px;
  transition: border-color 0.15s ease;
  cursor: default;
}

.controlador:hover,
.controlador.seleccionado {
  border-color: #3b82f6;
}

.controlador .img-contenido {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  display: block;
}

/* ── Controles de imagen ─────────────────────────────── */
.control-btn {
  width: 32px;
  height: 32px;
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.13s ease, box-shadow 0.13s ease;
  z-index: 5;
  backdrop-filter: blur(4px);
}

.controlador:hover .control-btn,
.controlador.seleccionado .control-btn {
  opacity: 1;
}

.control-btn:hover {
  transform: scale(1.15);
}

/* ✕ Eliminar — top-left, rojo */
.control-delete {
  top: -16px;
  left: -16px;
  background: #ef4444;
  box-shadow: 0 2px 8px rgba(239,68,68,0.45);
}
.control-delete:hover { background: #dc2626; }

/* ↻ Rotar — top-right, negro glass */
.control-rotate {
  top: -16px;
  right: -16px;
  background: rgba(20,20,20,0.82);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  cursor: grab;
}
.control-rotate:active { cursor: grabbing; }
.control-rotate:hover { background: rgba(0,0,0,0.95); }

/* ⇄ Voltear — top-center, índigo suave */
.control-flip {
  top: -16px;
  left: 50%;
  margin-left: -16px;
  background: rgba(99,102,241,0.88);
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}
.control-flip:hover { background: #4f46e5; }

/* ↗ Escalar — bottom-right, negro glass */
.control-scale {
  bottom: -16px;
  right: -16px;
  background: rgba(20,20,20,0.82);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  cursor: nwse-resize;
}
.control-scale:hover { background: rgba(0,0,0,0.95); }

/* ✥ Mover — bottom-left, negro glass */
.control-move {
  bottom: -16px;
  left: -16px;
  background: rgba(20,20,20,0.82);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  cursor: grab;
}
.control-move:hover { background: rgba(0,0,0,0.95); }
.control-move:active { cursor: grabbing; }

/* Etiqueta de dimensión */
.dimension-label {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,10,0.72);
  color: #fff;
  font-size: 9px;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  font-family: monospace;
  letter-spacing: 0.3px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.controlador:hover .dimension-label,
.controlador.seleccionado .dimension-label {
  opacity: 1;
}

/* ========== BURBUJA DE PRECIO FLOTANTE ========== */
.precio-burbuja {
  position: absolute;
  bottom: 24px;
  left: 42px;
  background: rgba(14,14,16,0.88);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  padding: 14px 18px;
  min-width: 180px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: none;
}

.precio-burbuja-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.precio-burbuja-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

.precio-burbuja-valor {
  font-size: 12px;
  color: rgba(255,255,255,0.88);
  font-weight: 500;
}

.precio-burbuja-divisor {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 2px 0;
}

.precio-burbuja-total .precio-burbuja-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}

.precio-burbuja-total .precio-burbuja-valor {
  font-size: 14px;
  color: #ffffff;
  font-weight: 700;
}

/* Máscara global: tapa lo que se sale de la zona de la camiseta */
.mascara-global {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* ========== F8: ANIMACIÓN GIRAR CAMISETA ========== */
@keyframes flipOut {
  from { transform: scale(var(--zoom, 1)) scaleX(1); opacity: 1; }
  to   { transform: scale(var(--zoom, 1)) scaleX(0); opacity: 0.4; }
}
@keyframes flipIn {
  from { transform: scale(var(--zoom, 1)) scaleX(0); opacity: 0.4; }
  to   { transform: scale(var(--zoom, 1)) scaleX(1); opacity: 1; }
}
.girando {
  pointer-events: none;
}

/* ========== F5: INDICADOR CARA + BOTÓN GIRAR ========== */
#barra-cara-2d {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10003;
  display: flex;
  align-items: center;
  gap: 8px;
}

#indicador-cara {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: 6px 14px;
  color: #444;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  pointer-events: none;
  transition: opacity 0.2s ease;
  user-select: none;
}

/* ========== F6: GUÍAS DE ÁREA DE ESTAMPADO ========== */
.area-estampado-guia {
  position: absolute;
  top: 25%;
  left: 20%;
  width: 60%;
  height: 45%;
  border: 1.5px dashed rgba(0, 0, 0, 0.22);
  border-radius: 4px;
  pointer-events: none;
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.area-estampado-guia.visible {
  opacity: 1;
}
#btn-guias.activo {
  color: #A78BFA;
}

/* ========== F9: SELECCIÓN DE PRODUCTO EN MODAL ========== */
.producto-card {
  cursor: pointer;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  opacity: 0.45;
  transition: opacity 0.2s ease;
  user-select: none;
}
.producto-card:hover {
  opacity: 0.75;
}
.producto-card.seleccionado {
  opacity: 1;
}
.producto-card.seleccionado::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #111;
}
.prod-nombre {
  font-size: 11px;
  color: #111;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.prod-precio {
  font-size: 10px;
  color: #555;
  font-weight: 400;
}

/* ========== F4: PANEL PRECIOS DETALLADO ========== */
.precio-contador {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}
#lista-elementos-precio {
  list-style: none;
  margin: 0 0 10px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#lista-elementos-precio li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}
#lista-elementos-precio li .elem-tipo {
  color: #ccc;
}
#lista-elementos-precio li .elem-dim {
  color: #777;
  font-size: 10px;
}
#lista-elementos-precio li .elem-precio {
  color: #A78BFA;
  font-weight: 600;
}
.sin-elementos-msg {
  font-size: 11px;
  color: #666;
  text-align: center;
  padding: 10px 0;
  font-style: italic;
}

/* ========== F1: TOAST DESCARGA ========== */
#toast-descarga {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1c1c1c;
  color: #fff;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 30px;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}
#toast-descarga.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== F3: MODAL COMPARTIR ========== */
#modal-compartir {
  display: none;
  opacity: 0;
  position: fixed;
  inset: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.55);
  z-index: 99000;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s ease;
}
#modal-compartir.open {
  display: flex;
  opacity: 1;
}
.modal-compartir-contenido {
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 22px 20px 18px;
  max-width: 340px;
  width: 92%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.modal-compartir-contenido h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.2px;
}
#preview-compartir {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1a1a;
}
.compartir-botones {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}
.btn-compartir-opcion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: #e0e0e0;
  transition: background 0.15s;
  width: 100%;
  text-decoration: none;
}
.btn-compartir-opcion svg { flex-shrink: 0; opacity: 0.85; }
.btn-compartir-opcion:hover { background: rgba(255,255,255,0.12); }
.btn-compartir-wsp  { }
.btn-compartir-copy { }
.btn-compartir-dl   { }
.btn-cerrar-compartir {
  background: none;
  border: none;
  font-size: 11.5px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0;
  text-align: center;
  width: 100%;
  transition: color 0.15s;
}
.btn-cerrar-compartir:hover { color: rgba(255,255,255,0.7); }

/* ========== F7: BOTONES UNDO/REDO ========== */
.topbar-icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none !important;
}

/* ================================================================
   CHECKOUT OVERLAY — paso2 y paso3
   ================================================================ */

.co-screen {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #141414;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
}
.co-screen[style*="flex"] { display: flex !important; }

/* Topbar */
.co-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 40px;
  flex-shrink: 0;
}
.co-brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-right: auto;
}
.co-isla {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 6px 12px;
}
.co-isla-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.co-isla-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.co-lang { letter-spacing: 1px; }

/* Body layout */
.co-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Izquierda: preview */
.co-izq {
  flex: 0 0 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px 30px 40px;
  position: relative;
}
#co-single-preview {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  padding: 24px 40px 0;
  box-sizing: border-box;
}
.co-img-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  box-sizing: border-box;
  overflow: hidden;
}
.co-preview-img {
  /* imagen recortada 1:1 — se contiene en el cuadrado disponible */
  display: none;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.co-preview-img.activo { display: block; }

/* Tabs frontal/trasera */
.co-face-tabs {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  flex-shrink: 0;
}
.co-ftab {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  font-family: 'Poppins', sans-serif;
  transition: color 0.2s;
  border-bottom: 1.5px solid transparent;
}
.co-ftab.activo {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.6);
}

/* Derecha: panel */
.co-der {
  flex: 0 0 42%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 72px 40px 72px;
  gap: 20px;
  overflow-y: auto;
  overflow-x: hidden;
}
.co-titulo {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.co-subtitulo {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  margin: -10px 0 0;
  line-height: 1.5;
}

/* Precio */
.co-precio-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.co-precio-label {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}
.co-precio-num {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}
.co-precio-cur {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

/* Color + Cantidad */
.co-opciones-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.co-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #000;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.co-op-label {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.co-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
}
.co-qty-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.co-qty-btn:hover { background: rgba(255,255,255,0.18); }
.co-qty-num {
  font-size: 16px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Tallas */
.co-tallas-sect { display: flex; flex-direction: column; gap: 10px; }
.co-talla-label { font-size: 14px; margin: 0; color: rgba(255,255,255,0.8); }
.co-talla-row { display: flex; gap: 10px; flex-wrap: wrap; }
.co-talla-row.shake { animation: talla-shake 0.55s ease; }
@keyframes talla-shake {
  0%,100% { transform: translateX(0); }
  15%      { transform: translateX(-6px); }
  35%      { transform: translateX(6px); }
  55%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}
.co-talla-btn {
  border: 1.5px solid rgba(255,255,255,0.2);
  background: none;
  color: rgba(255,255,255,0.6);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.15s ease;
}
.co-talla-btn:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
.co-talla-btn.activo { border-color: #A78BFA; color: #A78BFA; }

/* Botón principal */
.co-btn-cta {
  background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 17px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  width: 70%;
  box-sizing: border-box;
  max-width: 70%;
  transition: background 0.2s ease, transform 0.1s ease;
}
.co-btn-cta:hover { background: #13ad74; transform: translateY(-1px); }
.co-btn-cta:active { transform: translateY(0); }

/* Checkbox domicilio */
.co-domicilio-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  margin-bottom: 14px;
}
.co-domicilio-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #A78BFA;
  cursor: pointer;
  flex-shrink: 0;
}
.co-domicilio-txt {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.3;
}
.co-domicilio-precio {
  color: #A78BFA;
  font-weight: 600;
}

/* Desglose precios checkout */
.co-desglose {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.co-desglose-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.co-desglose-divisor {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 4px 0;
}
.co-desglose-total {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* ── Selector de pestañas en checkout ── */
.co-tabs-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45);
  margin: 0 0 10px;
}
.co-tabs-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.co-tab-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 10px 10px 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  min-width: 72px;
}
.co-tab-thumb:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}
.co-tab-thumb.activo {
  border-color: #A78BFA;
  background: rgba(167,139,250,0.12);
}
.co-tab-thumb-img-wrap {
  position: relative;
  width: 52px;
  height: 52px;
}
.co-tab-thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.co-tab-thumb-color {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  opacity: 0.25;
  pointer-events: none;
}
.co-tab-thumb-nombre {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-tab-thumb.activo .co-tab-thumb-nombre {
  color: #A78BFA;
}

/* ── Multi-producto: miniaturas lado izquierdo ───────────── */
.co-multi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-content: start;
  overflow-y: auto;
  max-height: 100%;
  padding: 4px 2px;
}
.co-mg-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  transition: border-color 0.15s;
  user-select: none;
}
.co-mg-cell.sel { border-color: #A78BFA; background: rgba(167,139,250,0.08); }
.co-mg-img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
  cursor: pointer;
}
.co-mg-chk {
  position: absolute;
  top: 7px; right: 7px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  font-size: 11px; line-height: 20px; text-align: center;
  color: transparent;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: all 0.15s;
  z-index: 2;
}
.co-mg-cell.sel .co-mg-chk {
  background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%);
  border-color: #A78BFA;
  color: #fff;
}
/* Botones frontal / trasera */
.co-mg-tabs {
  position: absolute;
  bottom: 7px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 4px;
  z-index: 2;
}
.co-mg-tab {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: rgba(255,255,255,0.7);
  font-size: 9px; font-family: 'Poppins',sans-serif;
  padding: 2px 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.co-mg-tab.activo {
  background: rgba(167,139,250,0.8);
  border-color: #A78BFA;
  color: #fff;
}

/* ── Paso 3 multi: grid de miniaturas en izquierda ───────── */
.co-p3-multi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
  overflow-y: auto;
}
.co-p3-thumb {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
}
.co-p3-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

/* ── Multi-items lista lado derecho ──────────────────────── */
.co-multi-items {
  display: flex; flex-direction: column; gap: 8px;
  padding: 2px 0 10px;
}
.co-mi-vacio { font-size: 11px; color: rgba(255,255,255,0.35); margin: 0; }
.co-mi {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,0.8);
}
.co-mi-nombre { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-mi-qty { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.co-mi-qbtn {
  background: rgba(255,255,255,0.1); border: none; border-radius: 5px;
  width: 20px; height: 20px; color: #fff; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.co-mi-qbtn:hover { background: rgba(255,255,255,0.2); }
.co-mi-qnum { font-size: 11px; min-width: 14px; text-align: center; color: rgba(255,255,255,0.9); }
.co-mi-precio { font-size: 11px; font-weight: 500; color: #A78BFA; flex-shrink: 0; }

/* Botón volver */
.co-btn-back {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  padding: 4px;
  transition: color 0.15s;
}
.co-btn-back:hover { color: rgba(255,255,255,0.7); }

/* Inputs paso3 */
.co-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 17px 20px;
  font-size: 14px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 70%;
  box-sizing: border-box;
}
.co-input::placeholder { color: rgba(255,255,255,0.28); }
.co-input:focus {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}

/* Campo teléfono con prefijo */
.co-tel-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 70%;
}
.co-tel-prefix {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 17px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.co-tel-input {
  width: 100%;
  border-radius: 0 12px 12px 0;
  border-left: 1px solid rgba(255,255,255,0.06);
}

/* ── PASO 4: Modal de confirmación de pedido ── */
.co-confirm-screen[style*="flex"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #0d1117 0%, #111827 100%);
}

.co-confirm-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 32px 36px 28px;
  max-width: 680px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: co-confirm-in 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes co-confirm-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cabecera */
.co-cf-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
}
.co-cf-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #A78BFA;
  margin: 0 0 4px;
}
.co-cf-titulo {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  letter-spacing: -0.3px;
}
.co-cf-num-block {
  text-align: right;
  flex-shrink: 0;
}
.co-cf-num-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.4);
  display: block;
  margin-bottom: 3px;
}
.co-cf-num {
  font-size: 15px;
  font-weight: 700;
  color: #A78BFA;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* Cuerpo dos columnas */
.co-cf-body {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}
.co-cf-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.co-cf-divider {
  width: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0 28px;
  flex-shrink: 0;
}
.co-cf-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 12px;
}
.co-cf-fila:last-of-type { border-bottom: none; }
.co-cf-lbl {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.co-cf-val {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 7px;
}
.co-cf-total .co-cf-lbl { color: rgba(255,255,255,0.7); font-weight: 600; }
.co-cf-total .co-cf-val { font-size: 15px; font-weight: 700; color: #A78BFA; }
.co-confirm-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  display: inline-block; flex-shrink: 0;
}
.co-cf-aviso {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
  margin-top: 14px;
}

/* Acciones */
.co-cf-actions {
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}
.co-confirm-wpp {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}
.co-confirm-wpp:hover { background: #1ebe5c; transform: translateY(-1px); }
.co-confirm-close {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.co-confirm-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

@media (max-width: 600px) {
  .co-cf-body { flex-direction: column; }
  .co-cf-divider { width: 100%; height: 1px; margin: 12px 0; }
  .co-cf-actions { flex-direction: column; }
}

/* ========== SISTEMA DE PESTAÑAS — isla flotante ========== */
#tab-bar {
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: none;
  min-height: 0;
  height: 0;
  padding: 0;
  overflow: visible;
  scrollbar-width: none;
  flex-shrink: 0;
  position: relative;
  z-index: 200;
}

#tab-list {
  position: absolute;
  top: 28px;
  left: 28px;
}
#tab-bar::-webkit-scrollbar { display: none; }

#tab-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

/* ── Miniaturas de tabs en panel-producto (grid 3 col) ── */
#tabs-miniaturas-list {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tab-mini-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-mini-cell:hover {
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.04);
}
.tab-mini-cell.activo {
  border-color: #A78BFA;
  background: rgba(167,139,250,0.1);
}
.tab-mini-cell img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  display: block;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 28px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  color: #aaa;
  background: transparent;
  border: none;
  user-select: none;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
  max-width: 200px;
  min-width: 0;
  box-sizing: border-box;
}
.editor-tab:hover {
  color: #555;
  background: rgba(0,0,0,0.05);
}
.editor-tab.activo {
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
}
.tab-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
  opacity: 0.4;
  flex-shrink: 0;
}
.editor-tab.activo .tab-icon { opacity: 1; }
.tab-nombre {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* Indicador dirty y botón cerrar */
.tab-dirty,
.tab-cerrar { display: none; }

.editor-tab.dirty:not(:hover) .tab-dirty {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%);
  flex-shrink: 0;
}

.editor-tab:hover .tab-cerrar,
.editor-tab.activo .tab-cerrar { display: flex; }

.tab-cerrar {
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #bbb;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.tab-cerrar:hover {
  background: rgba(220,50,50,0.12);
  color: #e05555;
}

#tab-bar-vacio {
  display: flex;
  align-items: center;
  color: #ccc;
  font-size: 11px;
  font-style: italic;
  height: 28px;
  padding: 0 4px;
}

/* ============================================================
   PANELES FLOTANTES — rediseño visual moderno
   Solo overrides visuales, sin tocar lógica ni HTML
   ============================================================ */

/* ── Fondo del layout: gris suave para que los cards floten ── */
body {
  background-color: #e4e6ea !important;
  display: flex !important;
  align-items: stretch !important;
  height: 100vh !important;
  overflow: hidden !important;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
}

.main-container {
  display: flex !important;
  flex: 1 !important;
  gap: 10px !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
}

/* ── Sidebar izquierdo: card flotante con margen ── */
.sidebar {
  width: 72px !important;
  min-width: 72px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  margin: 0 !important;
  height: calc(100vh - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05) !important;
  backdrop-filter: none !important;
  color: #555 !important;
  padding: 14px 0 !important;
  border: none !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.sidebar .logo {
  color: #ccc !important;
  font-size: 6px !important;
  letter-spacing: 0.5px !important;
  padding: 6px 0 14px !important;
  text-align: center !important;
}

.menu {
  padding: 2px 0 !important;
}

.menu li {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 9px 4px !important;
  margin: 2px 7px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  color: #aaa !important;
  transition: background 0.18s, color 0.18s !important;
  font-size: 8px !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px !important;
}

.menu li:hover {
  background: #f2f3f6 !important;
  color: #333 !important;
  opacity: 1 !important;
}

.menu li.active,
.menu li[data-panel].active {
  background: #edfaf4 !important;
  color: #A78BFA !important;
}

/* Íconos PNG: blancos en origen → hacerlos negros con filter */
.menu img {
  width: 20px !important;
  height: 20px !important;
  margin-bottom: 0 !important;
  filter: brightness(0) opacity(0.45) !important;
  transition: filter 0.18s !important;
}

.menu li:hover img {
  filter: brightness(0) opacity(0.75) !important;
}

.menu li.active img {
  filter: brightness(0) saturate(100%) invert(52%) sepia(69%) saturate(450%) hue-rotate(116deg) brightness(95%) !important;
}

.soporte {
  color: #bbb !important;
  font-size: 8px !important;
  gap: 3px !important;
  margin: 0 7px !important;
  border-radius: 12px !important;
  padding: 8px 4px !important;
  transition: background 0.18s, color 0.18s !important;
  text-align: center !important;
}

.soporte:hover {
  background: #f2f3f6 !important;
  color: #555 !important;
}

.soporte img {
  width: 20px !important;
  height: 20px !important;
  filter: brightness(0) opacity(0.35) !important;
  transition: filter 0.18s !important;
}

.soporte:hover img {
  filter: brightness(0) opacity(0.6) !important;
}

/* ── Submenu derecho: card flotante con margen ── */
.submenu {
  width: 290px !important;
  min-width: 290px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  margin: 0 !important;
  height: calc(100vh - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05) !important;
  backdrop-filter: none !important;
  color: #1a1a1a !important;
  padding: 20px 18px 16px !important;
  border: none !important;
  flex-shrink: 0 !important;
}

/* ── Dot grid en el workspace ── */
.workspace {
  background-color: #ffffff !important;
  background-image: radial-gradient(circle, #c8cdd6 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
}

/* ── Editor: card flotante ── */
.editor {
  border-radius: 16px !important;
  margin: 0 !important;
  height: calc(100vh - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05) !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.submenu-header {
  display: none !important;
}

.submenu-header h2 {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #ccc !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
}

/* Scrollbar light */
.submenu-content.active::-webkit-scrollbar { width: 3px !important; }
.submenu-content.active::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1) !important;
  border-radius: 4px !important;
}

/* ── Botón seleccionar producto ── */
.boton-cambiar {
  background: #f6f6f9 !important;
  border: 1px solid #ebebf0 !important;
  color: #444 !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  height: 38px !important;
  transition: background 0.18s, box-shadow 0.18s !important;
}

.boton-cambiar:hover {
  background: #ebebf0 !important;
  color: #1a1a1a !important;
  border-color: #ddd !important;
  box-shadow: none !important;
}

.boton-cambiar img {
  opacity: 0.5 !important;
  filter: invert(0) !important;
}

/* ── Labels ── */
.label-talla,
.label-color {
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #aaa !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  margin-bottom: 10px !important;
}

/* ── Talla buttons ── */
.talla-btn {
  padding: 8px 14px !important;
  font-size: 12px !important;
  border: 1px solid #e8e8ed !important;
  border-radius: 10px !important;
  background: #f6f6f9 !important;
  color: #555 !important;
  font-weight: 500 !important;
  transition: background 0.15s, border-color 0.15s, color 0.15s !important;
}

.talla-btn:hover {
  background: #ebebf0 !important;
  border-color: #d0d0d8 !important;
  color: #1a1a1a !important;
}

.talla-btn.active {
  background: #edfaf4 !important;
  border-color: #A78BFA !important;
  color: #A78BFA !important;
}

/* ── Cantidad ── */
.cantidad-btn {
  width: 34px !important;
  height: 34px !important;
  border: 1px solid #e8e8ed !important;
  border-radius: 50% !important;
  background: #f6f6f9 !important;
  color: #444 !important;
  font-size: 16px !important;
  transition: background 0.15s !important;
}

.cantidad-btn:hover {
  background: #ebebf0 !important;
  border-color: #ccc !important;
  color: #1a1a1a !important;
}

.cantidad-num {
  color: #1a1a1a !important;
  font-size: 14px !important;
}

/* ── Botón subir imagen ── */
.btn-subir {
  background: #f6f6f9 !important;
  border: 1px solid #ebebf0 !important;
  color: #555 !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  transition: background 0.18s !important;
}

.btn-subir:hover {
  background: #ebebf0 !important;
  border-color: #ddd !important;
  color: #1a1a1a !important;
}

.texto-formato {
  color: #bbb !important;
  font-size: 10px !important;
}

/* ── Dropzone ── */
.dropzone {
  background: #f9f9fc !important;
  border: 1.5px dashed #d8d8e4 !important;
  border-radius: 14px !important;
  color: #bbb !important;
  transition: border-color 0.18s, background 0.18s !important;
}

.dropzone:hover {
  border-color: #A78BFA !important;
  background: #f4fdf9 !important;
}

.dropzone svg {
  stroke: #ccc !important;
}

.dropzone-contenido p {
  color: #bbb !important;
  font-size: 11px !important;
}

/* ── Galería miniaturas ── */
.galeria-miniaturas img {
  border: 1.5px solid #ebebf0 !important;
  border-radius: 10px !important;
  background: #f6f6f9 !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.galeria-miniaturas img:hover {
  border-color: #A78BFA !important;
  box-shadow: 0 2px 8px rgba(167,139,250,0.15) !important;
}

/* ── Diseños ── */
.diseno-item {
  border: 1.5px solid #ebebf0 !important;
  border-radius: 12px !important;
  background: #f9f9fc !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  overflow: hidden !important;
}

.diseno-item:hover {
  border-color: #A78BFA !important;
  box-shadow: 0 2px 10px rgba(167,139,250,0.15) !important;
  background: #f4fdf9 !important;
}

/* ── Formas ── */
.figura-item {
  background: #f6f6f9 !important;
  border: 1.5px solid #ebebf0 !important;
  border-radius: 10px !important;
  padding: 8px !important;
  transition: border-color 0.15s, background 0.15s !important;
}

.figura-item:hover {
  border-color: #A78BFA !important;
  background: #f4fdf9 !important;
}

/* ── Panel textos — light theme ── */
.tx-sec {
  background: #f8f8fb !important;
  border: 1px solid #ebebf0 !important;
  border-radius: 12px !important;
}

.tx-sec-title {
  color: #bbb !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
}

.tx-input {
  background: #f0f0f4 !important;
  color: #1a1a1a !important;
  border-radius: 8px !important;
  border: none !important;
  font-size: 12px !important;
}

.tx-input:focus {
  background: #e8e8ee !important;
  outline: none !important;
}

select.tx-input option {
  background: #fff !important;
  color: #1a1a1a !important;
}

#panel-textos .style-btn {
  background: #f0f0f4 !important;
  color: #444 !important;
  border: none !important;
  border-radius: 8px !important;
  transition: background 0.15s !important;
}

#panel-textos .style-btn:hover {
  background: #e4e4ea !important;
  color: #1a1a1a !important;
}

.tx-field label {
  color: #aaa !important;
  font-size: 10px !important;
}

/* Range slider — light */
#panel-textos input[type="range"]::-webkit-slider-runnable-track {
  background: #e0e0e8 !important;
}

#panel-textos input[type="range"]::-moz-range-track {
  background: #e0e0e8 !important;
}

/* Color swatches — keep as-is, only fix border */
.tx-color-item input[type="color"] {
  border: 2px solid #e0e0e8 !important;
}

/* ── Rulers ocultos por defecto ── */
#ruler-h, #ruler-v, .ruler-corner {
  display: none !important;
}

/* ── Isla derecha siempre a la derecha ── */
.topbar .topbar-isla {
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

/* ── Tab-list dentro del topbar ── */
.topbar #tab-list {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 1 !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
  padding: 0 !important;
  height: 100% !important;
}

.topbar .editor-tab {
  height: 26px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  padding: 0 10px !important;
  min-width: 0 !important;
  max-width: 160px !important;
}

.topbar .editor-tab.activo {
  box-shadow: 0 1px 6px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.05) !important;
}

#tab-bar-vacio {
  font-size: 10px !important;
  color: #ccc !important;
  font-style: italic !important;
  height: auto !important;
  padding: 0 !important;
}

/* ── btn agregar texto ── */
.btn-agregar-texto {
  background: #f0f0f4 !important;
  color: #A78BFA !important;
  border: 1px solid #d0ede4 !important;
  border-radius: 50px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: background 0.18s !important;
}

.btn-agregar-texto:hover {
  background: #edfaf4 !important;
}

/* ── Precios dentro del submenu ── */
.precio-detalles {
  box-shadow: 0 8px 32px rgba(0,0,0,0.28) !important;
  border: none !important;
  background: rgba(14,14,16,0.88) !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 14px !important;
}
.precio-item .label { color: rgba(255,255,255,0.5) !important; }
.precio-item .valor { color: rgba(255,255,255,0.88) !important; }
.precio-total { border-top: 1px solid rgba(255,255,255,0.1) !important; }
.precio-total .label { color: rgba(255,255,255,0.6) !important; }
.precio-total .valor { color: #ffffff !important; font-size: 16px !important; font-weight: 700 !important; }
.precio-detalles .precio-item-icon,
.precio-detalles [class*="icon"] { display: none !important; }

/* ── Continuar button (keep green) ── */
.btn-continuar-global,
.btn-continuar {
  background: linear-gradient(135deg,#A78BFA 0%,#EC4899 55%,#FB923C 100%) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600 !important;
  border-radius: 50px !important;
  transition: opacity 0.2s !important;
}

.btn-continuar-global:hover,
.btn-continuar:hover {
  opacity: 0.88 !important;
}

/* ── Herramienta vertical (workspace) — ya es dark, solo afinar ── */
.herramientas-verticales {
  background: rgba(20,20,20,0.88) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18) !important;
}

.herramienta-sep {
  background: rgba(255,255,255,0.08) !important;
}

/* ── Botones de vista (btn-vista) ── */
.btn-vista {
  border-color: #e0e0e8 !important;
  color: #999 !important;
  background: transparent !important;
}

.btn-vista:hover {
  border-color: #bbb !important;
  color: #555 !important;
}

.btn-vista.active {
  border-color: #A78BFA !important;
  color: #A78BFA !important;
  background: #edfaf4 !important;
}

/* ── Upload rápido en panel producto ── */
.prod-upload-wrap {
  margin: 4px 0 4px;
}

.prod-upload-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px;
  background: #f6f6f9;
  border: 1.5px dashed #d8d8e4;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #777;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
  user-select: none;
}

.prod-upload-btn:hover {
  background: #f0fdf8;
  border-color: #A78BFA;
  color: #A78BFA;
}

.prod-upload-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
}

/* Grid 4 columnas para las imágenes subidas */
.galeria-prod {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.galeria-prod-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid #ebebf0;
  background: #f6f6f9;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.galeria-prod-thumb:hover {
  border-color: #A78BFA;
  box-shadow: 0 2px 8px rgba(167,139,250,0.18);
}

/* ── Colores: collapse a 3 + flecha ── */
.color-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}


/* ── Collapse de colores y tallas ── */
.color-opciones,
.tallas-opciones {
  overflow: hidden;
  transition: max-height 0.28s ease;
}

/* Fade suave solo en colores (3 filas), no en tallas (1 fila) */
.color-opciones.opciones-collapsed {
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.opciones-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s, transform 0.2s;
}

.opciones-more-btn:hover {
  color: #A78BFA;
  transform: translateY(2px);
}

.opciones-more-btn svg {
  stroke: currentColor;
  transition: transform 0.2s;
}

@keyframes chevron-pulse {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(3px); }
}

.opciones-more-btn:not(.expandido) svg {
  animation: chevron-pulse 1.8s ease-in-out infinite;
}

@keyframes spin3d { to { transform: rotate(360deg); } }

