.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 85px;
  padding: 0 var(--page-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header > .logo {
  margin-left: -10px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 27px;
  letter-spacing: 3px;
  color: var(--color-dark);
  white-space: nowrap;
}

.logo span {
  color: var(--color-accent);
}


.nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav a {
  position: relative;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav a:hover {
  color: var(--color-accent);
}

.nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-cta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-accent);
  transition: color var(--transition);
  white-space: nowrap;
}

.header-cta:hover {
  color: var(--color-accent);
}



.cart-link {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark);
  transition: color var(--transition);
}

.cart-link:hover {
  color: var(--color-accent);
}

.bag-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  opacity: 0.85;
  transition: opacity var(--transition), transform var(--transition);
}

.cart-link:hover .bag-icon {
  opacity: 1;
  transform: translateY(-2px);
}

.cart-count {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 15px;
  width: 15px;
  height: 15px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0;
}


.profile-menu {
  position: relative;
}

.profile-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-dark);
  cursor: pointer;
  transition: var(--transition);
}

.profile-toggle svg {
  width: 23px;
  height: 23px;
  transition: var(--transition);
}

.profile-toggle:hover {
  color: var(--color-accent);
}

.profile-toggle:hover svg {
  transform: translateY(-2px);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  min-width: 165px;
  padding: 12px 0;
  display: none;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.profile-menu.dropdown-open .profile-dropdown {
  display: flex;
}

.profile-dropdown a {
  padding: 12px 18px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text);
  transition: var(--transition);
}

.profile-dropdown a:hover {
  color: var(--color-accent);
  background: var(--color-bg-light);
}


.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
}


@media (min-width: 521px) and (max-width: 1000px) {

  .header {
    height: 75px;
    padding: 0 5%;
  }

  .header > .logo {
    margin-left: -8px;
  }

  .nav {
    gap: 20px;
  }

  .nav a {
    font-size: 9px;
    letter-spacing: 0.8px;
  }


  .nav a[href="orders.html"] {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .header-actions {
    gap: 18px;
  }
}


@media (max-width: 520px) {

  .header {
    height: 70px;
    padding: 0 6%;
  }

  .header > .logo {
    margin-left: -5px;
  }

  .logo {
    font-size: 23px;
    letter-spacing: 2px;
  }

  .header-actions {
    margin-left: auto;
    margin-right: 15px;
    gap: 15px;
  }

  .header-cta {
    display: none;
  }

  .cart-link {
    width: 30px;
    height: 30px;
  }

  .bag-icon {
    width: 22px;
    height: 22px;
  }

  .profile-toggle {
    width: 30px;
    height: 30px;
  }

  .profile-toggle svg {
    width: 21px;
    height: 21px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0 10px 10px;
  }

  .menu-toggle span {
    width: 25px;
    height: 1px;
    background: var(--color-dark);
  }

  .nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 30px 6%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }

  .header.menu-open .nav {
    display: flex;
  }

  .nav a {
    font-size: 11px;
  }

  
  .nav a[href="orders.html"] {
    display: block;
  }

  .profile-dropdown {
    top: calc(100% + 12px);
  }
}
