/* UBD disponibilidad manual — FIX conflicto con CSS de precio v1.2.0.2 */

/* La regla del tema aplica tamaño/color del precio a hijos directos de .current-price.
   Esta regla es deliberadamente más específica para neutralizarla sólo en nuestra píldora. */
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability,
html body#product .product-prices .current-price > span.ubd-product-availability,
body#product .product-prices .current-price span.ubd-product-availability {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;

  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:max-content!important;

  height:19px!important;
  min-height:19px!important;
  max-height:19px!important;

  margin:0 0 0 9px!important;
  padding:2px 7px!important;

  position:relative!important;
  inset:auto!important;
  top:0!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;

  border:0!important;
  border-radius:999px!important;
  box-sizing:border-box!important;

  background:#18333A!important;
  background-image:none!important;
  color:#FFFFFF!important;

  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;
  font-size:9px!important;
  font-weight:800!important;
  line-height:1!important;
  letter-spacing:.01em!important;
  text-transform:none!important;
  text-decoration:none!important;
  white-space:nowrap!important;

  box-shadow:0 1px 4px rgba(24,51,58,.16)!important;
  transform:none!important;
}

/* Todos los estados usan la identidad visual compacta. */
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--express,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--today,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--tomorrow,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--weekend,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--monday {
  background:#18333A!important;
  color:#FFFFFF!important;
}

/* Precio + etiqueta: bien alineados y con aire antes de estrellas/calificación. */
html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability,
body#product .product-prices .current-price.ubd-price-with-availability {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:wrap!important;
  column-gap:0!important;
  row-gap:5px!important;
  margin-bottom:18px!important;
  overflow:visible!important;
}

html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability > .price,
body#product .product-prices .current-price.ubd-price-with-availability > .price {
  margin:0!important;
}

/* Evita que reglas globales de producto agranden spans dentro del precio. */
html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability > .ubd-product-availability *,
body#product .product-prices .current-price.ubd-price-with-availability > .ubd-product-availability * {
  font-size:inherit!important;
  line-height:inherit!important;
  color:inherit!important;
}

/* Respaldo mientras JS todavía no la mueve junto al precio. */
body#product .tax-shipping-delivery-label .ubd-product-availability {
  display:inline-flex!important;
  width:auto!important;
  height:19px!important;
  min-height:19px!important;
  margin:4px 0!important;
  padding:2px 7px!important;
  border-radius:999px!important;
  background:#18333A!important;
  color:#fff!important;
  font-size:9px!important;
  font-weight:800!important;
  line-height:1!important;
}

/* iPhone / móvil */
@media (max-width:699px) {
  html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability,
  html body#product .product-prices .current-price > span.ubd-product-availability,
  body#product .product-prices .current-price span.ubd-product-availability {
    height:18px!important;
    min-height:18px!important;
    max-height:18px!important;
    margin-left:7px!important;
    padding:2px 6px!important;
    font-size:8px!important;
  }

  html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability,
  body#product .product-prices .current-price.ubd-price-with-availability {
    margin-bottom:16px!important;
  }
}


/* UBD v1.2.0.3 · MÁS AIRE ENTRE PRECIO/PÍLDORA Y CALIFICACIÓN */
html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability,
body#product .product-prices .current-price.ubd-price-with-availability {
  margin-bottom:30px!important;
}

/* Evita que la calificación suba visualmente hacia el bloque de precio */
body#product .product-comments,
body#product .product-comments-additional-info,
body#product .product-rating,
body#product .comments-note,
body#product .grade-stars,
body#product [class*="rating"] {
  scroll-margin-top:0;
}

@media (max-width:699px) {
  html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability,
  body#product .product-prices .current-price.ubd-price-with-availability {
    margin-bottom:34px!important;
  }
}


/* UBD v1.2.0.4 · SEPARACIÓN EXTRA GRANDE */
html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability,
body#product .product-prices .current-price.ubd-price-with-availability {
  margin-bottom:48px!important;
}

@media (max-width:699px) {
  html.ubd-product-ready body#product .product-prices .current-price.ubd-price-with-availability,
  body#product .product-prices .current-price.ubd-price-with-availability {
    margin-bottom:56px!important;
  }
}


/* UBD v1.2.0.5 · PÍLDORA MARCA ANIMADA
   Verde oscuro → naranja oscuro → verde oscuro */
@keyframes ubdAvailabilityBrandPulse {
  0%, 100% {
    background-color:#2F6B57;
    border-color:#2F6B57;
    box-shadow:0 2px 7px rgba(47,107,87,.22);
  }
  50% {
    background-color:#B85F2F;
    border-color:#B85F2F;
    box-shadow:0 2px 8px rgba(184,95,47,.24);
  }
}

html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability,
html body#product .product-prices .current-price > span.ubd-product-availability,
body#product .product-prices .current-price span.ubd-product-availability,
body#product .tax-shipping-delivery-label .ubd-product-availability {
  background:#2F6B57!important;
  background-image:none!important;
  border-color:#2F6B57!important;
  color:#FFFFFF!important;
  animation:ubdAvailabilityBrandPulse 3.8s ease-in-out infinite!important;
}

/* Conserva la misma identidad en todos los estados */
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--express,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--today,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--tomorrow,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--weekend,
html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability--monday {
  color:#FFFFFF!important;
}

/* Accesibilidad: si el sistema pide reducir movimiento, queda verde oscuro fijo */
@media (prefers-reduced-motion: reduce) {
  html.ubd-product-ready body#product .product-prices .current-price > span.ubd-product-availability,
  html body#product .product-prices .current-price > span.ubd-product-availability,
  body#product .product-prices .current-price span.ubd-product-availability,
  body#product .tax-shipping-delivery-label .ubd-product-availability {
    animation:none!important;
    background:#2F6B57!important;
    border-color:#2F6B57!important;
  }
}
