/**
 * header.css
 * Estilos do cabeçalho (header.php / template part "Header").
 *
 * Extraído do stylesheet principal do tema. Reúne apenas as classes
 * usadas pelo markup do header:
 *   .site-header, .home-header, .header-inner, .brand, .menu-toggle,
 *   .site-navigation, .header-icons, .header-icons-group, .icon-link,
 *   .lang-switch (+ .lang-switch-toggle, .lang-flag, .lang-menu,
 *   .lang-option), e a regra responsiva do menu mobile.
 *
 * Dependências globais (definidas no stylesheet principal do tema,
 * não duplicadas aqui): variáveis em :root (--ink, --paper, --navy,
 * --line, --sans), a classe utilitária .container e a classe .sr-only.
 * Se este ficheiro for usado isolado (sem o CSS principal), descomente
 * o bloco :root abaixo.
 */

/*
:root {
  --ink: #171717;
  --paper: #f7f5f0;
  --navy: #16324f;
  --line: rgba(23, 23, 23, 0.2);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*/

/* ---------- Estrutura base do header ---------- */
.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
}

.brand {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}

/* Variante usada na home (fundo branco, nav em maiúsculas) */
.home-header {
  background: #ffffff;
}

.home-header .header-inner {
  gap: 2rem;
}

/* ---------- Botão de menu (mobile) ---------- */
.menu-toggle {
  display: none;
  border: 0;
  padding: 0.25rem;
  color: var(--ink);
  background: transparent;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 1.5rem;
  height: 1px;
  margin: 0.35rem;
  background: currentColor;
}

/* ---------- Navegação principal ---------- */
.site-navigation {
  display: flex;
  gap: 1.75rem;
  font-size: 0.875rem;
}

.site-navigation a {
  text-decoration: none;
}

.site-navigation a:hover,
.site-navigation a:focus-visible {
  text-decoration: underline;
}

.home-header .site-navigation a {
  color: var(--navy);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.home-header .site-navigation a:hover,
.home-header .site-navigation a:focus-visible {
  text-decoration: underline;
}

/* ---------- Ícones (conta / carrinho) ---------- */
.header-icons {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--navy);
}

.header-icons-group {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.icon-link {
  display: inline-flex;
  color: var(--navy);
}

/* ---------- Seletor de idioma (lang-switch) ---------- */
.lang-switch {
  position: relative;
}

.lang-switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  padding: 0;
  background: none;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-flag {
  font-size: 1rem;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 10;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  min-width: 9.5rem;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border: 0;
  padding: 0.55rem 0.6rem;
  background: none;
  color: var(--ink);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: var(--muted);
}

.lang-option.is-active {
  font-weight: 700;
}

/* ---------- Responsivo (menu mobile) ---------- */
@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }

  .site-navigation {
    position: absolute;
    top: 4.5rem;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .site-navigation.is-open {
    display: flex;
  }
}