/* =========================================================
   lux-header.css (GLOBAL HEADER)
   - SAFE: only styles .lux-nav header + children
   - Does NOT touch :root or body (prevents layout breakage)
   ========================================================= */

/* Header frame */
.lux-nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 0;
  pointer-events: none;
}

#shopping img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

/* Full-width glass backdrop */
.lux-nav::before{
  content:"";
  position:absolute;
  inset: 0;
  height: var(--nav-offset, 100px); /* uses your existing token */
  background: rgba(231,224,211,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
}

/* Inner layout container */
.lux-nav__inner{
  position: relative;
  pointer-events: auto;

  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;

  /* feels premium + clean without changing page layout */
  padding: 16px 6px;
}

/* Brand */
.lux-nav__brand {
	justify-self: start;
	position: relative;
	text-decoration: none;
	color: var(--lux-ink, #141210);
	font-family: "Nunito", sans-serif;
	font-weight: 700;
	font-size: 20px;
	top: 11px;
	letter-spacing: 8px;
	white-space: nowrap;
	padding: 10px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(0, 0, 0, .06);
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.lux-nav__brand:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.20);
  box-shadow: 0 10px 20px rgba(0,0,0,.10);
}

/* Center nav */
.lux-nav__links{
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 34px;
}

/* Links */
.lux-nav__links a{
  position: relative;
  text-decoration: none;
  color: var(--lux-ink, #141210);

  font-family:"Nunito", sans-serif;
  font-weight: 600;
  top: 11px;
  font-size: 18.5px;
  letter-spacing: .18em;

  padding: 10px 4px;
  opacity: .86;
  transition: opacity .18s ease, transform .18s ease;
  white-space: nowrap;
}
.lux-nav__links a:hover{
  opacity: 1;
  transform: translateY(-1px);
}

/* Premium underline (center-grow) */
.lux-nav__links a::after{
  content:"";
  position:absolute;
  left: 50%;
  bottom: 2px;
  height: 2px;
  width: 0;
  transform: translateX(-50%);

  background: linear-gradient(90deg, transparent, var(--lux-accent, rgba(201,160,75,1)), transparent);
  border-radius: 999px;
  opacity: .95;

  transition: width .22s ease;
}
.lux-nav__links a:hover::after{
  width: 120%;
}

/* Actions */
.lux-nav__actions{
    justify-self: end;
    position: relative;
    top: 11px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon buttons (scoped so it can’t break product pages) */
.lux-nav .lux-iconbtn{
  appearance:none;
  -webkit-appearance:none;

  width: 44px;
  height: 44px;
  padding: 0;

  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.34);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);

  display:grid;
  place-items:center;

  cursor:pointer;
  text-decoration:none;
  position:relative;

  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.lux-nav .lux-iconbtn:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.46);
  box-shadow: 0 14px 24px rgba(0,0,0,.12);
}

.lux-nav .lux-icon{
  width: 22px;
  height: 22px;
  opacity: .92;
  object-fit: contain;
  pointer-events:none;
}

/* Cart badge (keep your id="cartCount") */
.lux-cart__badge{ all: unset; }

#cartCount{
  position:absolute;
  top: -7px;
  right: -7px;

  min-width: 19px;
  height: 19px;
  padding: 0 0px;

  border-radius: 999px;
  display:grid;
  place-items:center;

  font: 800 12px/1 "Nunito", sans-serif;
  color: #141210;

  background: rgba(201,160,75,.95);
  border: 1px solid rgba(62,42,31,.35);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);

  pointer-events:none;
}

/* Mobile */
@media (max-width: 900px){
  .lux-nav__links{ display:none; }
  .lux-nav__inner{
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 4px;
  }
  .lux-nav__actions{ justify-self: end; }
}


/* ============================
   CHECKOUT HEADER OVERRIDE
   ============================ */

/* Keep same glass effect, just slightly shorter */
.lux-nav--checkout::before{
  height: 80px;
}

