.size-guide-page {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 4vh 0 6vh;
    box-sizing: border-box;
}

.size-guide-container {
    width: min(42rem, 90%);
    display: flex;
    flex-direction: column;
    gap: 2vh;
    color: var(--color-text);
}

.size-guide-title {
    font-family: var(--font-family), serif;
    font-size: clamp(22px, 4vh, 36px);
    font-weight: bold;
    margin: 0;
    text-align: center;
}

.size-guide-intro,
.size-guide-unit {
    font-family: var(--font-family), serif;
    font-size: clamp(12px, 2vh, 18px);
    line-height: 1.6;
    margin: 0;
    text-align: center;
    color: var(--color-text-muted);
}

.size-guide-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 0.1vh solid var(--color-border);
    border-radius: 0.4vh;
    background-color: var(--color-bg-elevated);
}

.size-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-family), serif;
    font-size: clamp(12px, 2vh, 18px);
}

.size-guide-table thead {
    background-color: var(--color-hover-bg);
}

.size-guide-table th,
.size-guide-table td {
    padding: 1.2vh 1vw;
    text-align: center;
    border-bottom: 0.1vh solid var(--color-border);
}

.size-guide-table tbody tr:last-child th,
.size-guide-table tbody tr:last-child td {
    border-bottom: none;
}

.size-guide-table tbody tr:nth-child(even) {
    background-color: var(--color-input-bg);
}

.size-guide-table th {
    font-weight: bold;
    color: var(--color-text);
}

.size-guide-size {
    font-size: clamp(14px, 2.4vh, 22px);
    color: var(--color-text);
}

.size-guide-cards {
    display: none;
    flex-direction: column;
    gap: 1.5vh;
}

.size-guide-card {
    border: 0.1vh solid var(--color-border);
    border-radius: 0.4vh;
    padding: 1.5vh 3vw;
    background-color: var(--color-bg-elevated);
}

.size-guide-card-size {
    font-family: var(--font-family), serif;
    font-size: clamp(16px, 3vh, 24px);
    font-weight: bold;
    margin: 0 0 1vh;
    color: var(--color-text);
}

.size-guide-card-measures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1vh 2vw;
    margin: 0;
}

.size-guide-card-measures div {
    display: flex;
    flex-direction: column;
    gap: 0.3vh;
}

.size-guide-card-measures dt {
    font-family: var(--font-family), serif;
    font-size: clamp(10px, 1.5vh, 14px);
    color: var(--color-text-muted);
    font-weight: normal;
}

.size-guide-card-measures dd {
    margin: 0;
    font-family: var(--font-family), serif;
    font-size: clamp(12px, 2vh, 18px);
    font-weight: bold;
    color: var(--color-text);
    unicode-bidi: plaintext;
}

@media (max-width: 768px) {
    .size-guide-table-wrap {
        display: none;
    }

    .size-guide-cards {
        display: flex;
    }

    .size-guide-card-measures {
        grid-template-columns: 1fr;
    }
}

html[lang="ar"] .size-guide-container,
html[lang="ar"] .size-guide-table-wrap,
html[lang="ar"] .size-guide-cards {
    direction: ltr;
}

html[lang="ar"] .size-guide-title,
html[lang="ar"] .size-guide-intro,
html[lang="ar"] .size-guide-unit,
html[lang="ar"] .size-guide-table th,
html[lang="ar"] .size-guide-table td,
html[lang="ar"] .size-guide-card h3,
html[lang="ar"] .size-guide-card dt,
html[lang="ar"] .size-guide-card dd {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .size-guide-title {
    text-align: center;
}
