/* --- Express Order Layout --- */
.express-order-wrapper {
    max-width: 100%;
    margin: 20px auto;
    color: #333;
}

.eo-header h2 { font-size: 32px; color: #003366; margin-bottom: 5px; }
.eo-header p { color: #888; margin-bottom: 30px; font-size: 15px; }

/* Top Section Alignment */
.eo-search-section {
    display: flex;
    justify-content: flex-end; /* Aligns search bar and buttons to the right */
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

/* Search Bar Container */
.eo-search-box-container {
    position: relative;
    flex: 1;
    max-width: 450px;
}

#eo-product-search {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 50px;
    outline: none;
    font-size: 15px;
    height: 52px;
    box-sizing: border-box;
}

.eo-search-icon {
    position: absolute;
    left: 15px;
    top: 55%;
    transform: translateY(-50%);
    color: #999;
}

/* Floating Dropdown Results */
.eo-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none;
    max-height: 250px;
    overflow-y: auto;
}

.eo-dropdown ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.eo-dropdown li { 
    padding: 12px 20px; 
    border-bottom: 1px solid #f9f9f9; 
    cursor: pointer; 
    list-style: none !important;
    font-size: 14px;
}
.eo-dropdown li:hover { background: #f4f7fa; color: #003366; }
.eo-dropdown li strong { color: #003366; }

/* Pill-Shaped Buttons */
.eo-btn-primary, .eo-btn-cart {
    background-color: #003366 !important;
    color: #fff !important;
    border: none !important;
    padding: 15px 28px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    /*height: 44px !important;*/
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    transition: background 0.3s !important;
}

.eo-btn-primary:hover, .eo-btn-cart:hover { background-color: #002244 !important; }

/* Fixed Quantity Stepper (Pill Shape) */
/* Fix stepper layout */
.eo-qty-stepper, .eo-table-qty-stepper {
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ccc;
    border-radius: 50px;
    padding: 0 10px !important;
    background: #fff;
    height: 52px;
    width: 130px !important; /* Fixed width prevents collapsing */
    overflow: hidden;
}
/* Darker border for the one in the table row */
.eo-table-qty-stepper {
    border: 1px solid #333 !important;
    height: 38px;
    margin-left: auto; /* Keeps it right-aligned in cell */
}

/* Buttons (+/-) */
.eo-qty-stepper button, 
.eo-table-qty-stepper button {
    background: none !important;
    border: none !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    cursor: pointer;
    color: #cc0000 !important; /* Red color for +/- */
    padding: 0 5px !important;
    width: 30px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.eo-qty-stepper .qty-minus, .eo-qty-stepper .qty-plus{
    color: #000 !important;
}
.eo-table-qty-stepper button {
    color: #000 !important;
}
/* Ensure quantity numbers are forced visible */
.eo-qty-stepper input, 
.eo-table-qty-stepper input {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #333 !important; /* Force dark text */
    width: 45px !important;
    min-width: 45px !important;
    padding: 0 !important;
    border: none !important;
    text-align: center !important;
    z-index: 10 !important;
    /* Prevent theme from hiding numbers */
    -webkit-appearance: none;
    margin: 0;
}

/* Fix stepper layout so it doesn't collapse */
/*.eo-qty-stepper, .eo-table-qty-stepper {*/
/*    min-width: 120px !important;*/
/*    justify-content: space-around !important;*/
/*}*/
/* Chrome/Safari: Hide arrows */
/* Chrome, Safari, Edge, Opera - Remove arrows */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Table Design */
.eo-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px;
}

.eo-table th { 
    color: #aaa; 
    font-weight: 500; 
    text-align: left; 
    padding: 15px 10px; 
    border-bottom: 1px solid #eee; 
    text-transform: uppercase;
    font-size: 12px;
    border: 0px;

}

.eo-table td { 
    padding: 20px 10px; 
    font-size: 14px; 
    vertical-align: middle;
}
.eo-table td a {
    text-decoration: none !important;
    color: inherit !important; /* Keeps the text color the same as the table */
    transition: color 0.2s;
}
.eo-table td a:hover {
    color: #003366 !important; /* Changes to your brand blue on hover */
    text-decoration: underline !important;
}
/* Align Quantity Column and Footer to Right */
.eo-table th:last-child, .eo-table td:last-child { text-align: right; }

.eo-footer { 
    display: flex; 
    justify-content: flex-end; 
    margin-top: 30px; 
}
.express-order-wrapper .eo-table thead>tr>th {
    border: 0px !important;
    border-bottom: 1px solid #E6E7E8 !important;
    font-weight: 600;
}
.express-order-wrapper .eo-table tbody>tr>td {
    background-color: #fff;
    border-bottom: 1px solid #E6E7E8 !important;
    border: 0px;
}
/* --- Tablet Table Full Width Fix --- */
@media screen and (min-width: 768px) and (max-width: 1024px) {

    /* Force the wrapper and table to take all available space */
    .express-order-wrapper,
    .eo-table {
        width: 100% !important;
        max-width: 100% !important;
        display: table !important; /* Forces it back from 'block' to 'table' */
        border-collapse: collapse !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    /* Ensure the table headers and body rows are visible and full width */
    .eo-table thead, 
    .eo-table tbody {
        display: table-header-group !important;
        width: 100% !important;
    }

    .eo-table tr {
        display: table-row !important;
        width: 100% !important;
    }

    /* Assign specific column widths so they don't squish to the left */
    .eo-table th, 
    .eo-table td {
        display: table-cell !important;
        padding: 15px 10px !important;
        vertical-align: middle !important;
        box-sizing: border-box !important;
    }

    /* Column Ratio: 15% | 40% | 15% | 30% */
    .eo-table th:nth-child(1), .eo-table td:nth-child(1) { width: 15% !important; }
    .eo-table th:nth-child(2), .eo-table td:nth-child(2) { width: 40% !important; }
    .eo-table th:nth-child(3), .eo-table td:nth-child(3) { width: 15% !important; }
    .eo-table th:nth-child(4), .eo-table td:nth-child(4) { width: 30% !important; text-align: right !important; }

    /* Fix the Quantity Stepper position in the table cell */
    .eo-table-qty-stepper {
        display: inline-flex !important;
        width: 110px !important;
        float: right !important; /* Keeps the pill hugged to the right edge */
    }
}
/* --- Mobile Responsive Fixes --- */
@media (max-width: 768px) {
    /* 1. Stack the search row into two distinct lines */
    .eo-search-section {
        display: flex;
        flex-direction: column; /* Stack vertically */
        align-items: stretch;
        gap: 15px;
    }

    /* 2. Search bar takes full width in the first "row" */
    .eo-search-box-container {
        max-width: 100% !important;
        width: 100%;
    }

    /* 3. Create a wrapper for QTY and Button to be inline */
    /* We will wrap these two in a flex container via CSS if possible, 
       or just target them directly since the parent is now a column. */
    
    .eo-search-section {
        display: grid; /* Use grid for more control on mobile */
        grid-template-columns: 1fr; /* Default 1 col */
    }

    /* Target the Search bar to be row 1 */
    .eo-search-box-container {
        grid-row: 1;
    }

    /* Target Qty and Button to be in row 2, side-by-side */
    .eo-qty-stepper {
        grid-row: 2;
        grid-column: 1;
        width: 120px !important; /* Keep it compact */
        justify-self: start;
    }

    .eo-btn-primary {
        grid-row: 2;
        grid-column: 1;
        justify-self: end;
        width: calc(100% - 135px) !important; /* Fill remaining space */
        padding: 0 15px !important;
    }

    /* 4. Handle the table for mobile (Scrollable) */
    .eo-table {
        display: block;
        overflow-x: auto; /* Adds horizontal scroll so it doesn't break layout */
        white-space: nowrap;
    }
}