/* ==========================================================================
   Mirage Furniture — Floating WhatsApp button (.fab)
   A persistent, thumb-reachable enquiry shortcut. Fixed bottom-right, kept
   subtle and on-brand (dark disc, white glyph), above all content.
   ========================================================================== */

.fab {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--color-text-primary);
  color: var(--color-bg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.fab:hover {
  transform: translateY(-2px) scale(1.04);
}
.fab svg {
  width: 1.7rem;
  height: 1.7rem;
  fill: currentColor;
}

/* --- Sticky mobile CTA bar -------------------------------------------------
   A slim full-width "Request a Quote" bar pinned to the bottom on small
   screens, shown once the visitor scrolls past the hero (body.past-hero,
   toggled by header.js). Desktop always has the header CTA, so it is
   mobile-only. */
.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 44;                  /* just under the FAB */
  display: none;
  padding: 0.6rem var(--nav-pad-x);
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--color-bg) 94%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid var(--color-hairline);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-cta__btn {
  display: block;
  /* Leave room for the WhatsApp disc to its right. */
  margin-right: 4.25rem;
  padding: 0.85rem 1rem;
  text-align: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--text-xs);
  color: #ffffff;
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
}

@media (max-width: 640px) {
  .mobile-cta {
    display: block;
  }
  body.past-hero .mobile-cta {
    transform: translateY(0);
  }
  /* Lift the WhatsApp disc so it rides above the bar once it is shown. */
  body.past-hero .fab {
    bottom: calc(3.6rem + env(safe-area-inset-bottom, 0px) + 0.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fab {
    transition: none;
  }
  .fab:hover {
    transform: none;
  }
  .mobile-cta {
    transition: none;
  }
}
