.search-container {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;

  padding-left: 24px;
  justify-content: flex-end;
}

.searchbar-container {
  display: flex;
  align-items: center;
  /* Vertically center the icon and input */
  gap: 12px;
  /* A smaller gap looks more like the image */
  padding: 10px 16px;
  /* Adjust padding for a more balanced look */
  width: 70%;

  border-radius: 99px;
  background: #fff;
  box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.05), 0 2px 8px rgba(0, 0, 0, 0.1);
  /* Updated box-shadow for a more prominent effect */
}

.searchbar-container .searchbar {
  flex-grow: 1;
  /* Allows the input to take up the remaining space */
  border: none;
  background: transparent;
  /* Makes the input's background transparent */
  outline: none;
  /* Removes the focus outline */
  padding: 0;
  /* Remove padding from input since the container has it */
  color: #333;
  font-size: 16px;
  /* Adjust font size */
}

.searchbar::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 24px;
  width: 24px;
  background: url("data:image/svg+xml;utf8,<svg fill='black' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M14.348 5.652a.5.5 0 0 0-.707 0L10 9.293 6.36 5.652a.5.5 0 1 0-.707.707L9.293 10l-3.64 3.64a.5.5 0 0 0 .707.707L10 10.707l3.64 3.64a.5.5 0 0 0 .707-.707L10.707 10l3.64-3.64a.5.5 0 0 0 0-.708z'/></svg>")
    no-repeat center;
  background-size: 24px 24px;
  cursor: pointer;
}

.searchbar-container .search-icon {
  width: 20px;
  /* Adjust icon size to better match the image */
  height: 20px;
}

.searchbar-container:focus-within {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 4px 0 rgba(12, 12, 13, 0.05);
}

/* Regras de visibilidade adicionadas aqui */
.header-area-mega-search {
  background-color: #f6f6f6;
  width: 100vw;
  /* display: none; Esconde por padrão */
}

.header-area-mega-search.active {
  display: block;
  /* Mostra quando a classe 'active' é adicionada */
}

.menu-group {
  display: flex;
  width: 28px;
  height: 28px;
  flex-direction: column;
  gap: 3px;
}

/* .searchbar {
  width: 100%;
} */

.search-content {
  padding: 0 16px 24px 16px;
  width: 100%;
}

.search-result-container {
  display: flex;
  max-height: 50vh;
  overflow-y: scroll;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  max-width: 1280px;
  padding: 0 48px 24px 48px;
  gap: 16px;
  background: rgb(246, 246, 246);
  margin: 0px auto 24px;
}

.search-result-content {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.search-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  gap: 16px;
}

.search-result h2 {
  font-size: 24px;
  color: #333;
}

.search-p {
  padding: 0 !important;
}

.result-img-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: stretch;
  gap: 24px;
}

.result-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.search-result-items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  padding-left: 24px;
  gap: 16px;
}

.result-img-item img {
  max-width: 138px;
  max-height: 64px;
}

.result-item > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  align-self: stretch;
  color: rgb(51, 51, 51);
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
}

.search-result-items > h3,
.result-img-item > .result-item > h3 {
  color: var(--botao-primario);
  font-size: 16px;
  font-weight: 400;
}

@media (max-width: 1200px) {
  .search-result-container {
    padding: 24px;
  }
}

@media (max-width: 1080px) {
  .searchbar-container {
    width: 60%;
  }

  .search-container {
    padding-left: 24px;
  }

  .search-result-container {
    padding: 24px;
  }
}

@media (max-width: 940px) {
  .searchbar-container {
    width: 100%;
  }

  .search-container {
    padding-left: 24px;
  }

  .search-result-items {
    padding: 0;
  }

  .header-nav-mega-menu {
    padding: 24px;
  }

  .logo {
    max-width: 72px;
    max-height: 36px;
  }

  .search-mobile {
    padding: 0 16px 24px 16px;
    width: 100%;
  }
}

@media (max-width: 470px) {
  .searchbar-container .searchbar {
    font-size: 12px;
  }

  .search-container .search-icon {
    max-width: 14px;
    max-height: 14px;
  }

  .header-nav-mega-menu {
    padding: 16px;
    gap: 16px;
  }

  .header-nav {
    padding: 16px;
  }

  .search-result-container {
    max-height: 90vh !important;
    padding: 24px 16px;
  }

  .search-container {
    padding: 0;
  }
}
