/* Wanxi portal visual system v2. Loaded after the legacy child stylesheet. */
:root {
    --wanxi-red: #9f101c;
    --wanxi-red-dark: #760b15;
    --wanxi-wine: #320c12;
    --wanxi-wine-soft: #4a1119;
    --wanxi-cream: #f7f5f4;
    --wanxi-paper: #fbfbfa;
    --wanxi-line: #ddd8d7;
    --wanxi-muted: #6b6666;
    --wanxi-ink: #191718;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    color: var(--wanxi-ink);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    letter-spacing: 0;
}

.container,
.site-header__inner,
.site-footer__inner {
    width: min(1380px, calc(100% - 64px));
}

.section,
.section--contact {
    padding-block: 96px;
}

.portal-section {
    position: relative;
}

.portal-section__head {
    max-width: 860px;
    margin-bottom: 40px;
}

.portal-section__head--split {
    max-width: none;
    align-items: end;
}

.portal-section__head--split > div {
    max-width: 900px;
}

.portal-section__head h2,
.cross-border-section h2,
.contact-section h2 {
    margin: 0;
    color: var(--wanxi-ink);
    font-size: 42px;
    line-height: 1.18;
    font-weight: 760;
    letter-spacing: 0;
    text-wrap: balance;
}

.portal-section__head p,
.rich-text p,
.contact-section p {
    color: var(--wanxi-muted);
    font-size: 16px;
    line-height: 1.85;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--wanxi-red);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.text-link,
.product-card__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--wanxi-red-dark);
    font-weight: 760;
    text-decoration: none;
}

.text-link::after {
    content: "→";
}

.button {
    min-height: 46px;
    border-radius: 4px;
    font-weight: 760;
}

.button--primary {
    border-color: var(--wanxi-red);
    background: var(--wanxi-red);
}

.button--primary:hover {
    border-color: var(--wanxi-red-dark);
    background: var(--wanxi-red-dark);
}

/* Header: one clean row when there is room, structured menu below that. */
.wanxi-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e7e3e2;
    box-shadow: none;
}

.wanxi-header__inner {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) auto;
    grid-template-areas: "brand nav cta";
    min-height: 78px;
    gap: 24px;
    padding-block: 0;
}

.wanxi-brand {
    grid-area: brand;
    max-width: 270px;
    gap: 11px;
}

.wanxi-brand__logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.wanxi-brand__text {
    min-width: 0;
}

.wanxi-brand .site-brand__name {
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
    white-space: nowrap;
}

.wanxi-brand .site-brand__tagline {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
}

.wanxi-header .primary-nav {
    grid-area: nav;
    position: static;
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    overflow: visible;
}

.wanxi-header .primary-menu {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1px;
}

.wanxi-header .primary-menu a {
    min-height: 78px;
    padding: 0 8px;
    border-radius: 0;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 680;
    white-space: nowrap;
}

.wanxi-header .primary-menu .current-menu-item > a,
.wanxi-header .primary-menu a:hover {
    color: var(--wanxi-red);
    background: transparent;
    box-shadow: inset 0 -3px var(--wanxi-red);
}

.header-cta {
    grid-area: cta;
    gap: 6px;
}

.header-cta__link {
    display: none !important;
}

.header-cta__button {
    min-height: 40px;
    padding-inline: 16px;
    font-size: 14px;
}

.nav-toggle {
    display: none;
}

.mobile-menu-extras {
    display: none;
}

[id^="section-"] {
    scroll-margin-top: 100px;
}

/* Hero */
.portal-hero {
    height: min(720px, calc(100dvh - 78px));
    min-height: 610px;
    background: var(--wanxi-wine);
}

.portal-hero__slide {
    background-image:
        linear-gradient(90deg, rgba(25, 8, 11, 0.92) 0%, rgba(25, 8, 11, 0.72) 44%, rgba(25, 8, 11, 0.14) 78%),
        var(--hero-image);
    background-position: center;
    transition: opacity 520ms ease;
}

