#happymami-product-customization.hmw-inline {
  position: relative;
  margin-bottom: 1.25rem;
}

body.happymami-inline-wizard-product #happymami-product-customization.hmw-inline {
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  min-height: 0 !important;
  height: auto !important;
}

/* Ficha producto: reutiliza look embed sin layout de sidebar del shortcode */
#happymami-product-customization.happymami-wizard-embed--product {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 0.9rem;
}

body.happymami-inline-wizard-product .elementor-add-to-cart:has(#happymami-product-customization.hmw-inline--booting),
body.happymami-inline-wizard-product form.cart:has(#happymami-product-customization.hmw-inline--booting) {
  position: relative;
  min-height: clamp(280px, 48vh, 480px);
}

#happymami-product-customization.happymami-wizard-embed--product.hmw-inline--booting {
  position: static !important;
  min-height: 0;
}

#happymami-product-customization.happymami-wizard-embed--product.hmw-inline--booting .hmw-inline-wizard-wrap,
#happymami-product-customization.happymami-wizard-embed--product.hmw-inline--booting .hmw-inline-configurator-wrap,
#happymami-product-customization.happymami-wizard-embed--product.hmw-inline--booting .hmw-inline-celebration-wrap,
#happymami-product-customization.happymami-wizard-embed--product.hmw-inline--booting .hmw-inline-summary-wrap {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.happymami-inline-wizard-product form.cart:has(#happymami-product-customization.hmw-inline--booting) table.variations,
body.happymami-inline-wizard-product form.cart:has(#happymami-product-customization.hmw-inline--booting) .woocommerce-variation,
body.happymami-inline-wizard-product form.cart:has(#happymami-product-customization.hmw-inline--booting) .ppcp-messages {
  display: none !important;
}

#happymami-product-customization.happymami-wizard-embed--product.hmw-inline--booting .hmw-inline-boot {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2rem 1.25rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(119, 50, 50, 0.08);
  text-align: center;
}

#happymami-product-customization .hmw-inline-configurator-wrap.is-visible {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#happymami-product-customization .hmw-inline-summary-wrap--product {
  order: 2;
  margin-top: 16px;
  margin-bottom: 0;
}

body.happymami-inline-wizard-product #happymami-product-customization .hmw-inline-summary-wrap .hmw-embed-gallery-wrap {
  display: none !important;
}

body.happymami-inline-wizard-product .hmw-summary-card[data-redesign-mode="new"]:not(#happymami-product-customization .hmw-summary-card) {
  display: none !important;
}

#happymami-product-customization .hmw-summary-head__title {
  font-weight: 700;
}

#happymami-product-customization .hmw-summary-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 152, 152, 0.18);
  color: #773232;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease;
}

#happymami-product-customization .hmw-summary-collapse:hover {
  transform: scale(1.06);
  background: rgba(244, 152, 152, 0.28);
}

#happymami-product-customization .hmw-summary-collapse__icon {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

#happymami-product-customization .hmw-summary-card.is-panel-collapsed .hmw-summary-collapse__icon {
  transform: rotate(-135deg) translateY(1px);
}

#happymami-product-customization .hmw-summary-body {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  opacity: 1;
  transition:
    grid-template-rows 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

#happymami-product-customization .hmw-summary-body-clip {
  min-height: 0;
  overflow: hidden;
}

#happymami-product-customization .hmw-summary-card.is-panel-collapsed .hmw-summary-body {
  display: none !important;
  grid-template-rows: 0fr;
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 0;
  pointer-events: none;
}

#happymami-product-customization .hmw-summary-card.is-panel-collapsed .hmw-summary-body-clip {
  padding: 0 !important;
  margin: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

#happymami-product-customization .hmw-summary-card.is-panel-collapsed .hmw-summary-head {
  margin-bottom: 0;
}

#happymami-product-customization .hmw-summary-card.is-panel-collapsed {
  padding-bottom: 10px;
}

