/* ═══════════════════════════════════════════════════════════
   SEW Header — MOBILE FIRST
   Base: 390px → min-width: 480 → 768 → 992 → 1366
   ═══════════════════════════════════════════════════════════ */

.sew-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--sew-dark-600);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ─── Mobile Base (390px) ─────────────────────────────────── */
.sew-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

/* Logo */
.sew-header__logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sew-header__logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Fallback text logo (if image fails to load) */
.sew-header__logo-text {
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: 1.125rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.sew-header__logo-accent {
  color: var(--sew-primary-500);
  margin-left: 2px;
}

/* Desktop Nav — hidden on mobile */
.sew-header__nav {
  display: none;
  align-items: center;
  gap: 0.125rem;
}

.sew-header__nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.75rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.sew-header__nav-item:hover,
.sew-header__nav-item:focus {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.sew-header__nav-item svg {
  opacity: 0.65;
  flex-shrink: 0;
}

.sew-header__nav-item:hover svg {
  opacity: 1;
}

/* Actions */
.sew-header__actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

/* Hide desktop CTAs on mobile */
.sew-header__cta {
  display: none;
  padding: 0.4375rem 0.875rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.15s;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}

.sew-header__cta:hover {
  color: #fff;
}

.sew-header__cta--primary {
  background: var(--sew-primary-500);
  color: #fff;
}

.sew-header__cta--primary:hover {
  background: var(--sew-primary-700);
  color: #fff;
}

/* Mobile Toggle — grid-dots icon */
.sew-header__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: rgba(255,255,255,0.85);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.sew-header__toggle:hover {
  color: #fff;
}
.sew-header__toggle-grid,
.sew-header__toggle-close {
  display: block;
}
.sew-header__toggle-close {
  display: none;
}
.sew-header__toggle[aria-expanded="true"] .sew-header__toggle-grid {
  display: none;
}
.sew-header__toggle[aria-expanded="true"] .sew-header__toggle-close {
  display: block;
}

/* Mobile Nav Overlay */
.sew-header__mobile-nav {
  display: none;
  background: var(--sew-dark-600);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.75rem 1rem 1.25rem;
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
}

.sew-header__mobile-nav[aria-hidden="false"] {
  display: block;
}

.sew-header__mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── 2-column grid for nav links ─────────────────────── */
.sew-header__mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sew-header__mobile-item {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 0.875rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.sew-header__mobile-item:hover,
.sew-header__mobile-item:active {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}

.sew-header__mobile-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.65;
}

.sew-header__mobile-item:hover svg {
  opacity: 1;
}

.sew-header__mobile-account {
  display: block;
  text-align: center;
  padding: 0.875rem 1rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s;
}

.sew-header__mobile-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.sew-header__mobile-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 0.75rem !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
}

.sew-header__mobile-cta svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.sew-header__mobile-signin {
  color: #e6ebf5 !important;
  background: #233047 !important;
  border: 1px solid rgba(255,255,255,0.12);
}

.sew-header__mobile-signin:hover,
.sew-header__mobile-signin:active {
  background: #2b3c5c !important;
}

.sew-header__mobile-join {
  background: var(--sew-primary-500) !important;
  color: #fff !important;
}

.sew-header__mobile-join:hover,
.sew-header__mobile-join:active {
  background: var(--sew-primary-700) !important;
}

/* ─── Tablet (min-width: 768px) ──────────────────────────── */
@media (min-width: 768px) {
  .sew-header__inner {
    height: 64px;
    padding: 0 1.5rem;
  }

  .sew-header__logo-img {
    height: 42px;
  }

  .sew-header__nav {
    display: flex;
  }

  .sew-header__toggle {
    display: none;
  }

  .sew-header__mobile-nav {
    display: none !important;
  }

  .sew-header__cta {
    display: inline-flex;
  }
}

/* ─── Desktop (min-width: 992px) ─────────────────────────── */
@media (min-width: 992px) {
  .sew-header__nav {
    gap: 0.25rem;
  }

  .sew-header__nav-item {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
  }

  .sew-header__actions {
    gap: 0.5rem;
  }

  .sew-header__cta {
    padding: 0.5rem 1.125rem;
  }
}

/* ─── Wide (min-width: 1366px) ───────────────────────────── */
@media (min-width: 1366px) {
  .sew-header__inner {
    max-width: 1340px;
  }
}