.portal-hero__slide:first-child {
    background-position: center 58%;
}

.portal-hero__slide:nth-child(2) {
    background-position: center 62%;
}

.portal-hero__inner {
    padding-block: 96px 116px;
}

.portal-hero .eyebrow {
    color: #f2c8cd;
}

.portal-hero h1,
.portal-hero h2 {
    max-width: 850px;
    margin: 0 0 20px;
    font-size: 58px;
    line-height: 1.12;
    font-weight: 760;
    letter-spacing: 0;
}

.portal-hero__lead {
    max-width: 700px;
    font-size: 18px;
    line-height: 1.8;
}

.portal-hero__actions {
    margin-top: 30px;
}

.portal-hero .button--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.72);
    background: transparent;
}

.portal-hero .b2b-tags {
    max-width: 980px;
    margin-top: 32px;
    gap: 8px;
}

.portal-hero .b2b-tags span {
    min-height: 30px;
    padding-inline: 11px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(34, 9, 14, 0.2);
    font-size: 12px;
}

.portal-hero__dots {
    right: auto;
    left: max(32px, calc((100vw - 1380px) / 2));
    bottom: 34px;
    transform: none;
}

.portal-hero__dots button {
    width: 42px;
    height: 3px;
    border-radius: 0;
}

/* Company profile */
.portal-overview {
    background: #fff;
}

.overview-heading > p {
    max-width: 510px;
    margin: 0;
}

.overview-story {
    display: grid;
    grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
    gap: 70px;
    align-items: center;
}

.overview-story__copy {
    order: 0;
}

.overview-story__copy h3 {
    margin: 16px 0 22px;
    font-size: 30px;
    line-height: 1.3;
}

.section-index {
    color: #a69d9e;
    font-size: 11px;
    font-weight: 760;
}

.overview-story__gallery {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.75fr);
    grid-template-rows: repeat(2, 220px);
    gap: 10px;
}

.overview-story__media {
    position: relative;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #ddd;
}

.overview-story__media--primary {
    grid-row: 1 / span 2;
}

.overview-story__media img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: cover;
    transition: transform 420ms ease;
}

.overview-story__media:hover img {
    transform: scale(1.025);
}

.overview-story__media figcaption {
    right: auto;
    bottom: 12px;
    left: 12px;
    padding: 7px 10px;
    border-radius: 2px;
    color: #fff;
    background: rgba(39, 8, 13, 0.82);
    font-size: 12px;
}

.overview-grid {
    margin-top: 54px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--wanxi-line);
    border-bottom: 1px solid var(--wanxi-line);
}

.overview-card {
    min-height: 126px;
    padding: 22px 18px;
    border: 0;
    border-right: 1px solid var(--wanxi-line);
    border-radius: 0;
    box-shadow: none;
}

.overview-card:last-child {
    border-right: 0;
}

.overview-card span {
    color: #8b8182;
    font-size: 12px;
}

.overview-card strong {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.history-strip {
    margin-top: 50px;
    padding: 30px 0 0;
    border-top: 0;
}

.history-strip::before {
    background: #c7c0bf;
}

.history-strip__item strong {
    color: var(--wanxi-red);
    font-size: 20px;
}

/* Dark capability band: visual relief without marketing noise. */
#section-advantages {
    color: #fff;
    background: var(--wanxi-wine);
}

#section-advantages .portal-section__head h2,
#section-advantages .advantage-card h3 {
    color: #fff;
}

#section-advantages .eyebrow {
    color: #e8a8af;
}

.advantage-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.advantage-card {
    min-height: 235px;
    padding: 34px 28px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.76);
    background: transparent;
    box-shadow: none;
}

.advantage-card:last-child {
    border-right: 0;
}

.advantage-card__icon {
    width: auto;
    height: auto;
    margin-bottom: 34px;
    border-radius: 0;
    color: #efbbc0;
    background: transparent;
    font-size: 13px;
}

.advantage-card p {
    color: rgba(255, 255, 255, 0.7);
}

