/**
 * YEEZER floating assist — mid-right contact stack + separate bottom-right top.
 * Distinct from prior white fused rail; no left spine.
 * Hidden below 1024px; body.has-mz-float reserves --float-safe.
 */

.mz-float {
  --mz-float-size: 46px;
  --mz-float-gap: 8px;
  --mz-float-ink: #fff;
  --mz-float-face: var(--brand-bronze, #8f5f42);
  --mz-float-face-hover: #7a5038;
  --mz-float-face-2: var(--deep-elevated, #1a2128);
  --mz-float-accent: var(--brand-bronze, #8f5f42);
  --mz-float-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mz-float-right: max(1rem, env(safe-area-inset-right, 0px));

  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
  font-family: var(--font, "Plus Jakarta Sans", system-ui, sans-serif);
}

@media (min-width: 1024px) {
  body.has-mz-float {
    --float-safe: 4.5rem;
  }
}

.mz-float-stack,
.mz-float-top-wrap {
  pointer-events: auto;
}

/* Contact stack: vertical middle, right edge */
.mz-float-stack {
  position: absolute;
  top: 50%;
  right: var(--mz-float-right);
  display: flex;
  flex-direction: column;
  gap: var(--mz-float-gap);
  width: var(--mz-float-size);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transform: translateY(-50%);
}

.mz-float-stack::before {
  content: none;
  display: none;
}

.mz-float-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mz-float-item + .mz-float-item::before {
  display: none;
}

.mz-float-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mz-float-size);
  height: var(--mz-float-size);
  margin: 0;
  padding: 0;
  border: 1px solid var(--mz-float-face);
  border-radius: var(--radius, 4px);
  background: var(--mz-float-face);
  color: var(--mz-float-ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px rgb(143 95 66 / 28%);
  transition:
    color 0.2s var(--mz-float-ease),
    background 0.2s var(--mz-float-ease),
    border-color 0.2s var(--mz-float-ease),
    box-shadow 0.2s var(--mz-float-ease);
}

.mz-float-item:first-child .mz-float-btn,
.mz-float-item:last-child .mz-float-btn,
.mz-float-item:only-child .mz-float-btn {
  border-radius: var(--radius, 4px);
}

.mz-float-btn:hover,
.mz-float-btn:focus-visible,
.mz-float-item:focus-within .mz-float-btn {
  color: #fff;
  background: var(--mz-float-face-hover);
  border-color: var(--mz-float-face-hover);
  outline: none;
  box-shadow: 0 12px 28px rgb(143 95 66 / 40%);
}

.mz-float-btn svg {
  display: block;
  flex-shrink: 0;
}

.mz-float-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0b1219;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 18px;
  text-align: center;
  box-shadow: none;
}

.mz-float-cart-count[hidden] {
  display: none !important;
}

.mz-float-pop {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  width: min(280px, calc(100vw - 5.5rem));
  padding: 16px 18px 18px;
  background: var(--mz-float-face-2);
  border: 1px solid rgb(243 241 236 / 10%);
  border-radius: var(--radius, 4px);
  box-shadow: 0 18px 40px rgb(11 18 25 / 38%);
  color: var(--mz-float-ink);
  opacity: 0;
  visibility: hidden;
  transform: translate(8px, -50%);
  transition:
    opacity 0.2s var(--mz-float-ease),
    transform 0.2s var(--mz-float-ease),
    visibility 0.2s;
  pointer-events: none;
  z-index: 2;
}

.mz-float-pop::before {
  display: none;
}

.mz-float-pop::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  width: 10px;
  height: 10px;
  background: var(--mz-float-face-2);
  border-right: 1px solid rgb(243 241 236 / 10%);
  border-top: 1px solid rgb(243 241 236 / 10%);
  transform: translateY(-50%) rotate(45deg);
  z-index: 0;
  pointer-events: none;
  box-shadow: none;
  inset: auto;
  border-radius: 0;
}

.mz-float-pop > * {
  position: relative;
  z-index: 1;
}

.mz-float-item:hover .mz-float-pop,
.mz-float-item:focus-within .mz-float-pop {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  pointer-events: auto;
}

.mz-float-pop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--mz-float-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mz-float-pop-head svg {
  flex-shrink: 0;
  color: var(--mz-float-accent);
}

.mz-float-pop-value {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 650;
  word-break: break-word;
  color: var(--mz-float-ink);
}

.mz-float-pop-value a {
  color: inherit;
  text-decoration: none;
}

.mz-float-pop-value a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.mz-float-pop-note {
  margin: 0 0 14px;
  color: rgb(243 241 236 / 62%);
  font-size: 0.84rem;
  line-height: 1.5;
  font-weight: 500;
}

.mz-float-pop-qr {
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
  padding: 10px;
  background: #fff;
  border-radius: var(--radius, 4px);
}

.mz-float-pop-qr img {
  width: 132px;
  height: 132px;
  object-fit: contain;
}

.mz-float-pop-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  width: 100%;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius, 4px);
  background: var(--mz-float-accent);
  color: #fff !important;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.16s ease, filter 0.16s ease;
}

.mz-float-pop-cta:hover,
.mz-float-pop-cta:focus-visible {
  background: #a56f4d;
  outline: none;
  filter: brightness(1.05);
}

/* Back to top: bottom-right only — not tied to the CS stack */
.mz-float-top-wrap {
  position: absolute;
  right: var(--mz-float-right);
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  width: var(--mz-float-size);
}

.mz-float-top {
  width: var(--mz-float-size);
  height: var(--mz-float-size);
  border-radius: var(--radius, 4px) !important;
  background: #fff !important;
  border: 1px solid var(--line-strong, rgb(12 17 23 / 14%)) !important;
  color: var(--primary, #0b1219) !important;
  box-shadow: 0 8px 20px rgb(11 18 25 / 12%);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.mz-float-top:hover,
.mz-float-top:focus-visible {
  color: #fff !important;
  background: var(--primary, #0b1219) !important;
  border-color: var(--primary, #0b1219) !important;
}

.mz-float-top.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

@media (max-width: 1023px) {
  .mz-float {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mz-float-btn,
  .mz-float-pop,
  .mz-float-top,
  .mz-float-pop-cta {
    transition: none;
  }

}
