.header-bg {
    max-width: 1200px;
    margin: 0px auto;
    padding: 55px 40px 30px 40px;
}

#featured-title {
    border: none;
    border-radius: 15px;
    height: 200px;
    padding: 20px;
    color: white;
}

#featured-products {
    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;
}

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

.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;
}

.error-message {
    padding-top: 30px;
}

/* Truncation Wrappers & Spacing Reset */
.product-name-wrapper,
.username-wrapper {
    width: 100%; 
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis; 
    /* This overrides any generic margin applied by parent rules */
    margin: 0 !important; 
    padding: 0;
}

/* Inner Text Elements */
.product-name, 
.seller-username {
    display: block; 
    width: 100%;
    margin: 0; /* Remove default paragraph margins */
    padding: 0;

    /* These are included for robustness */
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

/* ---------------------------------------------------------------- */
/* MEDIA QUERY FOR SMALL SCREENS (600px and under) */
/* ---------------------------------------------------------------- */
@media (max-width: 600px) {     
    .header-bg {
        padding: 45px 40px 25px 40px;
    }
    .product-holder img {
        width: 140px;
        height: 140px;
    }
    .product-holder {
        width: 180px;
        height: 260px;
    }
    #featured-products {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        grid-template-rows: 260px;
        gap: 10px;
        min-width: 370px;
    }
}