/* ===== HEADER ===== */
.main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding: 20px 0;
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center; 
}

.header-container {
  width: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system;
  display: flex;
  align-items: center;
  padding: 0 100px;
  text-transform: uppercase;
  justify-content: space-between;
  gap: 15px;
}

/* Navegación */
.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-right: 19px;
}

.main-nav a,
.user-nav a {
  position: relative;
  text-decoration: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.user-nav .nav-wrapper a::after,
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.user-nav .nav-wrapper a:hover::after,
.main-nav a:hover::after {
  transform: scaleX(1);
}

/* Logo */
.logo img {
  width: 100px;
  height: auto;
}

/* User nav */
.user-nav {
  display: flex;
  align-items: center;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Botón hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1314px) {
  .header-container {
    padding: 10px 30px;
    gap: 10px;
  }

  .main-nav ul {
    gap: 20px;
  }

  .user-nav {
    gap: 15px;
  }
}

@media (max-width: 1038px) {
  .main-header {
    padding: 0;
  }

  .menu-toggle {
    display: flex;
    z-index: 20;
  }

  .main-nav,
  .user-nav {
    display: none;
  }

.nav-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end; 
  margin: 0;      
}

  .main-nav.active,
  .user-nav.active {
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: end;
    text-align: end;
    background: rgba(21, 21, 21, 0.7);
    padding: 20px;
    gap: 20px;
    z-index: 15;
  }

  .main-nav.active {
    position: absolute;
    top: 0;
    right: 0;
  }

  .user-nav.active {
    position: absolute;
    top: 14rem;
    right: 0;
    border-bottom-left-radius: 30px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
  }

  .logo {
    display: block;
    margin: 0 auto;
  }

  .header-container {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .logo img {
    width: 80px;
  }

  .main-nav a,
  .user-nav a {
    font-size: 14px;
  }
}
