/* Seller */

#seller-profile {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1350px;
    margin: 0px auto;
    margin-top: 30px;
    padding: 35px 40px 40px 40px;
    gap: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.171);
    background: linear-gradient(to bottom, #f7f7f7, white);
    border-radius: 30px 30px 0px 0px;
}

#seller-profile img {
    width: 150px;
    border-radius: 50%;
}

#seller-profile p {
    margin-top: 5px;
}

.username-with-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#seller-profile img {
  width: 150px;
  height: 150px;
  object-fit: cover;
}

#seller-products-title {
    max-width: 1200px;
    margin: 0px auto;
    padding: 50px 40px 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#products-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-template-rows: 335px;
    justify-items: center;
    max-width: 1200px;
    margin: 0px auto;
    justify-content: center;
    padding: 0px 40px;
}

.error-statement {
    padding-top: 170px;
}

/* PRODUCT HOLDER */

.product-holder {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 230px;
    height: 330px;
    padding: 23px;
}

.category-card {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.category-card:hover {
  opacity: 0.8;
  transform: scale(0.98);
}

.product-holder img {
    display: flex;
    flex-direction: row;
    align-self: center;
    width: 190px;
    height: 190px;
    object-fit: cover;
    border-radius: 15px;
}

.product-holder div {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.product-price {
    font-weight: 700;
    align-self: flex-end;
    margin-top: 15px;
}

.product-name {
    font-weight: 700;
}

#products-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-template-rows: 335px;
    justify-items: center;
    max-width: 1200px;
    margin: 0px auto;
    justify-content: center;
    padding: 0px 40px;
}

/* --- REPORT POPUP --- */
.report-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(50px); /* starts slightly below */
  background: #222; /* default dark */
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  pointer-events: none; /* clicks pass through */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Show animation */
.report-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Success message */
.report-popup.success {
  background-color: #2ecc71; /* green */
  color: #fff;
}

/* Error message */
.report-popup.error {
  background-color: #e74c3c; /* red */
  color: #fff;
}

/* Optional warning type */
.report-popup.warning {
  background-color: #f1c40f;
  color: #222;
}

/* In your CSS file (e.g., style.css) */

/* General Truncation Class */
.truncate-text-display {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    /* Adjust width based on context (e.g., 100% of product card or fixed size) */
    max-width: 150px; 
}

/* Bio Truncation (needs more space) */
.truncate-bio-display {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 400px; /* Example width */
}

.profile-info {
    display: flex;
    flex-direction: column;
    justify-self: flex-end;
    width: 100%;
    /* This max-width is key for the bio/username to know when to wrap/truncate */
    max-width: 400px; 
}

#seller-username {
    /* Use the same styles as .truncate-text-display */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block; 
    max-width: 400px;
    width: 100%; /* Adjust this width based on your layout */
}

#seller-bio {
    /* Use the same styles as .truncate-bio-display */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 400px; /* Adjust this width based on your layout */
}

/* ---------------------------------------------------------------- */
/* MEDIA QUERY FOR SMALL SCREENS (600px and under) */
/* ---------------------------------------------------------------- */
@media (max-width: 600px) {  
    #seller-profile {
        margin-top: 20px;
    }   
    .product-holder img {
        width: 140px;
        height: 140px;
    }
    .product-holder {
        width: 180px;
        height: 260px;
        padding: 10px 23px;
    }
    #products-section {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        grid-template-rows: 260px;
        gap: 10px;
        min-width: 370px;
    }
}