/* Header wrapper */
#wg-header,
.nh-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 0.0625rem solid #D8D8D8; /* 1px */
  box-sizing: border-box;
  height: 48px;
}
/* Header inner container with padding */
.nh-header-inner {
  width: 100%;
  height: 100%;
  /* Use the site's 12-column responsive grid so header content aligns with page sections */
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  /* Use responsive horizontal gutters instead of fixed px paddings */
  padding-inline: clamp(0.625rem, 4vw, 3.75rem);
  box-sizing: border-box;
  gap: 1rem;
  position: relative;
}

/* Left Navigation Group */
.nh-nav {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  grid-column: 1 / span 4;
}


.nh-burger {
  display: none;
}

.nh-nav__item {
  height: 2.625rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #252525;
  font-size: 0.75rem;
  font-family: Lato, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  white-space: nowrap;
}

.nh-nav__item--store {
  border-bottom: 2px solid black;
}

.nh-mega-menu {
  /* Megamenu anchored below the header element. Use absolute so it sits
     below the header (top:100%) and use a centered 100vw background to
     create a full-bleed effect without vw-based offsets that cause overflow. */
  position: absolute;
  top: 100%;
  left: 50%;
  width: 100vw;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  z-index: 1000;
  box-sizing: border-box;
}

.nh-nav__item-with-menu:hover .nh-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nh-mega-menu__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding-block: 18px;
  /* responsive horizontal gutters that match header spacing and avoid overflow */
  padding-inline: clamp(0.75rem, 3.5vw, 3.75rem);
  gap: 20px 28px; /* row-gap, column-gap */
  /* let the inner stretch but cap side gutters so mid-sized viewports use
     more of the available width */
  width: 100%;
  max-width: calc(100% - 2rem);
  margin: 0 auto;
  box-sizing: border-box;
}

.nh-mega-menu__content {
  display: flex;
  gap: 16px;
  grid-column: 1 / span 10;
  align-items: flex-start;
}

.nh-mega-menu__column {
  display: flex;
  flex-direction: column;
  gap: 11.14px;
}

.nh-mega-menu__column--brands {
  flex: 0 0 237px;
}

.nh-mega-menu__section {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.nh-mega-menu__title {
  color: #252525;
  font-size: 11px;
  font-family: Lato, sans-serif;
  font-weight: 400;
  letter-spacing: 0.11px;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 6.86px;
  border-bottom: 0.86px solid #CDCDCD;
  width: fit-content;
}

.nh-mega-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nh-mega-menu__link {
  color: #252525;
  font-size: 12px;
  font-family: Lato, sans-serif;
  font-weight: 400;
  text-decoration: none;
}

.nh-mega-menu__link--featured {
  font-weight: 700;
}

.nh-mega-menu__link--sale {
  color: #F51F22;
  font-weight: 700;
}

.nh-mega-menu__link:hover {
  text-decoration: underline;
}

/* Brands Grid */
.nh-mega-menu__brands-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two columns for brands */
  gap: 14px 16px;
  width: 246px;
  max-height: 200px; /* Limit height to match other sections */
}

.nh-mega-menu__brand-link {
  color: #252525;
  font-size: 12px;
  font-family: Lato, sans-serif;
  font-weight: 400;
  text-decoration: none;
  height: 14px;
  line-height: 14px;
}

.nh-mega-menu__brand-link:hover {
  text-decoration: underline;
}

.nh-mega-menu__view-all {
  margin-top: 28px;
}

.nh-mega-menu__view-all-link {
  color: #252525;
  font-size: 10px;
  font-family: Lato, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8.57px 0 5.14px;
  border-bottom: 0.86px solid #C5C5C5;
  display: inline-block;
}

.nh-mega-menu__view-all-link:hover {
  text-decoration: underline;
}

/* Featured Section */
.nh-mega-menu__featured {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 181px; /* fixed featured column */
}

