/* Header styles for Poland Bazaar */

.pb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid #e1e3e6;
  backdrop-filter: blur(8px);
}

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

.pb-skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: #111827;
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  z-index: 1100;
}

.pb-skip-link:focus {
  left: 0.75rem;
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

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

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

.pb-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 0.6rem;
  background: radial-gradient(circle at 30% 30%, #f97373, #b91c1c 55%, #7f1d1d 100%);
}

.pb-header__site-name {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: #111827;
}

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

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

.pb-header__nav-link {
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  padding: 0.4rem 0.25rem;
  border-radius: 999px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.pb-header__nav-link:hover,
.pb-header__nav-link:focus-visible {
  color: #111827;
  background-color: #f3f4f6;
  outline: none;
}

.pb-header__nav-link:focus-visible {
  box-shadow: 0 0 0 2px #ef4444;
}

.pb-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pb-header__action-link {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  border: 1px solid transparent;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.pb-header__action-link--secondary {
  color: #374151;
  border-color: #e5e7eb;
  background-color: #ffffff;
}

.pb-header__action-link--secondary:hover,
.pb-header__action-link--secondary:focus-visible {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  outline: none;
}

.pb-header__action-link--primary {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.25);
}

.pb-header__action-link--primary:hover,
.pb-header__action-link--primary:focus-visible {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.3);
  outline: none;
}

.pb-header__action-link:focus-visible {
  box-shadow: 0 0 0 2px #fef2f2, 0 0 0 4px #ef4444;
}

/* Mobile toggle */
.pb-header__toggle {
  display: none;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  padding: 0.4rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.2rem;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.pb-header__toggle-bar {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background-color: #111827;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.pb-header__toggle:hover,
.pb-header__toggle:focus-visible {
  background-color: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 0 0 2px #fef2f2, 0 0 0 4px #ef4444;
  outline: none;
}

.pb-header__toggle[aria-expanded="true"] .pb-header__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.pb-header__toggle[aria-expanded="true"] .pb-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.pb-header__toggle[aria-expanded="true"] .pb-header__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Responsive layout */
@media (max-width: 768px) {
  .pb-header__inner {
    padding-block: 0.5rem;
  }

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

  .pb-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    display: none;
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
  }

  .pb-header__nav--open {
    display: flex;
  }

  .pb-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
  }

  .pb-header__nav-link {
    width: 100%;
    padding: 0.5rem 0.25rem;
  }

  .pb-header__actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.25rem;
  }

  .pb-header__action-link {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-header *,
  .pb-header *::before,
  .pb-header *::after {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}