/**
 * Deko — reducir parpadeo visual (hover / mensajes / QV).
 */

/* Mensajes de cantidad/stock: no empujan botones al aparecer */
.dkh-stock-alert,
.dkh-cart-line-alert {
  box-sizing: border-box;
  min-height: 0;
}

.dkh-atc-block,
.dkh-qty-stepper,
.ce-product-quantity,
.js-product-add-to-cart .product-quantity,
.product-add-to-cart {
  position: relative;
}

/* Preferir alerta sobre el bloque sin desplazar el CTA */
.dkh-atc-block > .dkh-stock-alert,
.product-add-to-cart > .dkh-stock-alert,
.dkh-qty-stepper + .dkh-stock-alert {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

/* Hover: evitar transition:all que reinicia y titila */
.elementor-product-miniature .elementor-button,
.product-miniature .elementor-button,
.dkh-atc-unified-btn,
.dkh-qty-btn,
.elementor-atc .elementor-button {
  transition-property: background-color, color, border-color, box-shadow, opacity !important;
  transition-duration: 0.15s !important;
}

/* No re-animar entrada en widgets ya visibles tras un refresh residual */
.elementor-element.elementor-motion-effects-element:not(.elementor-invisible),
.elementor-invisible.animated {
  animation-fill-mode: both;
}

/* QV abierto: el mensaje no debe quedar bajo un overlay fantasma */
#ce-product-quick-view.dialog-visible,
#ce-product-quick-view[style*="display: block"] {
  pointer-events: auto;
}

/* Si el body quedó con prevent-scroll pero el QV no está visible, el CSS de CE
   bloquea scroll — nuestro JS limpia la clase; esto es red de seguridad blanda */
body.dialog-lightbox-prevent-scroll:not(:has(#ce-product-quick-view[style*="display: block"])):not(:has(#ce-product-quick-view.dialog-visible)) {
  overflow: auto !important;
}
