/* Header styles for GadgetMarketPL */

.gm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(3, 4, 6, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(120, 249, 142, 0.16);
}

.gm-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.gm-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.gm-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.gm-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 0.75rem;
  background: radial-gradient(circle at 30% 20%, #78f98e, #0ef0ff 55%, #181a20 100%);
  box-shadow: 0 0 18px rgba(120, 249, 142, 0.6);
}

.gm-header__logo-text {
  display: flex;
  flex-direction: column;
}

.gm-header__logo-main {
  font-family: "Orbitron", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #f9fafb;
}

.gm-header__logo-sub {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.7rem;
  color: #9ca3af;
  white-space: nowrap;
}

/* Navigation */

.gm-header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.gm-header__nav-list {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gm-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.2rem;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e5e7eb;
  text-decoration: none;
  transition: color 150ms ease-out;
}

.gm-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0ef0ff, #78f98e);
  border-radius: 999px;
  transition: width 180ms ease-out;
}

.gm-header__nav-link:hover,
.gm-header__nav-link:focus-visible {
  color: #ffffff;
}

.gm-header__nav-link:hover::after,
.gm-header__nav-link:focus-visible::after {
  width: 100%;
}

.gm-header__nav-link:focus-visible {
  outline: 2px solid #0ef0ff;
  outline-offset: 3px;
}

/* CTA button */

.gm-header__cta-wrap {
  display: flex;
  align-items: center;
}

.gm-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 249, 142, 0.8);
  background: radial-gradient(circle at 0 0, rgba(14, 240, 255, 0.3), transparent 60%), #050608;
  color: #f9fafb;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(120, 249, 142, 0.4);
  transition: background 160ms ease-out, transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out;
}

.gm-header__cta:hover,
.gm-header__cta:focus-visible {
  background: linear-gradient(135deg, #0ef0ff, #78f98e);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(14, 240, 255, 0.35);
}

.gm-header__cta:focus-visible {
  outline: 2px solid #0ef0ff;
  outline-offset: 3px;
}

/* Mobile toggle */

.gm-header__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at 30% 0, rgba(14, 240, 255, 0.3), transparent 60%), rgba(15, 23, 42, 0.9);
  cursor: pointer;
  padding: 0;
  justify-content: center;
  align-items: center;
}

.gm-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 160ms ease-out, opacity 160ms ease-out, width 160ms ease-out;
}

.gm-header__toggle-bar + .gm-header__toggle-bar {
  margin-top: 4px;
}

.gm-header__toggle:focus-visible {
  outline: 2px solid #0ef0ff;
  outline-offset: 3px;
}

/* Toggle active state */

.gm-header--nav-open .gm-header__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.gm-header--nav-open .gm-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.gm-header--nav-open .gm-header__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile layout */

@media (max-width: 768px) {
  .gm-header__inner {
    padding: 0.6rem 1rem;
  }

  .gm-header__logo-main {
    font-size: 1rem;
  }

  .gm-header__logo-sub {
    display: none;
  }

  .gm-header__toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .gm-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(3, 4, 6, 0.98);
    border-bottom: 1px solid rgba(55, 65, 81, 0.7);
    transform-origin: top;
    transform: scaleY(0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease-out, transform 150ms ease-out;
    flex-direction: column;
    align-items: stretch;
  }

  .gm-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.25rem 1rem 0.5rem;
  }

  .gm-header__nav-item {
    border-radius: 0.75rem;
  }

  .gm-header__nav-link {
    width: 100%;
    padding: 0.7rem 0.25rem;
  }

  .gm-header__cta-wrap {
    padding: 0 1rem 0.75rem;
  }

  .gm-header__cta {
    width: 100%;
  }

  /* Open state controlled via JS by toggling .gm-header--nav-open */
  .gm-header--nav-open .gm-header__nav {
    opacity: 1;
    pointer-events: auto;
    transform: scaleY(1);
  }
}

@media (max-width: 480px) {
  .gm-header__inner {
    gap: 0.75rem;
  }

  .gm-header__logo-mark {
    width: 28px;
    height: 28px;
  }
}
