/*
 * Tenbo site-only responsive layer.
 * Keep this file isolated from the shared theme styles used by other sites.
 */

@media screen and (min-width: 1025px) {
    .wapNav {
        display: none !important;
    }
}

/* 搜索结果中的产品型号，放在图片和产品描述之间。仅由 Tenbo 搜索页使用。 */
.searchList li .product-model {
    height: 42px;
    line-height: 42px;
    padding: 0 20px;
    border-top: 2px solid #ececec;
    box-sizing: border-box;
    color: #003da9;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.searchList li .product-description {
    height: 70px;
    line-height: 70px;
    padding: 0 20px;
    border-top: 0;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (max-width: 1024px) {
    body.tenbo-mobile-menu-open {
        overflow: hidden;
    }

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        padding-top: 60px;
    }

    .container,
    .header .container {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-left: auto;
        margin-right: auto;
        padding-left: 15px;
        padding-right: 15px;
    }

    .header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px !important;
        line-height: 60px !important;
        background: #fff !important;
        border-bottom: 1px solid #eee;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    }

    .header .container {
        height: 60px !important;
        overflow: visible !important;
    }

    .header .logo,
    .header .logo a {
        height: 60px !important;
        line-height: 60px !important;
    }

    .header .logo img.logo1 {
        display: none !important;
    }

    .header .logo img.logo2 {
        display: inline-block !important;
        width: auto !important;
        max-width: 190px;
        height: 36px !important;
    }

    .header .nav,
    .header .headR .tel,
    .header .headR i {
        display: none !important;
    }

    .header .headR {
        display: flex !important;
        align-items: center !important;
        height: 22px !important;
        top: 19px !important;
        right: 52px !important;
        line-height: 1 !important;
    }

    .header .headR a.searBtn {
        display: block !important;
        margin: 0 !important;
        color: #222 !important;
        font-size: 22px !important;
        height: 22px !important;
        line-height: 22px !important;
    }

    .navTrigger {
        display: block !important;
        top: 19px !important;
        right: 15px !important;
        width: 26px;
        height: 22px;
    }

    .wapNav {
        top: 60px !important;
        height: calc(100vh - 60px) !important;
        padding: 8px 15px 30px !important;
        background: #fff !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-100%);
        box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    }

    .wapNav.nav_on {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }

    .wapNav > ul {
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
    }

    .wapNav li {
        font-size: 16px;
    }

    .wapNav li a {
        min-height: 52px;
        height: auto;
        line-height: 52px;
        padding: 0 42px 0 4px;
    }

    .wapNav li.has-sub > a {
        padding-right: 48px;
    }

    .wapNav li > .wap-nav-toggle {
        display: block;
        width: 44px;
        height: 52px;
        line-height: 52px;
        text-align: center;
        right: 0;
        top: 0;
        z-index: 2;
        cursor: pointer;
    }

    .wapNav li.on > .wap-nav-toggle {
        transform: rotate(180deg);
        color: #a80101;
    }

    .wapNav .navSub {
        display: none;
        margin: 0 0 6px;
        padding: 4px 0;
        background: #f7f7f7;
        border-bottom: 0;
    }

    .wapNav .navSub li a {
        min-height: 42px;
        line-height: 42px;
        padding: 0 12px 0 24px;
        font-size: 14px;
        border: 0;
    }

    .topSear {
        top: 60px !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        padding: 12px 15px !important;
        z-index: 95;
        box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
    }

    .topSear form {
        width: 100% !important;
        height: 42px !important;
        line-height: 42px !important;
        display: flex !important;
        align-items: center;
        box-sizing: border-box;
        padding: 0 48px 0 0 !important;
        position: relative;
    }

    .topSear select,
    .topSear .txt,
    .topSear .btn {
        height: 42px !important;
        line-height: 42px !important;
        box-sizing: border-box;
    }

    .topSear select {
        position: static !important;
        flex: 0 0 88px;
        width: 88px !important;
        min-width: 88px;
        padding: 0 8px !important;
        background: #fff;
    }

    .topSear .txt {
        position: static !important;
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        padding: 0 10px !important;
    }

    .topSear .btn {
        position: absolute !important;
        top: 0;
        right: 48px;
        width: 40px !important;
        padding: 0 !important;
        background-size: 18px;
    }

    .topSear .closebtn {
        display: block !important;
        top: 24px !important;
        right: 15px !important;
        width: 18px !important;
        height: 18px !important;
    }

    .banner {
        min-width: 0 !important;
        height: clamp(180px, 56vw, 300px) !important;
    }

    .banner .swiper-wrapper,
    .banner .swiper-slide,
    .banner .swiper-slide a,
    .banner img.small {
        height: 100% !important;
    }

    .banner .swiper-slide a {
        display: block;
    }

    .banner img.big {
        display: none !important;
    }

    .banner img.small {
        display: block !important;
        width: 100% !important;
        object-fit: cover;
    }

    .banner .swiper-pagination {
        bottom: 10px !important;
    }

    .banner .swiper-pagination-bullet {
        margin: 0 4px !important;
    }

    .listBan,
    .mzsmBanner {
        height: clamp(220px, 42vw, 360px) !important;
    }

    .listBan .txt {
        width: calc(100% - 30px);
        font-size: clamp(16px, 3vw, 24px);
    }

    .listBan .txt h3 {
        font-size: 1.4em;
        overflow-wrap: anywhere;
    }

    .breadCrumb p,
    .breadCrumb2 {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: auto;
        white-space: nowrap;
    }

    .listMenu_box .container {
        overflow-x: auto;
    }

    .listMenu {
        width: max-content;
        min-width: 100%;
    }

    .container-product,
    .container-product .wrapper-content,
    .container-product .column-fluid,
    .container-product .content {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
    }

    .container-product .content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .sidebar,
    .container-product .sidebar {
        display: none !important;
    }

    .products-container.gallery-container {
        display: flex !important;
        flex-flow: row wrap !important;
        width: auto !important;
        min-height: 0 !important;
        margin-left: -6px !important;
        margin-right: -6px !important;
    }

    .products-container.gallery-container .item-content {
        width: 50% !important;
        float: none !important;
        margin: 0 0 14px !important;
        padding: 0 6px !important;
    }

    .products-container .item-content .item-grid-box {
        width: 100%;
    }

    .products-container .item-content .item-cover,
    .products-container .item-content .thumbnail,
    .products-container .item-content .centered {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }

    .products-container .item-content .centered {
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .products-container .item-content .centered img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }

    .products-container .item-content > .item-grid-box > a > div:last-child,
    .products-container .item-content figcaption h3 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .single-product-content {
        display: block !important;
        width: 100% !important;
    }

    .single-product-gallery,
    .product-summary-wrapper,
    .product-summary {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        float: none !important;
    }

    .single-product-gallery {
        margin-bottom: 24px !important;
    }

    .product-gallery-zoom,
    .product-image {
        width: 100% !important;
    }

    .product-gallery-zoom .product-image {
        min-height: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fafafa;
    }

    .product-gallery-zoom .product-image img {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    .product-thumbs-wrapper {
        display: flex !important;
        align-items: center;
        width: 100% !important;
        margin-top: 10px;
    }

    .product-thumbs-gallery {
        width: 100% !important;
        overflow-x: auto;
    }

    .product-thumbs-gallery .flex-control-thumbs {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: max-content !important;
        margin: 0 !important;
    }

    .product-thumbs-gallery .flex-control-thumbs li {
        flex: 0 0 68px;
        width: 68px !important;
        height: 68px !important;
        margin: 0 5px 0 0 !important;
    }

    .product-thumbs-gallery .flex-control-thumbs li img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    .product-summary .product-title {
        font-size: clamp(22px, 6vw, 32px) !important;
        line-height: 1.3;
        letter-spacing: 0 !important;
    }

    .product-summary .product-meta-list,
    .entry-content,
    .entry-content img,
    .entry-content video,
    .entry-content iframe {
        max-width: 100% !important;
    }

    .entry-content img,
    .entry-content video,
    .entry-content iframe {
        height: auto !important;
    }

    .product-inquiry .btn,
    .product-inquiry a {
        display: block !important;
        width: 100% !important;
        min-height: 46px;
        line-height: 46px;
        text-align: center;
    }

    .gallery-container,
    .newsList,
    .caseList,
    .solutionList,
    .videoList {
        max-width: 100% !important;
    }

    /* 新闻列表页：覆盖旧版固定宽度、浮动布局和模板内联反向 flex。 */
    .listWrap.container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .listMenu_box {
        height: auto !important;
        line-height: 1.2 !important;
        overflow: hidden !important;
    }

    .listMenu_box > .container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .listMenu {
        float: none !important;
        width: 100% !important;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .listMenu .main {
        display: flex;
        width: max-content;
        min-width: 100%;
    }

    .listMenu a {
        flex: 0 0 auto;
        line-height: 48px !important;
        padding: 0 14px !important;
        font-size: 14px !important;
    }

    .listMenu_box .breadCrumb2 {
        display: none !important;
    }

    .newsList {
        width: 100% !important;
        overflow: hidden;
    }

    .newsList > ul {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-direction: initial !important;
    }

    .newsList > ul > li {
        float: none !important;
        width: auto !important;
        min-width: 0;
        padding: 0 !important;
        margin: 0 !important;
    }

    .newsList li .pImg {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        padding-top: 0 !important;
        overflow: hidden;
    }

    .newsList li .pImg img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    .newsList li .txt {
        padding: 14px !important;
    }

    .newsList li h4 {
        margin-bottom: 8px !important;
        font-size: 15px !important;
        line-height: 1.45;
        white-space: normal !important;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .newsList li p {
        height: auto !important;
        max-height: 4.2em;
        margin-bottom: 10px !important;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    .newsList li .date {
        display: block;
        font-size: 12px;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .newsShow_F,
    .newsShow_R,
    .newsShow_F.fl,
    .newsShow_R.fr,
    .contactTxt,
    .messageL,
    .messageR {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .newsShow_F img,
    .newsShow_F video,
    .newsShow_F iframe,
    .contactTxt img {
        max-width: 100% !important;
        height: auto !important;
    }

    .feedback input,
    .feedback textarea,
    .feedback select,
    .messageR input,
    .messageR textarea,
    .messageR select {
        max-width: 100% !important;
    }

    .footer .footMain {
        display: block !important;
        width: 100% !important;
        padding-top: 28px;
        padding-bottom: 12px;
    }

    .footer .footMenu,
    .footer .footTxt,
    .footer .footWx {
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        margin: 0 !important;
    }

    .footer .footTxt {
        padding-top: 18px;
    }

    .footer .copyright .container {
        display: block !important;
        text-align: center;
        line-height: 1.8;
    }

    .footer .social-networks {
        float: none !important;
        margin-top: 10px;
    }

    /* 首页产品区：覆盖页面内联的固定 4 列静态网格。 */
    .product-swiper-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 等待 Swiper 根据移动端断点完成尺寸计算，避免首屏先闪出一个超大的产品卡片。 */
    .product-swiper:not(.tenbo-product-ready) {
        visibility: hidden;
    }

    /* 旧版 old/Tpl/css1/style.css 会把首页产品区固定为 1160px，移动端必须彻底解除。 */
    #wraper,
    #index_col,
    #srcollPic,
    .leftLoop,
    .product-swiper-container,
    .product-swiper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    #index_col,
    #srcollPic,
    .leftLoop,
    .product-swiper-container {
        overflow: hidden !important;
    }

    .product-swiper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .product-swiper .swiper-wrapper.static-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: none !important;
        gap: 12px !important;
        transform: none !important;
    }

    .product-swiper .swiper-wrapper.static-grid .swiper-slide {
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        padding: 6px !important;
    }

    .product-swiper .swiper-slide .pic,
    .product-swiper .swiper-slide .pic a {
        display: block;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

    .product-swiper .swiper-slide .pic img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: contain !important;
    }

    .product-swiper .title {
        margin-top: 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .product-swiper .des {
        min-height: 2.8em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-height: 1.4;
        white-space: normal;
    }

    .product-swiper-button-prev,
    .product-swiper-button-next {
        display: none !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .product-swiper .swiper-wrapper.static-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 767px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .pd60,
    .listWrap {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }

    .center_border-bottom,
    .showTit,
    .hTitle b {
        font-size: clamp(22px, 6vw, 30px) !important;
    }

    .center_border-bottom {
        margin-bottom: 24px !important;
    }

    .product-swiper-container {
        padding: 0 8px !important;
    }

    .product-swiper {
        padding: 0 !important;
    }

    .product-swiper .swiper-slide {
        padding: 5px !important;
    }

    .product-swiper .swiper-slide .pic {
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

    .product-swiper .swiper-slide .pic img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .product-swiper .title,
    .product-swiper .des {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .product-swiper-button-prev,
    .product-swiper-button-next {
        display: none !important;
    }

    .listMenu a {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .searchList li .product-model {
        height: 36px;
        line-height: 36px;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 13px;
    }

    .searchList li .product-description {
        height: 60px;
        line-height: 60px;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
    }

    .gallery-container .item-content figcaption h3 {
        height: auto !important;
        max-height: 40px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .tabs-list .tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
    }

    .tabs-list .tabs li {
        flex: 0 0 auto;
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media screen and (max-width: 390px) {
    .header .logo img.logo2 {
        max-width: 160px;
        height: 32px !important;
    }

    .products-container.gallery-container .item-content {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .products-container.gallery-container {
        margin-left: -4px !important;
        margin-right: -4px !important;
    }
}
