/* CART */
.js-cart-items {
    display: flex;
    flex-direction: row;
    align-self: center;
}

.cart-item h3 {
    margin-bottom: 2px;
}

#cart-title {
    max-width: 1350px;
    margin: 20px auto 0px auto;
    padding: 50px 40px 10px 50px;
    background: linear-gradient(to bottom, rgb(221 221 221), white);
    border-radius: 30px 30px 0px 0px;
}

.cart-product-holder {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0px auto 200px auto;
}

.error-message {
    display: flex;
    justify-content: center;
    margin-top: 75px;
}

.cart-product-holder img {
    display: flex;
    align-self: center;
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-product-price {
    margin-top: 3px;
}

.cart-product-info {
    border-bottom: 1px solid rgba(0, 0, 0, 0.144);
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    padding: 30px 0px;
    margin: 0px 40px;
    gap: 20px;
}

.cart-selection {
    padding: 15px 0px;
    display: flex;
    flex-direction: row;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cart-selection input {
    border: none;
    width: 50px;
    padding: 8px;
    border-radius: 30px;
    font-size: 1em;
    background-color: rgb(196, 196, 196);
    text-align: center;
}

.cart-selection select {
    border: none;
    width: 52px;
    padding: 8px;
    border-radius: 30px;
    font-size: 1em;
    background-color: rgb(196, 196, 196);
}

.cart-selection button {
    background-color: #00432d;
    color: white;
    cursor: pointer;
    padding: 8px 32px;
    border-radius: 30px;
    font-size: 1em;
    border: none;
}

.checkout-container {
    position: fixed;
    bottom: 0px;
    background-color: rgb(221 221 221);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0px 50px;
    height: 110px;
    width: 100%;
}

.checkout-btn {
    font-size: 1em;
    width: 200px;
    padding: 10px 30px;
    border-radius: 30px;
    text-align: center;
    color: white;
    background-color: #00432d ;
}

/* CSS for Truncation in the Cart */

/* 1. Define the layout of the primary container */
.cart-product-info {
    display: flex; /* Assuming a horizontal layout: Image | Details | Price/Controls */
    gap: 15px;
    align-items: flex-start;
}

/* 2. Define a dedicated container for the text that needs to truncate */
.cart-details-main {
    display: flex; 
    flex-direction: column; /* Stack text, price, and selection vertically */
    flex-grow: 1; /* Allow the details section to take up available space */
    min-width: 0; /* CRITICAL: Allows flex items to shrink and respects max-width */
}

/* 3. Constrain the specific text wrapper width */
.cart-item-text-area {
    /* Set a reasonable max width, or allow it to fill its parent */
    width: 100%;
    min-width: 0; /* CRITICAL for truncation inside flex/grid */
}

/* 4. Apply the truncation rules to the wrappers */
.product-name-wrapper,
.username-wrapper {
    /* Inherit width from parent text-area, but ensure overflow works */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    /* Clean up margins */
    margin: 0; 
    padding: 0;
}

/* 5. Ensure inner elements don't wrap */
.product-name-wrapper h3,
.username-wrapper p {
    display: block;
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    margin: 0; 
    margin-top: 3px;
}