/* APE 2026 — Sticky buy bar (BLUEPRINT §7.6). Glass, safe-area, sopra la BottomNav. */

/* La sticky ATC legacy di ape-product-enhancements (#ape-sticky-atc) è SOSTITUITA da
   questo componente (più completo: prezzo, varianti-aware, coordinato con BottomNav).
   Override SOLO presentazionale: il mu-plugin resta intatto e attivo su Partdo/prod. */
#ape-sticky-atc { display: none !important; }

.ape-stickybuy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
  display: flex; align-items: center; gap: var(--ape-s3);
  padding: var(--ape-s2) var(--ape-s4) calc(var(--ape-s2) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--ape-surface) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--ape-line);
  transform: translateY(0); transition: transform var(--ape-t-med) var(--ape-ease);
}
.ape-stickybuy[hidden] { display: none; }
.ape-stickybuy__price { font-weight: 700; font-size: 17px; white-space: nowrap; }
.ape-stickybuy__price del { color: var(--ape-ink-mute); font-weight: 450; font-size: 13px; }
.ape-stickybuy__price ins { text-decoration: none; color: var(--ape-ink); }
.ape-stickybuy__cta { flex: 1; }
/* su prodotto, la bottom-nav lascia il posto alla sticky bar */
body.has-stickybuy .ape-bottomnav { transform: translateY(110%); transition: transform var(--ape-t-med) var(--ape-ease); }
/* Revisione M2: bottom bar su TUTTI i viewport (la top bar copriva i contenuti).
   Lo spazio è RISERVATO via padding sul body → la barra non finisce mai sopra
   slider/tab/widget: il contenuto scorre sempre sopra di essa. */
body.has-stickybuy { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
@media (min-width: 1024px) {
  .ape-stickybuy { padding-inline: var(--ape-s8); justify-content: center; gap: var(--ape-s6); }
  .ape-stickybuy__cta { flex: 0 0 auto; min-width: 320px; }
}
