.header-tools {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
    min-width: 0;
}

.language-menu {
    position: relative;
}

.language-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 76px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid #dce3ec;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    list-style: none;
}

.language-menu summary::-webkit-details-marker {
    display: none;
}

.language-menu > div {
    position: absolute;
    z-index: 100;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    gap: 3px;
    min-width: 210px;
    padding: 8px;
    border: 1px solid #e0e6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(20, 38, 63, .16);
}

.language-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
}

.language-menu a:hover,
.language-menu a[aria-current="page"] {
    background: #edf5ff;
    color: #0874e8;
}

.language-flag {
    display: inline-flex;
    width: 24px;
    align-items: center;
    justify-content: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 20px;
    line-height: 1;
}

.language-menu summary .language-flag {
    width: 22px;
    font-size: 18px;
}

.localized-lead {
    font-size: 18px;
    line-height: 1.75;
}

.localized-page-section {
    padding: 80px 0;
}

.localized-page-section .content-narrow {
    max-width: 900px;
}

.localized-page-section h2 {
    margin-top: 38px;
}

.localized-page-section ul {
    display: grid;
    gap: 12px;
}

.localized-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.localized-product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e5eaf1;
    border-radius: 24px;
    background: #fff;
}

.localized-product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.localized-product-card > div {
    padding: 28px;
}

.localized-product-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.localized-product-card dt,
.localized-specs dt {
    color: #6f7782;
    font-size: 13px;
}

.localized-product-card dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.localized-product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 50px;
}

.localized-product-detail > * {
    min-width: 0;
}

.localized-product-detail img {
    width: 100%;
    height: auto;
    border-radius: 24px;
}

.localized-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.localized-specs div {
    min-width: 0;
    padding: 16px;
    border-radius: 14px;
    background: #f5f7fa;
}

