/* =============================================
   AURUM — Header Styles
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold:        #C9A84C;
  --gold-light:  #E2C97E;
  --gold-dim:    rgba(201,168,76,0.15);
  --bg:          #0E0D0B;
  --bg-surface:  #141210;
  --bg-elevated: #1C1915;
  --text:        #F0EBE0;
  --text-muted:  #7A7162;
  --border:      rgba(201,168,76,0.18);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Montserrat', sans-serif;

  --header-h-top:  36px;
  --header-h-main: 76px;
  --header-total:  112px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 200vh; /* demo scroll space */
}

/* ── Noise overlay ──────────────────────────── */
.header__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── Header wrapper ─────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
  background: rgba(14,13,11,0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 40px rgba(0,0,0,0.6), 0 1px 0 var(--border);
}

/* ── Top bar ────────────────────────────────── */
.header__topbar {
  position: relative;
  z-index: 1;
  height: var(--header-h-top);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header__topbar-divider {
  color: var(--gold);
  opacity: 0.6;
}

/* ── Main row ───────────────────────────────── */
.header__main {
  position: relative;
  z-index: 1;
  height: var(--header-h-main);
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

/* ── Nav ────────────────────────────────────── */
.header__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header__nav--left { justify-content: flex-start; }
.header__nav--right { justify-content: flex-end; }

.header__nav-link {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.25s;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 100%;
  height: 1px;
  background: var(--gold);
  transition: right 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}

.header__nav-link:hover { color: var(--gold-light); }
.header__nav-link:hover::after { right: 0; }

/* ── Icons ──────────────────────────────────── */
.header__icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.header__icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 50%;
  transition: color 0.25s, background 0.25s;
  position: relative;
}

.header__icon-btn svg {
  width: 18px;
  height: 18px;
}

.header__icon-btn:hover {
  color: var(--gold-light);
  background: var(--gold-dim);
}

.header__cart-btn { position: relative; }

.header__cart-count {
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  background: var(--gold);
  color: var(--bg);
  font-size: 8px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

/* ── Logo ───────────────────────────────────── */
.header__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  justify-self: center;
}

.header__logo-emblem svg {
  width: 36px;
  height: 36px;
  display: block;
  transition: transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

.header__logo:hover .header__logo-emblem svg {
  transform: rotate(15deg) scale(1.08);
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.header__logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--gold);
  line-height: 1;
}

.header__logo-sub {
  font-family: var(--font-body);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Search bar ─────────────────────────────── */
.header__search {
  position: relative;
  z-index: 1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
  border-top: 1px solid transparent;
}

.header__search.open {
  max-height: 60px;
  border-top-color: var(--border);
}

.header__search-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__search-icon {
  width: 16px; height: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

.header__search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text);
}

.header__search-input::placeholder { color: var(--text-muted); }

.header__search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px;
  transition: color 0.2s;
}
.header__search-close:hover { color: var(--gold); }

/* ── Burger ─────────────────────────────────── */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.header__burger span {
  display: block;
  height: 1px;
  background: var(--text-muted);
  transition: transform 0.3s, opacity 0.3s, width 0.3s, background 0.3s;
  transform-origin: center;
}

.header__burger span:nth-child(2) { width: 65%; margin-left: auto; }

.header__burger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  background: var(--gold);
}
.header__burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.header__burger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  background: var(--gold);
}

/* ── Mobile nav ─────────────────────────────── */
.mobile-nav {
  display: none;
}

.mobile-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.mobile-nav.open .mobile-nav__overlay {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav__drawer {
  position: fixed;
  top: 0; right: 0;
  width: 300px;
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  z-index: 950;
  display: flex;
  flex-direction: column;
  padding: 48px 36px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.mobile-nav.open .mobile-nav__drawer {
  transform: translateX(0);
}

.mobile-nav__logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 48px;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.mobile-nav__link {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav__link:hover {
  color: var(--gold-light);
  padding-left: 8px;
}

.mobile-nav__footer {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── Gold line accent ───────────────────────── */
.header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width 0.8s ease;
  pointer-events: none;
}
.header.scrolled::after { width: 100%; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .header__nav { display: none; }

  .header__icons {
    position: absolute;
    right: 72px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    margin-left: 0;
  }

  .header__main {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0 20px;
  }

  .header__burger { display: flex; }
  .mobile-nav { display: block; }
}

@media (max-width: 520px) {
  .header__topbar { display: none; }
  --header-total: 76px;
}