.header__icon--menu {
  position: initial;
}

/* AB#727: the drawer summary::before backdrop computes to a dark rgba(0,0,0,.5) bar pinned
   to the summary and shows as the gray band (Claire's lilith backdrop rules key on
   `menu-drawer >` but the live element is `header-drawer`, so they never match and the
   stock dark backdrop applies). The full-width drawer panel already covers the screen, so
   the backdrop is redundant - remove it. */
.menu-drawer-container > summary::before {
  display: none !important;
  content: none !important;
}

/* AB#747: the panel covers the header, so its close X is the <summary> toggle pinned at
   the top-left of the panel (above it) whenever the drawer is open/opening. Per Figma
   19660-1853 the panel shows only this X at the top — no logo or header icons. */
@media screen and (max-width: 989px) {
  .menu-drawer-container[open] > summary,
  .menu-drawer-container.menu-opening > summary {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 101;
    padding: 1.6rem 2.4rem;
  }
}

.js menu-drawer > details > summary::before,
.js menu-drawer > details[open]:not(.menu-opening) > summary::before {
  content: '';
  position: fixed;
  cursor: default;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  top: 0;
  left: 0;
  /* AB#488: Lilith wash instead of Dawn's default black 50%, per Figma mobile.
   * --brand-lilith fallback baked in case the palette token isn't in scope at
   * the drawer's CSS layer. */
  background: var(--brand-lilith, #F0E9FE);
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  transition: opacity 0s, visibility 0s;
}

menu-drawer > details[open] > summary::before {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--duration-default) ease, visibility var(--duration-default) ease;
}