.localized-specs dd {
    margin: 5px 0 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.translation-notice {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #f0d99a;
    border-radius: 12px;
    background: #fff8e7;
}

/* Localized contact page: it does not use the homepage body class. */
.localized-page-section .localized-product-detail > div > h2:first-child {
    margin-top: 0;
}

.localized-page-section .contact-info-item {
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid #d9e4e9;
    border-bottom: 0;
}

.localized-page-section .contact-info-item h3 {
    margin: 0 0 7px;
    color: #176a91;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.localized-page-section .contact-info-item a,
.localized-page-section .contact-info-item p {
    color: #122e40;
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.localized-page-section .contact-info-item a:hover {
    color: #0071e3;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.localized-page-section .review-form {
    min-width: 0;
    padding: clamp(26px, 3.4vw, 38px);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(20, 38, 63, .1);
}

.localized-page-section .review-form form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.localized-page-section .review-form label {
    display: block;
    min-width: 0;
    color: #122e40;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.localized-page-section .review-form input:not([type="hidden"]),
.localized-page-section .review-form textarea {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    outline: 0;
    background: #f1f6f8;
    color: #122e40;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.localized-page-section .review-form input:not([type="hidden"]) {
    min-height: 52px;
}

.localized-page-section .review-form textarea {
    min-height: 160px;
    resize: vertical;
}

.localized-page-section .review-form input:not([type="hidden"]):focus,
.localized-page-section .review-form textarea:focus {
    border-color: #0071e3;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, .12);
}

.localized-page-section .review-form .form-full-width,
.localized-page-section .review-form button {
    grid-column: 1 / -1;
}

.localized-page-section .review-form button {
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border: 0;
    border-radius: 14px;
    background: #0071e3;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.localized-page-section .review-form button:hover {
    background: #122e40;
}

.localized-page-section .review-form .website-field {
    display: none !important;
}

/* Keep the English layout unchanged while longer translations wrap cleanly. */
html:not([lang="en"]) body.jg-site-v3 :is(h1, h2, h3, p, li, dt, dd, a, button, label, summary) {
    overflow-wrap: break-word;
}

html:not([lang="en"]) body.jg-site-v3 :is(.button-primary, .button-secondary, .button-light, .outline-button, .btn-main, .header-btn) {
    max-width: 100%;
    height: auto;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

html:not([lang="en"]) body.jg-site-v3 .page-title h1 {
    max-width: 980px;
    margin-inline: auto;
    text-wrap: balance;
}

html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .home-cover .hero-copy h1,
html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .quote-band h2,
html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .goldspear-intro-copy h2,
html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .section-heading h2,
html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .home-contact h2 {
    text-wrap: balance;
}

html[lang="id"] body.jg-site-v3.jg-home-v2 .home-cover .hero-copy h1 {
    font-size: clamp(36px, 3.2vw, 50px);
    line-height: 1.06;
    letter-spacing: -.04em;
}

html[lang="vi"] body.jg-site-v3.jg-home-v2 .home-cover .hero-copy h1 {
    font-size: clamp(35px, 3.1vw, 48px);
    line-height: 1.08;
    letter-spacing: -.025em;
}

html[lang="th"] body {
    font-family: Arial, "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
}

html[lang="th"] body.jg-site-v3.jg-home-v2 .home-cover .hero-copy h1 {
    font-size: clamp(34px, 3vw, 47px);
    line-height: 1.16;
    letter-spacing: 0;
}

html[lang="th"] body.jg-site-v3 :is(h1, h2, h3, p, li, a, button, label, summary) {
    line-break: loose;
    word-break: normal;
}

html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .quote-band h2 {
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.1;
}

html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .goldspear-intro-copy h2 {
    font-size: clamp(38px, 4.5vw, 56px);
    line-height: 1.08;
}

html:not([lang="en"]) body.jg-site-v3 .localized-product-detail h1 {
    margin-bottom: 20px;
    font-size: clamp(32px, 3.5vw, 48px);
    line-height: 1.12;
    letter-spacing: -.035em;
    text-wrap: balance;
}

html[lang="th"] body.jg-site-v3 .localized-product-detail h1 {
    line-height: 1.2;
    letter-spacing: 0;
}

@media (max-width: 1200px) and (min-width: 981px) {
    html:not([lang="en"]) body.jg-site-v3 .header-tools .header-btn {
        display: none;
    }

    html:not([lang="en"]) body.jg-site-v3 .header-wrapper {
        gap: 12px;
    }

    html:not([lang="en"]) body.jg-site-v3 .main-nav > a,
    html:not([lang="en"]) body.jg-site-v3 .nav-dropdown > a {
        padding-inline: 7px;
        font-size: 12.5px;
    }
}

@media (max-width: 1000px) {
    .header-tools .header-btn {
        display: none;
    }

    .localized-product-grid,
    .localized-product-detail {
        grid-template-columns: 1fr;
    }

    .localized-product-detail {
        gap: 34px;
    }
}

@media (max-width: 768px) {
    html:not([lang="en"]) body.jg-site-v3 .page-title h1 {
        font-size: clamp(31px, 9.2vw, 40px);
        line-height: 1.12;
        letter-spacing: -.035em;
    }

    html[lang="th"] body.jg-site-v3 .page-title h1 {
        line-height: 1.2;
        letter-spacing: 0;
    }

    html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .home-cover .hero-copy {
        padding: 24px;
    }

    html[lang="id"] body.jg-site-v3.jg-home-v2 .home-cover .hero-copy h1,
    html[lang="vi"] body.jg-site-v3.jg-home-v2 .home-cover .hero-copy h1 {
        font-size: clamp(30px, 8.4vw, 38px);
        line-height: 1.1;
        letter-spacing: -.03em;
    }

    html[lang="th"] body.jg-site-v3.jg-home-v2 .home-cover .hero-copy h1 {
        font-size: clamp(29px, 8vw, 37px);
        line-height: 1.2;
    }

    html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .quote-band h2,
    html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .goldspear-intro-copy h2 {
        font-size: clamp(30px, 8.5vw, 39px);
    }

    html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .quote-band .button-light {
        align-self: stretch;
    }

    html:not([lang="en"]) body.jg-site-v3 .localized-product-detail h1 {
        font-size: clamp(30px, 8.5vw, 40px);
    }

    html:not([lang="en"]) body.jg-site-v3 .review-form form {
        grid-template-columns: 1fr;
    }

    html:not([lang="en"]) body.jg-site-v3 .review-form :is(label, input, textarea, button),
    html:not([lang="en"]) body.jg-site-v3 .form-full-width {
        min-width: 0;
        grid-column: 1;
    }

    html:not([lang="en"]) body.jg-site-v3 .contact-direct {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 720px) {
    .header-tools {
        margin-left: auto;
    }

    .language-menu summary {
        min-width: 70px;
        min-height: 38px;
        padding: 0 10px;
    }

    .language-menu > div {
        min-width: 200px;
        max-width: calc(100vw - 28px);
    }

    .localized-page-section {
        padding: 52px 0;
    }

    .localized-specs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .home-cover .hero-copy {
        padding: 20px;
    }

    html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .home-cover .action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    html:not([lang="en"]) body.jg-site-v3.jg-home-v2 .home-cover .action-row > a {
        width: 100%;
    }

    .localized-product-card > div {
        padding: 22px;
    }

    .localized-product-card dl {
        grid-template-columns: 1fr;
    }

    .localized-page-section .review-form {
        padding: 22px;
        border-radius: 20px;
    }
}