/* Layout stays centered */
.lux-nav--checkout .lux-nav__inner{
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 14px 6px;
}

/* Hide default elements */
.lux-nav--checkout .lux-nav__brand,
.lux-nav--checkout .lux-nav__links,
.lux-nav--checkout .lux-nav__actions{
  display: none !important;
}

/* Checkout title */
.lux-nav__checkout-title{
  justify-self: center;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .4em;
  color: var(--lux-ink, #141210);
  opacity: .9;
}

/* Back button (matches your design system) */
.lux-back-btn{
  justify-self: start;

  appearance:none;
  border:none;
  background: rgba(255,255,255,.34);
  border:1px solid rgba(0,0,0,.10);

  width:44px;
  height:44px;
  border-radius:14px;

  display:grid;
  place-items:center;

  font-size:18px;
  color:#141210;

  cursor:pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.lux-back-btn:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.46);
  box-shadow: 0 14px 24px rgba(0,0,0,.12);
}

/* Mobile tweak */
@media (max-width: 640px){
  .lux-nav__checkout-title{
    font-size: 14px;
    letter-spacing: .28em;
  }
}

/* ============================
   MOBILE HAMBURGER ADD-ON
   Does not change desktop header
============================ */

.lux-mobile-toggle {
  display: none;
}

.lux-mobile-drawer {
  display: none;
}

@media (max-width: 900px) {
  .lux-nav__actions {
    gap: 10px;
  }

  .lux-mobile-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.34);
    box-shadow: 0 8px 18px rgba(0,0,0,.08);
    display: grid;
    place-items: center;
    position: relative;
    cursor: pointer;
  }

  .lux-mobile-toggle span {
    position: absolute;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #141210;
    transition: transform .25s ease, opacity .25s ease;
  }

  .lux-mobile-toggle span:nth-child(1) {
    transform: translateY(-7px);
  }

  .lux-mobile-toggle span:nth-child(2) {
    transform: translateY(0);
  }

  .lux-mobile-toggle span:nth-child(3) {
    transform: translateY(7px);
  }

  .lux-mobile-toggle.is-open span:nth-child(1) {
    transform: rotate(45deg);
  }

  .lux-mobile-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .lux-mobile-toggle.is-open span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .lux-mobile-drawer {
	position: fixed;
	top: 85px;
	right: 7px;
	z-index: 100;
	width: min(310px, calc(100% - 28px));
	padding: 18px;
	border-radius: 24px;
	background: rgba(231, 224, 211, .94);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(0, 0, 0, .10);
	box-shadow: 0 20px 44px rgba(0, 0, 0, .16);
	display: flex;
	flex-direction: column;
	gap: 6px;
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity .22s ease, transform .22s ease;
  }

  .lux-mobile-drawer.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .lux-mobile-drawer a {
    text-decoration: none;
    color: var(--lux-ink, #141210);
    font-family: "Nunito", sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .16em;
    padding: 15px 14px;
    border-radius: 16px;
  }

  .lux-mobile-drawer a:hover {
    background: rgba(255,255,255,.28);
  }
}

/* ============================
   MOBILE HEADER POSITION FIX
   Keeps cart + hamburger from shifting on scroll
============================ */

@media (max-width: 900px) {
  .lux-nav__inner {
    width: calc(100% - 48px) !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .lux-nav__actions {
    justify-self: end !important;
    right: 0 !important;
    transform: none !important;
  }

  .lux-nav--overlay .lux-nav__actions,
  .lux-nav--scrolled .lux-nav__actions,
  .lux-nav.is-scrolled .lux-nav__actions {
    justify-self: end !important;
    right: 0 !important;
    transform: none !important;
  }

  .lux-nav .lux-iconbtn,
  .lux-mobile-toggle {
    flex: 0 0 44px !important;
  }
}

@media (max-width: 900px) {
  .lux-account-desktop {
    display: none !important;
  }
}