.nh-mega-menu__column {
  flex: 1 1 auto;
}

.nh-mega-menu__featured-item {
  width: 181px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nh-mega-menu__featured-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease;
}

.nh-mega-menu__featured-link:hover {
  transform: translateY(-2px);
}

.nh-mega-menu__featured-image {
  width: 181.17px;
  height: 178.25px;
  background: linear-gradient(0deg, rgba(196, 196, 196, 0.20) 0%, rgba(196, 196, 196, 0.20) 100%);
  background-blend-mode: darken, normal;
  border-radius: 4px;
  overflow: hidden;
}

.nh-mega-menu__featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nh-mega-menu__featured-text {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 6px;
}

.nh-mega-menu__featured-text span {
  color: #252525;
  font-size: 12px;
  font-family: Lato, sans-serif;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0.12px;
  text-align: center;
}

.nh-logo,
#wg-logo {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 6 / span 2; /* center logo in the middle columns */
  justify-self: center;
}

.nh-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nh-logo img {
  display: block;
  width: 7.9019rem;
  height: 1.2231rem;
  object-fit: contain;
}

/* Components.css sets `img { max-width: 100%; }` which can unintentionally
   constrain the header logo. Make the header logo immune to that global rule
   so our explicit sizing rules take effect. */
.nh-logo img {
  max-width: none !important;
}

.nh-logo svg {
  width: 7.9375rem;
  height: 1.25rem;
  object-fit: contain;
}

.nh-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.0625rem;
  padding-bottom: 0.0625rem;
  grid-column: 11 / span 2; /* place controls on the right area */
  justify-self: end;
}

.nh-controls__icons {
  height: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.3844rem;
}

