/* ─────────────────────────────────────────────
   HEADER SHELL
   ────────────────────────────────────────────── */
.act { position: relative; }
.cart-dot.hidden { display: none; }

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background var(--tr), box-shadow var(--tr), border-color var(--tr);
}

/* Scrolled header: cream background */
#site-header.scrolled {
  background: var(--cream);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 2px 48px rgba(45,10,78,.10);
  border-bottom-color: rgba(201,169,110,.18);
}

/* Scrolled + mega active: KEEP cream background */
#site-header.scrolled.mega-active {
  background: var(--cream);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 2px 48px rgba(45,10,78,.10);
  border-bottom-color: rgba(201,169,110,.18);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2.5rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ─────────────────────────────────────────────
   LOGO
   ────────────────────────────────────────────── */
.site-logo {
  flex-shrink: 0;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: .13em;
  color: #fff;
  transition: color var(--tr);
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.site-logo .ld {
  color: var(--gold);
  font-size: .65em;
  margin: 0 .06em;
  display: inline-block;
  transition: transform .4s var(--ease);
}

.site-logo:hover .ld { transform: rotate(45deg) scale(1.3); }

.site-logo .logo-img {
  max-height: 40px;
  width: auto;
}

/* Logo variants */
.logo-light { display: block; }
.logo-dark  { display: none; }

/* Scrolled → dark logo */
#site-header.scrolled .logo-light { display: none; }
#site-header.scrolled .logo-dark  { display: block; }
#site-header.scrolled .site-logo  { color: var(--charcoal); }

/* Scrolled + mega active → dark logo */
#site-header.scrolled.mega-active .logo-light { display: none; }
#site-header.scrolled.mega-active .logo-dark  { display: block; }
#site-header.scrolled.mega-active .site-logo  { color: var(--charcoal); }

/* ─────────────────────────────────────────────
   DESKTOP NAV
   ────────────────────────────────────────────── */
.header-nav { flex: 1; display: flex; justify-content: center; }

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
}

.nav-list > li > a {
  display: flex;
  align-items: center;
  gap: .28em;
  padding: 0 1.1rem;
  height: var(--header-h);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: .73rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
  transition: color .3s;
  position: relative;
}

.nav-list > li > a::after {
  content: '';
  position: absolute;
  bottom: 17px;
  left: 1.1rem;
  right: 1.1rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.nav-list > li > a:hover::after,
.nav-list > li.active > a::after,
.nav-list > li.current-menu-item > a::after {
  transform: scaleX(1);
}

.nav-list > li > a .arr {
  font-size: .55em;
  opacity: .55;
  transition: transform .3s;
}

.nav-list > li:hover > a .arr { transform: rotate(180deg); }

/* Scrolled – dark text */
#site-header.scrolled .nav-list > li > a {
  color: var(--charcoal);
}
#site-header.scrolled .nav-list > li > a:hover {
  color: var(--violet);
}

/* Scrolled + mega active – dark text */
#site-header.scrolled.mega-active .nav-list > li > a {
  color: var(--charcoal);
}
#site-header.scrolled.mega-active .nav-list > li > a:hover {
  color: var(--violet);
}

.nav-list > li > a.sale-link {
  color: rgba(201,169,110,.9);
}
#site-header.scrolled .nav-list > li > a.sale-link {
  color: var(--gold);
}

/* ─────────────────────────────────────────────
   ACTIONS
   ────────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}

.act {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  color: rgba(255,255,255,.88);
  flex-shrink: 0;
  transition: background .2s, color .2s;
  position: relative;
  text-decoration: none;
}

.act:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* Scrolled – dark icons */
#site-header.scrolled .act {
  color: var(--charcoal);
}
#site-header.scrolled .act:hover {
  background: var(--pale-lavender);
  color: var(--violet);
}

/* Scrolled + mega active – dark icons */
#site-header.scrolled.mega-active .act {
  color: var(--charcoal);
}
#site-header.scrolled.mega-active .act:hover {
  background: var(--pale-lavender);
  color: var(--violet);
}

.act svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 15px;
  height: 15px;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .55rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-dot:empty { display: none; }

.act-div {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.18);
  margin: 0 .2rem;
  transition: background var(--tr);
  flex-shrink: 0;
}

#site-header.scrolled .act-div,
#site-header.scrolled.mega-active .act-div {
  background: rgba(26,26,26,.12);
}
/* ─────────────────────────────────────────────
   HAMBURGER
   ────────────────────────────────────────────── */
.m-dlogo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

.ham {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  position: relative;
  z-index: 1100;
  flex-shrink: 0;
  transition: background .2s;
}

.ham:hover { background: rgba(255,255,255,.1); }

#site-header.scrolled .ham:hover {
  background: var(--pale-lavender);
}

