  /* Profile picture container */
    .profile-page .container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 70px 0 10px 0;
  }
  
  .profile-page .profile-picture img {
    width: 200px;
    height: 200px;
    border-radius: 4%;
    object-fit: cover;
    /* border: 4px solid rgb(20, 210, 20);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); */
  }

/* --- Scoped Styles for Profile Page Only --- */
.profile-page {
    box-sizing: border-box;
    width: 100%;
    padding: 0;
    margin: 0;
    min-height: 60vh;
  }
  
  .profile-page * {
    box-sizing: inherit;
  }
  
  /* --- Upload Button Section --- */
  .profile-page .Upload-btn {
    text-align: center;
    margin-top: 20px;
  }
  
  .profile-page .Upload-btn input[type="file"] {
    display: none;
  }
  
  .profile-page .Upload-btn label {
    display: inline-block;
    background-color:rgb(20, 210, 20);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
  }
  
  .profile-page .Upload-btn label:hover {
    background-color: rgb(20, 210, 20);
  }

.disp-msg-error {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -40%);
  text-align: center;
}
  
  /* --- Responsive Cropper Modal --- */
  #cropModal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
  }
  
  .crop-modal-content {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    text-align: center;
  }
  
  #croppingPreviewImage {
    width: 100%;
    max-height: 60vh;
    display: block;
    margin: auto;
    object-fit: contain;
  }
  
  /* --- Modal Buttons --- */
  .crop-buttons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .crop-buttons button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
  }
  
  #confirmCropUpload {
    background-color: rgb(20, 210, 20);
    color: white;
  }
  
  #confirmCropUpload:hover {
    background-color: #218838;
  }
  
  .crop-buttons button:last-of-type {
    background-color: #dc3545;
    color: white;
  }
  
  .crop-buttons button:last-of-type:hover {
    background-color: #c82333;
  }
  
  /* --- Work Grid --- */
  .profile-page .work-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
  }

.profile-page .work-section .product .work {
  width: 250px;
  height: 250px;
  overflow: hidden;
  position: relative;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center; /* ✅ centers image horizontally */
  box-sizing: border-box;
  flex-shrink: 0;
}


.profile-page .product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

  /* Work Card */
  .work-card {
    position: relative;
    width: 100%;
    height: 250px;
    max-width: 250px;
    margin: 1rem auto;
    overflow: hidden;
    border-radius: 8px;
  }
  
  .work-card img {
    width: 100%;
    height: 250px;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
  }
  
  /* Title Overlay */
  .work-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    border-bottom-right-radius: 8px;
    z-index: 1;
  }
  
  /* --- Section Titles --- */
  .profile-page .work-title-user,
  .profile-page .work-title {
    text-align: center;
    margin-top: 30px;
    font-size: 1.5rem;
  }
  
  /* Ensure modal content never overflows viewport */
.crop-modal-content {
  max-height: 90vh;
  width: 100%;
  max-width: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Responsive image that adjusts to modal height */
#croppingPreviewImage {
  max-width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
}

/* Ensure crop buttons never go out of view */
.crop-buttons {
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  padding-bottom: 1rem; /* Prevents buttons from hugging the edge */
}

.crop-buttons button {
  flex: 1 1 45%;
  margin: 0.3rem;
  min-width: 120px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 16px 0;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 24px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.private-stats {
    margin: 20px 0;
    padding: 16px;
    background: #f0f7f0;
    border-radius: 8px;
    border: 1px solid #c3e6c3;
}

.private-stats h3 {
    margin-bottom: 12px;
    color: #2d6a2d;
}

.dp-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #4a90d9;
    color: white;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make sure modal can scroll on small screens */
@media (max-height: 600px) {
  .crop-modal-content {
    max-height: 100vh;
    overflow-y: auto;
  }

  #croppingPreviewImage {
    max-height: 40vh;
  }

  .profile-page .profile-picture img {
    width: 150px;
    height: 150px;
  }
}