/* Product catalogue */
.portal-products {
    background: #f3f3f2;
}

.product-catalog-note {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: -12px 0 26px;
    color: var(--wanxi-muted);
}

.product-catalog-note strong {
    color: var(--wanxi-red);
    font-size: 30px;
    line-height: 1;
}

.filter-bar {
    gap: 6px;
    margin-bottom: 24px;
}

.filter-bar button {
    min-height: 34px;
    padding-inline: 12px;
    border-radius: 3px;
    color: #615b5c;
    border-color: #d8d3d2;
    font-size: 13px;
    font-weight: 650;
}

.filter-bar button.is-active {
    border-color: var(--wanxi-red);
    background: var(--wanxi-red);
}

.product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    grid-auto-flow: dense;
}

.product-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0dcdb;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    transition: transform 180ms ease, border-color 180ms ease;
}

.product-card:hover {
    border-color: #b9adae;
    transform: translateY(-3px);
}

.product-card--featured {
    grid-column: span 2;
}

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

.product-card--featured img {
    aspect-ratio: 16 / 8.6;
}

.product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.product-card__body > span {
    color: var(--wanxi-red);
    font-size: 11px;
}

.product-card__body h3 {
    margin: 8px 0 12px;
    font-size: 20px;
    line-height: 1.35;
}

.product-card__body p {
    margin: 0 0 8px;
    color: var(--wanxi-muted);
    font-size: 13px;
    line-height: 1.7;
}

.product-card__body p strong {
    color: var(--wanxi-ink);
}

.product-card__link {
    justify-content: space-between;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #ece9e8;
    font-size: 13px;
}

/* Factory gallery */
.portal-factory {
    background: #fff;
}

.factory-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 10px;
}

.factory-item {
    position: relative;
    grid-column: span 4;
    margin: 0;
    border: 0;
    border-radius: 3px;
    background: #151313;
}

.factory-item:first-child {
    grid-column: span 7;
    grid-row: span 2;
}

.factory-item:nth-child(2),
.factory-item:nth-child(3) {
    grid-column: span 5;
}

.factory-item img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 250px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    opacity: 0.94;
}

.factory-item:first-child img {
    min-height: 510px;
}

.factory-item figcaption {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 3px;
    padding: 38px 18px 16px;
    color: #fff;
    background: linear-gradient(transparent, rgba(21, 9, 11, 0.88));
}

.factory-item figcaption span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

/* R&D and production */
#section-rd {
    background: #f5f5f4;
}

.rd-layout {
    grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
    gap: 56px 70px;
}

.rd-layout__copy h2 {
    font-size: 40px;
    line-height: 1.2;
}

.rd-layout__media {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 10px;
}

.rd-layout__media img {
    height: 440px;
    border-radius: 3px;
    object-fit: cover;
}

.rd-layout__media img:last-child {
    object-position: 63% center;
}

.rd-layout__features {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--wanxi-line);
    border-bottom: 1px solid var(--wanxi-line);
}

.feature-list span {
    display: grid;
    gap: 14px;
    min-height: 112px;
    padding: 20px 16px;
    border: 0;
    border-right: 1px solid var(--wanxi-line);
    border-radius: 0;
    background: transparent;
    font-size: 14px;
}

.feature-list span:last-child {
    border-right: 0;
}

.feature-list b {
    color: var(--wanxi-red);
    font-size: 12px;
}

.production-visuals {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 0.8fr;
    gap: 10px;
    margin-bottom: 34px;
}

.production-visuals figure {
    position: relative;
    min-height: 350px;
    margin: 0;
    overflow: hidden;
    border-radius: 3px;
}

.production-visuals img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.production-visuals figcaption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 7px 10px;
    color: #fff;
    background: rgba(46, 9, 14, 0.82);
    font-size: 12px;
}

.quality-flow {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border: 0;
    border-top: 1px solid var(--wanxi-line);
    border-bottom: 1px solid var(--wanxi-line);
    border-radius: 0;
}