.ham span {
  display: block;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  transform-origin: center;
  transition: transform .4s var(--ease), opacity .35s, width .35s var(--ease);
}

.ham span:nth-child(1) { width: 22px; transform: translateY(-7px); }
.ham span:nth-child(2) { width: 15px; transform: translateX(3.5px); }
.ham span:nth-child(3) { width: 22px; transform: translateY(7px); }

.ham.open span:nth-child(1) { transform: rotate(45deg); width: 22px; }
.ham.open span:nth-child(2) { opacity: 0; transform: translateX(12px); }
.ham.open span:nth-child(3) { transform: rotate(-45deg); width: 22px; }

/* Scrolled – dark bars */
#site-header.scrolled .ham span { background: var(--charcoal); }

/* ─────────────────────────────────────────────
   SEARCH OVERLAY
   ───────────────────────────────────────────── */
.srch-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(27,7,56,.96);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.srch-overlay.open { opacity: 1; visibility: visible; }

.srch-inner {
  width: 100%;
  max-width: 680px;
  padding: 0 2rem;
  text-align: center;
}

.srch-label {
  font-family: var(--font-sans);
  font-size: .67rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 2rem;
}

.srch-wrap { position: relative; margin-bottom: 1.5rem; }

.srch-wrap input {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.25);
  padding: .7rem 3rem .7rem 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  color: #fff;
  outline: none;
  letter-spacing: .04em;
  transition: border-color .3s;
}

.srch-wrap input::placeholder {
  color: rgba(255,255,255,.25);
}
.srch-wrap input:focus {
  border-bottom-color: var(--gold);
}

.srch-sub {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  padding: .5rem;
  transition: color .2s;
}

.srch-sub:hover { color: #fff; }

.srch-sub svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.srch-x {
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  padding: .5rem;
  transition: color .2s, transform .3s;
}
.srch-x:hover {
  color: #fff;
  transform: rotate(90deg);
}

.srch-x svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.srch-res {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 1rem;
  text-align: left;
}

.srch-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s;
}

.srch-item:hover {
  background: rgba(255,255,255,.07);
}

.srch-thumb {
  width: 46px;
  height: 56px;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: cover;
}

.srch-pname {
  font-family: var(--font-serif);
  font-size: .95rem;
  color: #fff;
  display: block;
}

.srch-pprice {
  font-family: var(--font-sans);
  font-size: .73rem;
  color: var(--gold-light);
  display: block;
  margin-top: .15rem;
}

.srch-tags-wrap { margin-top: 1.5rem; text-align: left; }

.srch-tags-lbl {
  font-family: var(--font-sans);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  display: block;
  margin-bottom: .7rem;
}

.srch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.srch-tag {
  padding: .35rem .85rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: .7rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  letter-spacing: .05em;
  transition: all .2s;
}

.srch-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─────────────────────────────────────────────
   MOBILE DRAWER
   ───────────────────────────────────────────── */
.m-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  background: var(--warm-white);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform .5s var(--ease);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.m-drawer.open { transform: translateX(0); }

.m-dhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(201,169,110,.2);
  position: sticky;
  top: 0;
  background: var(--warm-white);
  z-index: 10;
}

.m-dlogo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--charcoal);
  text-decoration: none;
}
.m-dlogo .ld { color: var(--gold); }

.m-dx {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--pale-lavender);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.m-dx:hover { background: var(--soft-lilac); }

