Showing 'Sold Out' for individual product options with no inventory

The customer’s always right? …right? lol.

My client’s requested that the word ‘Sold Out’ appears next to product options (in the drop-down menu) that don’t have inventory in stock.

Seems easy enough, thinking I could just use ```php

{if $product_amount == 0} Sold Out {/if}

<br />
But that failed. It only works when the option with zero inventory is selected, but then all the options display 'Sold Out' dynamically.<br />
<br />
Here's the whole code I'm working with:<br />
<br />
<br />
<!-- Options -->  <br />
<select name="{$name}[{$id}][product_options][{$po.option_id}]" {if !$po.disabled}id="option_{$obj_prefix}{$id}_{$po.option_id}"{/if} class="text" onchange="{if $product.options_update}fn_change_options('{$obj_prefix}{$id}', '{$id}', '{$po.option_id}');{else} fn_change_variant_image('{$obj_prefix}{$id}', '{$po.option_id}');{/if}" {if $product.exclude_from_calculate && !$product.aoc || $po.disabled}disabled="disabled" class="disabled"{/if}><br />
{if $product.options_type == "S"}<br />
<option value="">{if $po.disabled}{$lang.select_option_above}{else}{$lang.please_select_one}{/if}</option>{/if}<br />
{foreach from=$po.variants item="vr" name=vars}{if !$po.disabled || ($po.disabled && $po.value && $po.value == $vr.variant_id)}<br />
<option value="{$vr.variant_id}" {if $po.value == $vr.variant_id}{assign var="selected_variant" value=$vr.variant_id}selected="selected"{/if}>{$vr.variant_name} {if $show_modifiers}{hook name="products:options_modifiers"}{if $vr.modifier|floatval}({include file="common_templates/modifier.tpl" mod_type=$vr.modifier_type mod_value=$vr.modifier display_sign=true}){/if}{/hook}{/if} {if $product_amount == 0}Out of Stock{/if}</option><br />
{/if}{/foreach}<br />
</select><br />

```<br />
<br />
This is the lovely mockup they provided me... oi...<p><a href="">mockup.png</a></p>

rub-a-dub-bump :0 any suggestions?