.menu-drawer {
  position: fixed;
  transform: translateX(-100%);
  visibility: hidden;
  z-index: 100;
  left: 0;
  /* AB#747: full-height side panel that covers the header (page peeks behind on the
     right at 85% width). The close X lives at the top of the panel (see summary rule),
     per Figma 19660-1853. */
  top: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  padding: 0;
  background-color: var(--brand-lilith, #F0E9FE); /* AB#669: lilith panel per Figma */
  overflow-x: hidden;
}

@media screen and (max-width: 749px) {
  .menu-drawer { width: 85%; max-width: 360px; } /* AB#747: page peeks behind */
}

.js .menu-drawer {
  height: 100vh;
  height: 100dvh;
}

.js details[open] > .menu-drawer,
.js details[open] > .menu-drawer__submenu {
  transition: transform var(--duration-default) ease, visibility var(--duration-default) ease;
}

.js details[open].menu-opening > .menu-drawer,
details[open].menu-opening > .menu-drawer__submenu {
  transform: translateX(0);
  visibility: visible;
}

/* AB#727 (open reliability): Dawn's slide-in above depends on the deferred menu-opening
   class, which is racy on this theme (intermittent "hit or miss" open + gray sliver).
   Drive the slide-in off the native [open] attribute (set synchronously on click) so the
   drawer opens every time. The transition above still animates it; close still removes
   [open] via closeAnimation. */
.menu-drawer-container[open] > .menu-drawer {
  transform: translateX(0) !important;
  visibility: visible !important;
}

/* AB#727 (root cause): the always-running announcement marquee keeps the compositor busy,
   so while it animates the position:fixed drawer panel + fixed close-X fail to repaint at
   their open positions (stale paint) -> the drawer does not visually cover, the hero's
   rgba(0,0,0,.1) overlay shows as a gray strip on the left, and the X does not paint.
   Pause the marquee whenever the drawer is open (body has an overflow-hidden-<bp> class)
   so the fixed overlay repaints. */
body:has(.menu-drawer-container[open]) .marquee-text-section {
  display: none !important;
}

/* AB#728/AB#856: the pre-launch cart/bag hide moved OUT of this static asset (which
   deploys to Dev + Prod identically) into a PROD-only Liquid {% style %} block in
   sections/header.liquid, gated on shop.permanent_domain. Dev keeps shopping active. */

.js .menu-drawer__navigation .submenu-open {
  visibility: hidden; /* hide menus from screen readers when hidden by submenu */
}

@media screen and (min-width: 750px) {
  .menu-drawer {
    width: 40rem;
    border-width: 0 var(--drawer-border-width) 0 0;
    border-style: solid;
    border-color: rgba(var(--color-foreground), var(--drawer-border-opacity));
  }
}

.menu-drawer__inner-container {
  position: relative;
  height: 100%;
}

.menu-drawer__navigation-container {
  /* AB#747: flow nav -> CTA -> social from the top (Figma 19660-1853). The top padding
     clears the fixed close X (topbar removed). Was a 1fr/auto grid that pushed the CTA +
     social to the very bottom. */
  display: block;
  overflow-y: auto;
  height: 100%;
  padding-top: 4.5rem;
}

.menu-drawer__navigation {
  padding: 0 0 1.5rem;
}

.menu-drawer__inner-submenu {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.js .menu-drawer__menu li {
  margin-bottom: 0.2rem;
}

.menu-drawer__menu-item {
  padding: 1.6rem 2.4rem;
  text-decoration: none;
  font-size: 2.1rem;
  font-weight: 900;            /* AB#669: Plaax Heavy ~21px per Figma */
  text-transform: none;        /* AB#669: sentence case from menu labels */
  color: #000;
  border-bottom: 1px solid rgba(0,0,0,0.12); /* AB#669: divider per Figma */
}

.menu-drawer summary.menu-drawer__menu-item {
  padding-right: 5.2rem;
}

.menu-drawer__menu-item--active,
.menu-drawer__menu-item:focus,
.menu-drawer__close-button:focus,
.menu-drawer__menu-item:hover,
.menu-drawer__close-button:hover {
  color: rgb(var(--color-foreground));
  background-color: rgba(var(--color-foreground), 0.04);
}

.menu-drawer__menu-item--active:hover {
  background-color: rgba(var(--color-foreground), 0.08);
}

.js .menu-drawer__menu-item .icon-caret {
  display: none;
}

.menu-drawer__menu-item > .svg-wrapper {
  width: 15px;
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
}

.js .menu-drawer__submenu {
  position: absolute;
  top: 0;
  width: 100%;
  bottom: 0;
  left: 0;
  background-color: rgb(var(--color-background));
  z-index: 1;
  transform: translateX(100%);
  visibility: hidden;
}

.js .menu-drawer__submenu .menu-drawer__submenu {
  overflow-y: auto;
}

.menu-drawer__close-button {
  margin-top: 1.5rem;
  padding: 1.2rem 2.6rem 1.2rem 3rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  width: 100%;
  background-color: transparent;
  font-family: var(--font-body-family);
  font-style: var(--font-body-style);
  text-align: left;
}

.menu-drawer__close-button .svg-wrapper {
  transform: rotate(180deg);
  margin-right: 1rem;
  width: 15px;
}

.menu-drawer__utility-links {
  padding: 0;
  background-color: transparent; /* AB#669: lilith panel shows through */
  position: relative;
}

.header--has-social .menu-drawer__utility-links {
  padding: 2rem 3rem;
}

@media screen and (max-width: 749px) {
  .header--has-account:where(:not(.header--has-social):not(.header--has-localizations)) .menu-drawer__utility-links {
    padding: 2rem 3rem;
  }
}

@media screen and (max-width: 989px) {
  .header--has-localizations:where(:not(.header--has-social)) .menu-drawer__utility-links {
    padding: 2rem 3rem;
  }
}

.menu-drawer__account {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 1rem 0;
  font-size: 1.4rem;
  color: rgb(var(--color-foreground));
  margin-bottom: 0;
}

.menu-drawer__utility-links:has(.menu-drawer__localization) .menu-drawer__account {
  margin: 0;
}

.menu-drawer__account account-icon > .svg-wrapper {
  height: 2rem;
  width: 2rem;
  margin-right: 1rem;
}

.menu-drawer__account shop-user-avatar {
  --shop-avatar-size: 2.4rem;
  margin-right: 0.55rem;
  margin-left: -0.45rem;
}

.menu-drawer__account:hover account-icon > .svg-wrapper {
  transform: scale(1.07);
}

.menu-drawer__utility-links {
  padding: 0 2.4rem;   /* AB#747: align social row with the nav + CTA left edge */
}
.menu-drawer .list-social {
  justify-content: flex-start;
  margin-left: 0;
}

.menu-drawer .list-social:empty {
  display: none;
}

.menu-drawer .list-social__link {
  padding: 0;
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-lilith, #F0E9FE);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 50%;
  margin: 0 0.8rem 0 0;
}

@media screen and (max-width: 749px) {
  .menu-drawer.country-selector-open {
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* AB#669: menu top bar (logo center + account/cart right) */
.menu-drawer__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 2.4rem 1rem;
  min-height: 5.2rem;
}
.menu-drawer__logo {
  display: inline-flex;
  margin: 0 auto;
}
.menu-drawer__logo img {
  max-height: 2.6rem;
  width: auto;
  display: block;
  filter: brightness(0); /* AB#747: black logo per Figma */
}
.menu-drawer__topbar-icons {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  flex: 0 0 auto;
}
.menu-drawer__topbar-icon {
  display: inline-flex;
  color: #000;
}
.menu-drawer__topbar-icon .svg-wrapper svg {
  width: 2.2rem;
  height: 2.2rem;
}
/* AB#669: Book a Piercing pill CTA */
.menu-drawer__book-cta {
  display: block;
  max-width: 22rem;
  margin: 2.4rem 2.4rem 1.6rem; /* AB#747: left-aligned with nav/social per Figma (was centered) */
  padding: 1.4rem 2rem;
  background: #000;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 100px;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}
.menu-drawer__book-cta:hover {
  color: #fff;
  opacity: 0.9;
}
