/* Header styles for StyleWearHubPL */

.swh-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(to bottom, rgba(247, 244, 240, 0.98), rgba(247, 244, 240, 0.92));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 221, 215, 0.9);
}

.swh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

/* Brand / logo */

.swh-header__brand {
  display: flex;
  align-items: center;
}

.swh-header__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.swh-header__logo::after {
  display: none;
}

.swh-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: radial-gradient(circle at 30% 20%, #ffffff, #e3d2b9);
  color: var(--color-primary-contrast);
}

.swh-header__logo-text {
  font-weight: 500;
}

/* Navigation */

.swh-header__nav {
  display: flex;
  align-items: center;
}

.swh-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.swh-header__nav-link {
  position: relative;
  font-size: var(--font-size-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.swh-header__nav-link::after {
  height: 1px;
}

.swh-header__nav-link:hover,
.swh-header__nav-link:focus-visible {
  color: var(--color-primary);
}

.swh-header__nav-item--accent .swh-header__nav-link--accent {
  padding-inline: 1.4rem;
  padding-block: 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-primary-soft);
  background-color: rgba(194, 162, 123, 0.08);
}

.swh-header__nav-item--accent .swh-header__nav-link--accent::after {
  display: none;
}

.swh-header__nav-item--accent .swh-header__nav-link--accent:hover,
.swh-header__nav-item--accent .swh-header__nav-link--accent:focus-visible {
  background-color: var(--color-primary);
  color: var(--color-primary-contrast);
}

/* Mobile toggle */

.swh-header__toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--color-gray-200);
  background-color: rgba(255, 255, 255, 0.8);
}

.swh-header__toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.swh-header__toggle-bar {
  width: 18px;
  height: 1.5px;
  background-color: var(--color-text);
  border-radius: 999px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.swh-header__toggle-bar + .swh-header__toggle-bar {
  margin-top: 5px;
}

/* Toggle animation when menu is open */

.swh-header--nav-open .swh-header__toggle-bar:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.swh-header--nav-open .swh-header__toggle-bar:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Responsive behaviour */

@media (max-width: 768px) {
  .swh-header__inner {
    padding-block: var(--space-3);
  }

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

  .swh-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: rgba(247, 244, 240, 0.98);
    border-bottom: 1px solid rgba(226, 221, 215, 0.9);
    transform-origin: top;
    transform: scaleY(0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  }

  .swh-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .swh-header__nav-link {
    padding-block: 0.35rem;
  }

  .swh-header--nav-open .swh-header__nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scaleY(1);
  }
}

/* High-contrast focus adjustment for links */

.swh-header__nav-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
