/* Shared phone layout, after motion and legacy rules; tablet/desktop unchanged. */
@media (max-width: 767px) {
    header.head .topbig { width: calc(100% - 40px); gap: 8px; --tx-row-gap: 8px; --tx-column-gap: 8px; }
    header.head .logo { min-width: 0; }
    header.head .tool ul { gap: 8px; --tx-row-gap: 8px; --tx-column-gap: 8px; }
    header.head .tool .search, header.head .tool-email, header.head .tool-email i { width: 44px; height: 44px; }
    header.head .tx-mobile-menu-toggle { box-sizing: border-box; flex-shrink: 0; width: 44px; height: 44px; padding: 0; }
    body .container { box-sizing: border-box; width: calc(100% - 40px) !important; max-width: none !important; margin-left: auto !important; margin-right: auto !important; padding-left: 0 !important; padding-right: 0 !important; }
    body .container .container { width: 100% !important; }
    body .container > .row { margin-left: 0; margin-right: 0; }
    body h1, body h2 { font-size: 30px !important; line-height: 1.25 !important; letter-spacing: normal; overflow-wrap: break-word; }
    body h1 br, body h2 br { display: none; }
    body section p, body main p, body .about-content section { font-size: 15px !important; line-height: 1.8 !important; overflow-wrap: break-word; }
    body section > .container > div, body main .container > div { min-width: 0; }
    .Homeabout, .Homeproducts, .Homefactory, .Homecert, .Homenews, .Homelatest, .home-brand,
    .company-profile, .history-section, .global-partners, .factory-capability, .why-choose,
    .customer-reviews, .NewsPage, .Contactpage, .FAQpage, .PolicyPage, .home-process,
    .moq-section, .custom-case { padding-top: 48px; padding-bottom: 48px; }
    .products-head, .factory-head, .cert-head, .news-head, .process-header, .global-header,
    .why-title, .contact-head, .faq-head, .policy-head, .news-page-head, .customer-reviews-head { margin-bottom: 28px; }
    .products-head h2, .factory-head h2, .cert-head h2, .news-head h2, .profile-content h2, .global-header h2 { margin-top: 12px; margin-bottom: 18px; }
    .about-label, .factory-label, .products-label, .cert-label, .news-label, .latest-label,
    .contact-label, .process-label { font-size: 12px; letter-spacing: 2px; }

    /* Let the image determine height; anchor the badge to that same visible box. */
    body .Homeabout .about-video { display: block; height: auto !important; min-height: 0; aspect-ratio: auto; width: 100%; }
    body .Homeabout .about-video img { display: block; position: static; width: 100%; height: auto !important; object-fit: contain; }
    body .Homeabout .video-mask { left: 12px; right: 12px; bottom: 12px; font-size: 11px; line-height: 1.5; letter-spacing: 1px; }
    .Homeabout .video-mask span { display: inline-block; box-sizing: border-box; max-width: 100%; padding: 7px 10px; background: rgba(0,0,0,.55); border-radius: 3px; }
    .Homeabout .about-content { flex: none; }
    .Homeabout .about-content h2 { margin-bottom: 20px; }
    .Homeabout .about-content section { margin-bottom: 24px; }

    /* These homepage areas have no .container in their markup. */
    body .home-brand > .factory-head, body .home-brand > div:not(.factory-head), body .Homeproducts .home-product-panels { box-sizing: border-box; width: calc(100% - 40px); max-width: none; margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; }
    body .Homeproducts .product-tabs { width: calc(100% - 40px); padding: 0; margin-bottom: 24px; }
    .Homeproducts .product-tab { font-size: 14px; padding: 10px 12px; }
    .homeProductsSwiper .product-item .product-overlay { left: 12px; right: 12px; bottom: 16px; }
    .homeProductsSwiper .product-overlay h3 { font-size: 18px; line-height: 1.35; }
    .homeProductsSwiper .product-overlay span { display: block; opacity: 1; transform: none; font-size: 13px; }

    /* Keep landscape factory photographs at their intrinsic aspect ratio. */
    body .Homefactory .factory-box { grid-template-columns: minmax(0, 1fr); grid-gap: 24px; gap: 24px; }
    body .Homefactory .factory-img { height: auto !important; min-height: 0; aspect-ratio: auto; }
    body .Homefactory .factory-img img { display: block; width: 100%; height: auto !important; object-fit: contain; transform: none; }
    body .Homefactory .factory-info { padding: 20px; }
    .Homefactory .factory-info h3 { font-size: 22px; line-height: 1.35; margin: 0 0 12px; }
    .Homefactory .factory-number { margin-top: 28px; padding-top: 28px; }
    body .factory-capability .factory-image.factoryRdSwiper,
    body .about-manufacturing .card-image.factoryBaseSwiper { height: auto !important; min-height: 0; aspect-ratio: auto; }
    .factoryRdSwiper > .swiper-wrapper, .factoryBaseSwiper > .swiper-wrapper { height: auto; align-items: flex-start; }
    body .factoryRdSwiper > .swiper-wrapper > .swiper-slide,
    body .factoryBaseSwiper > .swiper-wrapper > .swiper-slide { height: auto; }
    body .factoryRdSwiper .swiper-slide img, body .factoryBaseSwiper .swiper-slide img { display: block; width: 100%; height: auto !important; object-fit: contain; }

    /* One readable certificate row, with the label beside the logo. */
    body .Homecert .cert-list { display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 14px; gap: 14px; }
    body .Homecert .cert-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); grid-gap: 16px; gap: 16px; align-items: center; padding: 18px; min-width: 0; }
    body .Homecert .cert-item img { width: 110px; max-width: 100%; height: auto !important; margin: 0; border-radius: 0; }
    .Homecert .cert-item span { font-size: 16px; line-height: 1.5; text-align: left; letter-spacing: normal; }
    .tx-no-grid .Homecert .cert-list { display: block; }
    .tx-no-grid .Homecert .cert-item { display: flex; flex-direction: row; margin: 0 0 14px; }
    .tx-no-grid .Homecert .cert-item img { flex: 0 0 110px; margin-right: 16px; }

    .history-section > .history-title, body .customer-reviews-container { box-sizing: border-box; width: calc(100% - 40px); max-width: none; margin-left: auto; margin-right: auto; }
    .history-section > .history-title { margin-bottom: 24px; }
    .customer-review-content { padding: 20px; }
    .customer-review-content h3, .factory-card h3, .why-card h3, .case-item h3, .news-info h3 { font-size: 22px; line-height: 1.35; }
    .factory-card h4 { font-size: 22px; line-height: 1.35; }
    body .products-page .product-grid .product-card { box-sizing: border-box; width: 100%; padding: 16px; }
    body .products-page .product-grid .product-img { height: 0 !important; padding-top: 100%; aspect-ratio: auto; }
    .products-page .product-grid .product-card h3 { font-size: 20px; line-height: 1.4; white-space: normal; text-overflow: clip; overflow: visible; }
    .products-page .product-grid .inquiry-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 18px; white-space: normal; }
    .factory-capability .equipment-section > h3, .factory-capability .certification-section > h3, .factory-capacity-heading h3 { font-size: 30px; line-height: 1.25; }
    .latest-head { align-items: flex-start; flex-wrap: wrap; }
    .latest-controls { flex-shrink: 0; }
    .contact-form-grid, .contact-message-grid { grid-template-columns: minmax(0, 1fr); }
    .contact-form-box, .contact-form-box .form-title { min-width: 0; }
    .contact-location-tabs { flex-wrap: wrap; }
    .contact-location-tab { min-width: 0; padding: 12px 20px; }
    .contact-item p, .policy-content, .news-info { overflow-wrap: break-word; word-wrap: break-word; }
    .detail .specification { overflow-x: auto; }
    .PolicyPage .policy-content { max-width: 100%; }
    .PolicyPage .policy-content h2 { font-size: 24px !important; }
    .Homefooter .footer-main { grid-gap: 28px; gap: 28px; }
    .Homefooter .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    body .products-page .product-grid { grid-template-columns: minmax(0, 1fr); }
    .tx-no-grid .products-page .product-grid > .product-card { flex-basis: 100%; margin: 0 0 24px; }
}
@media (max-width: 359px) {
    header.head .logoimg img { max-width: 118px; }
}

