/* Header styles for CleanHomePL */
.ch-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(15, 52, 96, 0.06);
  backdrop-filter: blur(10px);
}

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

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

.ch-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.ch-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  position: relative;
  overflow: hidden;
}

.ch-header__logo-mark::after {
  content: "";
  position: absolute;
  inset: 18% 18% auto auto;
  width: 70%;
  height: 70%;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.ch-header__logo-text {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
  white-space: nowrap;
}

.ch-header__nav {
  flex: 1;
}

.ch-header__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ch-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2933;
  text-decoration: none;
  padding: 0.35rem 0;
}

.ch-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #facc15);
  transition: width 0.18s ease-out;
}

.ch-header__nav-link:focus-visible,
.ch-header__nav-link:hover {
  color: #0f172a;
}

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

.ch-header__nav-link:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 3px;
  border-radius: 4px;
}

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

.ch-header__cart {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 52, 96, 0.08);
  background-color: #f9fafb;
  color: #0f172a;
  text-decoration: none;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.ch-header__cart-icon {
  color: #22c55e;
  display: inline-flex;
}

.ch-header__cart-count {
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  padding: 0 0.2rem;
  background-color: #22c55e;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ch-header__cart:hover,
.ch-header__cart:focus-visible {
  background-color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.6);
}

.ch-header__cart:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 3px;
}

/* Mobile toggle */
.ch-header__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(15, 52, 96, 0.12);
  background-color: #ffffff;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ch-header__toggle-bar {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background-color: #0f172a;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

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

.ch-header__toggle:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 3px;
}

/* Toggle open state */
.ch-header--menu-open .ch-header__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

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

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

/* Mobile menu */
@media (max-width: 768px) {
  .ch-header__inner {
    padding-inline: 1rem;
  }

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

  .ch-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid rgba(15, 52, 96, 0.06);
    transform-origin: top;
  }

  .ch-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1.25rem 1rem;
    max-height: none;
  }

  /* Progressive enhancement: visible by default, JS will add class to manage state */
  .ch-header__nav--collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: scaleY(0.97);
    transition: max-height 0.18s ease-out, opacity 0.18s ease-out, transform 0.18s ease-out;
  }

  .ch-header__nav--expanded {
    max-height: 400px;
    opacity: 1;
    transform: scaleY(1);
  }

  .ch-header__nav-link {
    padding: 0.6rem 0;
  }

  .ch-header__actions {
    margin-left: 0.25rem;
  }

  .ch-header__logo-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .ch-header__cart-label {
    display: none;
  }
}
