.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

.profile-card {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%;
  max-width: 425px;
  margin-bottom: 2rem;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-row h2 {
  margin: 0;
  font-size: 1.4rem;
}

.email-display {
  margin: 0.2rem 0 0.6rem 0;
  font-size: 0.9rem;
  color: #555;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: #333;
}

.profile-stats span {
  white-space: nowrap;
}

.follow-toggle-button {
  background-color: #28a745;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.follow-toggle-button.following:hover {
  background-color: #dc3545;
}

.follow-toggle-button::after {
  content: 'Follow';
}
.follow-toggle-button.following::after {
  content: 'Following';
}
.follow-toggle-button.following:hover::after {
  content: 'Unfollow';
}

.profile-avatar {
  width: 100px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.profile-card h2 {
  margin-bottom: 0.5rem;
}

.profile-actions button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 0.5rem;
  background: #457B9D;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.profile-actions button:hover {
  background: #2e5984;
}

.profile-ads {
  max-width: 600px;
  width: 100%;
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.profile-ads h3 {
  margin-bottom: 1rem;
}

.profile-ads ul {
  list-style: none;
  padding: 0;
}

.profile-ads li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.verified-icon {
  width: 18px;
  height: 18px;
  margin-left: 6px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name h2 {
  margin: 0;
}

.profile-dropdown {
      position: absolute;
    top: -1rem;
    right: -1rem;
    z-index: 10;

}

.dropdown-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.dropdown-toggle:hover {
  background: #f0f0f0;
}

.dropdown-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 36px;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.dropdown-menu button {
  background: none;
  border: none;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
}

.dropdown-menu button:hover {
  background-color: #f5f5f5;
}

.ad-list {
  list-style: none;
  padding: 0;
}

.ad-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.ad-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.ad-meta a {
  font-weight: 500;
  text-decoration: none;
  color: #333;
}

.ad-meta a:hover {
  text-decoration: underline;
}


.buttonDiv {
  margin-top: 1rem;
  text-align: left;
}

.buttonDiv button {
    color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;

}
.follow-button {
  background-color: #28a745; /* Green */
}

.follow-button:hover {
  background-color: #218838;
}

.unfollow-button {
  background-color: #dc3545; /* Red */
}
.unfollow-button:hover {
  background-color: #c82333;
}


.follow-toggle-button {
  background-color: #28a745;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* If following, keep it green but switch on hover */
.follow-toggle-button.following:hover {
  background-color: #dc3545;
}

.follow-toggle-button::after {
  content: 'Follow';
}

.follow-toggle-button.following::after {
  content: 'Following';
}

.follow-toggle-button.following:hover::after {
  content: 'Unfollow';
}


@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-info {
    align-items: center;
    text-align: center;
  }

  .top-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .profile-stats {
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .buttonDiv {
    margin-top: 0.5rem;
    text-align: center;
  }

  .follow-toggle-button {
    width: 100%;
    max-width: 200px;
  }
}


.saved-ads-preview-container { position: relative; margin-top: 1rem; }
.saved-ads-preview {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: .5rem;
  width: 250px;
  z-index: 10;
}
.saved-ads-preview ul { list-style: none; margin: 0; padding: 0; }
.saved-ads-preview li { display: flex; align-items: center; margin-bottom: .5rem; }
.preview-thumb {
  width: 40px; height: 40px;
  object-fit: cover;
  margin-right: .5rem;
}
.preview-thumb.placeholder {
  background: var(--muted);
}
.view-all { display: block; text-align: right; margin-top: .5rem; font-size: .9em; }



.saved-button {
    padding: 10px;
    border: none;
    border-radius: 10px;
    margin-top: 10px;
}