.cart-title {
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

#cart-container {
    width: 95%;
    padding: 0px;
    padding-left: 10px;
}

#inventory-list {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#inventory-list th {
    font-size: 0.9em;
    padding: 10px;
    border-bottom: 1px solid #EA02F3;
    text-align: center;
}

.cart-row {
    border-bottom: 1px solid #EA02F3;
}

.item-info {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    
    justify-content: center;
    width: auto;
    margin: 0 auto;
}

.cart-img {
    width: 60px;
    height: auto;
    border: 1px solid #ccc;
    
    display: block;
    margin-right: 0px;
    flex-shrink: 0;
    
}

.cart-iname {
  
    font-weight: bold;
    margin: 0px;
    
    text-align: left;
}

.col-item{
  text-align: center;
  vertical-align: middle;
}

.col-price,
.col-qty,
.col-total{
  text-align: center;
  verical-align: middle;
  }

.col-qty .specimen-buymore{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  
  }
  
  
/* Expenditure Table Layout */
.expenditure-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#expenditure-table {
    width: 300px;
    margin-top: 10px;
}

#expenditure-table td {
    padding: 8px 0;
}

#expenditure-table td:last-child {
    text-align: right;
    font-weight: bold;
}

.zip-cell {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

#zip-input {
    width: 60px;
    text-align: center;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: inherit;
}

#calc-zip-btn {
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    width: 25px;
    cursor: pointer;
}

#zip-warning {
    color: red;
    font-size: 0.8em;
    font-weight: bold;
    text-align: right;
    margin-top: 15px;
}

#checkout-btn {
    background: #333;
    color: white;
    padding: 10px 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1em;
    margin-top: 15px;
}

/*Mobile drop down border cleanup for cart */
#shopnavborder{
 
  height: calc(355px  + 35px);

}

/* Mobile Responsiveness: Stacking rows */
@media screen and (max-width: 800px) {
    #inventory-list thead { display: none; }

    /* The container for the whole row */
    .cart-row {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center; 
        padding: 15px 5px;
    }

    /* GREEN BOX: Scaled up to fill the space */
    .col-item {
        display: block !important;
        flex: 1 1 auto;       /* Forces this box to grow and fill the gap */
        min-width: 0;         /* Allows the name to wrap if it gets too long */
        padding: 0px;  /* This is the reduced 'Red' spacing */
        border: none !important;
    }

    .item-info {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 0;
    }

    .cart-img {
      width: 30%;
      height: auto;
      }
    
    .cart-iname {
        display: inline-block;
        width: 100%;
        font-size: 1.1em;
        line-height: 1.2;
    }

    /* MATH STACK: Vertical column on the right */
    .col-math-stack {
        display: flex !important;
        flex-direction: column;
        align-items: flex-end;
        flex: 0 0 auto;       /* Do not grow; only take up needed space */
        width: min-content;   /* Shrinks the red box to its narrowest possible fit */
        white-space: nowrap;  /* Keeps 'PRICE: $9' on one line within the stack */
        border: none !important;
        gap: 8px;
        
        align-items: center;
        text-align: center;
    }

    .math-line { display: block; }

    /* Labels */
    .price-row::before {
        content: "PRICE: ";
        font-size: 0.8em;
        
      }
      
    .total-row::before {
        content: "TOTAL: ";
        font-size: 0.8em;
      }
      
      
      
      .total-row{
       align-self: flex-end;   /* Forces ONLY the price to the right edge */
      text-align: right; 
      }

    /* Restore your Expenditure table layout */
    .expenditure-wrapper { width: 100%; align-items: center; }
    #expenditure-table { width: 100%; }
}






