.header2 {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .3) 60%, rgba(0, 0, 0, 0) 100%);
  transition: background-color .25s ease, box-shadow .25s ease, height .25s ease;
}

.header2 .nav-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(94vw, 1600px);
  height: 100%;
  margin: auto;
}

.header2 .brand {
  flex: none;
}

.header2 .brand img {
  height: 56px;
  width: auto;
  transition: height .25s ease;
}

.header2 .main-nav {
  display: none;
  min-width: 0;
}

.header2 .nav-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.header2 .nav-search {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: none; border: none; padding: 0; color: white; cursor: pointer;
}
.header2.sticky .nav-search,
body.solid-nav .header2 .nav-search { color: var(--colour-10); }
.header2 .nav-search > span { display: none; }
.header2 .nav-search > i {
  color: inherit;
  font-size: 1.25rem;
}

.header2 .nav-cart,
.header2 .nav-cart .cart .cart-icon,
.header2 .nav-account {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; color: white; font-size: 1.7rem;
}

/* Wishlist count. No markup emits this yet — the header shows a bare icon until the
   wishlist is wired up and can report a real count. */
.header2 .nav-cart .badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--colour-9);
  color: white;
  font-size: .625rem;
  line-height: 16px;
  text-align: center;
}

.header2 .menu-toggle {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer;
}

.header2.sticky,
body.solid-nav .header2 {
  height: 64px;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}
.header2.sticky .brand img,
body.solid-nav .header2 .brand img { height: 40px; }
.header2 .nav-cart,
.header2 .nav-cart .cart .cart-icon,
.header2 .nav-account,
.header2 .menu-toggle,
.header2 .main-nav > ul > li > a { text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.header2.sticky .nav-cart,
.header2.sticky .nav-cart .cart .cart-icon,
.header2.sticky .nav-account,
.header2.sticky .menu-toggle,
body.solid-nav .header2 .nav-cart,
body.solid-nav .header2 .nav-cart .cart .cart-icon,
body.solid-nav .header2 .nav-account,
body.solid-nav .header2 .menu-toggle {
  color: var(--colour-10);
  text-shadow: none;
}
.header2.sticky .main-nav > ul > li > a,
body.solid-nav .header2 .main-nav > ul > li > a { text-shadow: none; }

/* --- Mobile menu --- */
body.no-scroll { overflow: hidden; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: white; padding: 1.5rem; overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  background: none; border: none;
  font-size: 1.5rem; color: var(--colour-10); cursor: pointer;
}

.mobile-menu ul {
  margin: 0;
  padding: 0 0 0 .75rem;
  list-style: none;
}
.mobile-menu > ul { padding-left: 0; }

.mobile-menu summary {
  padding: .75rem 0; font-weight: 600;
  color: var(--colour-7); cursor: pointer;
}

.mobile-menu a {
  display: block; padding: .5rem 0;
  color: var(--colour-10); font-size: .9375rem;
}

/* --- Responsive --- */
@media screen and (min-width: 425px) {}
@media screen and (min-width: 600px) {
  .header2 .nav-search {
    width: auto; height: auto; display: flex; align-items: center; gap: .5rem;
    justify-content: space-between;
    background: var(--background-colour); border: 1px dashed var(--colour-2); border-radius: 999px;
    padding: .5rem .5rem .5rem 1rem; color: var(--colour-1);
    font-family: 'Poppins', sans-serif; font-size: .875rem;
  }
  .header2.sticky .nav-search,
  body.solid-nav .header2 .nav-search { color: var(--colour-1); }
  .header2 .nav-search > span {
    display: inline; min-width: 0; text-align: left;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
  .header2 .nav-search > i {
    display: grid; place-items: center; width: 32px; height: 32px;
    border-radius: 50%; background: var(--colour-2); color: white; font-size: 1rem;
  }
}
@media screen and (min-width: 768px) {}
@media screen and (min-width: 1024px) {
  .header2 .menu-toggle { display: none; }
  .mobile-menu { display: none; }
  .header2 .main-nav {
    display: block;
    flex: none;
  }
  .header2 .main-nav > ul > li > a > i { display: none; }

  .header2 .nav-row { gap: .5rem; }
  .header2 .nav-tools {
    gap: .5rem; flex: 1 1 auto; min-width: 0;
    margin-left: 0; justify-content: flex-end;
  }
  .header2 .nav-search {
    flex: 1 1 auto;
    min-width: 44px;
    max-width: 320px;
  }
  .header2 .nav-cart,
  .header2 .nav-account { flex: none; }

  .header2 .main-nav > ul {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .header2 .main-nav > ul > li { position: static; }

  .header2 .main-nav > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: .125rem;
    padding: 1.5rem 0;
    color: white;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .header2.sticky .main-nav > ul > li > a,
  body.solid-nav .header2 .main-nav > ul > li > a {
    color: var(--colour-10);
    font-size: .75rem;
  }

  .header2 .mega {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: white;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .1);
    padding: 2rem calc((100vw - min(94vw, 1600px)) / 2);
  }

  .header2 .main-nav > ul > li:hover > .mega,
  .header2 .main-nav > ul > li:focus-within > .mega {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
    justify-content: start;
    gap: 1.5rem 2rem;
  }

  .header2 .mega .col > h3 {
    margin: 0 0 .5rem;
    font-size: 1rem;
    font-weight: 600;
  }
  .header2 .mega .col > h3 > a { color: var(--colour-7); }

  .header2 .mega .col > ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .header2 .mega .col > ul > li > a {
    display: block;
    padding: .25rem 0;
    color: var(--colour-10);
    font-size: .875rem;
  }
  .header2 .mega .col > ul > li > a:hover { color: var(--colour-2); }
}
@media screen and (min-width: 1200px) {
  .header2 .nav-row { gap: .75rem; }
  .header2 .main-nav > ul { gap: .5rem; }
  .header2 .main-nav > ul > li > a { font-size: .875rem; }
  .header2.sticky .main-nav > ul > li > a,
  body.solid-nav .header2 .main-nav > ul > li > a { font-size: .875rem; }
}
@media screen and (min-width: 1440px) {
  .header2 .main-nav > ul > li > a > i { display: inline-block; }
  .header2 .nav-row { gap: 1rem; }
  .header2 .nav-tools { gap: .75rem; }
  .header2 .main-nav > ul { gap: .625rem; }
}
