/* Texway: restrained motion layered over the existing design. */
:root {
    --tx-motion-ease: cubic-bezier(.22, 1, .36, 1);
    --tx-motion-fast: 220ms;
    --tx-motion-image: 550ms;
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 110px; }
.tx-motion-pending { opacity: 0; }
/* Keyboard users can always reach pending links before the observer fires. */
.tx-motion-pending:focus-within { opacity: 1; }

.banner .swiper-slide img {
    transform: scale(1.025);
    transition: transform 6500ms linear;
}
.banner .swiper-slide-active img { transform: scale(1); }
.banner .swiper-pagination-bullet {
    transition: width 350ms var(--tx-motion-ease), opacity var(--tx-motion-fast), background-color var(--tx-motion-fast);
}
.banner .bannerwen .bannertitle, .banner .bannerwen a {
    opacity: 1;
    animation: none;
    transition-delay: 0s;
}

/* Keep Swiper's slide transforms exclusively owned by Swiper. */
.news-img, .case-img, .product-img, .product-search-image, .featured-image, .factory-img { overflow: hidden; }
.news-img img, .case-img img, .product-img img, .product-search-image img,
.featured-image img, .factory-img img, .homeProductsSwiper .product-item img {
    transition: transform var(--tx-motion-image) var(--tx-motion-ease);
}
.news-info h3, .case-item h3, .product-card h3 {
    transition: color var(--tx-motion-fast) ease;
}
.about-more span, .contact-btn span, .news-info span {
    display: inline-block;
    transition: transform var(--tx-motion-fast) var(--tx-motion-ease);
}
.about-more, .contact-btn, .inquiry-btn, .product-tab, .process-tab,
.news-more a, .contact-message-form button, .product-search-form button,
.faq-contact a, .footer-column a, .lanmux a, .factoryRdSwiper button,
.factoryBaseSwiper button, .equipment-controls button {
    transition: color var(--tx-motion-fast), background-color var(--tx-motion-fast), border-color var(--tx-motion-fast), box-shadow var(--tx-motion-fast);
}
.texway-workflow .process-item {
    transition: transform 280ms var(--tx-motion-ease), border-color var(--tx-motion-fast), box-shadow var(--tx-motion-fast);
}
.texway-workflow .process-item::after {
    transition: opacity var(--tx-motion-fast);
}
.texway-workflow .process-item.tx-motion-pending::after { opacity: 0; }
.texway-workflow .process-item:not(.tx-motion-pending)::after { opacity: 1; }
.faq-item button span { transition: color var(--tx-motion-fast); }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible {
    outline: 2px solid #DE5528;
    outline-offset: 4px;
}
.news-item:focus-within .news-info h3, .case-item:focus-within h3,
.products-page .product-card:focus-within h3 { color: #DE5528; }
.about-more:focus-visible span, .contact-btn:focus-visible span { transform: translateX(4px); }

/* Dropdowns remain open for both mouse and keyboard; mobile keeps visible children. */
@media (min-width: 993px) {
    header.head .menu > ul > li > dl.pdtmenu {
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, 8px);
        transition: opacity 180ms ease, transform 220ms var(--tx-motion-ease), visibility 180ms;
    }
    header.head .menu > ul > li:hover > dl.pdtmenu,
    header.head .menu > ul > li:focus-within > dl.pdtmenu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }
    header.head .menu > ul > li:focus-within > a::after { width: 100%; }
}
@media (hover: hover) and (pointer: fine) {
    .news-item:hover .news-img img, .case-item:hover .case-img img,
    .products-page .product-card:hover img, .product-search-card:hover img,
    .featured-image:hover img, .factory-item:hover .factory-img img,
    .homeProductsSwiper .product-item:hover img { transform: scale(1.035); }
    .news-item:hover .news-info h3, .case-item:hover h3,
    .products-page .product-card:hover h3 { color: #DE5528; }
    .about-more:hover span, .contact-btn:hover span, .news-item:hover .news-info span { transform: translateX(4px); }
}
@media (max-width: 992px) {
    [id] { scroll-margin-top: 96px; }
    header.head .menu.tx-menu-open { animation: tx-menu-enter 200ms var(--tx-motion-ease); }
    /* Existing desktop grids need room to breathe before adding entrance motion. */
    .Homeabout .row { flex-direction: column; grid-gap: 32px;--tx-row-gap: 32px;--tx-column-gap: 32px;gap: 32px; }
    .Homeabout .about-video { width: 100%; height: auto; aspect-ratio: 6 / 5; }
    .Homeabout .about-content { width: 100%; min-width: 0; }
    .Homeabout .about-content h2 { font-size: 30px;font-size: clamp(30px, 5vw, 44px); }
    .Homefactory .factory-box { grid-template-columns: minmax(0, 1fr); }
    .Homefactory .factory-number { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 28px 16px;--tx-row-gap: 28px;--tx-column-gap: 16px;gap: 28px 16px; }
    .Homefactory .factory-number strong { font-size: 18px;font-size: clamp(18px, 4.5vw, 32px); }
    .Homefactory .factory-head h2, .factory-capability .factory-head h2 { font-size: 30px;font-size: clamp(30px, 5vw, 40px); overflow-wrap: anywhere; }
    .company-profile .profile-wrapper { grid-template-columns: minmax(0, 1fr); grid-gap: 32px;--tx-row-gap: 32px;--tx-column-gap: 32px;gap: 32px; }
    .company-profile .profile-content, .company-profile .profile-data { min-width: 0; max-width: 100%; }
    .Homecontact .contact-content { flex-wrap: wrap; grid-gap: 24px;--tx-row-gap: 24px;--tx-column-gap: 24px;gap: 24px; }
    .Homecontact .contact-copy { min-width: 0; max-width: 100%; }
    .lanmux { height: auto; }
    .lanmux .lm-ct, .lanmux .lm-ctbig { min-width: 0; max-width: 100%; }
    .lanmux .lm-ctbig > div, .lanmux .lm-ctbig > ul { min-width: 0; max-width: 100%; }
    .lanmux .lm-ct ul { flex-wrap: wrap; grid-gap: 0 20px;--tx-row-gap: 0;--tx-column-gap: 20px;gap: 0 20px; }
    .lanmux .lm-ct ul li { margin-right: 0; }
    .lanmux .lm-ct ul li a { line-height: 1.5; padding-top: 12px; padding-bottom: 12px; }
    .products-page .products-layout { grid-template-columns: minmax(0, 1fr); grid-gap: 24px;--tx-row-gap: 24px;--tx-column-gap: 24px;gap: 24px; }
    .products-page .products-main, .products-page .detail { min-width: 0; }
    .products-page .featured-product { grid-template-columns: minmax(0, 1fr); grid-gap: 24px;--tx-row-gap: 24px;--tx-column-gap: 24px;gap: 24px; }
    .products-page .featured-image { width: 100%; height: auto; aspect-ratio: 4 / 3; }
    .products-page .featured-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
    .products-page .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 24px 16px;--tx-row-gap: 24px;--tx-column-gap: 16px;gap: 24px 16px; }
    .products-page .product-img { height: auto; aspect-ratio: 3 / 4; }
    .products-page .product-card h3 { font-size: 18px; }
    .products-page .inquiry-btn { max-width: 100%; }
    .detail .product-summary { grid-template-columns: minmax(0, 1fr); grid-gap: 24px;--tx-row-gap: 24px;--tx-column-gap: 24px;gap: 24px; }
    .detail .product-gallery, .detail .product-info { min-width: 0; max-width: 100%; }
    .inquiry-popup .inquiry-box { width: calc(100% - 32px);max-width: 500px;width: min(500px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 32px 24px; }
}
@keyframes tx-menu-enter {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}
@media (hover: none), (pointer: coarse) {
    .homeProductsSwiper .product-item .product-overlay span,
    .latest-product .latest-product-img span { opacity: 1; transform: none; }
    .product-item:hover img, .products-page .product-card:hover img,
    .news-item:hover img, .factory-item:hover img { transform: none; }
    .texway-workflow .process-item:hover { transform: none; }
}

/* v2: visible accents for global reach, company data, and manufacturing detail. */
.tx-map-artwork { position: relative; width: 100%; isolation: isolate; }
.market-map .tx-map-artwork > img { display: block; width: 100%; height: auto; }
.tx-map-pin {
    position: absolute;
    width: 2.8%;
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.tx-map-pin-america { left: 18%; top: 29.55%; --tx-wave-delay: 0s; }
.tx-map-pin-europe { left: 51.7%; top: 23.7%; --tx-wave-delay: .65s; }
.tx-map-pin-australia { left: 87.43%; top: 74.8%; --tx-wave-delay: 1.3s; }
.tx-map-pin::before, .tx-map-pin::after {
    content: "";
    position: absolute;
    top: -12%;right: -12%;bottom: -12%;left: -12%;inset: -12%;
    border: 2px solid #ff742e;
    border-radius: 50%;
    background: rgba(255, 108, 40, .08);
    opacity: 0;
    animation: tx-map-wave 2800ms ease-out infinite;
    animation-delay: var(--tx-wave-delay);
    animation-play-state: paused;
}
.tx-map-pin::after { animation-delay: calc(var(--tx-wave-delay) + 1400ms); }
.tx-effects-visible .tx-map-pin::before, .tx-effects-visible .tx-map-pin::after { animation-play-state: running; }
@keyframes tx-map-wave {
    0% { opacity: 0; transform: scale(.85); }
    12% { opacity: .8; }
    85%, 100% { opacity: 0; transform: scale(3.1); }
}
.company-profile .profile-data .data-item { position: relative; transition: background-color 300ms, box-shadow 350ms; }
.company-profile .profile-data .data-item::after {
    content: ""; position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: #DE5528;
    transform: scaleX(0); transform-origin: left;
    transition: transform 800ms var(--tx-motion-ease);
}
.company-profile .profile-data .data-item.tx-stat-settled::after { transform: scaleX(1); }
.company-profile .profile-data .data-item strong { font-variant-numeric: tabular-nums; }
.company-profile .profile-data .data-item strong .tx-stat-value {
    display: inline-block; font: inherit; line-height: inherit; color: inherit;
}
.tx-stat-counting .tx-stat-value { animation: tx-stat-enter 650ms var(--tx-motion-ease) both; }
@keyframes tx-stat-enter {
    from { opacity: .35; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
.historySwiper .history-year { position: relative; isolation: isolate; }
.historySwiper .history-year::after {
    content: ""; position: absolute; top: -6px;right: -6px;bottom: -6px;left: -6px;inset: -6px;
    border: 1px solid #DE5528; border-radius: inherit; opacity: 0;
    pointer-events: none;
}
.historySwiper.tx-effects-visible .swiper-slide-active .history-year::after {
    animation: tx-history-signal 3400ms ease-out infinite;
}
@keyframes tx-history-signal {
    0% { opacity: 0; transform: scale(.9); }
    15% { opacity: .7; }
    65%, 100% { opacity: 0; transform: scale(1.5); }
}
.data-area .jindu::after { transform-origin: left; }
.data-area.tx-effects-visible .jindu::after { animation: tx-progress-fill 1200ms var(--tx-motion-ease) both; }
@keyframes tx-progress-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.texway-workflow .workflow-icon { overflow: hidden; }
.texway-workflow .workflow-icon::after {
    content: ""; position: absolute; top: -20%;right: -20%;bottom: -20%;left: -20%;inset: -20%; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.85) 50%, transparent 70%);
    transform: translateX(-140%);
}
@media (hover: hover) and (pointer: fine) {
    .company-profile .profile-data .data-item:hover { background: #fff7f1; box-shadow: 0 12px 28px rgba(43,40,36,.08); }
    .texway-workflow .process-item:hover .workflow-icon::after { animation: tx-icon-sweep 700ms ease-out; }
    .why-card:hover img { transform: scale(1.045); }
    .why-card img { transition: transform 850ms var(--tx-motion-ease); }
}
@keyframes tx-icon-sweep { to { transform: translateX(140%); } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: 0ms !important;
        transition-delay: 0ms !important;
    }
    .tx-motion-pending { opacity: 1 !important; }
    .banner .swiper-slide img, .banner .swiper-slide-active img,
    .banner .swiper-slide-duplicate-active img,
    .news-item:hover img, .case-item:hover img,
    .products-page .product-card:hover img, .product-search-card:hover img,
    .factory-item:hover img, .featured-image:hover img,
    .homeProductsSwiper .product-item:hover img,
    .detail .related-slider .swiper-slide:hover img,
    .latest-product:hover .latest-product-img img { transform: none !important; }
    .texway-workflow .process-item:hover, .news-item:hover { transform: none !important; }
    .about-more:hover span, .contact-btn:hover span,
    .about-more:focus-visible span, .contact-btn:focus-visible span,
    .news-item:hover .news-info span { transform: none !important; }
    .partners .swiper-slide:hover img { transform: translate(var(--partner-logo-x, -50%), var(--partner-logo-y, -50%)) !important; }
    .tx-map-pin::before, .tx-map-pin::after,
    .historySwiper .history-year::after { animation: none !important; opacity: 0 !important; }
    .data-area.tx-effects-visible .jindu::after { animation: none !important; transform: scaleX(1); }
    .why-card:hover img, .tx-stat-counting .tx-stat-value { transform: none !important; animation: none !important; }
}
@media print {
    .tx-motion-pending { opacity: 1 !important; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Certificate feedback on mouse devices, shared by home and about. */
.Homecert .cert-item, .factory-capability .certification-section .cert-grid > div { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
@media (hover: hover) and (pointer: fine) {
 .Homecert .cert-item:hover, .factory-capability .certification-section .cert-grid > div:hover { transform: translateY(-5px); border-color: #DE5528; box-shadow: 0 10px 28px rgba(222,85,40,.14); }
}
@media (prefers-reduced-motion: reduce) {
 .Homecert .cert-item, .factory-capability .certification-section .cert-grid > div { transition: none; }
 .Homecert .cert-item:hover, .factory-capability .certification-section .cert-grid > div:hover { transform: none; }
}
