.announcement {
  background: var(--gold);
  padding: 10px;
  p,
  a {
    text-decoration: none;
    color: var(--white);
    text-align: center;
    font-size: 14px;
  }
  a:hover {
    opacity: 0.7;
  }
}

.main-header {
  .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  nav {
    width: 100%;
    display: flex;
    align-items: center;
  }
  .logo {
    display: inline-block;
    img {
      display: inline-block;
      width: 100px;
    }
  }
  .search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;

    .hamburger-menu {
      display: none;
    }

    .category-select {
      display: flex;
      min-width: 100px;
      border: 1px solid var(--border);
      height: 54px;
      border-radius: 0 40px 40px 0;
      border-left: none;
      justify-content: center;
      background: var(--white);
      cursor: pointer;
      outline: none;
      font-size: 14px;
      appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      padding: 0 15px 0 30px;
      &:focus,
      &:active {
        box-shadow: none !important;
        outline: none !important;
      }
    }

    .category-select,
    .search-input {
      height: 52px;
      box-sizing: border-box;
    }

    .search-input {
      flex: 1;
      display: flex;
      padding: 0 10px;
      position: relative;
      align-items: center;
      border: 1px solid var(--border);
      border-right: none;
      border-radius: 40px 0 0 40px;
      z-index: 10;
      &::before {
        content: "";
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: var(--border);
        width: 1px;
        height: 20px;
        right: 5px;
      }
      &::after {
        content: "\f078"; /* FontAwesome Unicode for "angle-down" */
        font-family: "Font Awesome 6 Free"; /* Use the correct FontAwesome family */
        font-weight: 900; /* Required for solid icons */
        position: absolute;
        top: 50%;
        right: -1.5rem;
        transform: translateY(-50%);
        pointer-events: none; /* Ensure clicks pass through to the select */
        font-size: 0.875rem;
        color: var(--text);
      }

      input {
        width: 100%;
        padding: 0 10px;
        outline: none;
        border: none;
        height: 100%;
        flex: 1;
        font-size: 14px;
      }

      .search-button {
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        i {
          font-size: 16px;
          color: var(--text);
        }
      }

      .search-results {
        max-height: 300px;
        overflow-y: auto;
        position: absolute;
        top: calc(100% + 1px);
        background: var(--white);
        width: calc(100% - 36px);
        box-shadow: 0 12px 20px 3px rgb(0 0 0 / 14%);
        right: 0;
        border-radius: 0 0 10px 10px;
        display: none;
        flex-direction: column;
        p {
          font-size: 14px;
        }
        &::-webkit-scrollbar {
          width: 8px;
        }
        &::-webkit-scrollbar-thumb {
          background: var(--border);
        }
        &.show {
          display: flex;
        }
        .search-result-item {
          a {
            padding-right: 12px;
            padding-top: 12px;
            padding-bottom: 12px;
            text-decoration: none;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            .result-image {
              overflow: hidden;
              position: relative;
              margin-left: 10px;
              width: 50px;
              height: 50px;
              img {
                position: absolute;
                width: 100%;
                height: auto;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
              }
            }
            &:hover {
              background-color: rgba(0, 0, 0, 0.02);
              color: var(--gold);
            }
          }
        }
      }
    }
  }
  .navigation {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    &.fixed-navigation {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      opacity: 0.9;
      background-color: var(--white);
      z-index: 1000;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .nav-links {
      display: flex;
      gap: 30px;
      transition: all 0.3s ease-in-out;
      width: 100%;
      background-color: var(--white);
      padding: 0 24px;
      &.category-menu {
        width: 30%;
        .menu-item {
          &:hover {
            .dropdown-menu {
              top: 0;
              display: block;
            }
          }
        }
        > .dropdown {
          gap: 10px;
          align-items: center;
          display: flex;
          &:hover {
            .dropdown-menu:not(.inner) {
              display: block;
            }
          }
          .dropdown-menu {
            top: 100%;
          }
        }
        border-left: 1px solid var(--border);
      }
      > li,
      > .dropdown {
        position: relative;
        display: inline-block;
        > a {
          padding: 15px 0;
        }
        a {
          text-decoration: none;
          display: block;
          font-size: 14px;
          &:hover {
            color: var(--gold);
          }
          &.dropdown-toggle {
            text-decoration: none;
            &::after {
              content: "\f107";
              font-family: "Font Awesome 5 Free";
              font-weight: 900;
              margin-right: 5px;
            }
          }
        }
      }
      .dropdown {
        &:hover {
          > .dropdown-menu {
            display: block;
          }
        }
      }

      .dropdown-menu li {
        position: relative;
        a.dropdown-toggle::after {
          content: "\f104";
          position: absolute;
          left: 10px;
          top: 50%;
          transform: translateY(-50%);
        }
        .dropdown-menu {
          position: absolute;
          right: 100%;
          top: 0;
          a:hover {
            background-color: var(--white);
          }
        }
      }
    }
  }
}

.navigation .categories-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  border-left: 1px solid var(--border);
  padding-left: 200px;
  margin-left: 200px;
}

.exit {
  position: absolute;
  left: 20px;
  top: 20px;
  display: flex;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: var(--white);
  min-width: 160px;
  z-index: 1;
  border: 1px solid var(--border);
  a {
    padding: 8px 15px;
    display: block;
    text-decoration: none;
    font-size: 14px;
  }

  li {
    list-style: none;
    &:hover,
    &.active {
      color: var(--gold);
    }
  }
}

.menu-btn {
  position: fixed;
  top: 50px;
  right: 20px;
  z-index: 1000;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
}

.menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
  a {
    color: var(--white);
    text-decoration: none;
    font-size: 24px;
    margin: 15px 0;
    transition: color 0.3s;
    &.active {
      transform: translateX(0);
    }
  }
}

/* media queries */
@media (max-width: 425px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 200;
    padding: 2rem;
    transition: transform 0.3s ease-in-out;
    align-items: flex-start !important;
    transform: translateX(-100%);
    &.open {
      transform: translateX(0);
    }
    ul {
      list-style: none;
      padding: 0;
      margin: 0;
      li {
        margin-bottom: 1rem;
        a {
          text-decoration: none;
          color: var(--text);
          font-size: 1.2rem;
        }
      }
    }
  }

  .navigation {
    display: none;
  }
  .main-header {
    border-bottom: 1px solid var(--border);
    .search-bar {
      .category-select {
        display: none;
      }
      .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 2rem;
        height: 2rem;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 9;
        i {
          font-size: 20px;
        }
      }
    }
    .search-input {
      border: 1px solid var(--border) !important;
      border-radius: 40px !important;
      &::before {
        display: none;
      }
      &::after {
        display: none;
      }
    }
  }
}

@media (min-width: 768px) {
  .logo img {
    margin-left: -100px;
    display: inline-block;
    width: 100px;
  }
}
