/* Responsive overrides — scoped to mobile/tablet (≤900px, matches mobile-enhance.js) */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  body {
    font-size: 15px;
    line-height: 1.6;
    padding: 12px 0 !important;
  }

  .site-top-header {
    padding: 0 10px;
    gap: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .site-logo {
    display: inline-flex;
    align-items: center;
    min-height: 0;
    max-width: 100%;
    margin: 0;
    line-height: 0;
  }

  .site-logo img {
    display: block !important;
    width: auto;
    height: 28px;
    max-width: min(240px, 58vw);
  }

  .site-logo::after {
    content: none;
  }

  .top-nav.home-nav {
    display: flex !important;
    flex-wrap: wrap;
    width: 100%;
    gap: 4px;
    margin-top: 6px;
  }

  .top-nav.home-nav a {
    display: inline-flex !important;
  }

  [style*="max-width:980px"] {
    max-width: 100% !important;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
  }

  [style*="border:1px solid #e5e5e5"][style*="padding:16px"],
  [style*="border:1px solid #e5e5e5"][style*="padding:18px"],
  .pc-box,
  .box {
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  }

  h1 {
    font-size: 20px !important;
    line-height: 1.35 !important;
    margin: 4px 0 8px !important;
  }

  h2 {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 2px;
    margin-bottom: 8px !important;
  }

  .tip {
    font-size: 12px !important;
    border-radius: 10px !important;
  }

  .sublist.slide_c::before {
    display: none !important;
  }

  .sublist.slide_c {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    height: auto !important;
    min-height: 0 !important;
    background: transparent;
  }

  .sublist.slide_c .fullimg {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  .sublist.slide_c .fullimg img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    display: block;
  }

  .sublist.slide_c .ico_c {
    position: relative !important;
    left: auto !important;
    bottom: auto !important;
    height: auto !important;
    margin: 8px 0 8px 10px;
  }

  .home-kpi {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-top: 12px !important;
  }

  .home-kpi .kpi-item {
    padding: 12px 6px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
  }

  .home-kpi .kpi-num {
    font-size: 22px !important;
  }

  .home-kpi .kpi-lab {
    font-size: 11px !important;
  }

  .home-product-showcase {
    margin-top: 14px !important;
    padding: 12px !important;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  }

  .home-product-showcase .hps-header,
  .home-product-showcase .hps-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .home-product-showcase .hps-header h3,
  .home-product-showcase .hps-group-head h4 {
    margin: 0;
  }

  .home-product-showcase .hps-header a,
  .home-product-showcase .hps-group-head a {
    font-size: 12px;
    white-space: nowrap;
  }

  .home-product-showcase .hps-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-product-showcase .hps-group {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e6eef8;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
  }

  .home-product-showcase .hps-cards {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-product-showcase .hps-card {
    min-height: 72px;
    padding: 10px 8px;
    display: flex !important;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #edf2ff;
  }

  .home-product-showcase .hps-card .dot {
    margin-right: 4px;
  }

  .home-featured-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .news-grid,
  .hps-cards,
  .entry-list {
    gap: 8px !important;
  }

  .news-card,
  .hps-card {
    border-radius: 10px;
  }

  .news-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 14px !important;
  }

  .news-card {
    padding: 12px !important;
    border: 1px solid #e6eef8;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
  }

  .news-card h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px !important;
  }

  .news-card a {
    display: block;
    padding: 7px 0;
    border-bottom: 1px dashed #e5edf9;
    line-height: 1.5;
  }

  .news-card a:last-child {
    border-bottom: 0;
    color: var(--theme-primary-dark);
    font-weight: 700;
  }

  .section {
    margin-top: 10px !important;
  }

  .section > p,
  .section > div > p,
  .section li {
    font-size: 14px;
    line-height: 1.7;
  }

  .section img,
  .box img {
    border-radius: 10px;
  }

  .section img[style*="width"],
  .box img[style*="width"],
  .section img[style*="height"],
  .box img[style*="height"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .product-photo-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .order-filter {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .order-filter select,
  .order-filter input[type="text"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  .order-filter button {
    width: 100%;
  }

  #news-table,
  #news-table tbody,
  #news-table tr,
  #news-table td {
    display: block;
    width: 100%;
  }

  #news-table tr {
    margin-bottom: 8px;
    border: 1px solid #e6eef8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  }

  #news-table td {
    padding: 12px !important;
    border: 0 !important;
  }

  #news-table a {
    display: block;
    line-height: 1.5;
    word-break: break-word;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hero-image svg {
    height: auto !important;
    min-height: 110px;
  }

  .box > p > a[href$="index.html"],
  .box > div > p > a[href$="index.html"],
  .back-link {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    min-height: 34px;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    border: 1px solid #c9d6ff !important;
    background: #f8fbff !important;
    margin-top: 10px !important;
  }

  .box > p > a[href$="index.html"]:hover,
  .box > div > p > a[href$="index.html"]:hover,
  .back-link:hover {
    border-color: var(--theme-primary) !important;
    background: var(--theme-soft) !important;
  }

  .slogan {
    margin: 14px 0 6px !important;
  }

  .slogan img {
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  }

  .news-pager-wrap {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, .96);
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 18px rgba(15, 23, 42, .08);
    z-index: 8;
  }

  .news-pager-wrap .pg-btn {
    min-width: 38px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px !important;
    font-size: 13px !important;
  }

  table {
    width: 100% !important;
    table-layout: fixed;
  }

  td,
  th {
    word-break: break-word;
  }

  table.mobile-spec,
  table.mobile-spec tbody,
  table.mobile-spec tr,
  table.mobile-spec td,
  table.mobile-spec th {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  table.mobile-spec tr {
    margin-bottom: 8px;
    border: 1px solid #e6eef8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
  }

  table.mobile-spec td,
  table.mobile-spec th {
    padding: 8px 10px !important;
    border: 0 !important;
  }

  table.mobile-spec td:first-child,
  table.mobile-spec th:first-child {
    font-weight: 700;
    color: #334155;
    background: #f8fbff;
  }

  .service-float.mobile-service-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(62px + env(safe-area-inset-bottom));
    z-index: 10035;
    width: auto;
    top: auto;
    transform: none;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
  }

  body.mobile-contact-open .service-float.mobile-service-bar {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .service-float.mobile-service-bar .svc-btn {
    width: 100% !important;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid #dbe7ff;
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .10);
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }

  .service-float.mobile-service-bar .svc-btn::before {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    flex: 0 0 auto;
  }

  .service-float.mobile-service-bar .svc-online::before {
    content: "Q";
    background: #2b7cff;
  }

  .service-float.mobile-service-bar .svc-phone::before {
    content: "☎";
    background: #14b8a6;
  }

  .service-float.mobile-service-bar .svc-wechat::before {
    content: "微";
    background: #16a34a;
  }

  .service-float.mobile-service-bar .svc-btn:active {
    transform: translateY(1px) scale(.99);
  }

  .service-float.mobile-service-bar .svc-btn:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
  }

  .service-float.mobile-service-bar .svc-phone-panel,
  .service-float.mobile-service-bar .svc-wechat-panel {
    display: none !important;
  }

  .appearance-panel {
    right: 8px !important;
    bottom: 10px !important;
  }

  .mobile-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .88);
    z-index: 10060;
    padding: 14px;
  }

  .mobile-lightbox.show {
    display: flex;
  }

  .mobile-lightbox img {
    max-width: 100%;
    max-height: 86vh;
    border-radius: 10px;
    background: #fff;
  }

  .mobile-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 18px;
  }

  .footer.site-footer {
    margin-top: 14px;
  }

  .footer-meta {
    font-size: 12px;
    line-height: 1.55;
  }

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.has-mobile-tabbar {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10040;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid #dbe7ff;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, .10);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-tabbar.mobile-tabbar--5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .mobile-tabbar.mobile-tabbar--6 {
    grid-template-columns: repeat(6, 1fr);
  }

  .mobile-tabbar.mobile-tabbar--7 {
    grid-template-columns: repeat(7, 1fr);
  }

  .mobile-tabbar.mobile-tabbar--6 a,
  .mobile-tabbar.mobile-tabbar--7 a {
    min-height: 48px;
    font-size: 10px;
    gap: 1px;
    padding: 0 1px;
  }

  .mobile-tabbar.mobile-tabbar--6 a em,
  .mobile-tabbar.mobile-tabbar--7 a em {
    font-size: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-tabbar.mobile-tabbar--6 a span,
  .mobile-tabbar.mobile-tabbar--7 a span {
    font-size: 13px;
  }

  .mobile-tabbar a {
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #475569;
    font-size: 11px;
  }

  .mobile-tabbar a span {
    font-size: 14px;
    line-height: 1;
    width: 1.3em;
    text-align: center;
  }

  .mobile-tabbar a em {
    font-style: normal;
  }

  .mobile-tabbar a.active {
    color: var(--theme-primary-dark);
    background: #f0f6ff;
    background: color-mix(in srgb, var(--theme-soft) 74%, #fff 26%);
  }

  .mobile-tabbar a[data-role="toggle-contact"].active {
    border-top: 2px solid var(--theme-primary);
    box-shadow: inset 0 2px 0 #dbe7ff;
    box-shadow: inset 0 2px 0 color-mix(in srgb, var(--theme-primary) 28%, #fff 72%);
  }

  @media (max-width: 768px) {
    .site-top-header {
      position: sticky;
      top: 0;
      z-index: 20;
      background: rgba(255, 255, 255, .96);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    }

    .top-nav {
      width: 100%;
      padding-top: 6px;
    }

    .home-product-showcase .hps-cards {
      grid-template-columns: 1fr 1fr;
    }

    .home-product-showcase .hps-card span:last-child {
      font-size: 12px;
      line-height: 1.45;
    }
  }

  @media (max-width: 420px) {
    .home-kpi {
      grid-template-columns: repeat(2, 1fr) !important;
    }

    .home-product-showcase .hps-header,
    .home-product-showcase .hps-group-head {
      align-items: flex-start;
      flex-direction: column;
    }

    .home-product-showcase .hps-header a,
    .home-product-showcase .hps-group-head a {
      font-size: 11px;
    }

    .site-logo img {
      height: 24px;
    }
  }
}
