/* ============================================================
   Shared stylesheet for homepage + non-LUBA pages
   Covers: destockage banner, toast, empty cart drawer,
   suppression of the Klaviyo email-signup popup, mobile menu,
   dropdown menu fixes, scroll-perf hardening.
   ============================================================ */

/* --- Scroll perf: disable will-change on the body and add containment.
       Fixes micro-freezes from heavy on-scroll repaints. --- */
html { scroll-behavior: auto; }
body {
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
}
/* Reduce paint during scroll: throttle expensive backdrop-filter on hidden bits */
[hidden] { content-visibility: hidden; }
/* Pause heavy animations off-screen */
@media (prefers-reduced-motion: no-preference) {
  .reveal, [data-sequence], split-lines {
    will-change: auto;
  }
}
/* Mark frequently-redrawn fixed regions as their own layer to avoid full-document repaint */
.redesign-destockage,
.rd-cart-drawer,
.rd-mobile-menu,
.rd-toast-stack,
product-quick-add {
  contain: layout paint style;
  transform: translateZ(0);
}

/* --- Kill the Shopify native drawers (they trap touch events on mobile
       even when invisible, breaking scroll). We use our own drawer. --- */
cart-drawer,
search-drawer,
#cart-drawer,
#search-drawer,
div[id$="__cart-drawer"] cart-drawer,
div[id$="__search-drawer"] search-drawer { display: none !important; }
/* Hide native mobile nav drawer (we render our own) */
navigation-drawer,
#header-sidebar-menu,
div[id$="__header"] navigation-drawer { display: none !important; }
html, body { overscroll-behavior: auto; }
body:not(.rd-cart-open):not(.rd-mm-open) { overflow: auto !important; }

/* --- Hide the Klaviyo popup everywhere --- */
[class*="klaviyo-form-"],
[class*="klaviyo-modal"],
[class*="klaviyo-popup"],
div[class*="needsclick"][class*="kl-private-reset-css-"],
iframe[src*="klaviyo.com"],
.klaviyo-outer-wrapper,
.kl-modal,
#klaviyo-form-VJdFhU,
div[data-klaviyo-form],
.klaviyo-close-form,
.klaviyo-form-version-cid-1 { display: none !important; visibility: hidden !important; }
html.klaviyo-form-opened,
body.klaviyo-form-opened,
html.kl-open,
body.kl-open { overflow: auto !important; }

/* --- Destockage banner --- */
.redesign-destockage {
  background: #0b0b0b;
  color: #fff;
  text-align: center;
  padding: 9px 14px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  position: relative;
  z-index: 50;
  line-height: 1.35;
}
.redesign-destockage span { display: inline-flex; align-items: center; gap: 6px; }
.redesign-destockage .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; display: inline-block;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7);
  animation: rd-pulse 1.6s infinite;
}
@keyframes rd-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
  70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Hide original Mammotion announcement bar on all shared pages */
#shopify-section-sections--25770480959777__announcement-bar { display: none !important; }

/* ------ Dropdown / mega-menu fix: ensure they actually display when open ------ */
details.disclosure-details > .dropdown-menu,
details.disclosure-details > .mega-menu {
  display: none;
}
details.disclosure-details[open] > .dropdown-menu,
details.disclosure-details[open] > .mega-menu {
  display: block;
}
details.disclosure-details > summary {
  list-style: none;
  cursor: pointer;
}
details.disclosure-details > summary::-webkit-details-marker { display: none; }
details.disclosure-details[open] > summary .icon-chevron-bottom {
  transform: rotate(180deg);
  transition: transform .2s ease;
}
/* Position the dropdown panel below the trigger */
details.disclosure-details {
  position: relative;
}
details.disclosure-details > .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 240px;
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  padding: 8px;
  margin-top: 8px;
}
details.disclosure-details > .dropdown-menu .dropdown-menu__item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #111;
  text-decoration: none;
  font-size: .95rem;
  line-height: 1.3;
}
details.disclosure-details > .dropdown-menu .dropdown-menu__item:hover {
  background: #f3f4f6;
}

/* ------ Toast stack ------ */
.rd-toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(520px, calc(100vw - 24px));
}
.rd-toast {
  pointer-events: auto;
  background: #fff5f5;
  border: 1px solid #f8c9cd;
  color: #c0142b;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .14s ease-out, opacity .14s ease-out;
}
.rd-toast.is-visible { transform: translateY(0); opacity: 1; }
.rd-toast .rd-toast-icon {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  background: #c0142b;
  color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}
.rd-toast .rd-toast-title { font-weight: 700; margin-right: 4px; }
.rd-toast .rd-toast-close {
  margin-left: auto;
  appearance: none; border: 0; background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
}

/* ------ Mobile menu ------ */
.rd-mobile-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9996;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.rd-mobile-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(360px, 92vw);
  background: #fff;
  z-index: 9997;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
}
body.rd-mm-open .rd-mobile-backdrop { opacity: 1; pointer-events: auto; }
body.rd-mm-open .rd-mobile-menu { transform: translateX(0); }
body.rd-mm-open { overflow: hidden; }