.quality-flow article {
    min-height: 128px;
    padding: 22px 18px;
    background: #fff;
}

.quality-flow h3 {
    font-size: 16px;
}

/* Team, cooperation, cross-border */
.team-section {
    background: #fff;
}

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

.team-card {
    position: relative;
    min-height: 400px;
    overflow: hidden;
    border: 0;
    border-radius: 3px;
    background: #1e1718;
}

.team-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.team-card > div {
    position: absolute;
    inset: auto 0 0;
    padding: 70px 24px 22px;
    color: #fff;
    background: linear-gradient(transparent, rgba(25, 8, 12, 0.9));
}

.team-card h3 {
    color: #fff;
}

.team-card p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.76);
}

#section-cooperation {
    background: #f4f3f2;
}

.cooperation-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cooperation-card {
    min-height: 230px;
    padding: 30px 24px;
    border: 0;
    border-top: 3px solid var(--wanxi-red);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.cooperation-card h3 {
    margin-bottom: 34px;
    font-size: 21px;
}

.cross-border-section {
    color: #fff;
    background-color: var(--wanxi-wine);
    background-image:
        linear-gradient(90deg, rgba(43, 8, 13, 0.98) 0%, rgba(43, 8, 13, 0.9) 48%, rgba(43, 8, 13, 0.64) 100%),
        url("../images/portal/hero-overseas.webp");
    background-position: center;
    background-size: cover;
}

.cross-border-section h2,
.cross-border-section h3 {
    color: #fff;
}

.cross-border-section .eyebrow {
    color: #efb6bc;
}

.cross-border-section .rich-text p {
    color: rgba(255, 255, 255, 0.82);
}

.cross-border-section .button--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

.mini-card-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 48px;
}

.mini-card {
    min-height: 170px;
    padding: 22px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    background: rgba(42, 7, 12, 0.48);
}

.mini-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* Projects, credentials, editorial content */
.case-grid--b2b {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.case-card {
    overflow: hidden;
    border: 1px solid var(--wanxi-line);
    border-radius: 3px;
    background: #fff;
    box-shadow: none;
}

.case-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.case-card__body {
    padding: 22px;
}

.case-card__body h3 {
    font-size: 21px;
}

.case-card__body p {
    font-size: 13px;
    line-height: 1.75;
}

#section-certificates {
    background: #f4f3f2;
}

.certificate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.certificate-card {
    padding: 0 0 22px;
    overflow: hidden;
    border: 1px solid var(--wanxi-line);
    border-radius: 3px;
    box-shadow: none;
}

.certificate-card img {
    padding: 0;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #eee;
}

.certificate-card h3,
.certificate-card p {
    margin-inline: 20px;
}

.news-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--wanxi-line);
}

.news-column {
    min-height: 280px;
    padding: 30px 28px;
    border: 0;
    border-right: 1px solid var(--wanxi-line);
    border-radius: 0;
}

.news-column:last-child {
    border-right: 0;
}

.news-column h3 {
    font-size: 22px;
}

/* Contact */
.contact-section {
    color: #fff;
    background: var(--wanxi-wine-soft);
}

.contact-section h2,
.contact-section .eyebrow {
    color: #fff;
}

.contact-section p {
    color: rgba(255, 255, 255, 0.72);
}

.contact-layout {
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    gap: 72px;
}

.inquiry-card,
.contact-panel {
    border-radius: 4px;
    box-shadow: none;
}

.contact-section .inquiry-card {
    border: 0;
    background: #fff;
}

/* Internal page hero: page-specific real material, not a generic banner. */
.page-hero--b2b {
    position: relative;
    display: grid;
    align-items: end;
    min-height: 410px;
    padding-block: 70px;
    color: #fff;
    background-color: var(--wanxi-wine);
    background-image:
        linear-gradient(90deg, rgba(29, 7, 11, 0.92), rgba(29, 7, 11, 0.55) 62%, rgba(29, 7, 11, 0.18)),
        url("../images/portal/ai-factory-exterior.webp");
    background-position: center 56%;
    background-size: cover;
}

