.gj-header {
  position: sticky;
  top: 0;
  z-index: var(--gj-z-header);
  background: var(--gj-ivory-alpha);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gj-gold-line);
}

.gj-header__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--gj-space-4);
  height: var(--gj-header-height);
  max-width: var(--gj-page-max);
  margin-inline: auto;
  padding-inline: clamp(32px, 5vw, 82px);
}

/* ---------- Left nav ---------- */

.gj-header__nav {
  justify-self: start;
  min-width: 0;
}

.gj-header__nav ul {
  display: flex;
  align-items: center;
  gap: clamp(30px, 2.4vw, 36px);
}

.gj-header__nav a,
.gj-header__links a {
  position: relative;
  display: inline-block;
  padding-block: 6px;
  font-family: var(--gj-font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gj-ink);
  transition: color 200ms var(--gj-ease);
}

.gj-header__nav a::after,
.gj-header__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gj-gold-600);
  transition: width 200ms var(--gj-ease);
}

.gj-header__nav a:hover,
.gj-header__links a:hover {
  color: var(--gj-mehroon-700);
}

.gj-header__nav a:hover::after,
.gj-header__nav a:focus-visible::after,
.gj-header__links a:hover::after,
.gj-header__links a:focus-visible::after {
  width: 100%;
}

.gj-header__nav-optional {
  display: none;
}

/* ---------- Center wordmark ---------- */

.gj-header__logo {
  justify-self: center;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--gj-mehroon-700);
  white-space: nowrap;
}

.gj-header__logo-mark {
  color: var(--gj-gold-600);
}

.gj-header__logo-text {
  font-family: var(--gj-font-display);
  font-size: clamp(36px, 2.9vw, 42px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;
  padding-left: 0.16em;
  color: var(--gj-mehroon-700);
}

/* ---------- Right utilities ---------- */

.gj-header__utils {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
}

.gj-header__links {
  display: none;
  align-items: center;
  gap: clamp(16px, 1.6vw, 26px);
  margin-right: 6px;
}

.gj-header__util {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(155, 119, 40, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: var(--gj-ink);
  transition: border-color 200ms var(--gj-ease), background 200ms var(--gj-ease),
    transform 200ms var(--gj-ease);
}

.gj-header__util:hover {
  border-color: var(--gj-gold-600);
  background: var(--gj-ivory);
  transform: translateY(-1px);
}

.gj-header__bag-count {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 15px;
  height: 15px;
  padding-inline: 3px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  color: var(--gj-ivory);
  background: var(--gj-mehroon-700);
  border-radius: 999px;
}

.gj-header__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: -10px;
  color: var(--gj-ink);
  justify-self: start;
}

/* ---------- Breakpoints ---------- */

@media (min-width: 1200px) {
  .gj-header__links {
    display: flex;
  }

  .gj-header__nav-optional {
    display: list-item;
  }
}

@media (max-width: 1023px) {
  .gj-header__nav,
  .gj-header__links {
    display: none;
  }

  .gj-header__menu-btn {
    display: inline-flex;
  }

  .gj-header__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding-inline: clamp(18px, 4vw, 32px);
  }

  .gj-header__logo {
    grid-column: 2;
  }

  .gj-header__logo-text {
    font-size: clamp(24px, 6.4vw, 28px);
    letter-spacing: 0.15em;
    padding-left: 0.15em;
  }

  .gj-header__logo-mark {
    width: 12px;
    height: 12px;
  }

  .gj-header__utils {
    gap: 6px;
  }

  .gj-header__util {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
  }

  .gj-header__util:hover {
    transform: none;
    background: transparent;
    color: var(--gj-mehroon-700);
  }
}

@media (max-width: 767px) {
  .gj-header__util--wa {
    display: none;
  }
}

@media (max-width: 480px) {
  .gj-header__utils {
    gap: 4px;
  }

  .gj-header__util {
    width: 36px;
    height: 36px;
  }

  .gj-header__logo-text {
    font-size: clamp(20px, 5.4vw, 24px);
  }
}

@media (max-width: 350px) {
  .gj-header__utils .gj-header__util:not(.gj-header__bag) {
    display: none;
  }
}

@media (max-width: 400px) {
  .gj-header__logo-mark {
    display: none;
  }
}

/* ---------- Mobile drawer ---------- */

.gj-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--gj-z-drawer) - 1);
  background: rgba(36, 6, 13, 0.45);
  opacity: 0;
  transition: opacity var(--gj-dur) var(--gj-ease);
}

.gj-drawer-backdrop.is-open {
  opacity: 1;
}

.gj-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--gj-z-drawer);
  width: min(21rem, 88vw);
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--gj-ivory);
  border-right: 1px solid var(--gj-gold-soft);
  box-shadow: var(--gj-shadow-md);
  transform: translateX(-102%);
  transition: transform var(--gj-dur) var(--gj-ease);
  overflow-y: auto;
}

.gj-drawer.is-open {
  transform: translateX(0);
}

.gj-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--gj-header-height);
  padding-inline: var(--gj-space-5);
  border-bottom: 1px solid var(--gj-gold-line);
}

.gj-drawer__brand {
  font-family: var(--gj-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gj-mehroon-700);
}

.gj-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--gj-ink);
}

.gj-drawer__nav {
  padding: var(--gj-space-5) var(--gj-space-5) var(--gj-space-6);
}

.gj-drawer__nav ul {
  display: flex;
  flex-direction: column;
}

.gj-drawer__nav a {
  display: block;
  padding-block: 0.62rem;
  font-family: var(--gj-font-display);
  font-size: clamp(30px, 8vw, 36px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--gj-mehroon-950);
  border-bottom: 1px solid rgba(155, 119, 40, 0.16);
  transition: color 180ms var(--gj-ease), padding-left 180ms var(--gj-ease);
}

.gj-drawer__nav a:hover {
  color: var(--gj-mehroon-700);
  padding-left: 6px;
}

.gj-drawer__secondary {
  margin-top: var(--gj-space-5);
}

.gj-drawer__secondary a,
.gj-drawer__secondary button {
  font-family: var(--gj-font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gj-muted);
  border-bottom-color: transparent;
}

.gj-drawer__secondary button {
  display: block;
  width: 100%;
  padding-block: 0.62rem;
  text-align: left;
}
