/* ═══════════════════════════════════════════════════════════════════════════
 * navbar.css — moderno, arejado, com hierarquia visual clara
 * ═══════════════════════════════════════════════════════════════════════════ */

.navbar {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 91, 69, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(2, 32, 58, 0.05);
  font-family: 'Manrope', 'Segoe UI', Tahoma, sans-serif;
}

.navbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ── Brand (logo + nome) ────────────────────────────────────────────────── */
.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.navbar-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(2, 32, 58, 0.12);
}
.navbar-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: #10232f;
  white-space: nowrap;
  letter-spacing: -0.01em;
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── Nav links principais (centro) ──────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  position: relative;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  color: #2a3947;
  text-decoration: none;
  transition: color .15s, background .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-link:hover { background: rgba(15, 91, 69, 0.06); color: #0f5b45; }
.nav-link.active {
  background: rgba(15, 91, 69, 0.10);
  color: #0f5b45;
  font-weight: 800;
}

/* ── Dropdown destinos ──────────────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  padding: 9px 16px;
  color: #2a3947;
}
.nav-dropdown.active > .nav-dropdown-trigger {
  background: rgba(15, 91, 69, 0.10);
  color: #0f5b45;
  font-weight: 800;
}
.dropdown-caret { font-size: 0.7rem; opacity: 0.6; margin-left: 2px; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border-radius: 14px;
  padding: 6px;
  min-width: 220px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(15, 91, 69, 0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
/* [hidden] precisa vencer o display:flex acima */
.nav-dropdown-menu[hidden] { display: none !important; }
.dropdown-item {
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #2a3947;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background .12s;
}
.dropdown-item:hover { background: rgba(15, 91, 69, 0.08); color: #0f5b45; }
.dropdown-item.active { background: rgba(15, 91, 69, 0.10); color: #0f5b45; font-weight: 800; }

/* ── Right side actions ─────────────────────────────────────────────────── */
.navbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Botão circular reutilizável */
.nav-pill,
.nav-weather,
.nav-cart-btn,
.lang-current,
.nav-login-link,
.nav-account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  height: 40px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: #10232f;
  background: #f6f1e8;
  border: 1px solid #eee5d6;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.nav-weather:hover,
.nav-cart-btn:hover,
.lang-current:hover,
.nav-login-link:hover,
.nav-account-link:hover {
  background: #fff;
  border-color: #0f5b45;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 91, 69, 0.12);
}

/* Weather chip */
.nav-weather-emoji { font-size: 1.1rem; line-height: 1; }
.nav-weather-text { font-weight: 600; }

/* Cart button */
.nav-cart-btn { gap: 6px; font-weight: 700; }
#nav-cart-count {
  background: #0f5b45;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Idiomas ────────────────────────────────────────────────────────────── */
.lang-select { position: relative; display: inline-flex; }
.lang-current {
  gap: 0;
  padding: 0;
}
.lang-current.lang-current-compact {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  overflow: hidden;
  background: #f6f1e8;
  border: 1px solid #eee5d6;
}
.lang-current.lang-current-compact .lang-current-flag {
  width: 26px;
  height: 18px;
  border-radius: 3px;
}
.lang-current-flag,
.lang-option-flag {
  width: 32px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.20);
  flex-shrink: 0;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(15, 91, 69, 0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-menu[hidden] { display: none; }
.lang-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #2a3947;
  transition: background .12s;
}
.lang-option:hover { background: rgba(15, 91, 69, 0.06); }
.lang-option.is-active {
  background: rgba(15, 91, 69, 0.10);
  color: #0f5b45;
  font-weight: 800;
}

/* ── Mobile-extra (escondido no desktop, mostrado só no menu mobile) ──── */
.nav-mobile-extra { display: none; }

/* ── Auth (Entrar / Conta / Sair / Criar conta) ─────────────────────────── */
.nav-auth-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(15, 91, 69, 0.12);
  margin-left: 4px;
}

.nav-login-link {
  font-weight: 700;
}
.nav-signup-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
  background: linear-gradient(135deg, #0f5b45 0%, #0d4a39 100%);
  border: 0;
  text-decoration: none;
  transition: transform .12s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(15, 91, 69, 0.30);
  letter-spacing: 0.01em;
}
.nav-signup-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 91, 69, 0.40);
}

.nav-account-link {
  gap: 8px;
}
.nav-logout-btn {
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .12s, color .12s;
}
.nav-logout-btn:hover { background: #fff5f5; color: #b94545; }

/* ── Mobile menu toggle ─────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav-toggle:hover { background: rgba(15, 91, 69, 0.08); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nav-weather-text {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .navbar-name { font-size: 1.05rem; }
}

@media (max-width: 920px) {
  .nav-signup-link { display: none; }
  .nav-weather { padding: 9px 12px; }
  .nav-weather-text { max-width: 60px; }
}

@media (max-width: 768px) {
  .navbar-inner { padding: 0 16px; height: 64px; gap: 12px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-110%);
    transition: transform .25s ease;
    z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link {
    padding: 12px 16px;
    border-radius: 10px;
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 0 0 6px 16px;
    margin-top: 4px;
  }
  .navbar-actions { gap: 6px; }
  .navbar-name { display: none; }
  .nav-account-link span:not([aria-hidden]),
  .nav-login-link span:not([aria-hidden]) { display: none; }
  .nav-account-link, .nav-login-link, .nav-cart-btn, .nav-weather {
    padding: 9px 12px;
  }
  .nav-auth-wrap { padding-left: 6px; }
  .nav-logout-btn { display: none; }
}


/* ════════════════════════════════════════════════════════════════════════
 * MOBILE (≤640px): esconde navbar do topo, usa .mobile-app-nav bottom
 * Pattern: Instagram/AirBnB — header desktop fica intacto.
 * ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Esconde TODA a navbar topo no mobile */
  .navbar { display: none; }

  /* Body precisa de padding-bottom pra bottom-nav nao tampar conteudo */
  body { padding-bottom: calc(64px + var(--safe-bottom, 0px)); }
}