.page-template-page-services .page-hero--b2b {
    background-image: linear-gradient(90deg, rgba(29, 7, 11, 0.9), rgba(29, 7, 11, 0.32)), url("../images/portal/hero-overseas.webp");
}

.page-template-page-rd-production .page-hero--b2b {
    background-image: linear-gradient(90deg, rgba(22, 9, 12, 0.9), rgba(22, 9, 12, 0.28)), url("../images/portal/ai-rd-workbench.webp");
}

.page-template-page-oem-odm-cooperation .page-hero--b2b,
.page-template-page-solutions .page-hero--b2b {
    background-image: linear-gradient(90deg, rgba(29, 7, 11, 0.92), rgba(29, 7, 11, 0.36)), url("../images/portal/ai-production-detail.webp");
}

.page-template-page-cross-border-service .page-hero--b2b {
    background-image: linear-gradient(90deg, rgba(29, 7, 11, 0.92), rgba(29, 7, 11, 0.3)), url("../images/portal/hero-overseas.webp");
}

.page-template-page-cases-gallery .page-hero--b2b,
.page-template-page-cases .page-hero--b2b {
    background-image: linear-gradient(90deg, rgba(29, 7, 11, 0.92), rgba(29, 7, 11, 0.3)), url("../images/portal/hero-overseas.webp");
}

.page-template-page-knowledge .page-hero--b2b,
.page-template-page-faq .page-hero--b2b {
    background-image: linear-gradient(90deg, rgba(29, 7, 11, 0.94), rgba(29, 7, 11, 0.58)), url("../images/portal/ai-project-meeting.webp");
}

.page-template-page-contact .page-hero--b2b {
    background-image: linear-gradient(90deg, rgba(29, 7, 11, 0.92), rgba(29, 7, 11, 0.38)), url("../images/portal/ai-service-center.webp");
}

.page-hero--b2b .container {
    position: relative;
    z-index: 1;
}

.page-hero--b2b h1 {
    max-width: 920px;
    margin: 0;
    color: #fff;
    font-size: 48px;
    line-height: 1.2;
    text-wrap: balance;
}

.page-hero--b2b p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
}

.page-hero--b2b .eyebrow {
    color: #efb6bc;
}

.page-hero--b2b .breadcrumbs,
.page-hero--b2b .breadcrumbs a {
    color: rgba(255, 255, 255, 0.72);
}

.product-detail-hero {
    padding-block: 68px;
    background: #f4f3f2;
}

.product-detail-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 72px;
    align-items: center;
}

.product-detail-hero__copy h1 {
    margin: 14px 0 24px;
    font-size: 48px;
    line-height: 1.18;
}

.product-detail-hero__copy > p {
    color: var(--wanxi-muted);
    line-height: 1.8;
}

.product-detail-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.product-detail-hero figure {
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
}

.product-detail-hero figure img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-detail-body__layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    gap: 72px;
}

.product-detail-body__intro h2 {
    font-size: 34px;
    line-height: 1.3;
}

/* Footer */
.wanxi-footer {
    color: rgba(255, 255, 255, 0.78);
    background: #4a0b14;
    border-top: 6px solid var(--wanxi-red);
}

.wanxi-footer::before {
    display: none;
}

.wanxi-footer .site-footer__inner {
    gap: 42px 64px;
}

.wanxi-footer h2 {
    font-size: 24px;
}

.wanxi-footer h3 {
    font-size: 15px;
}

.wanxi-footer p,
.wanxi-footer a,
.wanxi-footer span {
    font-size: 14px;
    line-height: 1.85;
}

