/* ------------------------------------------------------------------
   Lux Peptides header

   Sizes in px throughout: the reference Shopify theme assumes a 10px
   root while WordPress uses 16px, and porting rem across that gap is
   what makes everything render 1.6x too large.

   Colours read from the design-system tokens where they exist, with
   literal fallbacks so this plugin still looks right on its own.
   ------------------------------------------------------------------ */

.luxh {
  position: sticky;
  top: 0;
  z-index: 900;
  font-family: var(--font-navigation, inherit);
}

/* --- Ticker -------------------------------------------------------- */

.luxh-ticker {
  overflow: hidden;
  background: var(--luxh-ticker-bg, #151515);
  padding: 9px 0;
}

.luxh-ticker__track {
  display: flex;
  width: max-content;
  animation: luxh-scroll 28s linear infinite;
}

.luxh-ticker:hover .luxh-ticker__track { animation-play-state: paused; }

.luxh-ticker__item {
  color: var(--luxh-ticker-text, #fff);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .5px;
  white-space: nowrap;
  padding: 0 40px;
}

@keyframes luxh-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Bar ----------------------------------------------------------- */

.luxh-bar {
  background: var(--color-header-background, #fff);
  border-bottom: 1px solid transparent;
  transition: background-color .35s ease, backdrop-filter .35s ease,
              box-shadow .35s ease, border-color .35s ease;
}

/* Glass only once scrolled, so it reads as a response to scrolling
   rather than a permanent style. */
.luxh.is-stuck .luxh-bar {
  background: rgba(252, 250, 244, .72);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
          backdrop-filter: blur(16px) saturate(170%);
  border-bottom-color: rgba(21, 21, 21, .08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
}

.luxh-bar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--site-max-width, 1600px);
  margin: 0 auto;
  padding: 10px 24px;
}

/* --- Brand --------------------------------------------------------- */

.luxh-brand { flex: 0 0 auto; line-height: 0; }

.luxh-brand img,
.luxh-brand .custom-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: var(--luxh-logo-height, 88px);
}

.luxh-brand__text {
  font-size: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-header-text, #151515);
  line-height: 1.2;
}

/* --- Nav ----------------------------------------------------------- */

.luxh-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.luxh-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.luxh-menu li { position: relative; list-style: none; }

.luxh-menu a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  color: var(--color-header-text, #151515);
  font-size: var(--font-navigation-size, 16px);
  font-weight: var(--font-navigation-weight, 600);
  letter-spacing: var(--font-navigation-letter-spacing, .5px);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .25s ease;
}

.luxh-menu a:hover { opacity: .6; }

/* One caret, drawn in CSS. Menu plugins tend to add a second indicator
   of their own; nothing here does. */
.luxh-menu .menu-item-has-children > a::after,
.luxh-menu .luxh-mega-item > a::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s ease;
}

.luxh-menu .is-open > a::after { transform: rotate(-135deg) translateY(-2px); }

/* Plain dropdown for ordinary sub-menus. */
.luxh-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: var(--color-background, #fbfaf6);
  border: 1px solid rgba(21, 21, 21, .08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}

.luxh-menu li:hover > .sub-menu,
.luxh-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.luxh-menu .sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 14px;
  white-space: nowrap;
}

/* --- Tools --------------------------------------------------------- */

.luxh-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.luxh-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  background: none;
  border: 0;
  color: var(--color-header-text, #151515);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
}

.luxh-loc::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.luxh-loc__flag { display: block; width: 22px; height: auto; border-radius: 2px; }

.luxh-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--color-header-text, #151515);
  cursor: pointer;
  transition: opacity .25s ease;
}

.luxh-icon:hover { opacity: .6; }
.luxh-icon svg { width: 21px; height: 21px; }

