<style>
.size-box{width:100%;font-family:Arial,sans-serif;color:#111;box-sizing:border-box;}
.unit-switch{text-align:center;font-size:22px;margin-bottom:16px;}
.unit-switch span{cursor:pointer;padding:0 10px;color:#9499a2;}
.unit-switch span.active{color:#4296e0;font-weight:500;}
.table-header{display:flex;align-items:center;padding:12px 0;border:1px solid #ddd;border-bottom:none;}
.table-header > div{flex:1;text-align:center;font-size:24px;font-weight:600;}
.table-header .sel-cell{flex:1.2;}
.region-select{font-size:22px;padding:5px 10px;border:1px solid #aaa;border-radius:3px;}
.size-table{width:100%;border-collapse:collapse;border:1px solid #ddd;}
.size-table td{text-align:center;padding:20px 8px;font-size:24px;border-bottom:1px solid #eee;}
.size-table td:first-child{font-weight:bold;}
.note-desc{margin-top:24px;font-size:18px;line-height:1.6;color:#222;}
.measure-guide{margin-top:30px;width:100%;text-align:center;}
.measure-guide h4{font-size:20px;margin:0 0 12px 0;font-weight:600;color:#222;}
.measure-guide img{width:100%;height:auto;display:block;}
</style>
<div class="size-box">
<div class="unit-switch">
<span class="active" id="cmBtn">CM</span>
<span>|</span>
<span id="inchBtn">INCHES</span>
</div>
<div class="table-header">
<div>SIZE</div>
<div class="sel-cell">
<select class="region-select" id="countrySel">
<option value="us" selected>US</option>
<option value="ca">CA</option>
<option value="uk">UK</option>
<option value="eu">EU</option>
</select>
</div>
<div>LENGTH</div>
<div>BUST</div>
<div>WAIST</div>
<div>HIP</div>
<div>SLEEVE</div>
</div>
<!-- 厘米尺寸表格 -->
<table class="size-table" id="cmTable">
<tr>
<td>S</td>
<td data-size="S">4</td>
<td>151</td>
<td>82</td>
<td>66</td>
<td>84</td>
<td>31.8</td>
</tr>
<tr>
<td>M</td>
<td data-size="M">6</td>
<td>152</td>
<td>86</td>
<td>70</td>
<td>88</td>
<td>34.3</td>
</tr>
<tr>
<td>L</td>
<td data-size="L">8/10</td>
<td>153</td>
<td>92</td>
<td>76</td>
<td>94</td>
<td>36.8</td>
</tr>
<tr>
<td>XL</td>
<td data-size="XL">12</td>
<td>154</td>
<td>98</td>
<td>82</td>
<td>100</td>
<td>39.4</td>
</tr>
</table>
<!-- 英寸换算表格(保留1位小数) -->
<table class="size-table" id="inchTable" style="display:none;">
<tr>
<td>S</td>
<td data-size="S">4</td>
<td>59.4</td>
<td>32.3</td>
<td>26.0</td>
<td>33.1</td>
<td>12.5</td>
</tr>
<tr>
<td>M</td>
<td data-size="M">6</td>
<td>59.8</td>
<td>33.9</td>
<td>27.6</td>
<td>34.6</td>
<td>13.5</td>
</tr>
<tr>
<td>L</td>
<td data-size="L">8/10</td>
<td>60.2</td>
<td>36.2</td>
<td>29.9</td>
<td>37.0</td>
<td>14.5</td>
</tr>
<tr>
<td>XL</td>
<td data-size="XL">12</td>
<td>60.6</td>
<td>38.6</td>
<td>32.3</td>
<td>39.4</td>
<td>15.5</td>
</tr>
</table>
<p class="note-desc">This data was obtained from manually measuring the product, it may be off by 1-2 CM.</p>
<div class="measure-guide">
<h4>How To Measure</h4>
<img src="https://cdn.shopify.com/s/files/1/0805/5678/5909/files/Size_Guide_j.png?v=1780900288" alt="Body Measurement Guide">
</div>
</div>
<script>
// CM/INCH 单位切换逻辑
const cmBtn = document.getElementById('cmBtn');
const inchBtn = document.getElementById('inchBtn');
const cmTable = document.getElementById('cmTable');
const inchTable = document.getElementById('inchTable');
cmBtn.onclick = () => {
cmBtn.classList.add('active');
inchBtn.classList.remove('active');
cmTable.style.display = 'table';
inchTable.style.display = 'none';
};
inchBtn.onclick = () => {
inchBtn.classList.add('active');
cmBtn.classList.remove('active');
inchTable.style.display = 'table';
cmTable.style.display = 'none';
};
// 多国尺码映射
const sizeContrast = {
S: {us:"4", ca:"4", uk:"8", eu:"34"},
M: {us:"6", ca:"6", uk:"10", eu:"36"},
L: {us:"8/10", ca:"8/10", uk:"12/14", eu:"38/40"},
XL:{us:"12", ca:"12", uk:"16", eu:"42"}
};
const countrySel = document.getElementById('countrySel');
function refreshSize(area) {
document.querySelectorAll('[data-size]').forEach(item => {
item.textContent = sizeContrast[item.getAttribute('data-size')][area];
})
}
countrySel.addEventListener('change', e => refreshSize(e.target.value));
</script>