/* Homepage navigation: past the hero, the floating side menu becomes a compact
   top bar (see the nav-compact script in footer.php).
   No transform/filter on #header itself: that would trap the fixed mobile menu
   inside the bar. The background lives on a pseudo-element instead. */

html {
  scroll-padding-top: 64px;
}

#header .nav-logo {
  display: none;
}

#header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(27, 27, 27, 0.94);
  border-bottom: 1px solid rgba(235, 226, 208, 0.12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#header.nav-compact {
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}
#header.nav-compact::before {
  opacity: 1;
}

#header.nav-compact #desktop-menu a.menu-link.is-active {
  color: #ff2b59;
}

@keyframes nav-compact-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Tablet & desktop: horizontal bar ---------- */

@media (min-width: 768px) {
  #header.nav-compact #desktop-menu {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    height: 64px;
    padding: 0 1.5rem;
    animation: nav-compact-in 0.3s ease;
  }
  #header.nav-compact #desktop-menu,
  #header.nav-compact #desktop-menu.menu-dark {
    color: #fff !important;
  }
  #header.nav-compact #desktop-menu ul {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1.1rem;
    margin: 0;
    padding: 0 !important;
  }
  #header.nav-compact #desktop-menu ul li {
    padding: 0;
  }
  #header.nav-compact #desktop-menu ul li a.menu-link {
    font-size: 12px;
    white-space: nowrap;
  }
  #header.nav-compact #desktop-menu ul li a.menu-link:hover {
    color: #ff2b59;
  }
}

@media (min-width: 992px) {
  #header.nav-compact #desktop-menu {
    justify-content: space-between;
    padding: 0 2.5rem;
  }
  #header.nav-compact .nav-logo {
    display: block;
    flex-shrink: 0;
  }
  #header.nav-compact .nav-logo img {
    display: block;
    width: 120px;
    height: auto;
  }
  #header.nav-compact #desktop-menu ul {
    gap: 1.75rem;
  }
  #header.nav-compact #desktop-menu ul li a.menu-link {
    font-size: 13px;
  }
}

/* ---------- Phones: slim bar behind the menu button ---------- */

@media (max-width: 767px) {
  html {
    scroll-padding-top: 56px;
  }
  #header.nav-compact {
    height: 56px;
  }
  #header.nav-compact #hamburger-icon {
    position: relative;
    padding-top: 0.6rem;
  }
}


/* Cart icon with item count */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #ebe2d0 !important;
  font-size: 1.15rem;
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-cart:hover {
  color: #ff2b59 !important;
}
.nav-cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff2b59;
  color: #fff;
  font-family: "AlbertSans-ExtraBold";
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
#header #desktop-menu ul li.nav-cart-item {
  padding-top: 0.6rem;
}
#header.nav-compact #desktop-menu ul li.nav-cart-item,
#header nav.non-homepage #desktop-menu ul li.nav-cart-item {
  padding-top: 0;
}

/* Phones: icon in the top-right corner, opposite the menu button */
@media (max-width: 767px) {
  #header {
    position: relative;
  }
  #header.position-fixed {
    position: fixed !important;
  }
  #header .mobile-cart {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    z-index: 4;
  }
  #header.position-fixed .mobile-cart {
    position: fixed;
  }
  #header .mobile-cart .nav-cart {
    font-size: 1.6rem;
  }
}