.m-dx svg {
  width: 16px;
  height: 16px;
  stroke: var(--violet);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Drawer footer – single source of truth */
.m-dfooter {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: .5rem;
  background: var(--warm-white);
  border-top: 1px solid rgba(201,169,110,.2);
  padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 15;
}

.m-dfb {
  flex: 1;
  min-height: 44px;
  padding: .78rem .7rem;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  transition: all .2s;
}

.m-dfb.pri {
  background: var(--plum);
  color: #fff;
}
.m-dfb.pri:hover { background: var(--violet); }

.m-dfb.sec {
  border: 1px solid rgba(201,169,110,.4);
  color: var(--charcoal);
}
.m-dfb.sec:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.m-dfb svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ─────────────────────────────────────────────
   OVERLAY + LOADER
   ───────────────────────────────────────────── */
.site-ov {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(45,10,78,.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
  backdrop-filter: blur(4px);
}
.site-ov.open { opacity: 1; visibility: visible; }

.loader {
  position: fixed;
  inset: 0;
  background: var(--pale-lavender);
  z-index: 99997;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: loaderOut 0.8s ease 2.4s forwards;
}

.loader-logo { animation: logoReveal 1s ease 0.3s both; }

.loader-logo-img {
  width: clamp(120px, 28vw, 200px);
  height: auto;
  display: block;
}

.loader-line {
  width: 0;
  height: 1px;
  background: var(--gold);
  margin-top: 1.2rem;
  animation: lineExpand 1.2s ease 0.8s forwards;
}

.loader-sub {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.45em;
  color: var(--soft-lilac);
  margin-top: 1rem;
  opacity: 0;
  animation: fadeIn 0.8s ease 1.5s forwards;
  text-transform: uppercase;
}

@keyframes logoReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lineExpand {
  to { width: 120px; }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes loaderOut {
  to { opacity: 0; visibility: hidden; transform: translateY(-100%); }
}
/* ─────────────────────────────────────────────
   SINGLE PRODUCT — Header starts solid plum
   (no hero underneath, so transparent won't work)
   ────────────────────────────────────────────── */

/* Force solid plum header on product pages */
.single-product #site-header {
  background: var(--plum) !important;
  border-bottom-color: rgba(168, 85, 247, 0.2) !important;
  box-shadow: 0 2px 48px rgba(45, 10, 78, 0.3) !important;
}

/* Keep logo-light visible (white logo on plum) */
.single-product #site-header .logo-light { display: block !important; }
.single-product #site-header .logo-dark  { display: none  !important; }
.single-product #site-header .site-logo  { color: var(--cream) !important; }

/* Nav links — cream on plum */
.single-product #site-header .nav-list > li > a {
  color: rgba(255, 255, 255, 0.88) !important;
}
.single-product #site-header .nav-list > li > a:hover {
  color: var(--gold) !important;
}

/* Icons — white on plum */
.single-product #site-header .act {
  color: rgba(255, 255, 255, 0.88) !important;
}
.single-product #site-header .act:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* Divider line */
.single-product #site-header .act-div {
  background: rgba(255, 255, 255, 0.18) !important;
}

/* Hamburger bars — white */
.single-product #site-header .ham span {
  background: #fff !important;
}
.single-product #site-header .ham:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* When scrolled on product page — switch to cream (normal scrolled state) */
.single-product #site-header.scrolled {
  background: var(--cream) !important;
  box-shadow: 0 2px 48px rgba(45, 10, 78, 0.10) !important;
  border-bottom-color: rgba(201, 169, 110, 0.18) !important;
}

/* Scrolled → switch back to dark logo */
.single-product #site-header.scrolled .logo-light { display: none  !important; }
.single-product #site-header.scrolled .logo-dark  { display: block !important; }
.single-product #site-header.scrolled .site-logo  { color: var(--charcoal) !important; }

/* Scrolled → dark nav + icons */
.single-product #site-header.scrolled .nav-list > li > a {
  color: var(--charcoal) !important;
}
.single-product #site-header.scrolled .nav-list > li > a:hover {
  color: var(--violet) !important;
}
.single-product #site-header.scrolled .act {
  color: var(--charcoal) !important;
}
.single-product #site-header.scrolled .act:hover {
  background: var(--pale-lavender) !important;
  color: var(--violet) !important;
}
.single-product #site-header.scrolled .act-div {
  background: rgba(26, 26, 26, 0.12) !important;
}
.single-product #site-header.scrolled .ham span {
  background: var(--charcoal) !important;
}
.single-product .product-page {
  padding-top: calc(var(--header-h) + 2rem) !important;
}
/* ─────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ham { display: flex; }
  .header-nav { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .header-inner { padding: 0 1rem; }
  .act.hm { display: none; }
  .site-logo { font-size: 1.4rem; }
}

@media (max-width: 768px) {
  .loader-logo-img { width: clamp(100px, 35vw, 160px); }
}

@media (max-width: 480px) {
  :root { --header-h: 65px; }

  .header-inner {
    padding: 0 1rem;
    justify-content: space-between;
  }

  .header-actions {
    position: static !important;
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
  }

  .mega-menu { display: none !important; }

  /* Coming soon content (if used in drawer) */
  .mcs-inner {
    padding: 1.2rem;
    text-align: center;
  }
  .mcs-inner h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }
  .mcs-inner p {
    font-size: 0.7rem;
    line-height: 1.55;
  }

  /* Cart dot more visible */
  .cart-dot {
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    font-size: 0.5rem;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }

  .act {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .m-drawer {
    height: 100vh;
    height: 100dvh;
    padding-bottom: 0;
  }

  .m-dfooter {
    gap: 0.55rem;
    padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  }

  .m-dfb {
    min-height: 44px;
    padding: 0.78rem 0.6rem;
    font-size: 0.64rem;
    letter-spacing: 0.09em;
  }

  .loader-logo-img { width: 110px; }
  .loader-sub {
    letter-spacing: 0.25em;
    font-size: 0.58rem;
  }
}