.vis-swatches{
  display:flex;
  gap:15px;
  flex-wrap:wrap;
  margin:2px;
  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:120px;
  height:120px;
  object-fit:cover;
  border-radius:50%;
  border:0;
  outline: 1px solid #CCC;
  outline-offset: 4px;  
}

.vis-type-image .vis-label{
  display:block;
  font-size:16px;
  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;
  text-align: left;
}

.vis-type-text .is-selected .vis-pill{
  border-color:#000;
}
.vis-pill span{
  font-weight: 300;
  font-size: 16px;
}

/* 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: 3.5px 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;
    background: #000;
    padding: 3px 6px !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    transform-origin: center !important;
    min-height: 17px;
    width: max-content;
  }

  /* 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 */
  }
  ul.vis-swatches.vis-type-text{
    gap:0px;
    margin:5px 0px;
  }
  li.vis-swatch.vis-swatch-text{
    margin:2px 0px;
  }
  
  /* 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;
  }
}

/* =========================================
   BULLET STYLE FINAL
========================================= */

/* BASE BULLET */
.vis-bullet{
  width:22px;
  height:22px;
  border-radius:50%;
  border:2px solid #959595; /* gris / rosa deseleccionado */
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

/* PUNTO INTERNO (oculto por defecto) */
.vis-bullet::after{
  content:"";
  width:10px;
  height:10px;
  border-radius:50%;
  background:#959595;
  opacity:0;
  transition:.2s;
}

/* ESTADO SELECCIONADO */
.vis-swatch.is-selected .vis-bullet{

  border:2px solid #959595; /* color activo */

  /* 🔥 crea el anillo blanco interior */
  box-shadow:
      inset 0 0 0 4px #fff;

}

/* muestra punto */
.vis-swatch.is-selected .vis-bullet::after{
  opacity:1;
  background:rgb(126, 124, 124);
}

.vis-swatch.is-selected .vis-bullet::after{
  opacity:1;
  transform:scale(1);
}

.vis-bullet::after{
  transform:scale(.5);
  transition:.25s cubic-bezier(.2,.8,.2,1);
}



/* ===============================
   CARD LAYOUT VERTICAL FIX
=============================== */

.vis-swatches.vis-card-layout li.vis-swatch{

  display:flex !important;
  align-items:center !important;   /* ⭐ CENTRADO VERTICAL REAL */
  justify-content:space-between;
  
}

/* bloque izquierdo (bullet + texto) */
.vis-swatches.vis-card-layout li.vis-swatch .vis-pill{
  display:flex;
  align-items:center;
}

/* bloque info derecha */
.vis-swatches.vis-card-layout li.vis-swatch .variation-info{
  display:flex;
  flex-direction:column;
  justify-content:center;   /* ⭐ centra precio respecto altura card */
}

/* si existe wrapper description no debe empujar layout */
.vis-swatches.vis-card-layout .vis-variation-desc-wrap{
  position:absolute;
}
.vis-swatches.vis-card-layout li.vis-swatch{
  position:relative;
}

.vis-swatches.vis-card-layout .vis-variation-desc-wrap{

  position:absolute;
  top:-8px;
  right:20px;
  z-index:20;
  pointer-events:none;

}

.no-variation-image .vis-badge-text{
  position:absolute;
  left:45px;
  top:50px;
  color:#000;
}
.vis-badge-text{
  position:absolute;
  left:90px;
  top:50px;
  color:#000;
}


.vis-swatches.vis-card-layout .vis-swatch{
  display:flex;
  flex-wrap:wrap;
}
.eb-low-stock{
  justify-content: center;
}
/* efecto vibración elegante */
@keyframes visBuzz{
  0%{ transform:translateX(0); }
  25%{ transform:translateX(-1px); }
  50%{ transform:translateX(1px); }
  75%{ transform:translateX(-1px); }
  100%{ transform:translateX(0); }
}
/* 3.0: attribute pills and full quantity visibility. */
.vis-configured .vis-option-button { display:flex; align-items:center; gap:12px; padding:12px 16px; border:2px solid #ccc; border-radius:10px; background:#fff; color:inherit; font:inherit; cursor:pointer; text-align:left; }
.vis-configured .is-selected .vis-option-button { border-color:#000; }
.vis-configured .vis-option-button:focus-visible { outline:3px solid #2271b1; outline-offset:3px; }
.vis-configured .is-disabled { opacity:.45; }
.vis-configured .vis-option-button:disabled { cursor:not-allowed; }
.vis-configured .vis-configured-image { width:60px; height:60px; object-fit:cover; border-radius:6px; }
.vis-configured .vis-option-content { display:flex; flex-direction:column; gap:4px; }
.vis-configured .vis-option-label { font-weight:600; }
.vis-configured .vis-option-message { font-size:.85em; }
.vis-configured .vis-option-badge { font-size:.8em; font-weight:700; }
.vis-configured .precio { display:flex; gap:8px; }
body.single-product.vis-hide-quantity-complete form.cart .quantity,
body.single-product.vis-hide-quantity-complete form.cart input.qty,
body.single-product.vis-hide-quantity-complete form.cart .bde-quantity-button,
body.single-product.vis-hide-quantity-complete form.cart .ins-cart-minus,
body.single-product.vis-hide-quantity-complete form.cart .ins-cart-plus { display:none !important; }

/* Each configured pill occupies a full row. */
ul.vis-swatches.vis-configured {
  width:100%;
  margin-left:0;
  margin-right:0;
  box-sizing:border-box;
  flex-direction:column;
  align-items:stretch;
}
ul.vis-swatches.vis-configured > li.vis-swatch {
  width:100%;
  max-width:none;
  box-sizing:border-box;
}
ul.vis-swatches.vis-configured > li.vis-swatch > .vis-option-button {
  width:100%;
  max-width:none;
  box-sizing:border-box;
}

/* 3.0.3: card layout for configured pills. */
.vis-swatches.vis-configured { gap:14px; }
.vis-swatches.vis-configured .vis-swatch { position:relative; }
.vis-swatches.vis-configured .vis-option-button {
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  min-height:80px;
  padding:14px 16px;
  text-align:left;
}
.vis-swatches.vis-configured .vis-bullet { order:0; }
.vis-swatches.vis-configured .vis-configured-image { order:1; flex-shrink:0; }
.vis-swatches.vis-configured .vis-option-content {
  order:2;
  flex:1 1 0%;
  min-width:0;
}
.vis-swatches.vis-configured .vis-option-label {
  font-size:clamp(16px, 2.2vw, 22px);
  font-weight:800;
  line-height:1.2;
  overflow-wrap:anywhere;
}
.vis-swatches.vis-configured .precio {
  order:3;
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:4px;
  margin:0 0 0 auto;
  line-height:1.15;
  white-space:nowrap;
}
.vis-swatches.vis-configured .precio .current {
  order:0;
  font-size:clamp(20px, 2.5vw, 26px);
  font-weight:800;
}
.vis-swatches.vis-configured .precio .regular {
  order:1;
  font-size:clamp(14px, 1.8vw, 18px);
  color:inherit;
  font-weight:400;
}
.vis-swatches.vis-configured .vis-option-message,
.vis-swatches.vis-configured .vis-option-badge {
  position:absolute;
  top:0;
  right:10px;
  transform:translateY(-50%);
  z-index:2;
  max-width:calc(100% - 20px);
  padding:3px 8px;
  border-radius:4px;
  background:#a1b493;
  color:#111;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  text-transform:uppercase;
  white-space:normal;
  overflow-wrap:anywhere;
}
/* Keep independently enabled messages and badges readable together. */
.vis-swatches.vis-configured .vis-option-message ~ .vis-option-badge {
  top:auto;
  bottom:0;
  transform:translateY(50%);
}
@media (max-width:380px) {
  .vis-swatches.vis-configured .vis-option-button { gap:8px; padding:14px 10px; }
  .vis-swatches.vis-configured .vis-configured-image { width:42px; height:42px; }
}
