/* Header styles for Bloem Haven */

.bh-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.bh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  gap: var(--space-4);
}

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

.bh-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--color-text);
}

.bh-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f9e3ea, #f28a9b 45%, #2f7b5a 70%);
  box-shadow: var(--shadow-md);
}

.bh-header__site-name {
  font-family: var(--font-serif);
  font-size: var(--font-size-xl);
  letter-spacing: 0.03em;
}

/* Navigation */

.bh-header__nav {
  flex: 1 1 auto;
}

.bh-header__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  list-style: none;
}

.bh-header__nav-link {
  position: relative;
  padding: 0.35rem 0;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-soft);
}

.bh-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #f28a9b, #2f7b5a);
  transition: width var(--transition-normal);
}

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

/* Actions */

.bh-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.bh-header__action-button {
  white-space: nowrap;
}

.bh-header__icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface-soft);
  color: var(--color-text-soft);
}

.bh-header__icon-link:hover {
  background-color: var(--gray-100);
  color: var(--color-primary-strong);
}

.bh-header__cart-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
}

/* Mobile toggle */

.bh-header__toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
}

.bh-header__toggle-text {
  font-size: var(--font-size-sm);
}

.bh-header__toggle-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.bh-header__toggle-line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--color-text);
  transition: var(--transition-base);
}

.bh-header__toggle--open .bh-header__toggle-line:first-child {
  transform: translateY(3px) rotate(45deg);
}

.bh-header__toggle--open .bh-header__toggle-line:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* Responsive layout */

@media (max-width: 960px) {
  .bh-header__inner {
    gap: var(--space-2);
  }

  .bh-header__nav-list {
    gap: var(--space-3);
  }

  .bh-header__action-button {
    display: none;
  }
}

@media (max-width: 768px) {
  .bh-header__inner {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  .bh-header__toggle {
    display: inline-flex;
  }

  .bh-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: var(--color-surface);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    transform-origin: top;
  }

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

  .bh-header__nav-link {
    width: 100%;
    padding: 0.6rem 0;
  }

  .bh-header__nav-link::after {
    display: none;
  }

  .bh-header__nav-list.bh-header__nav-list--collapsed {
    display: none;
  }

  .bh-header__nav-list.bh-header__nav-list--open {
    display: flex;
  }

  .bh-header__actions {
    gap: var(--space-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bh-header,
  .bh-header__nav,
  .bh-header__toggle-line {
    scroll-behavior: auto;
    transition: none;
  }
}