/* Switch to the structured navigation before text can collide. */
@media (max-width: 1520px) {
    .wanxi-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand toggle";
        width: min(1380px, calc(100% - 48px));
        min-height: 72px;
    }

    .wanxi-brand {
        max-width: 330px;
    }

    .header-cta {
        display: none;
    }

    .nav-toggle {
        grid-area: toggle;
        display: grid;
        place-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
        border: 1px solid #d9d5d4;
        border-radius: 4px;
        background: #fff;
    }

    .wanxi-header .primary-nav {
        position: absolute;
        z-index: 80;
        top: 100%;
        right: 24px;
        left: 24px;
        display: none;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
        padding: 26px;
        border: 1px solid #e1dcdb;
        background: #fff;
        box-shadow: 0 20px 50px rgba(34, 12, 16, 0.14);
    }

    .wanxi-header .primary-nav.is-open {
        display: block;
    }

    .wanxi-header .primary-menu {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;
        border-top: 1px solid var(--wanxi-line);
        border-left: 1px solid var(--wanxi-line);
    }

    .wanxi-header .primary-menu a {
        min-height: 54px;
        padding: 8px 10px;
        border-right: 1px solid var(--wanxi-line);
        border-bottom: 1px solid var(--wanxi-line);
        font-size: 14px;
        white-space: normal;
    }

    .wanxi-header .primary-menu .current-menu-item > a,
    .wanxi-header .primary-menu a:hover {
        box-shadow: none;
        background: #f8f4f4;
    }

    .mobile-menu-extras {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px;
        margin-top: 22px;
    }

    .mobile-menu-extras section h2 {
        margin-bottom: 10px;
        font-size: 14px;
    }

    .mobile-menu-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .mobile-menu-grid a {
        color: var(--wanxi-ink);
        font-size: 13px;
        line-height: 1.45;
        text-decoration: none;
    }

    .mobile-menu-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    .container,
    .site-footer__inner {
        width: min(100% - 40px, 940px);
    }

    .section,
    .section--contact {
        padding-block: 76px;
    }

    .portal-section__head h2,
    .cross-border-section h2,
    .contact-section h2 {
        font-size: 36px;
    }

    .overview-story {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .overview-story__gallery {
        grid-template-rows: repeat(2, 190px);
    }

    .overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .overview-card:nth-child(3) {
        border-right: 0;
    }

    .overview-card:nth-child(-n+3) {
        border-bottom: 1px solid var(--wanxi-line);
    }

    .advantage-grid,
    .cooperation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .advantage-card:nth-child(2),
    .cooperation-card:nth-child(2) {
        border-right: 0;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-card--featured {
        grid-column: span 1;
    }

    .product-card--featured img {
        aspect-ratio: 4 / 3;
    }

    .rd-layout {
        grid-template-columns: 1fr;
    }

    .rd-layout__features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .feature-list span:nth-child(3) {
        border-right: 0;
    }

    .feature-list span:nth-child(-n+3) {
        border-bottom: 1px solid var(--wanxi-line);
    }

    .production-visuals {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .production-visuals figure:last-child {
        grid-column: 1 / -1;
        min-height: 300px;
    }

    .quality-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quality-flow article:nth-child(3n) {
        border-right: 0;
    }

    .quality-flow article:nth-child(-n+3) {
        border-bottom: 1px solid var(--wanxi-line);
    }

    .mini-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-detail-hero__layout,
    .product-detail-body__layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .case-grid--b2b,
    .certificate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .container,
    .site-footer__inner {
        width: calc(100% - 28px);
    }

    .wanxi-header__inner {
        width: calc(100% - 28px);
        min-height: 64px;
    }

    .wanxi-brand {
        max-width: calc(100vw - 88px);
    }

    .wanxi-brand__logo {
        width: 34px;
        height: 34px;
    }

    .wanxi-brand .site-brand__name {
        font-size: 14px;
    }

    .wanxi-brand .site-brand__tagline {
        font-size: 10px;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
    }

    .wanxi-header .primary-nav {
        position: fixed;
        top: 64px;
        right: 0;
        bottom: auto;
        left: 0;
        height: calc(100dvh - 64px);
        max-height: none;
        padding: 16px 14px 98px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overscroll-behavior: contain;
    }

    body.admin-bar .wanxi-header .primary-nav {
        top: 110px;
    }

    .wanxi-header .primary-menu {
        display: none;
    }

    .wanxi-header .primary-menu a {
        min-height: 48px;
        font-size: 13px;
    }

    .mobile-menu-extras {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 0;
    }

    .mobile-menu-extras section {
        padding: 0 0 16px;
        border: 0;
        border-bottom: 1px solid var(--wanxi-line);
        border-radius: 0;
        background: transparent;
    }

    .mobile-menu-extras h2 {
        margin-bottom: 8px;
        font-size: 13px;
    }

    .mobile-menu-grid {
        gap: 0 16px;
    }

    .mobile-menu-grid a {
        justify-content: flex-start;
        min-height: 40px;
        padding: 0;
        border: 0;
        border-bottom: 1px solid #eeeae9;
        border-radius: 0;
        background: transparent;
        text-align: left;
    }

    .mobile-menu-grid a.is-active,
    .mobile-menu-grid a:focus-visible {
        color: var(--wanxi-red);
        border-color: var(--wanxi-red);
        background: transparent;
    }

    .mobile-menu-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .mobile-section-nav {
        top: 64px;
        z-index: 45;
        border-bottom: 1px solid #e0dbda;
        background: #fff;
    }

    .mobile-section-nav__inner {
        padding-block: 9px;
    }

    .mobile-section-nav__inner > span {
        color: var(--wanxi-red);
        font-size: 12px;
    }

    .mobile-section-nav a {
        border-radius: 3px;
        font-size: 12px;
    }

    .section,
    .section--contact {
        padding-block: 54px;
    }

    .portal-section__head,
    .portal-section__head--split {
        display: block;
        margin-bottom: 24px;
    }

    .portal-section__head--split .text-link {
        margin-top: 12px;
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    .portal-section__head h2,
    .cross-border-section h2,
    .contact-section h2,
    .rd-layout__copy h2 {
        font-size: 28px;
        line-height: 1.28;
    }

    .portal-hero {
        height: 540px;
        min-height: 540px;
    }

    .portal-hero__slide {
        background-image:
            linear-gradient(90deg, rgba(25, 8, 11, 0.91), rgba(25, 8, 11, 0.54)),
            var(--hero-image);
    }

    .portal-hero__slide:first-child {
        background-position: 66% center;
    }

    .portal-hero__slide:nth-child(2) {
        background-position: 62% center;
    }

    .portal-hero__inner {
        padding-block: 46px 76px;
    }

    .portal-hero h1,
    .portal-hero h2 {
        max-width: 350px;
        font-size: 32px;
        line-height: 1.18;
    }

    .portal-hero__lead {
        max-width: 340px;
        font-size: 14px;
        line-height: 1.7;
    }

    .portal-hero__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 340px;
        margin-top: 20px;
    }

    .portal-hero__actions .button {
        min-height: 42px;
        font-size: 13px;
    }

    .portal-hero .b2b-tags {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: min(340px, 100%);
        margin-top: 18px;
        overflow: visible;
        padding-bottom: 0;
    }

    .portal-hero .b2b-tags span {
        min-width: 0;
        justify-content: center;
        padding-inline: 5px;
        white-space: nowrap;
    }

    .portal-hero .b2b-tags span:nth-child(n+4) {
        display: none;
    }

    .portal-hero__dots {
        left: 14px;
        bottom: 24px;
    }

    .overview-heading > p {
        margin-top: 12px;
    }

    .overview-story {
        gap: 26px;
    }

    .overview-story__copy h3 {
        font-size: 24px;
    }

    .overview-story__gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 132px;
    }

    .overview-story__media--primary {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 32px;
    }

    .overview-card,
    .overview-card:nth-child(3) {
        min-height: 110px;
        border-right: 1px solid var(--wanxi-line);
        border-bottom: 1px solid var(--wanxi-line);
    }

    .overview-card:nth-child(2n) {
        border-right: 0;
    }

    .overview-card:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .history-strip {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        margin-inline: -14px;
        padding: 24px 14px 4px;
        scroll-snap-type: x mandatory;
    }

    .history-strip__item {
        flex: 0 0 78%;
        min-width: 0;
        scroll-snap-align: start;
    }

    .advantage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .advantage-card {
        min-height: 190px;
        padding: 24px 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    }

    .advantage-card__icon {
        margin-bottom: 24px;
    }

    .product-catalog-note {
        margin-top: 0;
    }

    .product-grid,
    .case-grid--b2b,
    .certificate-grid,
    .news-layout {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        margin-inline: -14px;
        padding: 0 14px 8px;
        scroll-snap-type: x mandatory;
    }

    .product-card,
    .case-card,
    .certificate-card,
    .news-column {
        flex: 0 0 84%;
        scroll-snap-align: start;
    }

    .product-card--featured {
        grid-column: auto;
    }

    .factory-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        margin-inline: -14px;
        padding: 0 14px 8px;
        scroll-snap-type: x mandatory;
    }

    .factory-item,
    .factory-item:first-child,
    .factory-item:nth-child(2),
    .factory-item:nth-child(3) {
        flex: 0 0 86%;
        min-height: 320px;
        scroll-snap-align: start;
    }

    .factory-item img,
    .factory-item:first-child img {
        min-height: 320px;
    }

    .rd-layout {
        gap: 28px;
    }

    .rd-layout__media {
        grid-template-columns: 1fr;
    }

    .rd-layout__media img {
        height: 250px;
    }

    .rd-layout__media img:last-child {
        display: none;
    }

    .rd-layout__features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-list span,
    .feature-list span:nth-child(3) {
        min-height: 100px;
        border-right: 1px solid var(--wanxi-line);
        border-bottom: 1px solid var(--wanxi-line);
    }

    .feature-list span:nth-child(2n) {
        border-right: 0;
    }

    .feature-list span:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .production-visuals {
        display: flex;
        overflow-x: auto;
        margin-inline: -14px;
        padding: 0 14px 8px;
        scroll-snap-type: x mandatory;
    }

    .production-visuals figure,
    .production-visuals figure:last-child {
        flex: 0 0 84%;
        min-height: 300px;
        scroll-snap-align: start;
    }

    .quality-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quality-flow article,
    .quality-flow article:nth-child(3n) {
        min-height: 108px;
        border-right: 1px solid var(--wanxi-line);
        border-bottom: 1px solid var(--wanxi-line);
        border-radius: 0;
    }

    .quality-flow article:nth-child(2n) {
        border-right: 0;
    }

    .quality-flow article:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .team-grid {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        margin-inline: -14px;
        padding: 0 14px 8px;
        scroll-snap-type: x mandatory;
    }

    .team-card {
        flex: 0 0 86%;
        min-height: 330px;
        scroll-snap-align: start;
    }

    .cooperation-grid {
        grid-template-columns: 1fr;
    }

    .cooperation-card,
    .cooperation-card:nth-child(2) {
        min-height: 0;
        border-right: 0;
    }

    .cooperation-card h3 {
        margin-bottom: 14px;
    }

    .mini-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 30px;
    }

    .mini-card {
        min-height: 150px;
        padding: 18px 14px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .page-hero--b2b {
        min-height: 330px;
        padding-block: 46px;
    }

    .page-hero--b2b h1 {
        font-size: 32px;
    }

    .product-detail-hero {
        padding-block: 44px;
    }

    .product-detail-hero__copy h1 {
        font-size: 32px;
    }

    .product-detail-hero__layout,
    .product-detail-body__layout {
        gap: 24px;
    }

    .product-detail-body__intro h2 {
        font-size: 26px;
    }

    .news-column {
        border-right: 0;
    }

    .wanxi-footer {
        padding-bottom: 82px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .portal-hero__slide,
    .overview-story__media img,
    .product-card {
        transition: none;
    }
}
