/* =========================================
   HEADER GERAL
   ========================================= */
header {
  background-color: var(--azulEscuro);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* === LINHA SUPERIOR: LOGO + MENU + ÍCONES === */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11%;
  height: 80px;
  width: 100%;
}

.logo-header img {
  height: 55px;
  object-fit: contain;
}

/* =========================================
   MENU DESKTOP
   ========================================= */
.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}

.menu a {
  color: var(--branco);
  text-decoration: none;
  font-weight: 700;
  margin: 0 15px;
  font-size: 17px;
  padding: 8px 12px;
  border-radius: 10px;
  transition: 0.3s ease;
  white-space: nowrap;
}

.menu a:hover {
  background-color: var(--branco);
  color: var(--azulEscuro);
}

.botaoEntrar {
  border-radius: 12px;
  padding: 6px 12px;
  background-color: var(--branco);
  color: var(--azulEscuro);
  font-weight: 800;
}

/* =========================================
   BARRA DE BUSCA INLINE (DESKTOP)
   ========================================= */
.inline-search {
  width: clamp(150px, 15vw, 250px);
  margin-left: 15px;
  display: flex;
  align-items: center;
  background-color: var(--branco);
  border-radius: 10px;
  overflow: hidden;
  height: 38px;
  transition: width 0.3s ease;
}

.inline-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 0.9rem;
  font-family: "Montserrat", sans-serif;
}

.inline-search button {
  background-color: var(--azulClaro);
  color: var(--branco);
  border: none;
  width: 42px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}

.inline-search button:hover {
  background-color: var(--branco);
  color: var(--azulEscuro);
}

/* =========================================
   ÍCONES DO HEADER
   ========================================= */
.headerUserIcon i,
#cart-icon i {
  color: var(--branco);
  font-size: 20px;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--branco);
  color: var(--azulEscuro);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
}

/* =========================================
   MENU MOBILE
   ========================================= */
.hamburger-menu {
  display: none;
  cursor: pointer;
}

.hamburger-menu i {
  font-size: 30px;
  color: var(--branco);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background-color: var(--azulEscuro);
  position: absolute;
  top: 125px;
  width: 100%;
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu a {
  color: var(--branco);
  text-decoration: none;
  font-weight: 700;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.mobile-menu a:hover {
  background-color: var(--branco);
  color: var(--azulEscuro);
}

.mobile-menu.open {
  display: flex !important;
}

/* =========================================
   BARRA DE BUSCA (MOBILE)
   ========================================= */
.mobile-search-bar {
  display: flex;
  align-items: center;
  background-color: var(--branco);
  border-radius: 10px;
  overflow: hidden;
  height: 40px;
  margin: 15px auto 10px auto;
  width: 85%;
}

.desktop {
  display: none;
}

.mobile-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 0.9rem;
  font-family: "Montserrat", sans-serif;
}

.mobile-search-bar button {
  background-color: var(--azulClaro);
  color: var(--branco);
  border: none;
  width: 45px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: 0.3s ease;
}

.mobile-search-bar button:hover {
  background-color: var(--branco);
  color: var(--azulEscuro);
}

/* =========================================
   RESPONSIVIDADE
   ========================================= */
@media screen and (max-width: 1150px) {
  .inline-search {
    display: none; /* esconde no tablet/mobile */
  }

  .desktop {
    display: flex;
  }

  .hamburger-menu {
    display: block;
  }

  .menu {
    display: none; /* menu desktop some */
  }

  .header-top {
    padding: 0 6%;
    height: 70px;
  }

  .logo-header img {
    height: 45px;
  }
}

@media screen and (max-width: 700px) {
  .header-top {
    padding: 0 5%;
  }

  .logo-header img {
    height: 40px;
  }

  .mobile-menu a {
    font-size: 0.95rem;
    padding: 14px;
  }
}

@media screen and (max-width: 480px) {
  .header-top {
    height: 65px;
  }

  .logo-header img {
    height: 36px;
  }

  .hamburger-menu i {
    font-size: 26px;
  }

  .mobile-search-bar {
    height: 36px;
  }

  .mobile-search-bar input {
    font-size: 0.85rem;
  }

  .mobile-search-bar button {
    width: 40px;
    font-size: 0.9rem;
  }
}

.mobile-dropdown {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mobile-dropdown-btn {
  background: none;
  color: var(--branco);
  font-weight: 700;
  border: none;
  text-align: center;
  padding: 15px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.mobile-dropdown-btn i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.mobile-dropdown-btn.open i {
  transform: rotate(180deg);
}

.mobile-filters {
  display: none;
  flex-direction: column;
  background-color: #152051;
  max-height: 60vh;
  overflow-y: auto;
}

.mobile-filters.open {
  display: flex;
}

.mobile-filters .category {
  padding: 12px 18px;
  color: var(--branco);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-filters .subcategory {
  padding: 10px 25px;
  color: #dcdcdc;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  cursor: pointer;
}

.mobile-filters .subcategory:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
