.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background-color: var(--white);
}

.header > div {
  display: flex;
  align-items: center;
  padding: 1.6rem;
  justify-content: space-between;
}

.header .nav {
  position: fixed;
  top: 5.8rem;
  left: 0;
  height: calc(100vh - 5.8rem);
  width: 100%;
  background-color: var(--gray-light);
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  padding-left: -4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.socials {
  position: absolute;
  left: 50%;
  bottom: 8rem;
  transform: translateX(-50%);
  display: flex;
  gap: 1.2rem;
}

.socials svg {
  width: 3.2rem;
  height: 3.2rem;
}

.header .nav .navList {
  list-style: none;
  margin-top: -6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  position: relative;
}

.header .nav .navList li a {
  font-size: 2.4rem;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 2.4rem;
  display: block;
}

.open {
  transform: translateX(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.logo {
  position: relative;
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 36 / 5;
}

.search {
  padding-left: 3.2rem;
  background: var(--red) url("/images/search.svg") no-repeat 0.8rem center;
  background-size: 2.4rem;
  border: none;
  border-radius: 2.4rem;
  display: none;
  position: relative;
}

.search input {
  padding: 0.8rem 1.6rem 0.8rem 0.4rem;
  width: 100%;
  max-width: 16rem;
  border: none;
  border-radius: 0.4rem;
  font-size: 1.6rem;
  background-color: transparent;
  color: var(--white);
  outline: none;
  height: 3.4rem;
  display: none;
}

.mobileSearch {
  background: url("/images/search-red.svg") no-repeat center center;
  background-size: 3.6rem;
  width: 2.4rem;
  height: 2.4rem;
  cursor: pointer;
}

.search input::placeholder {
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 300;
  font-family: var(--font-open-sans);
}

.burger {
  background: url("/images/burger.svg") no-repeat center center;
  background-size: 3.2rem;
  width: 2.4rem;
  height: 2.4rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.burgerOpen {
  background: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.burgerOpen::before {
  content: "✕";
  font-size: 3.2rem;
  font-weight: 300;
}

/* Mobile Search Overlay */
.mobileSearchOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 20000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.mobileSearchContainer {
  width: calc(100% - 2.4rem);
  position: absolute;
  left: 1.2rem;
  top: 0;
  max-width: 42rem;
}

.mobileSearchClose {
  position: absolute;
  top: 1.4rem;
  right: 0.8rem;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
  z-index: 20001;
}

.mobileSearchInput {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  width: 100%;
  border-radius: 2.4rem;
}

.mobileSearchInput input {
  width: 100%;
  padding: 1rem 1rem 0.8rem;
  border: none;
  outline: none;
  font-size: 1.6rem;
  border-radius: 2.4rem;
}

.mobileSearchButton {
  background-color: var(--white);
  border: none;
  padding: 0.8rem;
  cursor: pointer;
}

.actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.bgImage {
  background: url("/images/auto-frogy-icon.webp") no-repeat bottom center;
  background-size: contain;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-47%);
  right: 0;
  bottom: 15%;
  z-index: -1;
  width: 90dvw;
  opacity: 0.2;
}

.header .nav .navList li a {
  text-decoration: none;
}

.activeLink {
  color: var(--gray-ultra-dark);
  opacity: 0.6;
}

.productsDropdown {
  opacity: 0;
  visibility: hidden;
  display: none;
}

@media screen and (min-width: 768px) {
  .mobileSearchContainer {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media screen and (min-width: 968px) {
  .header .nav .navList {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 1rem;
    text-transform: uppercase;
    flex-direction: row;
  }

  .header .nav .navList li {
    font-weight: 700;
  }

  .search {
    display: block;
  }

  .search input {
    display: block;
  }

  .header .nav {
    position: relative;
    all: unset;
  }

  .header .nav .navList li a {
    font-size: 1.6rem;
    margin-bottom: 0;
    font-weight: 700;
  }

  .bgImage,
  .socials,
  .mobileSearchOverlay,
  .mobileSearch,
  .actions,
  .burger {
    display: none;
  }
}

@media screen and (min-width: 1024px) {
  /* Using existing relative positioning from line ~246 */

  .productsDropdown {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) !important;
    min-width: 24rem;
    background-color: var(--white);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.6rem;
    border-radius: 1.6rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .productsDropdown.open {
    opacity: 1;
    visibility: visible;
  }

  .productsList {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    list-style: none;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .nav .navList .productsList li a {
    font-size: 1.4rem;
    text-transform: none;
    transition: all 0.3s ease;
  }

  .nav .navList .productsList li a:hover {
    color: var(--gray-ultra-dark);
    opacity: 0.6;
  }
}