.rd-mm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eef0f2;
}
.rd-mm-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  letter-spacing: .2px;
}
.rd-mm-close {
  appearance: none; border: 0; background: transparent;
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #111;
}
.rd-mm-close:hover { background: #f2f4f7; }

.rd-mm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 16px 8px;
  background: #f6f7f9;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  padding: 10px 12px;
}
.rd-mm-search svg { color: #6b7280; flex: 0 0 auto; }
.rd-mm-search input {
  flex: 1 1 auto;
  appearance: none;
  border: 0;
  background: transparent;
  font-size: .95rem;
  outline: none;
  color: #111;
}
.rd-mm-search button {
  appearance: none; border: 0;
  background: #0b0b0b;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.rd-mm-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 12px 24px;
}
.rd-mm-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rd-mm-nav li > a,
.rd-mm-nav .rd-mm-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
}
.rd-mm-nav li > a:hover,
.rd-mm-nav .rd-mm-toggle:hover { background: #f2f4f7; }
.rd-mm-nav .rd-mm-toggle svg { transition: transform .2s ease; }
.rd-mm-nav .rd-mm-toggle.is-open svg { transform: rotate(180deg); }
.rd-mm-sub {
  display: none;
  padding-left: 8px;
  margin-bottom: 4px;
}
.rd-mm-sub.is-open { display: block; }
.rd-mm-sub a {
  display: block;
  padding: 11px 14px;
  font-size: .92rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  border-radius: 8px;
}
.rd-mm-sub a:hover { background: #f2f4f7; color: #111; }
.rd-mm-cta {
  margin-top: 14px;
  background: linear-gradient(90deg, #e11d48 0%, #b91c1c 100%) !important;
  color: #fff !important;
  font-weight: 800 !important;
  text-align: center !important;
  justify-content: center !important;
}
.rd-mm-cta:hover { color: #fff !important; }

/* ------ Cart drawer (empty / upsell variant) ------ */
.rd-cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.48);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.rd-cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.18);
}
body.rd-cart-open .rd-cart-backdrop { opacity: 1; pointer-events: auto; }
body.rd-cart-open .rd-cart-drawer { transform: translateX(0); }
body.rd-cart-open { overflow: hidden; }

.rd-cart-timer {
  background: #0b0b0b;
  color: #fff;
  padding: 11px 14px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.rd-cart-timer svg { color: #fff; flex: 0 0 auto; }
.rd-cart-timer .rd-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  padding: 3px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}
.rd-cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eef0f2;
}
.rd-cart-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111;
}
.rd-cart-close {
  appearance: none; border: 0; background: transparent;
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #111;
}
.rd-cart-close:hover { background: #f2f4f7; }
.rd-cart-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 18px;
}

.rd-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 8px;
  gap: 14px;
}
.rd-cart-empty svg {
  width: 64px; height: 64px;
  color: #d1d5db;
}
.rd-cart-empty h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
}
.rd-cart-empty p {
  margin: 0;
  font-size: .9rem;
  color: #6b7280;
  line-height: 1.45;
}

.rd-upsell {
  margin-top: 4px;
  border: 1px solid #e6ebe8;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8faf9 0%, #f2f6f4 100%);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
  width: 100%;
  text-decoration: none;
}
.rd-upsell img {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
  flex: 0 0 auto;
}
.rd-upsell-info {
  flex: 1 1 auto;
  min-width: 0;
}
.rd-upsell-title {
  margin: 0 0 4px;
  font-size: .92rem;
  font-weight: 800;
  color: #111;
  line-height: 1.25;
}
.rd-upsell-prices {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.rd-upsell-price {
  font-size: 1.05rem;
  font-weight: 900;
  color: #e11d48;
}
.rd-upsell-compare {
  font-size: .8rem;
  color: #9aa0a6;
  text-decoration: line-through;
}
.rd-upsell-chip {
  display: inline-block;
  font-size: .65rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 4px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.rd-cart-footer {
  border-top: 1px solid #eef0f2;
  padding: 14px 18px 18px;
  background: #fff;
}
.rd-cta-btn {
  width: 100%;
  appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #1f2937 0%, #0b0b0b 100%);
  color: #fff;
  border-radius: 12px;
  padding: 15px 20px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .3px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .08s ease, box-shadow .15s ease;
}
.rd-cta-btn:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.15);
  transform: translateY(-1px);
  color: #fff;
}
.rd-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  color: #4b5563;
  font-size: .78rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
}
.rd-secure svg { color: #00b67a; flex: 0 0 auto; }

.rd-cart-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e6e8eb;
}
.rd-cart-payments .rd-pay-label {
  width: 100%;
  text-align: center;
  font-size: .72rem;
  color: #6b7280;
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 4px;
}
.rd-cart-payments .rd-pay-ic {
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.rd-cart-payments .rd-pay-ic img,
.rd-cart-payments .rd-pay-ic svg { display: block; height: 18px; width: auto; }