/* 2026-10-28: follow-up refinements from phone screenshots. */
.tx-submenu-toggle, .tx-search-title { display: none; }
html.tx-search-open { overflow: hidden; }
@media (max-width: 992px) {
    header.head .menu li.tx-has-submenu { position: relative; }
    header.head .menu li.tx-has-submenu > a { padding-right: 52px; }
    header.head .menu .tx-submenu-toggle { display: block; position: absolute; top: 2px; right: 0; width: 44px; height: 44px; border: 0; background: transparent; color: #DE5528; }
    .tx-submenu-toggle::before { content: ''; display: block; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -5px auto 0; }
    .tx-submenu-toggle[aria-expanded="true"]::before { transform: rotate(225deg); margin-top: 5px; }
    header.head .menu ul li dl.pdtmenu[hidden], header.head .menu .sub-menu[hidden] { display: none !important; }
    header.head .menu ul li dl.pdtmenu:not([hidden]), header.head .menu .sub-menu:not([hidden]) { display: block !important; }
    header.head .menu ul > li > a::after { display: none !important; }
    header.head .menu .pdtmenu, header.head .menu .sub-menu { border-top: 0 !important; }
}
@media (max-width: 767px) {
    /* A single filled image box also keeps pagination on the image itself. */
    body .factory-capability .factory-image.factoryRdSwiper,
    body .about-manufacturing .card-image.factoryBaseSwiper { position: relative; height: 0 !important; padding-top: 56.25%; min-height: 0; overflow: hidden; background: transparent; }
    body .factoryRdSwiper > .swiper-wrapper, body .factoryBaseSwiper > .swiper-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100% !important; align-items: stretch; }
    body .factoryRdSwiper > .swiper-wrapper > .swiper-slide, body .factoryBaseSwiper > .swiper-wrapper > .swiper-slide { height: 100% !important; }
    body .factoryRdSwiper .swiper-slide img, body .factoryBaseSwiper .swiper-slide img { width: 100%; height: 100% !important; object-fit: cover; }
    body .factoryRdSwiper .factory-rd-pagination { position: absolute; bottom: 10px; height: auto; margin: 0; padding: 0; line-height: 1; background: transparent; }
    .factory-content, .factory-content p, .factory-content ul, .factory-content li { text-indent: 0; text-align: left; }
    body .factory-capability .factory-content ul { padding-left: 0; margin-left: 0; list-style: none; }
    body .factory-capability .factory-content li { padding-left: 0; text-indent: 0; }
    .factory-content li::before { display: none; }

    /* Match the two-column, logo-above-label certificate reference. */
    body .Homecert .cert-list, body .factory-capability .certification-section .cert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 14px; gap: 14px; }
    body .Homecert .cert-item, body .factory-capability .certification-section .cert-grid > div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; margin: 0; padding: 14px 10px; border: 1px solid #ddd; border-radius: 0; box-shadow: none; background: #fff; font-size: 16px; line-height: 1.4; text-align: center; }
    body .Homecert .cert-item img, body .factory-capability .certification-section .cert-grid img { display: block; flex: none; width: 100%; max-width: 100%; height: auto !important; margin: 0 0 12px; border-radius: 0; object-fit: contain; }
    body .Homecert .cert-item span, body .factory-capability .certification-section .cert-grid span { display: block; font-size: 16px; line-height: 1.4; text-align: center; letter-spacing: normal; }
    body .Homecert .cert-item, body .factory-capability .certification-section .cert-grid > div { gap: 0; --tx-row-gap: 0px; --tx-column-gap: 0px; }
    .tx-no-grid .Homecert .cert-list, .tx-no-grid .factory-capability .certification-section .cert-grid { display: flex; flex-wrap: wrap; }
    .tx-no-grid .Homecert .cert-item, .tx-no-grid .factory-capability .certification-section .cert-grid > div { box-sizing: border-box; flex: 0 1 calc(50% - 14px); flex-direction: column; margin: 0 7px 14px; }
    .tx-no-grid .Homecert .cert-item img { flex: none; margin-right: 0; }
    .contact-head p { margin-bottom: 0; }
    body .contact-location-tabs { margin-top: 24px; margin-bottom: 32px; }

    /* Both workflow tabs follow the same vertical reading order. */
    .texway-workflow .process-content[data-content] .process-list { display: block !important; width: 100%; max-width: none; overflow: visible !important; padding: 0; scroll-snap-type: none; }
    .texway-workflow .process-content[data-content] .process-item { box-sizing: border-box; grid-area: auto !important; width: 100% !important; min-height: 180px; height: auto; aspect-ratio: auto; margin: 0 0 64px !important; padding: 42px 22px 24px; }
    .texway-workflow .process-content[data-content] .process-item::after { top: calc(100% + 32px) !important; bottom: auto !important; left: 50% !important; right: auto !important; transform: translate(-50%, -50%) rotate(90deg) !important; }
    .texway-workflow .process-content[data-content] .process-item:last-child { margin-bottom: 0 !important; }
    .texway-workflow .process-content[data-content] .process-item:last-child::after { display: none; }

    body .product-search-card h2 { font-size: 20px !important; line-height: 1.4 !important; font-weight: 500; color: #DE5528; }
    .product-search-page { padding: 40px 0 48px; }
    .product-search-head { margin-bottom: 28px; }
    .product-search-head h1 { margin: 12px 0 24px; }
    .product-search-form { width: 100%; }
    .product-search-form input { box-sizing: border-box; min-height: 48px; padding: 12px; font-size: 16px; }
    .product-search-form button { min-height: 48px; padding: 12px 16px; background: #DE5528; border-color: #DE5528; }
    .product-search-grid { grid-template-columns: minmax(0,1fr); grid-gap: 28px; gap: 28px; }
    .product-search-image { height: 0; padding-top: 100%; position: relative; }
    .product-search-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }

    body .search-alert { background: #fff; overflow-y: auto; }
    .search-alert .close { top: 20px; top: calc(20px + env(safe-area-inset-top)); right: 20px; width: 44px; height: 44px; background: none; color: #333; opacity: 1; text-shadow: none; }
    .search-alert .cent-form { box-sizing: border-box; top: 110px; left: 20px; width: calc(100% - 40px); height: auto; margin: 0; border: 0; }
    .search-alert .tx-search-title { display: block; margin-bottom: 24px; font-size: 26px; line-height: 1.3; color: #222; }
    .search-alert .cent-form form { display: flex; width: 100%; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
    .search-alert .cent-form .tex { position: static; float: none; flex: 1 1 0%; min-width: 0; width: 0; height: 52px; margin: 0; padding: 12px; border: 0; background: #fff; color: #222; font-size: 16px; line-height: 1.5; text-align: left; }
    .search-alert .cent-form .sub-butn { position: static; float: none; flex: 0 0 88px; width: 88px; height: 52px; margin: 0; padding: 12px; border: 0; background: #DE5528; color: #fff; font-size: 16px; line-height: 1.5; text-align: center; }
    .search-alert .cent-form .tex:focus { outline: 2px solid #DE5528; outline-offset: -2px; }
}