.luxh-cart__count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-action-background, #000);
  color: var(--color-action-text, #fff);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.luxh-cart__count.is-empty { display: none; }

/* --- Burger -------------------------------------------------------- */

.luxh-burger {
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--color-header-text, #151515);
  cursor: pointer;
}

.luxh-burger svg { width: 22px; height: 22px; }

/* --- Mega panel ---------------------------------------------------- */

/* Rendered outside the header so no ancestor's overflow or stacking
   context can clip it. */
.luxh-mega {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 890;
  background: var(--color-background, #fbfaf6);
  border-top: 1px solid rgba(21, 21, 21, .08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .06);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .28s ease, transform .28s cubic-bezier(.16, 1, .3, 1);
}

.luxh-mega.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.luxh-mega__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(24px, 5vw, 90px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 24px;
}

.luxh-cat { display: block; text-decoration: none; }

/* The gold ring is a gradient behind a circular inset, not a border —
   a flat border colour reads as plastic. */
.luxh-cat__ring {
  display: block;
  /* Ring thickness. 5px read as a frame around the image rather than a
     rim on it. */
  padding: var(--luxh-ring, 2px);
  border-radius: 50%;
  background: linear-gradient(140deg, #f0dc9a 0%, #b8901f 30%, #e8cd7a 55%, #9c7418 80%, #e6c46a 100%);
}

.luxh-cat__inner {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
}

.luxh-cat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.16, 1, .3, 1);
}

.luxh-cat__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #0d0d0d;
  /* box-shadow, not border: a border changes the box size and throws off
     the centring that aspect-ratio depends on. */
  box-shadow: 0 0 0 1px #c9a227;
  color: #fff;
  font-family: var(--font-headline, inherit);
  font-size: clamp(14px, 1.4vw, 24px);
  line-height: 1.15;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-align: center;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), background-color .4s ease;
}

@media (hover: hover) {
  .luxh-cat:hover img { transform: scale(1.08); }
  .luxh-cat:hover .luxh-cat__hub {
    transform: translate(-50%, -50%) scale(1.05);
    background: #000;
  }
}

/* --- Hidden state --------------------------------------------------
   The `hidden` attribute sets display:none in the UA stylesheet, which
   any author display value beats. Without this, the search overlay —
   position:fixed, inset:0, display:grid — sat invisibly over the whole
   page at opacity 0 and swallowed every click. */

.luxh-search[hidden],
.luxh-drawer[hidden],
.luxh-backdrop[hidden],
.luxh-mega[hidden] {
  display: none !important;
}

/* --- Search overlay ------------------------------------------------ */

.luxh-search {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: start center;
  padding: 18vh 24px 0;
  background: rgba(251, 250, 246, .96);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s ease;
}

.luxh-search { pointer-events: none; }
.luxh-search.is-open { opacity: 1; pointer-events: auto; }

.luxh-search__inner {
  position: relative;
  width: min(680px, 100%);
}

.luxh-search__field {
  width: 100%;
  padding: 18px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(21, 21, 21, .25);
  font-family: var(--font-headline, inherit);
  font-size: clamp(22px, 3vw, 34px);
  color: #151515;
}

.luxh-search__field:focus { outline: none; border-bottom-color: #151515; }

.luxh-search__close {
  position: absolute;
  top: -60px;
  right: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: #151515;
  cursor: pointer;
}

.luxh-search__close svg { width: 22px; height: 22px; }

/* --- Drawers ------------------------------------------------------- */

.luxh-backdrop {
  position: fixed;
  inset: 0;
  z-index: 990;
  background: rgba(21, 21, 21, .4);
  opacity: 0;
  transition: opacity .35s ease;
}

.luxh-backdrop.is-open { opacity: 1; }

.luxh-drawer {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: min(420px, 100vw);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-background, #fbfaf6);
  color: #151515;
  box-shadow: 0 0 40px rgba(0, 0, 0, .1);
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}

.luxh-drawer--loc { right: 0; transform: translateX(100%); }
.luxh-drawer--nav { left: 0;  transform: translateX(-100%); }
.luxh-drawer.is-open { transform: translateX(0); }

body.luxh-locked { overflow: hidden; }

.luxh-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(21, 21, 21, .12);
}

.luxh-drawer__title {
  font-size: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.luxh-drawer__close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  transition: transform .25s ease;
}

.luxh-drawer__close:hover { transform: rotate(90deg); }
.luxh-drawer__close svg { width: 20px; height: 20px; }

.luxh-drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
}