#happymami-product-customization .hmw-summary-card.is-expanded:not(.is-panel-collapsed) .hmw-summary-body {
  display: grid !important;
  grid-template-rows: 1fr;
  height: auto !important;
  max-height: none !important;
  opacity: 1;
  pointer-events: auto;
}

#happymami-product-customization .hmw-summary-row[data-step-id] {
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  border-radius: 8px;
}

#happymami-product-customization .hmw-summary-row[data-step-id]:hover {
  transform: translateY(-1px);
  background: rgba(244, 152, 152, 0.08);
}

#happymami-product-customization .hmw-inline-wizard-wrap {
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

#happymami-product-customization .hmw-inline-summary-wrap,
#happymami-product-customization .hmw-inline-configurator-wrap {
  display: none !important;
}

#happymami-product-customization .hmw-inline-summary-wrap.is-visible,
#happymami-product-customization .hmw-inline-configurator-wrap.is-visible {
  display: block !important;
}

#happymami-product-customization.hmw-inline--wizard .hmw-inline-summary-wrap,
#happymami-product-customization.hmw-inline--wizard .hmw-inline-configurator-wrap {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

#happymami-product-customization.hmw-inline--configurator .hmw-inline-summary-wrap.is-visible {
  margin-top: 16px;
  margin-bottom: 0;
}

#happymami-product-customization.hmw-inline--leaving-wizard .hmw-inline-wizard-wrap {
  opacity: 0;
  transform: translateY(-6px) scale(0.996);
  pointer-events: none;
}

#happymami-product-customization.hmw-inline--leaving-configurator .hmw-inline-summary-wrap.is-visible,
#happymami-product-customization.hmw-inline--leaving-configurator .hmw-inline-configurator-wrap.is-visible {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

#happymami-product-customization #happymami-wizard.hmw-inline-wizard {
  margin: 0;
}

#happymami-product-customization .hmw-summary-btn--redesign {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#happymami-product-customization .hmw-summary-btn--redesign:hover {
  transform: translateY(-1px);
}

#happymami-product-customization .hmw-summary-btn--redesign.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

/* Micro-animación al montar bundles en ficha producto */
@keyframes hmw-inline-soft-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body.happymami-inline-wizard-product .hmw-embed-mount-in,
.happymami-wizard-embed--product .hmw-embed-mount-in {
  animation: hmw-inline-soft-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform: none !important;
}

.happymami-wizard-embed--product #happymami-product-selector .variant-list > li.hmw-embed-mount-in:nth-child(1) {
  animation-delay: 0.02s;
}

.happymami-wizard-embed--product #happymami-product-selector .variant-list > li.hmw-embed-mount-in:nth-child(2) {
  animation-delay: 0.05s;
}

.happymami-wizard-embed--product #happymami-product-selector .variant-list > li.hmw-embed-mount-in:nth-child(3) {
  animation-delay: 0.08s;
}

.happymami-wizard-embed--product #happymami-product-selector .variant-list > li.hmw-embed-mount-in:nth-child(4) {
  animation-delay: 0.11s;
}

.happymami-wizard-embed--product #happymami-product-selector .variant-list > li.hmw-embed-mount-in:nth-child(n + 5) {
  animation-delay: 0.14s;
}

