.vis-swatches{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  margin:10px 0;
  list-style:none;
  padding:0;
}

.vis-card-layout .vis-swatches li,
.vis-type-image li,
.vis-type-image .vis-swatch{
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
}

.vis-swatch{
  text-align:center;
  cursor:pointer;
}

/* Color */
.vis-type-image .vis-swatch-img{
  width:100px;
  height:100px;
  object-fit:cover;
  border-radius:50%;
  border:0;
}

.vis-type-image .vis-label{
  display:block;
  font-size:13px;
  font-weight:600;
  margin-bottom:16px;
}

/* Text */
.vis-type-text .vis-pill{
  padding:10px 16px;
  border-radius:10px;
  border:3px solid #ccc;
  font-weight:600;
}

.vis-type-text .is-selected .vis-pill{
  border-color:#000;
}

/* Price */
.vis-type-text .precio{
  margin-top:6px;
  font-size:14px;
}

.vis-type-text .precio .regular{
  text-decoration:line-through;
  color:#999;
}

.vis-type-text .precio .sale,
.vis-type-text .precio .current{
  font-weight:700;
}

/* Ring exterior SOLO para imagen seleccionada */
.is-selected img.vis-swatch-img {
  outline: 1px solid #000;
  outline-offset: 4px;
  border-radius: 50%;
}

/* ===============================
   DESCRIPCIÓN (RESERVA + BOUNCE)
   Solo afecta a swatches de CARD
   =============================== */

   .vis-card-layout li.vis-variation-desc-wrap.vis-variation-desc-wrap{
    justify-content: right !important;    
  }

/* ===============================
   DESCRIPCIÓN (RESERVA + BOUNCE)
   Solo afecta a swatches de texto
   =============================== */

  
  /* Wrapper: SIEMPRE reserva espacio */
  .li.vis-swatch.vis-swatch-text .vis-variation-desc-wrap{
    min-height: 22px !important;        /* reserva fijo */
    height: 22px !important;            /* fuerza reserva */
    margin-bottom: 4px !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }
  
  /* Caja de texto */
  .vis-type-text li.vis-swatch.vis-swatch-text .vis-variation-desc{
    display: inline-block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #fff !important;
    background: #000 !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    transform-origin: center !important;
    min-height: 17px;
  }

  /* Cuando está vacío: oculto pero SIGUE ocupando espacio */
  .vis-type-text li.vis-swatch.vis-swatch-text .vis-variation-desc:empty{
    visibility: hidden !important;      /* 👈 esta es la clave */
  }
  
  /* Bounce SOLO cuando hay texto */
  .vis-type-text li.vis-swatch.vis-swatch-text .vis-variation-desc:not(:empty){
    animation: visBounce 1.8s ease-in-out infinite !important;
  }
  
  /* Keyframes bounce */
  @keyframes visBounce{
    0%, 100% { transform: scale(1); }
    30%      { transform: scale(1.15); }
    50%      { transform: scale(0.95); }
    70%      { transform: scale(1.08); }
  }

  /* ===============================
   MOBILE FIX · COLOR SWATCHES
   Estructura real del plugin
   =============================== */
@media (max-width: 768px){

  /* El contenedor sigue siendo flex */
  .vis-swatches.vis-type-image{
    row-gap: 18px;          /* separación entre filas */
  }

  /* Cada swatch se comporta como bloque vertical */
  .vis-swatches.vis-type-image .vis-swatch{
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 140px;      /* 🔑 reserva espacio suficiente */
  }

  /* Label (nombre del color) */
  .vis-swatches.vis-type-image .vis-label{
    order: 2;               /* debajo de la imagen */
    margin-top: 6px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;    /* permite salto de línea */
  }

  /* Imagen */
  .vis-swatches.vis-type-image .vis-swatch-img{
    order: 1;
    margin: 0;
  }
}