/* =========================
   Base Styles
   ========================= */
html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: var(--bg-color, #f5f5f5);
  color: var(--text-color, #333);
  max-width: 100%;
  overflow-x: hidden; /* 🔑 prevent horizontal scroll */
}

/* =========================
   Header
   ========================= */
header {
  background: var(--card-bg, #fff);
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
}

header .branding {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  flex-wrap: wrap;        /* 🔑 prevent overflow */
  justify-content: center;
}

header .branding img {
  height: 36px;
  width: auto;
  max-width: 100%;
}

header .branding h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  white-space: normal;   /* allow wrapping */
  text-align: left;      /* 🔑 align text left */
  flex: 1 1 auto;
  min-width: 0;
}


/* =========================
   Profile Container
   ========================= */
.profile-container {
  max-width: 800px;
  margin: 1rem auto 5rem;
  padding: 0 1rem;
  box-sizing: border-box;
}

.profile-card {
  background: var(--card-bg, #fff);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.profile-pic-container {
  position: relative;
  display: inline-block;
}

#profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  max-width: 100%;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #36c36c;
  color: #fff;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 20px;
  margin-top: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
}

#profile-image {
  display: none;
}

.profile-name {
  margin-top: 1rem;
  font-size: 1.5rem;
}

.profile-info p {
  margin: 0.4rem 0;
  font-size: 1rem;
}

/* =========================
   Actions
   ========================= */
.profile-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;       /* 🔑 wrap buttons on small screens */
  gap: 0.8rem;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.profile-actions a,
.profile-actions button {
  flex: 1 1 30%;
  min-width: 100px;       /* 🔑 lowered from 120px */
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.sell-btn { background: #36c36c; color: #fff; }
.edit-btn { background: #3498db; color: #fff; }
.logout-btn { background: #e74c3c; color: #fff; }


/* =========================
   Responsive Media Queries
   ========================= */

/* Phones (≤480px) */
@media (max-width: 480px) {
  header {
    padding: 0.6rem 0.8rem;
  }
  header .branding {
    gap: 0.4rem;
  }
  header .branding img {
    height: 26px;
  }
  header .branding h1 {
    font-size: 1rem;
  }

  #profile-pic {
    width: 90px;
    height: 90px;
  }

  .profile-name {
    font-size: 1.2rem;
  }

  .profile-info p {
    font-size: 0.9rem;
  }

  .profile-actions {
    flex-direction: column;
    gap: 0.6rem;
  }

  .profile-actions a,
  .profile-actions button {
    flex: 1 1 auto;
    font-size: 0.9rem;
    min-width: auto;
  }

}
