 :root {
            --brand: #f26522;
            --header-h: 72px;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            color: #111;
        }

        /* ==== Global reset to avoid mobile overflow ====*/
        *, *::before, *::after{ box-sizing: border-box; }
        html, body{ width:100%; max-width:100%; overflow-x:hidden; }

        /* ===== 导航（与 product.html 一致） ===== */
        .site-header {
            transition: background-color .3s ease, backdrop-filter .3s ease;
        }

        .with-header-offset {
            padding-top: calc(var(--header-h) + 12px);
        }

        #mobile-nav {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            transform: translateY(-100%) !important;
        }

        #mobile-nav.open {
            display: block !important;
            visibility: visible !important;
            pointer-events: auto !important;
            transform: translateY(0) !important;
        }

        @media (min-width:768px) {
            #desktop-nav {
                display: flex !important;
            }

            #hamburger {
                display: none !important;
            }

            #mobile-nav,
            #mobile-nav * {
                display: none !important;
            }

            .webshow {
                display: block;
            }

            .webhidden {
                display: none;
            }
        }

        @media (max-width:767.98px) {
            #desktop-nav {
                display: none !important;
            }

            #hamburger {
                display: inline-flex !important;
                align-items: center;
                justify-content: center;
            }

            #mobile-nav {
                position: fixed;
                left: 0;
                right: 0;
                top: var(--header-h);
                z-index: 60;
                background: rgba(0, 0, 0, .9);
                backdrop-filter: saturate(120%) blur(6px);
                transform: translateY(-100%);
                transition: transform .25s ease;
            }

            #mobile-nav.open {
                transform: translateY(0);
            }
        }

        /* ===== Mega menu (desktop) — 1:1 look ===== */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 60;
        }

        .header-inner {
            position: relative;
        }


        /* ===== 页脚（与 product.html 一致） ===== */
        .webshow {
            display: block;
        }

        .webhidden {
            display: none;
        }

        @media (max-width:767.98px) {
            .webshow {
                display: none;
            }

            .webhidden {
                display: block;
            }
        }

        /* === Product details page (1:1 layout scaffold) === */
        .breadcrumb {
            font-size: 12px;
            color: #888
        }

        .breadcrumb a {
            color: #666;
            text-decoration: none
        }

        .breadcrumb a:hover {
            color: #f26522
        }

        .hero-grid {
            display: grid;
            grid-template-columns: 320px 1fr;
            gap: 28px
        }

        /* Ensure grid items can shrink on small screens */
        .hero-grid > * { min-width: 0; }

        @media (max-width: 1023.98px) {
            .hero-grid {
                grid-template-columns: 1fr;
            }
        }

        .orange-underline {
            position: relative;
            display: inline-block;
            padding-bottom: 8px
        }

        .orange-underline::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 3px;
            width: 84px;
            margin: 0 auto;
            background: #f26522;
            border-radius: 999px
        }

        .content-box {
            background: #fff;
            border: 1px solid #E5E7EB;
            box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
        }

        .orange-rail {
            position: fixed;
            right: 0;
            top: 40%;
            transform: translateY(-50%) rotate(-90deg);
            transform-origin: right top;
            background: #ff7a00;
            color: #fff;
            padding: .45rem .9rem;
            letter-spacing: .02em;
            font-weight: 700;
            border-top-left-radius: 6px;
            border-top-right-radius: 6px;
            z-index: 30
        }

        .table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px
        }

        .table th,
        .table td {
            border: 1px solid #e5e7eb;
            padding: 8px 10px;
            color: #222
        }

        .table thead th {
            background: #f6f6f6;
            font-weight: 700
        }

        .note {
            font-size: 12px;
            color: #666
        }

        .muted {
            color: #666
        }

        .hpx-badge {
            display: inline-block;
            font-style: italic;
            font-weight: 800
        }

        /* Fix page body color for details page */
        body.product-details {
            background: #ffffff;
            color: #111
        }

        .truncate-15 {
            display: -webkit-box;
            -webkit-line-clamp: 15;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* ==== Product gallery & docs (detail page) ==== */
        .gallery {
            display: flex;
            flex-direction: column;
            gap: 12px;
        
        }

        .gallery .main-pic {
            position: relative;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            background: #fff;
            overflow: hidden;
            width: 100%;
            max-width: 100%;
            aspect-ratio: 1.28;
            cursor: grab;
            user-select: none;
            width:100%;
            max-width:100%;
            overflow:hidden;
            aspect-ratio: 1;              /* closer to design on phones */

        }

        .gallery .main-pic.grabbing{ cursor: grabbing; }

        .gallery .main-pic img {
            display: block;
            width: 100%;
            height: auto;
            object-fit: contain;
            aspect-ratio: 1;              /* closer to design on phones */

            
        }

        .gallery .thumbs {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding: 6px 4px;
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 transparent;
        }
        .gallery .thumbs::-webkit-scrollbar-track {
            background: transparent;
        }
        .gallery .thumbs::-webkit-scrollbar {
            height: 3px;
        }
        .gallery .thumbs::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 999px
        }

        .gallery .thumb {
            flex: 0 0 72px;
            width: 72px;
            height: 72px;
            border: 2px solid transparent;
            border-radius: 6px;
            overflow: hidden;
            background: #fff;
            cursor: pointer
        }

        .gallery .thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            aspect-ratio: 1;

        }

        .gallery .thumb.is-active {
            border-color: var(--brand)
        }

        /* Docs list */
        .docs-card {
            background: #fff;
            border: 1px solid #E5E7EB;
            border-radius: 8px;
            padding: 14px 16px
        }

        .docs-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 700;
            margin-bottom: 10px
        }

        .doc-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 6px;
            border-radius: 6px;
            transition: background .2s
        }

        .doc-item:hover {
            background: #f7f7f8
        }

        .doc-item .badge {
            width: 22px;
            height: 28px;
            min-width: 22px;
            border-radius: 4px;
            background: #ff5a5f;
            color: #fff;
            font-weight: 800;
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center
        }

        .doc-item a {
            color: #0f172a;
            text-decoration: none;
            flex: 1;
            min-width: 0;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden
        }

        .doc-item .dl {
            margin-left: auto;
            font-size: 12px;
            color: var(--brand)
        }

        /* layout tune */
        .hero-grid {
            grid-template-columns: 420px 1fr
        }

        @media (max-width:1279.98px) {
            .hero-grid {
                grid-template-columns: 360px 1fr
            }
        }

        @media (max-width:1023.98px) {
            .hero-grid {
                grid-template-columns: 1fr
            }
        }

        /* ===== Mobile / Tablet responsive tune for detail page (新增) ===== */
        .page-title{font-size:clamp(18px,5.2vw,28px);line-height:1.35}
        .section-title{font-size:clamp(18px,4.8vw,24px)}

        @media (max-width:1279.98px){
          .hero-grid{grid-template-columns:360px 1fr;gap:24px}
        }
        @media (max-width:1023.98px){
          .hero-grid{grid-template-columns:1fr;gap:18px}
        }
        @media (max-width:767.98px){
          main{padding-top:6px}
          .hero-grid{gap:14px}
          .gallery{gap:10px}
          .gallery .thumb{flex:0 0 60px;width:60px;height:60px}
          .gallery .thumbs{gap:8px}
          .docs-card{padding:12px 12px}
          .doc-item{padding:10px 8px}
          .doc-item .badge{width:20px;height:24px}
          .orange-rail{display:none}
        }

        @media (max-width:1023.98px){
          .orange-rail{ display:none; }
        }

        /* === Mobile refinements (gallery, docs list, spacing, safe header) === */
        @media (max-width: 767.98px){
          /* Ensure the header offset is respected on small screens */
          .with-header-offset{ padding-top: calc(var(--header-h) + 8px); }

          /* Make the main product image taller but not overflow the viewport */
          .gallery .main-pic{
            aspect-ratio: 1;              /* closer to design on phones */
            max-height: min(56svh, 440px);    /* keep visible without pushing content off */
            width:100%;
            max-width:100%;
          }
          .gallery .main-pic img{ width:100%; height:100%; object-fit:contain;aspect-ratio: 1;  }

          /* Thumbnails: larger tap targets + smoother scroll */
          .gallery .thumbs{ gap:10px; -webkit-overflow-scrolling: touch; }
          .gallery .thumb{ flex:0 0 68px; width:68px; height:68px; }

          /* Title & section spacing tweaks */
          .page-title{ margin-top: 2px; }
          .section-title{ line-height:1.35; }

          /* Docs list: larger buttons, clearer layout */
          .docs-card{ padding: 12px 12px; }
          .doc-item{ padding: 10px 10px; }
          .doc-item a{ font-size: 14px; }
          .doc-item .dl{
            display:inline-flex; align-items:center; justify-content:center;
            padding: 6px 12px; border-radius: 999px; background: var(--brand);
            color:#fff; font-weight:600; font-size: 13px; min-width: 72px; text-align:center;
          }
        }

        /* Tighten tablet spacing slightly */
        @media (min-width: 768px) and (max-width: 1023.98px){
          .gallery .main-pic{ max-height: min(58svh, 520px); }
          .docs-card{ padding: 14px 14px; }
          .doc-item .dl{ padding: 6px 12px; }
        }
