.page-heading {
    max-width: 1200px;
    margin: 0px auto;
    padding: 55px 0px 10px 40px;
}

.orders-tabs {
    display: flex;
    gap: 10px;
    max-width: 1200px;
    margin: 0px auto;
    padding: 10px 40px;
}

#announcement-notice {
    display: flex;
    gap: 10px;
    max-width: 1200px;
    margin: 0px auto;
    padding: 10px 40px;
    border-radius: 15px;
}

#announcement-notice p {
    background-color: rgb(145 0 0);
    padding: 15px 20px;
    border-radius: 15px;
    color: white;
}

#hera-wallet-div {
    max-width: 1200px;
    margin: 0px auto;
    padding: 20px 40px;
}

#my-orders-btn, #my-sales-btn {
    padding: 15px 20px;
    background-color: black;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: white;
}

/* ORDER ITEMS */

.order-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0px auto;
    padding: 20px 40px;
}

.order-header, .order-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.order-footer {
    border-bottom: 1px solid rgba(0, 0, 0, 0.219);
    padding-bottom: 40px;
    gap: 40px;
}

.footer-buttons {
    display: flex;
    align-items: flex-end;
    gap: 5px;
}

.order-card {
    margin: 0px auto;
}

.order-card button {
    padding: 10px 15px;
    background-color: rgb(201, 201, 201);
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: black;
}

.order-item {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.order-card img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 15px;
    flex-shrink: 0;
}

#my-sales-section {
    max-width: 1200px;
    margin: 0px auto;
    padding: 20px 40px;
}

#orders-list p {
    display: flex;
}

.sale-card {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 35px 0px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.205);
    gap: 15px;
}

.sale-info {
    display: flex;
    gap: 20px;
}

.sale-info img {
    width: 130px;
    height: 130px;
    border-radius: 15px;
}

.view-sale-details {
    display: flex;
    height: 41px;
    padding: 0px 15px;
    background-color: #3B524A;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: white;
    align-items: center;
    align-self: flex-end;
}

#sales-summary {
    padding: 5px 0px 20px 0px;
    gap: 5px;
}

.empty-msg {
    display: flex;
    justify-content: center;
    padding: 30px 0px;
}

.button-border {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.164);
}

.button-border button {
    background-color: #D0D7CD;
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 1em;
}

/* ======================================= */
/* CUSTOM MODAL STYLES (Overrides Tailwind)*/
/* ======================================= */

/* 1. Backdrop: Force Full-screen Positioning and Centering */
#custom-modal-backdrop {
    /* These styles replicate fixed inset-0 items-center justify-center */
    position: fixed !important; /* IMPORTANT: Use !important to override any conflicting global CSS */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    
    display: flex; /* Overridden by JS, but good practice to keep here */
    align-items: center !important;
    justify-content: center !important;
    
    /* Ensure the background opacity is correct */
    background-color: rgba(0, 0, 0, 0.233); /* bg-gray-900 bg-opacity-75 */
}

/* 2. Modal Content: Force 300px Width and Styling */
#custom-modal-content {
    /* IMPORTANT: Force the exact 300px width */
    width: 300px !important; 
    max-width: 300px !important; 

    /* Styles from Tailwind classes (bg-white p-6 rounded-[15px] shadow-2xl) */
    background-color: white;
    padding: 24px;
    border-radius: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 3. Button Styling (Your requested color) */
#modal-buttons button {
    background-color: #D0D7CD;
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 1em;
}

#modal-title {
    margin-bottom: 5px;
}

#modal-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    cursor: pointer;
}

/* --- CSS for Text Truncation in Orders and Sales Views --- */

/* Ensure the container holding the text respects layout constraints */
/* For the Buyer Orders item detail area: */
.order-item-details, .sale-item-info {
    min-width: 0; /* CRITICAL for Flexbox/Grid children to allow content overflow */
    flex-grow: 1;
}

/* Apply truncation rules to the wrappers */
.product-name-wrapper,
.username-wrapper,
.sale-id-wrapper {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    /* Optional: margin/padding adjustments */
    margin-bottom: 2px;
}

/* Ensure inner elements respect the wrappers' truncation rules */
.product-name-wrapper h3,
.username-wrapper p,
.sale-id-wrapper h3 {
    display: block; /* Important for white-space/text-overflow */
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    margin: 0; /* Remove default margin/padding */
}

.status.awaiting-payment {
    color: #92400e;
}

/* Standardize the status badge for Awaiting Payment */
.status.awaiting-payment {
    padding: 0px 3px;
    font-weight: bold;
}

/* Style the PayNow link to look like a primary button */
.pay-now-btn {
    display: block;
    text-align: center;
    background-color: #92400e;
    color: white !important;
    padding: 10px 15px;
    border-radius: 30px;
    text-decoration: none;
}

.pay-now-btn:hover {
    background-color: #1d4ed8;
}