/* ==========================================================================
   Weihua Group - mobile refinements (2026-12-03)
   Mobile-only overrides. Desktop layout above 1080px is untouched.
   ========================================================================== */

/* New mobile-only helpers stay hidden on desktop */
.nav-caret,
.nav-contact,
.float-label,
.mobile-extra,
.client-arrows{display:none}

/* ---------- tablet / mobile navigation ---------- */
@media (max-width:1080px){
  .header-actions{margin-left:auto;justify-content:flex-end}
  .main-nav{top:99px;max-height:calc(100vh - 99px);-webkit-overflow-scrolling:touch}
  .main-nav>li>a{justify-content:space-between;padding:0 8px}
  .nav-contact{display:block;border-bottom:0}
  .nav-contact>a{color:var(--red);font-weight:700}
  .nav-caret{
    display:inline-flex;align-items:center;justify-content:center;
    width:38px;height:38px;margin-left:auto;flex:0 0 38px;
    border-left:1px solid #eeeeee;position:relative;
  }
  .nav-caret::before{
    content:"";width:0;height:0;border:5px solid transparent;
    border-top-color:#8d8f93;transform:translateY(2px);transition:transform .2s;
  }
  .main-nav>li.open-sub .nav-caret::before{transform:rotate(180deg) translateY(-2px)}
  .main-nav>li>a .nav-caret{color:inherit}
  .main-nav>li.open-sub .submenu{display:block}
  .submenu a{padding:9px 12px;font-size:13.5px}
  .main-nav>li.current>a{box-shadow:none}

  /* fixed bottom inquiry bar */
  .floating{
    left:0;right:0;bottom:0;top:auto;width:100%;height:60px;
    transform:none;flex-direction:row;align-items:stretch;gap:0;
    background:#fff;border-top:1px solid #e6e6e6;
    box-shadow:0 -8px 24px rgba(15,20,30,.13);
    z-index:1500;padding-bottom:env(safe-area-inset-bottom);
  }
  .float-btn{
    flex:1 1 0;width:auto;height:60px;border:0;border-right:1px solid #ededed;
    border-radius:0;box-shadow:none;background:#fff;color:#4a4b4f;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:3px;padding:6px 2px;
  }
  .float-btn:last-child{border-right:0}
  .float-btn svg{width:20px;height:20px;color:var(--red);flex:0 0 auto}
  .float-label{
    display:block;font:400 10.5px/1.2 Arial,Helvetica,sans-serif;
    color:#4a4b4f;white-space:nowrap;letter-spacing:0;
  }
  .float-btn:hover{background:#fff7f7;color:var(--red)}
  .float-tip{display:none!important}
  .float-wechat{display:none!important}
  .float-tel{display:flex!important}
  body.at-top .floating>a[href="#top"]{display:none}
  .site-footer{padding-bottom:84px}
}

@media (max-width:820px){
  .main-nav{top:66px;max-height:calc(100vh - 66px)}
}

/* ---------- mobile layout ---------- */
@media (max-width:900px){
  /* hero */
  .home-hero{min-height:300px;height:auto;padding:46px 0 30px;background-image:url("../images/hero-home-m.webp")!important}
  .home-about{background-image:url("../images/about-workshop-m.webp")!important}
  .home-hero .wrap{padding-top:0}
  .home-hero:before{background:linear-gradient(90deg,rgba(0,0,0,.72),rgba(0,0,0,.3))}
  .eyebrow{font-size:11px;padding:6px 11px;margin-bottom:12px}
  .home-hero h1{font-size:24px;line-height:1.32;margin-bottom:12px;letter-spacing:0}
  .home-hero p{font-size:13px;line-height:1.56;margin-bottom:18px}
  .home-hero .btn-red{height:40px;padding:0 18px;font-size:13px;gap:8px}
  .page-hero{min-height:300px;height:auto;padding:78px 0 26px;align-items:center}
  .page-hero .wrap{padding-bottom:0}
  .page-hero h1{font-size:22px;line-height:1.28;margin-bottom:6px;letter-spacing:0}
  .page-hero p{font-size:13px;line-height:1.55}
  .breadcrumbs .wrap{height:44px;font-size:13px;gap:5px;overflow:hidden;white-space:nowrap}
  .breadcrumbs svg{width:14px;height:14px}

  /* section heads */
  .section{padding:44px 0}
  .section.tight{padding:30px 0}
  .section-head{margin-bottom:24px}
  .section-head h2{font-size:26px;padding-bottom:12px}
  .section-head h2:after{width:60px;height:3px}
  .section-head p{margin-top:10px;font-size:13px;line-height:1.6}
  .head-row{flex-direction:column;align-items:flex-start;gap:10px;margin-bottom:22px}
  .head-row h2{font-size:26px;padding-bottom:12px}
  .head-row h2:after{width:62px;height:3px}
  .head-row .learn{height:38px;padding:0 18px;font-size:13px}
  .news-tabs{gap:18px;font-size:13px}

  /* fourth home case/news item: mobile only */
  .case-card.mobile-extra{display:block}
  .news-card.mobile-extra{display:flex;flex-direction:column}

  /* product / case / news: hide the Products + Contact cards, keep the message form */
  body.page-product-list .sidebar > .side-card:first-child,
  body.page-case-list .sidebar > .side-card:first-child,
  body.page-news-list .sidebar > .side-card:first-child,
  body.page-product-list .sidebar .side-contact,
  body.page-case-list .sidebar .side-contact,
  body.page-news-list .sidebar .side-contact{display:none}
  body.page-product-list .layout,
  body.page-case-list .layout,
  body.page-news-list .layout{grid-template-columns:1fr}

  /* service pages: hide the Service + Contact cards, keep the message form */
  body.page-service-list .sidebar > .side-card:first-child,
  body.page-service-list .sidebar .side-contact{display:none}
  body.page-service-list .layout{grid-template-columns:1fr}

  /* equipment page: 8 photos per mobile page */
  body.page-equipment .media-grid > .media-card:nth-child(n+9){display:none}
  .mobile-media-pagination{display:flex;align-items:center;justify-content:center;gap:6px;margin:26px 0 0}
  .mobile-media-pagination a{display:flex;align-items:center;justify-content:center;min-width:34px;height:34px;border:1px solid #ddd;color:#555;font-size:13px;line-height:1;text-decoration:none}
  .mobile-media-pagination a.active{background:var(--red);border-color:var(--red);color:#fff}
  .mobile-media-pagination .mp-arrow{font-size:17px}

  /* products: two per row */
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}
  .product-card h3{font-size:14.5px;margin-top:8px}
  .home-products .btn-line{height:38px;margin-top:26px;font-size:13px}
  .product-groups{padding:18px 12px}
  .product-group{padding-bottom:30px}
  .product-group-head{gap:10px;margin-bottom:14px}
  .product-group-head h2{font-size:18px}
  .product-group-head a{font-size:13px;gap:6px}
  .product-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}
  .product-mini-grid > .product-mini:nth-child(n+9){display:none}
  .mobile-product-pagination{display:flex;align-items:center;justify-content:center;gap:6px;margin:30px 0 0}
  .mobile-product-pagination a{display:flex;align-items:center;justify-content:center;min-width:34px;height:34px;border:1px solid #ddd;color:#555;font-size:13px;line-height:1;text-decoration:none}
  .mobile-product-pagination a.active{background:var(--red);border-color:var(--red);color:#fff}
  .mobile-product-pagination .mp-arrow{font-size:17px}
  .product-mini .thumb{aspect-ratio:1.55}
  .product-mini h3{font-size:14px;line-height:1.4;margin-top:8px}

  /* home about + overlapping panel -> normal flow */
  .home-about{padding:48px 0 54px}
  .home-about .about-title{margin-bottom:20px}
  .home-about h2{font-size:26px;padding-bottom:12px}
  .home-about h2:after{width:60px;height:3px}
  .home-about .about-text{font-size:13.5px;line-height:1.7}
  .home-about .btn-ghost{margin-top:18px;height:38px;font-size:13px}
  .environment-panel{margin:0 auto;max-width:100%;padding:20px 14px 18px;min-height:0;box-shadow:none}
  .environment-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}
  .environment-card h3{font-size:13px;margin-top:7px}
  .environment-dots{margin-top:18px}
  .environment-dots span{width:20px}

  /* cases: two compact cards */
  .case-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .case-card .thumb{aspect-ratio:1.5}
  .case-card .txt{padding:13px 12px 15px}
  .case-card h3{font-size:15px;line-height:1.4;min-height:0}
  .case-card .learn{font-size:12px;margin-top:7px}
  .clients{padding:44px 0}
  .clients .section-head h2{font-size:26px}
  .client-carousel{position:relative}
  .client-viewport{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .client-viewport::-webkit-scrollbar{display:none}
  .client-wall{
    display:grid;grid-template-columns:unset;grid-template-rows:repeat(2,62px);
    grid-auto-flow:column;grid-auto-columns:calc((100vw - 66px)/4);
    gap:10px;justify-content:start;width:max-content;max-width:none;padding:0;
  }
  .client-logo{height:62px;width:auto;padding:7px;border-radius:4px}
  .client-logo img{max-height:46px}
  .client-stat{display:none}
  .client-arrows{display:flex;justify-content:center;gap:12px;margin-top:14px}
  .client-arrow{width:34px;height:34px;border:1px solid #dddddd;background:#fff;color:#666;display:flex;align-items:center;justify-content:center;font-size:17px;line-height:1;transition:.2s}
  .client-arrow:active{background:var(--red);border-color:var(--red);color:#fff}
  .client-arrow.dis{opacity:.35}

  /* news cards: two per row */
  .home-news{padding:44px 0}
  .home-news-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .news-card .thumb{aspect-ratio:1.45}
  .news-card .txt{padding:12px 11px 14px}
  .news-card h3{font-size:14px;line-height:1.4;margin-bottom:6px}
  .news-card p{font-size:12px;line-height:1.5;-webkit-line-clamp:2}
  .news-card .learn{font-size:11.5px;margin-top:8px}
  .news-date{left:8px;font-size:10px;padding:6px 8px}

  /* footer: simplified, no form / product list / copyright */
  .contact-strip{display:none}
  .site-footer{padding:30px 0 86px}
  .footer-inner{padding:0 18px}
  .footer-logo{margin-bottom:14px}
  .footer-logo img{height:36px}
  .footer-top{border-bottom:0;padding-bottom:0}
  .footer-grid{display:block;padding:18px 0 8px}
  .footer-grid .footer-col:nth-child(2),
  .footer-grid .footer-col:nth-child(3){display:none}
  .footer-col h3{font-size:16px;padding-bottom:10px;margin-bottom:10px}
  .footer-nav{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
  .footer-nav li{margin:3px 0;font-size:13px}
  .footer-bottom{display:none}

  /* generic inner pages */
  .page-main{padding:20px 0 48px}
  .layout{grid-template-columns:1fr;gap:16px}
  .layout>.content-card,.layout>.sidebar{min-width:0}
  .sidebar{order:2}
  .content-card{padding:18px 14px 24px}
  .content-card h1,.content-card>h1,.content-card .content-title h1{font-size:24px;line-height:1.35}
  .content-card .content-title{margin-bottom:20px}
  .content-card .content-title .date{font-size:12px}
  .content-card .rich-text,.rich-text{font-size:14.5px;line-height:1.8}
  .rich-text img{max-width:100%}
  .rich-text table{display:block;max-width:100%;overflow-x:auto}
  .list-card{padding:20px 14px 28px}
  .case-list{padding-top:20px}
  .list-head{margin-bottom:20px}
  .list-head h1{font-size:22px}
  .list-rows .row-item{grid-template-columns:minmax(110px,34%) minmax(0,1fr);gap:14px;padding:20px 0;align-items:start}
  .list-rows .thumb{aspect-ratio:4/3}
  .list-rows h2{font-size:16px;line-height:1.4;margin-bottom:6px}
  .list-rows p{font-size:12.5px;line-height:1.55;-webkit-line-clamp:2;margin:0}
  .list-rows .date{font-size:12px;margin-top:8px}
  .side-card{padding:18px 16px}
  .side-card h3{font-size:18px;padding-bottom:12px;margin-bottom:12px}
  .side-nav a{font-size:14px;padding:8px 0}
  .side-contact p{font-size:13px;margin:8px 0}
  .side-form input,.side-form textarea{font-size:13px}

  /* company profile */
  .profile-top,.profile-mid{grid-template-columns:1fr;gap:18px;margin-bottom:34px}
  .profile-top figure{height:260px}
  .profile-labels{gap:14px}
  .profile-labels span{font-size:22px}
  .profile-card{padding:20px}
  .profile-card p{font-size:13px;line-height:1.75}
  .profile-mid figure{height:200px}
  .profile-rest p{font-size:13px;line-height:1.75;margin-bottom:18px}

  /* pagination: compact on mobile */
  .pagination{gap:4px;margin-top:26px;flex-wrap:nowrap;overflow:hidden;font-size:12px}
  .pagination a,.pagination span{min-width:32px;height:32px;padding:0 6px;font-size:12.5px}
  .pagination .pg-dots{min-width:16px;border:0;background:none;color:#a4a6aa}
  .pagination .page-arrow{min-width:24px;border:0;background:none;font-size:17px}
  .pagination ul#page{gap:4px;flex-wrap:nowrap}
  .pagination ul#page li a,.pagination ul#page li.thisclass,.pagination ul#page li.colorCloss{min-width:32px;height:32px;padding:0 6px;font-size:12px}

  /* about pages */
  .about-main{padding:32px 0 50px}
  .about-wrap{padding:0 18px}
  .about-head{gap:14px;margin-bottom:24px}
  .about-head h1{font-size:28px;margin-bottom:6px}
  .about-head .sub{font-size:13px}
  .about-tabs{gap:14px;font-size:13px;padding-bottom:4px}
  .about-tabs a{padding-bottom:6px;border-bottom-width:2px}
  .timeline-list{padding-left:0}
  .timeline-list:before{display:none}
  .about-history{grid-template-columns:1fr;gap:12px;padding:16px;margin-bottom:26px;min-height:0}
  .about-history .history-year{position:static;width:auto;display:inline-block;margin-bottom:10px;padding:8px 12px;font-size:13px;top:auto;left:auto}
  .about-history img{order:0;height:180px}
  .about-history span{font-size:18px;line-height:1.4;margin-bottom:8px}
  .history-copy h2{font-size:20px;margin-bottom:8px}
  .history-copy p{font-size:13px;line-height:1.7}
  .about-single .rich-text{font-size:14.5px;line-height:1.8}
  .split-block{gap:16px;margin-bottom:32px}
  .split-block h2{font-size:22px;margin-bottom:10px}
  .split-block p{font-size:13px;line-height:1.75;margin-bottom:10px}
  .about-quote{padding:18px;font-size:13px}

  /* culture / why */
  .culture-block,.culture-block.reverse{gap:18px;margin-bottom:30px}
  .culture-copy h2{font-size:22px;line-height:1.3}
  .culture-copy p{font-size:13px;line-height:1.7;margin-bottom:8px}
  .culture-details .culture-copy p{font-size:12.5px}
  .why-card{padding:20px 18px}
  .why-top{gap:18px}
  .why-features{gap:10px;margin-top:22px}
  .why-features article{padding:18px 14px;min-height:0;border-radius:5px}
  .why-features h3{font-size:16px;margin:12px 0 6px}
  .why-features p{font-size:12px;line-height:1.55}
  .why-icon{width:36px;height:36px}
  .why-gallery{gap:10px;margin-top:22px}

  /* media / video / faq / downloads */
  .media-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 10px}
  .media-card h3{font-size:13px;padding:9px 4px 0}
  .about-video{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .about-video strong{font-size:12px;padding:9px 8px;min-height:40px}
  .faq-item{grid-template-columns:42px 1fr;gap:10px;padding:16px 0}
  .faq-num{width:42px;height:36px;font-size:16px}
  .faq-item strong{font-size:16px!important}
  .download-center4{grid-template-columns:1fr;gap:10px}
  .download-center4 li{padding:14px;min-height:80px;gap:12px}
  .download-center4 strong{font-size:14px}

  /* product detail */
  .product-detail{grid-template-columns:1fr;gap:20px}
  .gallery .main-img{aspect-ratio:1.25}
  .product-info h1{font-size:24px;line-height:1.3;margin-bottom:10px}
  .product-specs{font-size:14px;line-height:1.85;overflow-x:auto}
  .product-specs table{min-width:520px;width:auto}
  .product-actions{gap:10px;margin-top:18px}
  .product-actions .btn-red,.product-actions .btn-ghost{height:40px;padding:0 14px;font-size:13px}
  .detail-tabs .tab-head{margin-top:24px;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .detail-tabs .tab-head button{height:40px;padding:0 14px;font-size:13px;white-space:nowrap;flex:0 0 auto}
  .detail-tabs .tab-body{padding:18px 0 4px;font-size:14px;line-height:1.8;overflow-x:auto}
  .detail-tabs .tab-body table{min-width:560px}
  .related-products{margin-top:26px;padding-top:20px}
  .related-products h2{font-size:22px;margin-bottom:14px}
  .related-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .related-item h3{font-size:13px}

  /* featured news */
  .featured-slide{grid-template-columns:1fr;gap:14px;padding:14px}
  .featured-slide .thumb{aspect-ratio:1.4}
  .featured-slide h2{font-size:20px;line-height:1.35;margin-bottom:8px}
  .featured-slide p{font-size:13px;line-height:1.6}
  .featured-footer{margin-top:12px;justify-content:center}
  .featured-footer span{width:24px;height:24px}
  .news-section-block{padding:18px 14px 20px;margin-bottom:14px}
  .news-section-head{margin-bottom:12px}
  .news-section-head h2{font-size:22px}
  .news-section-head a{font-size:13px}
  .news-section-block .row-item{grid-template-columns:100px minmax(0,1fr);gap:12px;padding:14px 0}
  .news-section-block .row-item h3{font-size:14px;line-height:1.4}
  .news-section-block .row-item p{font-size:12px;line-height:1.5}

  /* contact */
  .contact-page{padding:36px 0 54px}
  .contact-wrap{padding:0 18px}
  .contact-page .contact-head{margin-bottom:24px}
  .contact-page h1{font-size:28px;margin-bottom:8px}
  .contact-page .contact-head p{font-size:13px;line-height:1.65}
  .contact-cards{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:26px}
  .contact-card{padding:18px 8px;min-height:132px}
  .contact-card svg{width:32px;height:32px;margin-bottom:8px}
  .contact-card h3{font-size:15px;margin-bottom:6px}
  .contact-card p{font-size:12.5px;line-height:1.5}
  .contact-body{grid-template-columns:1fr;gap:24px}
  .contact-photo{min-height:240px}
  .contact-photo .caption{left:14px;right:14px;bottom:14px;padding:10px 12px;font-size:12px}
  .contact-form h2{font-size:18px}
  .contact-form p{font-size:13px;margin-bottom:16px}
  .contact-form .row2{grid-template-columns:1fr;gap:0}
  .contact-form input,.contact-form textarea{font-size:13px;height:42px;padding:10px 12px;margin-bottom:10px}
  .contact-form textarea{height:110px}
  .contact-form button{height:42px;font-size:14px}

  /* services */
  .quanlity-control{max-width:100%;overflow-wrap:break-word}
  .quanlity-control img,.quanlity-control div img{max-width:100%!important;height:auto!important}
  .quanlity-control ul.quanlity-control3{grid-template-columns:1fr 1fr;gap:10px}
  .quanlity-control3 li img{height:150px!important;object-fit:cover}
  .quanlity-control ul,.quanlity-control2{grid-template-columns:1fr 1fr;gap:10px}
}

@media (max-width:520px){
  .home-hero h1{font-size:22px}
  .environment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .contact-cards{grid-template-columns:1fr 1fr}
  .product-grid,.product-mini-grid,.case-grid,.home-news-grid,.related-grid,.media-grid,.about-video{grid-template-columns:repeat(2,minmax(0,1fr))}
  .client-wall{grid-template-columns:unset;grid-auto-columns:calc((100vw - 66px)/4)}
  .contact-strip{display:none}
}
