/* Header styles for HomeAeroClima */

.ha-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 32, 45, 0.96);
  backdrop-filter: blur(14px);
  color: #f7fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.ha-header__brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.ha-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.ha-header__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: radial-gradient(circle at 30% 20%, #6be6ff 0, #0ea5e9 38%, #0f766e 80%);
  box-shadow: 0 0 0 1px rgba(148, 210, 255, 0.4), 0 8px 18px rgba(15, 23, 42, 0.6);
}

.ha-header__logo-text {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Navigation */

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

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

.ha-header__nav-link {
  position: relative;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #e2f3ff;
  text-decoration: none;
  padding: 0.35rem 0;
}

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

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

.ha-header__nav-link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
  border-radius: 3px;
}

.ha-header__nav-item--highlight .ha-header__nav-link--cta {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #38bdf8);
  color: #0b1723;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.5);
}

.ha-header__nav-item--highlight .ha-header__nav-link--cta::after {
  display: none;
}

.ha-header__nav-item--highlight .ha-header__nav-link--cta:hover,
.ha-header__nav-item--highlight .ha-header__nav-link--cta:focus-visible {
  background: linear-gradient(135deg, #16a34a, #0ea5e9);
}

/* Header actions (icons) */

.ha-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.ha-header__icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #e0f2fe;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 210, 255, 0.35);
  transition: background 0.18s ease-out, border-color 0.18s ease-out, transform 0.12s ease-out, box-shadow 0.18s ease-out;
}

.ha-header__icon-link:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(15, 23, 42, 0.7);
}

.ha-header__icon-link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.ha-header__icon-link--cart {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(45, 212, 191, 0.5);
}

.ha-header__cart-count {
  position: absolute;
  top: -0.25rem;
  right: -0.05rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.15rem;
  border-radius: 999px;
  background: #f97316;
  color: #0b1723;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8);
}

/* Mobile toggle */

.ha-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 210, 255, 0.4);
  background: rgba(15, 23, 42, 0.4);
  padding: 0;
  cursor: pointer;
  transition: background 0.18s ease-out, border-color 0.18s ease-out, transform 0.12s ease-out;
}

.ha-header__toggle:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: #38bdf8;
}

.ha-header__toggle:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.ha-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #e0f2fe;
  transition: transform 0.18s ease-out, opacity 0.18s ease-out, width 0.18s ease-out;
  margin: 2px 0;
}

/* Toggle animation when active */

.ha-header--menu-open .ha-header__toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
  width: 20px;
}

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

.ha-header--menu-open .ha-header__toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 20px;
}

/* Responsive layout */

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

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

  .ha-header__nav {
    position: fixed;
    inset: 56px 0 auto 0;
    max-height: 0;
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.98));
    border-bottom: 1px solid rgba(148, 210, 255, 0.28);
    transition: max-height 0.24s ease-out;
  }

  .ha-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.25rem 1rem 0.9rem;
    gap: 0.2rem;
  }

  .ha-header__nav-link {
    display: block;
    padding: 0.55rem 0.1rem;
  }

  .ha-header__nav-item--highlight .ha-header__nav-link--cta {
    width: 100%;
    text-align: center;
    margin-top: 0.4rem;
  }

  .ha-header__actions {
    gap: 0.4rem;
  }

  .ha-header--menu-open #ha-main-nav {
    max-height: 320px;
  }
}

@media (max-width: 520px) {
  .ha-header__inner {
    gap: 0.5rem;
  }

  .ha-header__logo-text {
    font-size: 0.98rem;
  }

  .ha-header__actions {
    gap: 0.25rem;
  }

  .ha-header__icon-link {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ha-header,
  .ha-header__nav,
  .ha-header__toggle-bar,
  .ha-header__icon-link,
  .ha-header__nav-link::after {
    transition: none !important;
  }
}
