header.css 2.2 KB
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo h1 {
  color: #2c5aa0;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.search-bar {
  display: flex;
  flex: 1;
  max-width: 500px;
  margin: 0 2rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #2c5aa0;
}

.search-button {
  background: #2c5aa0;
  color: white;
  border: 2px solid #2c5aa0;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-button:hover {
  background: #1e3d6f;
  border-color: #1e3d6f;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  color: #495057;
  font-weight: 500;
  transition: color 0.3s ease;
  border-radius: 6px;
}

.nav-link:hover {
  color: #2c5aa0;
  background: #f8f9fa;
}

.cart-button {
  background: #28a745;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.cart-button:hover {
  background: #218838;
  transform: translateY(-1px);
}

.login-button {
  background: #6c757d;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.login-button:hover {
  background: #545b62;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logout-button {
  background: #dc3545;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.logout-button:hover {
  background: #c82333;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  .search-bar {
    margin: 0;
    max-width: 100%;
    order: 3;
    width: 100%;
  }

  .nav {
    gap: 1rem;
  }

  .user-menu {
    flex-direction: column;
    gap: 0.5rem;
  }
}