.nh-controls__icons button,
.nh-controls__icons a {
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.2906rem;
  background: transparent;
  border: none;
  padding: 0;
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.nh-controls__icons button:hover,
.nh-controls__icons a:hover {
  opacity: 0.7;
}

/* Cart count indicator */
.nh-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #F51F22;
  color: white;
  font-size: 10px;
  font-family: Lato, sans-serif;
  font-weight: 400;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nh-cart-count.is-visible {
  display: flex;
}

.nh-cta {
  height: 1.6875rem;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: #F51F22 !important;
  border-radius: 0.125rem;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.nh-cta span {
  color: #ffffff;
  font-size: 0.75rem;
  font-family: Lato, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
}

/* Hide burger menu on desktop */
.nh-mobile-menu {
  visibility: hidden;
}

@media (max-width: 47.9375rem) {
  .nh-header-inner {
    padding-inline: 0.625rem;
  }

  /* Show burger menu on mobile */
  .nh-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.025rem;
    height: 2.025rem;
    padding: 0.45rem;
    background: white;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10010;
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Hide desktop nav items on mobile, but keep nav container for burger */
  .nh-nav__item:not(.nh-burger) {
    display: none;
  }

  /* Exception: allow account / login icons to remain visible on mobile
     without revealing the full desktop nav. These anchors are also used
     inside the right controls area, so make them touch-friendly here. */
  .nh-nav__item--account,
  .nh-nav__item--signup {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.5rem; /* 24px touch target */
    height: 1.5rem;
    padding: 0;
    margin: 0;
  }

  .nh-nav__item-with-menu {
    display: none;
  }

  /* Ensure nav container stays for burger */
  .nh-nav {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }

  /* Center logo and controls container for mobile layout */
  .nh-logo {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    }

  /* Create a right-aligned controls container for mobile */
  .nh-controls {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.3844rem;
  }

  /* Scale logo down for mobile */
  .nh-logo img {
    width: 7.2563rem;
    height: 1.1231rem;
  }

  .nh-logo svg {
    /* Responsive: let the SVG scale to its container but cap its maximum size
       so the logo is larger on mobile but won't overflow small viewports. */
    width: 100%;
    height: auto;
    max-width: 9rem;
  }

  /* Keep controls visible but make them compact */
  .nh-controls {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.3844rem;
  }

  /* Show essential icons on mobile - very compact */
  .nh-controls__icons {
    display: flex;
    gap: 0.5rem;
    height: 1.5rem;
  }

  /* Remove cart and flash sale hiding rules - show all three icons */
  /* .nh-controls__icons a[href*="cart"],
  .nh-controls__icons a[aria-label="cart"],
  .nh-controls__icons .nh-flash-sale-link,
  .nh-controls__icons a[aria-label="flash sale"] {
    display: none !important;
  } */

  .nh-controls__icons button,
  .nh-controls__icons a {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    min-width: unset;
    gap: 0.375rem;
  }

  .nh-controls__icons svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  /* Hide CTA on mobile to save space */
  .nh-cta {
    display: none !important;
  }

  .nh-burger__box {
    display: inline-block;
    width: 1.5rem;
    height: 0.9rem;
    position: relative;
  }

  .nh-burger__inner,
  .nh-burger__inner::before,
  .nh-burger__inner::after {
    content: "";
    display: block;
    width: 1.5rem;
    height: 0;
    outline: 0.12rem solid #252525;
    outline-offset: -0.06rem;
    position: absolute;
    left: 0;
  }

  .nh-burger__inner {
    top: 50%;
    transform: translateY(-50%);
  }

  .nh-burger__inner::before {
    top: -0.5rem;
  }

  .nh-burger__inner::after {
    top: 0.5rem;
  }

  /* Hide mega menu on mobile */
  .nh-mega-menu {
    display: none !important;
  }

  .nh-mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 260ms ease, visibility 260ms ease;
    z-index: 10020;
    align-items: flex-start;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

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

  .nh-mobile-menu__inner {
    background: #fff;
    width: 80%;
    max-width: 20rem;
    height: 100%;
    padding: 1rem;
    box-sizing: border-box;
    position: relative;
    z-index: 10021;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 100vh;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);

    /* slide animation: start off-screen to the left */
    transform: translateX(-100%);
    transition: transform 320ms cubic-bezier(.2,.8,.2,1);
  }

  /* Slide drawer content in when menu open */
  .nh-mobile-menu.open .nh-mobile-menu__inner {
    transform: translateX(0);
  }

  /* When mobile menu is open, lower/disable the burger so it doesn't sit on top */
  .nh-mobile-open .nh-burger {
    z-index: 0;
    pointer-events: none;
  }

  .nh-mobile-menu__close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    margin-bottom: 1rem;
    cursor: pointer;
  }

  .nh-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .nh-mobile-nav__item {
    color: #252525;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0;
    display: block;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
  }

  /* Mobile navigation dropdown styles */
  .nh-mobile-nav__dropdown {
    width: 100%;
  }

  .nh-mobile-nav__toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
  }

  .nh-mobile-nav__arrow {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.2s ease;
  }

  .nh-mobile-nav__submenu {
    padding-left: 1rem;
    margin-top: 0.5rem;
    border-left: 2px solid #f0f0f0;
  }

  .nh-mobile-nav__submenu[hidden] {
    display: none;
  }

  .nh-mobile-nav__section {
    margin-bottom: 1rem;
  }

  .nh-mobile-nav__section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .nh-mobile-nav__link {
    color: #252525;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    display: block;
    transition: color 0.2s ease;
  }

  .nh-mobile-nav__link:hover {
    color: #666;
  }

  /* Ensure burger sits left of logo */
  .nh-header-inner {
    flex-direction: row;
    align-items: center;
  }
}

/* Notification dots for Flash Sale and admin features */
.nh-notification-dot,
.nh-nav-notification-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: #ff0000;
  border-radius: 50%;
  border: 1px solid #fff;
}

.nh-flash-sale-link {
  position: relative;
  display: inline-block;
}