/* --- Mobile menu inside the drawer --------------------------------- */

.luxh-menu--mobile {
  display: block;
  gap: 0;
}

.luxh-menu--mobile li { border-bottom: 1px solid rgba(21, 21, 21, .08); }

.luxh-menu--mobile a {
  display: block;
  padding: 15px 0;
  font-size: 16px;
}

.luxh-menu--mobile .sub-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  min-width: 0;
  padding: 0 0 8px 16px;
  background: none;
  border: 0;
  box-shadow: none;
}

.luxh-menu--mobile .sub-menu a { padding: 10px 0; font-size: 14px; opacity: .75; }
.luxh-menu--mobile .menu-item-has-children > a::after { display: none; }

/* --- Tabs ---------------------------------------------------------- */

.luxh-tabs {
  display: flex;
  gap: 24px;
  margin: 18px 24px 0;
  border-bottom: 1px solid rgba(21, 21, 21, .35);
}

.luxh-tab {
  position: relative;
  padding: 0 0 13px;
  background: none;
  border: 0;
  color: rgba(21, 21, 21, .6);
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color .25s ease;
}

.luxh-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #151515;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

.luxh-tab[aria-selected="true"] { color: #151515; }
.luxh-tab[aria-selected="true"]::after { transform: scaleX(1); }

.luxh-loc-current {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
}

.luxh-loc-current img { border-radius: 2px; }
.luxh-loc-current__sep { color: rgba(21, 21, 21, .3); }

.luxh-note {
  margin: 13px 0 0;
  color: #6b6b6b;
  font-size: 14px;
  line-height: 1.6;
}

.luxh-lang { list-style: none; margin: 0; padding: 0; }
.luxh-lang li { list-style: none; }

.luxh-lang a {
  display: block;
  padding: 12px 14px;
  border-radius: 4px;
  color: #151515;
  font-size: 16px;
  text-decoration: none;
  transition: background-color .2s ease;
}

.luxh-lang a:hover { background: rgba(21, 21, 21, .05); }
.luxh-lang .current-lang a { background: rgba(21, 21, 21, .06); font-weight: 600; }
.luxh-lang .current-lang a::after { content: "✓"; float: right; }

/* --- Third-party switcher inside the drawer -------------------------
   Translation plugins each ship their own markup and often their own
   floating widget styling. This resets it to a plain stacked list so it
   matches the rest of the drawer rather than hovering over the page. */

.luxh-lang-custom > * {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-shadow: none !important;
  background: none !important;
  z-index: auto !important;
}

.luxh-lang-custom ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.luxh-lang-custom li { list-style: none; }

.luxh-lang-custom a,
.luxh-lang-custom button,
.luxh-lang-custom option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #151515;
  font-family: inherit;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease;
}

.luxh-lang-custom a:hover,
.luxh-lang-custom button:hover { background: rgba(21, 21, 21, .05); }

.luxh-lang-custom select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(21, 21, 21, .18);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: #151515;
}

/* Flags shipped by the switcher, kept to a sensible size. */
.luxh-lang-custom img {
  width: 22px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 2px;
}

/* --- Responsive ---------------------------------------------------- */

@media (max-width: 1199px) {
  .luxh-menu { gap: 18px; }
  .luxh-menu a { font-size: 14px; }
  .luxh-bar__inner { gap: 16px; }
}

@media (max-width: 991px) {
  .luxh-burger { display: grid; }
  .luxh-nav { display: none; }
  .luxh-mega { display: none !important; }

  .luxh-brand { margin: 0 auto; }
  .luxh-brand img { max-height: 56px; }

  .luxh-bar__inner { padding: 10px 16px; gap: 10px; }
  .luxh-tools { gap: 8px; }
  .luxh-loc { display: none; }
  .luxh-ticker__item { font-size: 12px; padding: 0 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .luxh-bar, .luxh-mega, .luxh-drawer, .luxh-backdrop,
  .luxh-search, .luxh-tab::after, .luxh-cat img, .luxh-cat__hub,
  .luxh-drawer__close, .luxh-menu .sub-menu { transition: none; }

  .luxh-ticker__track { animation: none; }
}