/* Footer fijo blanco en ficha producto (solo móvil) */
@media (max-width: 768px) {
  body.happymami-inline-wizard-product .sidebar-footer.hm-inline-floating-footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 2147483647 !important;
    padding: 12px 14px calc(env(safe-area-inset-bottom) + 12px) !important;
    background: #ffffff !important;
    box-shadow: 0 -4px 24px rgba(119, 50, 50, 0.1) !important;
    border-top: 1px solid rgba(244, 152, 152, 0.22) !important;
  }

  body.happymami-inline-wizard-product #happymami-product-customization.hmw-inline {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    transition: min-height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.happymami-inline-wizard-product #happymami-product-customization .hmw-inline-summary-wrap--product,
  body.happymami-inline-wizard-product #happymami-product-customization.hmw-inline--configurator .hmw-inline-summary-wrap.is-visible {
    margin-top: 16px;
    margin-bottom: 0;
  }

  body.happymami-inline-wizard-product #happymami-product-customization .hmw-summary-card.is-panel-collapsed {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  body.happymami-inline-wizard-product #happymami-product-customization .hmw-summary-card.is-panel-collapsed .hmw-summary-head {
    margin-bottom: 0;
  }

  body.happymami-inline-wizard-product #happymami-product-customization .hmw-summary-card.is-panel-collapsed .hmw-summary-body,
  body.happymami-inline-wizard-product #happymami-product-customization .hmw-summary-card.is-panel-collapsed .hmw-summary-body-clip {
    padding: 0;
    margin: 0;
  }

  body.happymami-inline-wizard-product #happymami-product-customization + .sidebar-footer,
  body.happymami-inline-wizard-product form.cart > .sidebar-footer,
  body.happymami-inline-wizard-product form.cart + .sidebar-footer {
    margin-top: 0;
    padding-top: 0 !important;
  }
}

body.happymami-inline-wizard-product #happymami-product-customization {
  transition: min-height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

body.happymami-inline-wizard-product #happymami-product-customization.hmw-inline--height-lock .hmw-inline-configurator-wrap.is-visible {
  overflow: hidden;
}

body.happymami-inline-wizard-product #happymami-product-customization + .sidebar-footer,
body.happymami-inline-wizard-product form.cart > .sidebar-footer,
body.happymami-inline-wizard-product form.cart + .sidebar-footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  width: 100%;
  margin-top: 12px;
  padding: 16px 0 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