.nh-nav__item--flash-sale {
  position: relative;
}

.nh-nav-notification-dot {
  top: 2px;
  right: -8px;
}

/* Admin-specific navigation styling */
.nh-nav__item--admin {
  color: #d4af37; /* Gold color for admin items */
}

.nh-nav__item--signup {
  font-weight: 600;
  color: #007bff; /* Blue color for sign up */
}

.nh-controls__icons .nh-nav__item--signup {
  width: auto;
  padding: 0 8px;
}

/* User state specific styles */
.nh-nav__item--account {
  border-bottom: 2px solid transparent;
}

.nh-nav__item--account:hover {
  border-bottom-color: #333;
}

/* Flash sale animation for notification dot */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.nh-notification-dot.is-animated,
.nh-nav-notification-dot.is-animated {
  animation: pulse 2s infinite;
}

/* Mobile responsive adjustments for new elements */
@media (max-width: 768px) {
  .nh-flash-sale-link .nh-notification-dot {
    top: 0;
    right: 0;
  }

  .nh-nav__item--admin,
  .nh-nav__item--signup {
    font-size: 15px;
  }
}

/* ========================================
   SEARCH MODAL STYLES
   ======================================== */

/* Position the search modal to appear below the new header */
#wg-header + .Search,
.nh-header + .Search {
  top: 100%;
  left: 0;
  right: 0;
  position: absolute;
  z-index: 1000;
}

.Search {
  display: block;
  position: absolute;
  top: 100%;
  width: 100%;
  background: var(--background, #ffffff);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-25px);
  transition: transform 0.15s ease-in-out, opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
  z-index: 1000;
}

.Search[aria-hidden=false] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.Search__Inner {
  padding: 14px 18px;
  max-height: calc(100vh - 60px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@supports (--css: variables) {
  .Search__Inner {
    max-height: calc(100vh - var(--header-height, 48px) - 88px);
  }
}

.Search__SearchBar {
  display: flex;
  align-items: center;
}

.Search__Form {
  display: flex;
  align-items: center;
  flex: 1 0 auto;
}

.Search__InputIconWrapper {
  position: relative;
  top: -1px;
  /* For pixel perfect */
  margin-right: 12px;
  color: var(--text-color-light, #666);
}

.Search__Input {
  background: none;
  width: 100%;
  border: none;
  font-size: 15px;
  vertical-align: middle;
  outline: none;
}

.Search__Input::-moz-placeholder {
  color: var(--text-color-light, #666);
}

.Search__Input:-ms-input-placeholder {
  color: var(--text-color-light, #666);
}

.Search__Input::placeholder {
  color: var(--text-color-light, #666);
}

.Search__Input::-ms-clear {
  display: none;
}

.Search__Close {
  color: var(--text-color-light, #666);
  font-size: 15px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.Search__Results {
  display: none;
  margin-top: 30px;
  margin-bottom: 30px;
}

.Search__Results[aria-hidden=false] {
  display: block;
}

@media screen and (max-width: 640px) {
  .Search__Results .ProductItem__Wrapper {
    display: flex;
    align-items: center;
  }

  .Search__Results .Grid__Cell + .Grid__Cell {
    margin-top: 25px;
  }

  .Search__Results .ProductItem__ImageWrapper {
    width: 70px;
    min-width: 70px;
    margin-right: 25px;
  }

  .Search__Results .ProductItem__Info {
    margin-top: 0;
    text-align: left;
  }
}

@media screen and (min-width: 641px) {
  .Search__Inner {
    padding: 28px 50px;
  }

  .Search__Input {
    font-size: 18px;
  }

  .Search__InputIconWrapper {
    margin-right: 20px;
  }

  .Search__Close {
    font-size: 16px;
  }

  .Search__Close svg {
    stroke-width: 1.25px;
  }

  .Search__Results {
    margin-top: 70px;
    margin-bottom: 48px;
  }
}

