/* =========================
   NAVBAR BASE
========================= */

.navbar {
  position: fixed;
  top: var(--announcement-height);
  width: 100%;
  z-index: 4000;

  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);

  transition:
    top 0.3s ease,
    background 0.3s ease,
    border 0.3s ease,
    box-shadow 0.3s ease;
}

body.header-collapsed .navbar {
  top: 0;
}
/* =========================
   OVERLAY MODE 
========================= */

body.home-page .navbar,
body.lookbook-page .navbar {
  background: transparent;
  border: none;
}

body.home-page .navbar.scrolled,
body.lookbook-page .navbar.scrolled {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* =========================
    SCROLLED STATE
========================= */

.navbar.scrolled {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}


/* =========================
    LAYOUT
========================= */

.nav-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;

  padding: 0 70px;
  height: var(--navbar-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  gap: 24px;
}

.nav-right {
  gap: 20px;
}


/* =========================
    NAV LINKS
========================= */

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-link {
  display: flex;
  align-items: center;
  height: var(--navbar-height);

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: inherit;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: currentColor;
}


/* =========================
    COLOR SYSTEM
========================= */

/* DEFAULT (white navbar) */
.navbar .nav-logo,
.navbar .nav-link,
.navbar .nav-icon {
  color: #000;
}

/* OVERLAY (ONLY WHEN NOT SCROLLED) */
body.home-page .navbar:not(.scrolled) .nav-logo,
body.home-page .navbar:not(.scrolled) .nav-link,
body.home-page .navbar:not(.scrolled) .nav-icon,
body.home-page .navbar:not(.scrolled) .nav-toggle,

body.lookbook-page .navbar:not(.scrolled) .nav-logo,
body.lookbook-page .navbar:not(.scrolled) .nav-link,
body.lookbook-page .navbar:not(.scrolled) .nav-icon,
body.lookbook-page .navbar:not(.scrolled) .nav-toggle {
  color: #fff;
}

/* SCROLLED ALWAYS DARK (FORCE OVERRIDE) */
.navbar.scrolled .nav-logo,
.navbar.scrolled .nav-link,
.navbar.scrolled .nav-icon {
  color: #000 
}


/* =========================
    LOGO SWITCH
========================= */

.logo-white { display: none; }
.logo-black { display: block; }

/* overlay uses white logo */
body.home-page .logo-white,
body.lookbook-page .logo-white {
  display: block;
}

body.home-page .logo-black,
body.lookbook-page .logo-black {
  display: none;
}

/* scrolled uses black logo */
.navbar.scrolled .logo-white {
  display: none;
}

.navbar.scrolled .logo-black {
  display: block;
}


/* =========================
    NAV ICONS
========================= */

.nav-icon {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: opacity 0.2s ease;

  -webkit-tap-highlight-color: transparent;
}

.nav-icon:hover {
  opacity: 0.6;
}

.nav-icon:hover {
  opacity: 0.6;
}

.nav-icon svg {
  width: 18px;
  height: 18px;

  stroke: currentColor;
  stroke-width: 1.8;

  fill: none;

  display: block;
}

/* =========================
   ACCOUNT ICON BALANCE
========================= */

#account-link svg {
  transform: scale(1.12);
}


/* =========================
    CART BADGE
========================= */

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;

  min-width: 16px;
  height: 16px;

  font-size: 10px;
  font-weight: 600;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #000;
  color: #fff;

  border-radius: 999px;
  z-index: 1;
}


/* ========================
    SEARCH
========================= */

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  position: absolute;
  right: 100%;

  width: 0;
  opacity: 0;

  border: none;
  border-bottom: 1px solid currentColor;
  outline: none;

  background: transparent;
  color: inherit;

  font-size: 13px;

  margin-right: 10px;

  transition: width 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.search-input.active {
  width: 140px;
  opacity: 1;
  pointer-events: auto;
}

/* =========================
    MOBILE NAVBAR
========================= */

.nav-toggle {
  display: none;

  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  cursor: pointer;

  padding: 0;

  background: transparent;
  border: none;

  color: inherit;

  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;

  background: currentColor;

  display: block;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

@media (max-width: 768px) {

  body.home-page .navbar:not(.scrolled) {
    border-bottom: 1px solid rgba(255,255,255,0.4);
  }

  .nav-container {
  padding: 0 20px;

  height: 64px;
}

  .nav-left {
    gap: 0;
  }

  .nav-right {
    gap: 18px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;

    width: 42px;
    height: 42px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }

  .nav-icon svg {
    width: 21px;
    height: 21px;
  }

}

/* =========================
   MOBILE MENU
========================= */

.mobile-menu {
  position: fixed;

  top: var(--announcement-height);
  left: 0;
  right: 0;
  bottom: 0;

  background: #fff;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;

  z-index: 6000;

  overflow-y: auto;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* =========================
   MOBILE MENU HEADER
========================= */

.mobile-menu__header {
  position: fixed;

  top: var(--announcement-height);
  left: 0;
  right: 0;

  width: 100%;
  z-index: 20;

  height: 60px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 16px;

  background: #fff;

  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* =========================
   COLLAPSED HEADER FIX
========================= */

body.header-collapsed .mobile-menu,
body.header-collapsed .mobile-menu__header {
  top: 0;
}


/* =========================
   CLOSE BUTTON
========================= */

.mobile-menu__close {
  width: 28px;
  height: 28px;

  border: none;
  background: transparent;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  font-weight: 300;
  line-height: 1;

  color: #111;

  padding: 0;
}

.mobile-menu__close span {
  position: absolute;

  width: 18px;
  height: 1.5px;

  background: #111;

  border-radius: 999px;
}

.mobile-menu__close span:first-child {
  transform: rotate(45deg);
}

.mobile-menu__close span:last-child {
  transform: rotate(-45deg);
}


/* =========================
   MOBILE HEADER RIGHT
========================= */

.mobile-menu__search-wrapper {
  display: flex;
  align-items: center;

  min-width: 0;

  margin-left: auto;

  margin-right: 6px;
}

.mobile-menu__search-input {
  width: 0;

  opacity: 0;

  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.18);

  background: transparent;

  outline: none;

  font-size: 14px;
  color: #111;

  margin-left: 8px;

  transition:
    width 0.28s ease,
    opacity 0.2s ease;

  pointer-events: none;
}

.mobile-menu__search-input.active {
  width: 100%;

  opacity: 1;

  pointer-events: auto;
}

.mobile-menu__icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-menu__icons .nav-icon {
  position: relative;

  width: 28px;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.mobile-menu__icons .nav-icon svg {
  width: 21px;
  height: 21px;
}

/* MOBILE CART BADGE */

.mobile-menu__icons .cart-badge {
  top: -5px;
  right: -5px;

  min-width: 16px;
  height: 16px;

  font-size: 9px;
}

/* =========================
   PANEL
========================= */

.mobile-menu__panel {
  display: flex;
  flex-direction: column;

  padding: 72px 16px 40px;
}


/* =========================
   LINKS
========================= */

.mobile-menu__panel a {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 62px;

  border-bottom: 1px solid rgba(0,0,0,0.08);

  color: #111;

  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  text-decoration: none;
}

/* =========================
   MOBILE MENU HOVER
========================= */

.mobile-menu__panel a:active {
  opacity: 0.55;
}


/* =========================
   HIDE NAVBAR CONTENT
   WHEN MOBILE MENU OPEN
========================= */

body.menu-open .navbar .nav-container {
  opacity: 0;
  pointer-events: none;
}