body.happymami-inline-wizard-product #happymami-product-customization.hmw-inline--wizard + .sidebar-footer,
body.happymami-inline-wizard-product #happymami-product-customization.hmw-inline--celebration + .sidebar-footer,
body.happymami-inline-wizard-product #happymami-product-customization.hmw-inline--booting + .sidebar-footer,
body.happymami-inline-wizard-product:has(#happymami-product-customization.hmw-inline--wizard) form.cart + .sidebar-footer,
body.happymami-inline-wizard-product:has(#happymami-product-customization.hmw-inline--celebration) form.cart + .sidebar-footer,
body.happymami-inline-wizard-product:has(#happymami-product-customization.hmw-inline--booting) form.cart + .sidebar-footer {
  display: none !important;
}

body.happymami-inline-wizard-product #happymami-product-customization + .sidebar-footer #happymami-add-to-cart,
body.happymami-inline-wizard-product form.cart > .sidebar-footer #happymami-add-to-cart,
body.happymami-inline-wizard-product form.cart + .sidebar-footer #happymami-add-to-cart {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
}

/* ATC nativo: oculto solo mientras el wizard de medidas no está hecho */
form.cart:has(#happymami-product-customization.hmw-inline--wizard) .e-atc-qty-button-holder,
form.cart:has(#happymami-product-customization.hmw-inline--booting) .e-atc-qty-button-holder,
form.cart:has(#happymami-product-customization.hmw-inline--celebration) .e-atc-qty-button-holder,
form.cart:has(#happymami-product-customization.hmw-inline--wizard) .single_add_to_cart_button,
form.cart:has(#happymami-product-customization.hmw-inline--booting) .single_add_to_cart_button,
form.cart:has(#happymami-product-customization.hmw-inline--celebration) .single_add_to_cart_button,
#happymami-product-customization.hmw-inline--wizard .e-atc-qty-button-holder,
#happymami-product-customization.hmw-inline--booting .e-atc-qty-button-holder,
#happymami-product-customization.hmw-inline--celebration .e-atc-qty-button-holder,
#happymami-product-customization.hmw-inline--wizard ~ .e-atc-qty-button-holder,
#happymami-product-customization.hmw-inline--booting ~ .e-atc-qty-button-holder,
#happymami-product-customization.hmw-inline--celebration ~ .e-atc-qty-button-holder {
  display: none !important;
}

/* ATC nativo: visible cuando el wizard ya está hecho (configurador) */
body.happymami-type-pack form.cart:has(#happymami-product-customization.hmw-inline--configurator) .woocommerce-variation-add-to-cart,
body.happymami-type-pack form.cart:has(#happymami-product-customization.hmw-inline--configurator) .woocommerce-variation-add-to-cart-enabled,
body.happymami-type-pack form.cart:has(#happymami-product-customization.hmw-inline--configurator) .woocommerce-variation-add-to-cart-disabled,
body.happymami-type-pack form.cart:has(#happymami-product-customization.hmw-inline--configurator) .e-atc-qty-button-holder,
form.cart:has(.happymami-color-attributes):has(#happymami-product-customization.hmw-inline--configurator) .e-atc-qty-button-holder,
body.happymami-type-pack #happymami-product-customization.hmw-inline--configurator .e-atc-qty-button-holder,
body.happymami-type-pack #happymami-product-customization.hmw-inline--configurator ~ .e-atc-qty-button-holder,
body.happymami-type-pack #happymami-product-customization.happymami-wizard-embed.hmw-inline--configurator .e-atc-qty-button-holder,
form.cart:has(#happymami-product-customization.hmw-inline--configurator) .e-atc-qty-button-holder,
#happymami-product-customization.hmw-inline--configurator ~ .e-atc-qty-button-holder {
  display: flex !important;
  flex-wrap: wrap;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100%;
  margin-top: 16px;
}

body.happymami-type-pack form.cart:has(#happymami-product-customization.hmw-inline--configurator) .single_add_to_cart_button,
form.cart:has(.happymami-color-attributes):has(#happymami-product-customization.hmw-inline--configurator) .single_add_to_cart_button,
body.happymami-type-pack form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button,
body.happymami-type-pack #happymami-product-customization.hmw-inline--configurator .single_add_to_cart_button,
body.happymami-type-pack #happymami-product-customization.hmw-inline--configurator ~ .e-atc-qty-button-holder .single_add_to_cart_button,
body.happymami-type-pack #happymami-product-customization.happymami-wizard-embed.hmw-inline--configurator .single_add_to_cart_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
}

form.cart .quantity,
form.variations_form .quantity,
.e-atc-qty-button-holder .quantity,
#happymami-product-customization .quantity,
#happymami-product-customization ~ .e-atc-qty-button-holder .quantity {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .happymami-sidebar-ui h3,
body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .happymami-sidebar-ui h4,
body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .happymami-sidebar-ui .image-preview {
  display: none !important;
}

body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .happymami-sidebar-ui {
  margin-top: 0;
}

body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .set2-second-toggle {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6b3c3c;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.2rem 0;
  margin: 0.25rem 0 0.3rem;
  cursor: pointer;
  box-shadow: none;
  outline: 0;
}

body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .set2-second-options {
  overflow: hidden;
}

body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .variant-list li.hm-selector-open > .hm-selector-panel,
body.happymami-inline-wizard-product #happymami-product-selector.hm-bottle-selector-style-new_happymami .variant-list li.active > .hm-selector-panel {
  animation: hmw-inline-panel-reveal 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hmw-inline-panel-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body.happymami-inline-wizard-product .sidebar-row.error .happymami-product-color-container .color-container,
body.happymami-inline-wizard-product .sidebar-row.error .color-container {
  border: 2px solid #FF4363;
  border-radius: 10px;
  padding: 10px;
}

@media (prefers-reduced-motion: reduce) {
  #happymami-product-customization .hmw-inline-wizard-wrap,
  #happymami-product-customization .hmw-inline-summary-wrap,
  #happymami-product-customization .hmw-inline-configurator-wrap,
  #happymami-product-customization .hmw-summary-card,
  #happymami-product-customization .hmw-summary-body,
  #happymami-product-customization .hmw-summary-collapse,
  #happymami-product-customization .hmw-summary-row[data-step-id] {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
