{"product_id":"人参五宝茶","title":"人参五宝茶","description":"\u003cstyle\u003e\n    .shopify-section--main-product,\n    .product__media,\n    .product__info-wrapper,\n    .product__title,\n    .product__description,\n    .price,\n    .product-form,\n    .product-form__submit,\n    .product__submit,\n    .buy-buttons,\n    .shopify-payment-button,\n    .product-form__buttons,\n    form[action=\"\/cart\/add\"],\n    .product-recommendations,\n    .shopify-section--product-recommendations {\n        display: none !important;\n    }\n    body, main, .shopify-section { background: #FFFFFF !important; }\n    * { margin: 0; padding: 0; box-sizing: border-box; }\n\n    .herb-product {\n        max-width: 1280px;\n        margin: 0 auto;\n        padding: 3rem 2rem 4rem;\n        font-family: 'Inter', sans-serif;\n        color: #2A2620;\n        background: #FFFFFF;\n    }\n    .herb-product-main {\n        display: grid;\n        grid-template-columns: 1fr 1fr;\n        gap: 4rem;\n        align-items: start;\n        margin-bottom: 4rem;\n    }\n    .herb-product-image {\n        position: relative;\n        cursor: pointer;\n        border-radius: 32px;\n        overflow: hidden;\n        background: #F5F0E8;\n    }\n    .herb-product-image img {\n        width: 100%;\n        height: auto;\n        display: block;\n        transition: transform 0.4s ease;\n    }\n    .herb-product-image:hover img { transform: scale(1.02); }\n    .herb-zoom-hint {\n        position: absolute;\n        bottom: 1rem;\n        right: 1rem;\n        background: rgba(255,255,255,0.8);\n        backdrop-filter: blur(4px);\n        padding: 0.25rem 0.75rem;\n        border-radius: 40px;\n        font-size: 0.6rem;\n        color: #2A2620;\n        opacity: 0;\n        transition: opacity 0.3s;\n        pointer-events: none;\n    }\n    .herb-product-image:hover .herb-zoom-hint { opacity: 1; }\n    .herb-product-info { padding-top: 0; }\n    .herb-product-sub {\n        font-size: 0.7rem;\n        text-transform: uppercase;\n        letter-spacing: 3px;\n        color: #C57C4A;\n        margin-bottom: 1rem;\n    }\n    .herb-product-title {\n        font-family: 'Noto Serif SC', serif;\n        font-size: 2.5rem;\n        font-weight: 500;\n        color: #2A2620;\n        line-height: 1.2;\n        margin-bottom: 1rem;\n    }\n    .herb-price { margin: 1.5rem 0 1rem 0; }\n    .herb-price-sale {\n        font-size: 1.75rem;\n        font-weight: 500;\n        color: #2A2620;\n    }\n    .herb-price-compare {\n        font-size: 1rem;\n        font-weight: 400;\n        color: #9E9A94;\n        text-decoration: line-through;\n        margin-left: 0.75rem;\n    }\n    .herb-price-tax {\n        font-size: 0.8rem;\n        font-weight: 400;\n        color: #9E9A94;\n        margin-left: 0.5rem;\n    }\n    .herb-quantity {\n        display: flex;\n        align-items: center;\n        gap: 1rem;\n        margin: 1.5rem 0;\n    }\n    .herb-qty-label {\n        font-size: 0.7rem;\n        letter-spacing: 2px;\n        color: #9E9A94;\n    }\n    .herb-qty-control {\n        display: flex;\n        align-items: center;\n        gap: 0.5rem;\n        background: #F5F0E8;\n        border-radius: 60px;\n        padding: 0.2rem;\n    }\n    .herb-qty-btn {\n        width: 32px;\n        height: 32px;\n        background: transparent;\n        border: none;\n        border-radius: 50%;\n        cursor: pointer;\n        font-size: 1.2rem;\n        color: #2A2620;\n        transition: all 0.2s;\n    }\n    .herb-qty-btn:hover { background: rgba(197, 124, 74, 0.15); }\n    .herb-qty-number {\n        min-width: 40px;\n        text-align: center;\n        font-size: 0.9rem;\n        font-weight: 500;\n    }\n\n    .herb-buttons {\n        display: flex;\n        flex-direction: column;\n        gap: 0.75rem;\n        margin: 1rem 0;\n    }\n\n    .herb-add-to-cart {\n        background: #2A2620;\n        color: #FCF9F4;\n        border: none;\n        padding: 1rem 2rem;\n        font-size: 0.8rem;\n        font-weight: 500;\n        letter-spacing: 2px;\n        border-radius: 60px;\n        cursor: pointer;\n        width: 100%;\n        transition: all 0.3s ease;\n        font-family: 'Inter', sans-serif;\n    }\n    .herb-add-to-cart:hover { background: #C57C4A; }\n    .herb-add-to-cart:disabled {\n        opacity: 0.5;\n        cursor: not-allowed;\n    }\n\n    .herb-buy-now {\n        background: #C57C4A;\n        color: #FCF9F4;\n        border: none;\n        padding: 1rem 2rem;\n        font-size: 0.8rem;\n        font-weight: 500;\n        letter-spacing: 2px;\n        border-radius: 60px;\n        cursor: pointer;\n        width: 100%;\n        transition: all 0.3s ease;\n        font-family: 'Inter', sans-serif;\n    }\n    .herb-buy-now:hover { background: #A8653A; }\n\n    .herb-cart-message {\n        font-size: 0.75rem;\n        color: #C57C4A;\n        text-align: center;\n        margin-top: 0.25rem;\n        min-height: 1.5rem;\n        opacity: 0;\n        transition: opacity 0.3s ease;\n    }\n    .herb-cart-message.show {\n        opacity: 1;\n    }\n\n    .herb-tags {\n        display: flex;\n        flex-wrap: wrap;\n        gap: 0.75rem;\n        margin-top: 1.5rem;\n    }\n    .herb-tag {\n        background: #F5F0E8;\n        padding: 0.35rem 1rem;\n        border-radius: 40px;\n        font-size: 0.7rem;\n        color: #2A2620;\n    }\n    .herb-description {\n        border-top: 1px solid rgba(42, 38, 32, 0.06);\n        padding: 3rem 0;\n        max-width: 720px;\n    }\n    .herb-description-text {\n        font-size: 0.95rem;\n        line-height: 1.8;\n        color: #4A4640;\n        margin-bottom: 2rem;\n        white-space: pre-wrap;\n    }\n    .herb-features {\n        list-style: none;\n        padding: 0;\n        margin: 1.5rem 0;\n    }\n    .herb-features li {\n        font-size: 0.85rem;\n        color: #4A4640;\n        margin: 0.75rem 0;\n        padding-left: 1.5rem;\n        position: relative;\n    }\n    .herb-features li::before {\n        content: \"🌿\";\n        position: absolute;\n        left: 0;\n        top: 0;\n        font-size: 0.8rem;\n    }\n    .herb-brewing {\n        background: #F5F0E8;\n        border-radius: 28px;\n        padding: 2rem;\n        margin: 2rem 0;\n        max-width: 680px;\n    }\n    .herb-brewing-title {\n        font-family: 'Noto Serif SC', serif;\n        font-size: 1rem;\n        margin-bottom: 1.25rem;\n        color: #C57C4A;\n    }\n    .herb-brewing-step {\n        font-size: 0.85rem;\n        margin: 0.75rem 0;\n        display: flex;\n        gap: 1rem;\n        flex-wrap: wrap;\n        padding: 0.5rem 0;\n        border-bottom: 0.5px solid rgba(42, 38, 32, 0.04);\n    }\n    .herb-brewing-step strong {\n        min-width: 70px;\n        color: #6B675F;\n    }\n    .herb-brewing-step:last-child { border-bottom: none; }\n    .herb-notice {\n        background: rgba(197, 124, 74, 0.04);\n        border-left: 2px solid #C57C4A;\n        padding: 1rem 1.5rem;\n        margin: 1.5rem 0;\n        font-size: 0.75rem;\n        color: #6B675F;\n        line-height: 1.5;\n    }\n    .herb-closing {\n        font-size: 0.85rem;\n        color: #9E9A94;\n        text-align: center;\n        padding: 2rem 0;\n        font-style: italic;\n    }\n\n    .herb-recommended {\n        margin: 4rem 0 2rem;\n        border-top: 1px solid rgba(42, 38, 32, 0.06);\n        padding-top: 3rem;\n    }\n    .herb-recommended-title {\n        font-family: 'Noto Serif SC', serif;\n        font-size: 1.1rem;\n        font-weight: 500;\n        text-align: center;\n        letter-spacing: 2px;\n        color: #2A2620;\n        margin-bottom: 2rem;\n    }\n    .herb-recommended-grid {\n        display: grid;\n        grid-template-columns: repeat(2, 1fr);\n        gap: 2.5rem;\n    }\n    .herb-recommended-item {\n        text-decoration: none;\n        color: inherit;\n        transition: all 0.3s ease;\n        display: block;\n        text-align: center;\n    }\n    .herb-recommended-item:hover {\n        transform: translateY(-4px);\n    }\n    .herb-recommended-img {\n        width: 100%;\n        aspect-ratio: 1\/1;\n        background: #F5F0E8;\n        border-radius: 24px;\n        object-fit: cover;\n        margin-bottom: 1rem;\n        transition: box-shadow 0.3s ease;\n    }\n    .herb-recommended-item:hover .herb-recommended-img {\n        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);\n    }\n    .herb-recommended-name {\n        font-family: 'Noto Serif SC', serif;\n        font-size: 0.95rem;\n        font-weight: 500;\n        color: #2A2620;\n        transition: color 0.2s ease;\n    }\n    .herb-recommended-item:hover .herb-recommended-name {\n        color: #C57C4A;\n    }\n    .herb-recommended-price {\n        font-size: 0.75rem;\n        color: #9E9A94;\n        margin-top: 0.25rem;\n    }\n\n    .herb-footer {\n        text-align: center;\n        padding: 2rem 0 0;\n        border-top: 1px solid rgba(42, 38, 32, 0.06);\n        font-size: 0.7rem;\n        color: #9E9A94;\n        letter-spacing: 1px;\n        margin-top: 2rem;\n    }\n    .herb-modal {\n        position: fixed;\n        top: 0;\n        left: 0;\n        width: 100%;\n        height: 100%;\n        background: rgba(42, 38, 32, 0.95);\n        z-index: 10001;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        opacity: 0;\n        visibility: hidden;\n        transition: all 0.3s;\n        cursor: pointer;\n    }\n    .herb-modal.active {\n        opacity: 1;\n        visibility: visible;\n    }\n    .herb-modal img {\n        max-width: 90%;\n        max-height: 90%;\n        border-radius: 16px;\n    }\n    .herb-modal-close {\n        position: absolute;\n        top: 2rem;\n        right: 2rem;\n        color: #FCF9F4;\n        font-size: 2rem;\n        cursor: pointer;\n    }\n\n    .herb-back-to-top {\n        position: fixed;\n        bottom: 2rem;\n        right: 2rem;\n        width: 48px;\n        height: 48px;\n        background: #2A2620;\n        color: #FCF9F4;\n        border: none;\n        border-radius: 50%;\n        cursor: pointer;\n        font-size: 1.5rem;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        transition: all 0.3s ease;\n        z-index: 10000;\n        box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n        opacity: 0;\n        visibility: hidden;\n        transform: translateY(20px);\n    }\n    .herb-back-to-top.show {\n        opacity: 1;\n        visibility: visible;\n        transform: translateY(0);\n    }\n    .herb-back-to-top:hover {\n        background: #C57C4A;\n        transform: translateY(-2px);\n    }\n\n    @media (max-width: 768px) {\n        .herb-product { padding: 1.5rem 1rem 3rem; }\n        .herb-product-main { grid-template-columns: 1fr; gap: 2rem; }\n        .herb-product-title { font-size: 1.75rem; }\n        .herb-recommended-grid { gap: 1.25rem; }\n        .herb-recommended-name { font-size: 0.85rem; }\n        .herb-back-to-top {\n            bottom: 1.5rem;\n            right: 1.5rem;\n            width: 44px;\n            height: 44px;\n            font-size: 1.2rem;\n        }\n    }\n\u003c\/style\u003e\n\n\u003cdiv class=\"herb-product\"\u003e\n    \u003cdiv class=\"herb-product-main\"\u003e\n        \u003cdiv class=\"herb-product-image\" id=\"herbProductImage\"\u003e\n            \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0679\/3386\/4005\/files\/17a2553342de2e3fd8a5bb54a0d04feb_9552189f-3551-4319-8e5e-44d7c45679cb.png?v=1780392166\" alt=\"人参五宝茶\" id=\"herbMainImage\"\u003e\n            \u003cspan class=\"herb-zoom-hint\"\u003e🔍 クリックで拡大\u003c\/span\u003e\n        \u003c\/div\u003e\n        \u003cdiv class=\"herb-product-info\"\u003e\n            \u003cdiv class=\"herb-product-sub\"\u003e古来の知恵が生んだ、体に優しい毎日の一杯\u003c\/div\u003e\n            \u003ch1 class=\"herb-product-title\"\u003e人参五宝茶\u003c\/h1\u003e\n            \u003cdiv class=\"herb-price\"\u003e\n                \u003cspan class=\"herb-price-sale\" id=\"herbSalePrice\"\u003e¥5,000\u003c\/span\u003e\n                \u003cspan class=\"herb-price-compare\" id=\"herbComparePrice\"\u003e¥6,500\u003c\/span\u003e\n                \u003cspan class=\"herb-price-tax\"\u003e（税込）\u003c\/span\u003e\n            \u003c\/div\u003e\n            \u003cdiv class=\"herb-quantity\"\u003e\n                \u003cspan class=\"herb-qty-label\"\u003e数量\u003c\/span\u003e\n                \u003cdiv class=\"herb-qty-control\"\u003e\n                    \u003cbutton class=\"herb-qty-btn\" id=\"herbQtyMinus\"\u003e−\u003c\/button\u003e\n                    \u003cspan class=\"herb-qty-number\" id=\"herbQtyNumber\"\u003e1\u003c\/span\u003e\n                    \u003cbutton class=\"herb-qty-btn\" id=\"herbQtyPlus\"\u003e+\u003c\/button\u003e\n                \u003c\/div\u003e\n            \u003c\/div\u003e\n            \u003cdiv class=\"herb-buttons\"\u003e\n                \u003cbutton class=\"herb-add-to-cart\" id=\"herbAddToCart\"\u003eカートに追加\u003c\/button\u003e\n                \u003cbutton class=\"herb-buy-now\" id=\"herbBuyNow\"\u003eすぐに購入する\u003c\/button\u003e\n            \u003c\/div\u003e\n            \u003cdiv class=\"herb-cart-message\" id=\"herbCartMessage\"\u003e\u003c\/div\u003e\n            \u003cdiv class=\"herb-tags\"\u003e\n                \u003cspan class=\"herb-tag\"\u003eノンカフェイン\u003c\/span\u003e\n                \u003cspan class=\"herb-tag\"\u003e薬食同源\u003c\/span\u003e\n                \u003cspan class=\"herb-tag\"\u003e3-5回抽出可\u003c\/span\u003e\n                \u003cspan class=\"herb-tag\"\u003e滋養強壮\u003c\/span\u003e\n            \u003c\/div\u003e\n        \u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv class=\"herb-description\"\u003e\n        \u003cdiv class=\"herb-description-text\"\u003e古代中国発祥の健康茶は飲食の同源、健康の知恵が凝縮！\n\n和と中国の素材の組み合わせは6種類！高麗人参、クコの実、タデ、桑参、ナツメ、そしてマカ——これら6種類の和漢素材、体の内側、飲むむたびにじんわり元気がパトロールしてくるような…体質改善をやさしくサポートします。\n\nノンカフェインだから夜でも安心。1パックに3〜5杯分の高品質なドリンクが入っています。毎日の健康維持と活力維持に！\u003c\/div\u003e\n        \u003cul class=\"herb-features\"\u003e\n            \u003cli\u003e6種の和漢素材が体質を整え、健やかさをサポート\u003c\/li\u003e\n            \u003cli\u003eノンカフェインで朝晩いつでも安心\u003c\/li\u003e\n            \u003cli\u003e1包で3〜5杯分、経済的で毎日続けやすい\u003c\/li\u003e\n            \u003cli\u003e滋養強壮・疲労回復に\u003c\/li\u003e\n        \u003c\/ul\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv class=\"herb-brewing\"\u003e\n        \u003cdiv class=\"herb-brewing-title\"\u003e🍵 お召し上がり方\u003c\/div\u003e\n        \u003cdiv class=\"herb-brewing-step\"\u003e\n\u003cstrong\u003eホット\u003c\/strong\u003e 90℃のお湯200-300ml、3-5分抽出\u003c\/div\u003e\n        \u003cdiv class=\"herb-brewing-step\"\u003e\n\u003cstrong\u003e水出し\u003c\/strong\u003e 常温の水300ml、約10分抽出\u003c\/div\u003e\n        \u003cdiv class=\"herb-brewing-step\"\u003e\n\u003cstrong\u003e繰り返し\u003c\/strong\u003e 1包で2-3回抽出可能\u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv class=\"herb-notice\"\u003e⚠️ ご注意：妊娠中・授乳中の方は、ご利用前に医師にご相談ください。天然由来の原料を使用しているため、色や香りには自然な個体差がございます。\u003c\/div\u003e\n\n    \u003cdiv class=\"herb-closing\"\u003e毎日続ける一杯から、和漢のやさしい力を、あなたのリズムに。\u003c\/div\u003e\n\n    \u003cdiv class=\"herb-recommended\"\u003e\n        \u003cdiv class=\"herb-recommended-title\"\u003e—— こちらもおすすめ ——\u003c\/div\u003e\n        \u003cdiv class=\"herb-recommended-grid\" id=\"herbRecommendedGrid\"\u003e\u003c\/div\u003e\n    \u003c\/div\u003e\n\n    \u003cdiv class=\"herb-footer\"\u003e© 草本新生 · 日常の一杯をお茶に。\u003c\/div\u003e\n\u003c\/div\u003e\n\n\u003cdiv class=\"herb-modal\" id=\"herbModal\"\u003e\n    \u003cdiv class=\"herb-modal-close\"\u003e✕\u003c\/div\u003e\n    \u003cimg id=\"herbModalImg\" src=\"\"\u003e\n\u003c\/div\u003e\n\n\u003cbutton class=\"herb-back-to-top\" id=\"herbBackToTop\" aria-label=\"回到顶部\"\u003e↑\u003c\/button\u003e\n\n\u003cscript\u003e\n(function() {\n    \/\/ ============================================================\n    \/\/ 人参五宝茶 - Variant ID\n    \/\/ ============================================================\n    var VARIANT_ID = 45222879625285;\n\n    \/\/ ============================================================\n    \/\/ 设置固定价格（人参五宝茶）\n    \/\/ ============================================================\n    var saleEl = document.getElementById('herbSalePrice');\n    var compareEl = document.getElementById('herbComparePrice');\n\n    if (saleEl) saleEl.textContent = '¥5,000';\n    if (compareEl) compareEl.textContent = '¥6,500';\n\n    \/\/ ============================================================\n    \/\/ 产品推荐数据（日文名称）\n    \/\/ ============================================================\n    var recommendedProducts = [\n        {\n            name: \"菊花決明子茶\",\n            price: \"¥5,000（税込）\",\n            handle: \"菊花決明子茶\",\n            img: \"https:\/\/cdn.shopify.com\/s\/files\/1\/0679\/3386\/4005\/files\/a65f5fa0d5a1006ef99202a9d20741c0_bbff3bf7-3234-4c7c-ab5e-6868060fbaab.png?v=1780392165\"\n        },\n        {\n            name: \"金柑レモンパッションフルーツ茶\",\n            price: \"¥5,000（税込）\",\n            handle: \"金柑レモンパッションフルーツ茶\",\n            img: \"https:\/\/cdn.shopify.com\/s\/files\/1\/0679\/3386\/4005\/files\/782f0198b2774f896c3f02c937395655_f4092d02-8f40-4567-908f-82c9805d9f13.png?v=1780392195\"\n        },\n        {\n            name: \"桑葚ローズティー\",\n            price: \"¥5,000（税込）\",\n            handle: \"桑葚ローズティー\",\n            img: \"https:\/\/cdn.shopify.com\/s\/files\/1\/0679\/3386\/4005\/files\/bcdd87264e8884637fe42f8b93fe20fb_555e358a-1712-4298-8596-578fc47ce4f1.png?v=1780392175\"\n        },\n        {\n            name: \"蜜桃ウーロン茶\",\n            price: \"¥5,000（税込）\",\n            handle: \"蜜桃ウーロン茶\",\n            img: \"https:\/\/cdn.shopify.com\/s\/files\/1\/0679\/3386\/4005\/files\/f15370648296a22b608f2cc77d74fd6b_09d9823a-8273-4adc-80d2-6b41865c4d5b.png?v=1780392189\"\n        }\n    ];\n\n    \/\/ ============================================================\n    \/\/ 生成推荐产品\n    \/\/ ============================================================\n    var grid = document.getElementById('herbRecommendedGrid');\n    if (grid) {\n        recommendedProducts.forEach(function(product) {\n            var encodedHandle = encodeURIComponent(product.handle);\n            var url = 'https:\/\/hcrhcr.com\/products\/' + encodedHandle;\n            \n            var item = document.createElement('a');\n            item.className = 'herb-recommended-item';\n            item.href = url;\n            item.innerHTML = \n                '\u003cimg src=\"' + product.img + '\" class=\"herb-recommended-img\" alt=\"' + product.name + '\"\u003e' +\n                '\u003cdiv class=\"herb-recommended-name\"\u003e' + product.name + '\u003c\/div\u003e' +\n                '\u003cdiv class=\"herb-recommended-price\"\u003e' + product.price + '\u003c\/div\u003e';\n            grid.appendChild(item);\n        });\n    }\n\n    \/\/ ============================================================\n    \/\/ 数量选择器\n    \/\/ ============================================================\n    var qty = 1;\n    var qtySpan = document.getElementById('herbQtyNumber');\n    var qtyMinus = document.getElementById('herbQtyMinus');\n    var qtyPlus = document.getElementById('herbQtyPlus');\n    \n    if (qtyMinus) {\n        qtyMinus.addEventListener('click', function() {\n            if (qty \u003e 1) { qty--; qtySpan.textContent = qty; }\n        });\n    }\n    if (qtyPlus) {\n        qtyPlus.addEventListener('click', function() {\n            qty++; qtySpan.textContent = qty;\n        });\n    }\n\n    \/\/ ============================================================\n    \/\/ ===================== 核心修复开始 ==========================\n    \/\/ ============================================================\n\n    var addBtn = document.getElementById('herbAddToCart');\n    var buyBtn = document.getElementById('herbBuyNow');\n    var messageEl = document.getElementById('herbCartMessage');\n\n    \/\/ ---------- 显示消息 ----------\n    function showMessage(text, isSuccess) {\n        if (!messageEl) return;\n        messageEl.textContent = text;\n        messageEl.style.color = isSuccess ? '#C57C4A' : '#D43F3F';\n        messageEl.classList.add('show');\n        setTimeout(function() {\n            messageEl.classList.remove('show');\n        }, 3000);\n    }\n\n    \/\/ ---------- 更新购物车数量（增强版） ----------\n    function updateCartCount() {\n        fetch('\/cart.js', { cache: 'no-store' })\n            .then(function(res) { return res.json(); })\n            .then(function(cart) {\n                var total = 0;\n                if (cart.items) {\n                    cart.items.forEach(function(item) {\n                        total += item.quantity;\n                    });\n                }\n\n                \/\/ 使用更全面的选择器，适配各种主题\n                var selectors = [\n                    '.cart-count',\n                    '.cart-icon .count', \n                    '.site-header__cart-count',\n                    '.header__cart-count',\n                    '[data-cart-count]',\n                    '.cart-count-bubble span',\n                    '.js-cart-count',\n                    '.cart__count'\n                ];\n\n                var found = false;\n                selectors.forEach(function(selector) {\n                    document.querySelectorAll(selector).forEach(function(el) {\n                        el.textContent = total;\n                        el.style.display = total \u003e 0 ? 'flex' : 'none';\n                        found = true;\n                    });\n                });\n\n                \/\/ 如果没找到，尝试更新任何包含购物车数字的元素\n                if (!found) {\n                    document.querySelectorAll('.cart-count, .cart__count, [class*=\"cart-count\"]').forEach(function(el) {\n                        if (\/^\\d+$\/.test(el.textContent.trim()) || el.textContent.trim() === '') {\n                            el.textContent = total;\n                        }\n                    });\n                }\n\n                return total;\n            })\n            .catch(function(error) {\n                console.error('更新购物车数量失败:', error);\n            });\n    }\n\n    \/\/ ---------- 加购（Ajax，带延迟重试） ----------\n    function addToCartAjax(variantId, quantity) {\n        if (!addBtn) return;\n        \n        addBtn.disabled = true;\n        addBtn.textContent = '追加中...';\n        \n        fetch('\/cart\/add.js', {\n            method: 'POST',\n            headers: {\n                'Content-Type': 'application\/json',\n                'Accept': 'application\/json'\n            },\n            body: JSON.stringify({\n                items: [{\n                    id: parseInt(variantId),\n                    quantity: parseInt(quantity)\n                }]\n            })\n        })\n        .then(function(response) {\n            if (!response.ok) {\n                return response.text().then(function(text) {\n                    throw new Error(text);\n                });\n            }\n            return response.json();\n        })\n        .then(function(data) {\n            showMessage('✅ カートに追加しました (' + quantity + '点)', true);\n            \n            \/\/ 延迟执行，确保Shopify后台数据已更新\n            setTimeout(function() {\n                updateCartCount();\n                \/\/ 触发购物车更新事件，通知主题其他组件\n                document.dispatchEvent(new CustomEvent('cart:updated', { detail: data }));\n                \/\/ 如果主题使用了Shopify的ajaxCart，手动触发更新\n                if (window.Shopify \u0026\u0026 Shopify.ajaxCart) {\n                    Shopify.ajaxCart.update();\n                }\n            }, 500);\n        })\n        .catch(function(error) {\n            console.error('Error:', error);\n            showMessage('⚠️ 追加に失敗しました。もう一度お試しください。', false);\n        })\n        .finally(function() {\n            addBtn.disabled = false;\n            addBtn.textContent = 'カートに追加';\n        });\n    }\n\n    \/\/ ---------- 立即购买（先加购再跳转结账，解决404） ----------\n    function buyNow(variantId, quantity) {\n        if (!buyBtn) return;\n\n        buyBtn.disabled = true;\n        buyBtn.textContent = '処理中...';\n\n        fetch('\/cart\/add.js', {\n            method: 'POST',\n            headers: {\n                'Content-Type': 'application\/json',\n                'Accept': 'application\/json'\n            },\n            body: JSON.stringify({\n                items: [{\n                    id: parseInt(variantId),\n                    quantity: parseInt(quantity)\n                }]\n            })\n        })\n        .then(function(response) {\n            if (!response.ok) {\n                return response.text().then(function(text) {\n                    throw new Error(text);\n                });\n            }\n            return response.json();\n        })\n        .then(function() {\n            \/\/ 加购成功后跳转结账\n            window.location.href=\"\/zh\/checkout\";\n        })\n        .catch(function(error) {\n            console.error('Error:', error);\n            showMessage('⚠️ 購入手続きに失敗しました。もう一度お試しください。', false);\n            buyBtn.disabled = false;\n            buyBtn.textContent = 'すぐに購入する';\n        });\n    }\n\n    \/\/ ---------- 绑定事件 ----------\n    if (addBtn) {\n        addBtn.addEventListener('click', function(e) {\n            e.preventDefault();\n            addToCartAjax(VARIANT_ID, qty);\n        });\n    }\n\n    if (buyBtn) {\n        buyBtn.addEventListener('click', function(e) {\n            e.preventDefault();\n            buyNow(VARIANT_ID, qty);\n        });\n    }\n\n    \/\/ ---------- 监听购物车更新事件（响应主题其他组件的更新） ----------\n    document.addEventListener('cart:updated', function(event) {\n        setTimeout(function() {\n            updateCartCount();\n        }, 300);\n    });\n\n    \/\/ ---------- 页面加载完成后立即更新购物车数量 ----------\n    document.addEventListener('DOMContentLoaded', function() {\n        \/\/ 初次加载延迟执行，确保主题的购物车元素已渲染\n        setTimeout(function() {\n            updateCartCount();\n        }, 500);\n    });\n\n    \/\/ ============================================================\n    \/\/ ===================== 核心修复结束 ==========================\n    \/\/ ============================================================\n\n    \/\/ ============================================================\n    \/\/ 图片放大\n    \/\/ ============================================================\n    var modal = document.getElementById('herbModal');\n    var modalImg = document.getElementById('herbModalImg');\n    var productImage = document.getElementById('herbProductImage');\n    var mainImage = document.getElementById('herbMainImage');\n    \n    if (productImage \u0026\u0026 modal \u0026\u0026 modalImg \u0026\u0026 mainImage) {\n        productImage.addEventListener('click', function() {\n            modalImg.src = mainImage.src;\n            modal.classList.add('active');\n        });\n        modal.addEventListener('click', function(e) {\n            if (e.target === modal || e.target.classList.contains('herb-modal-close')) {\n                modal.classList.remove('active');\n            }\n        });\n    }\n\n    \/\/ ============================================================\n    \/\/ 一键到顶\n    \/\/ ============================================================\n    var backToTopBtn = document.getElementById('herbBackToTop');\n    \n    if (backToTopBtn) {\n        window.addEventListener('scroll', function() {\n            if (window.scrollY \u003e 300) {\n                backToTopBtn.classList.add('show');\n            } else {\n                backToTopBtn.classList.remove('show');\n            }\n        });\n        backToTopBtn.addEventListener('click', function() {\n            window.scrollTo({ top: 0, behavior: 'smooth' });\n        });\n    }\n})();\n\u003c\/script\u003e","brand":"H.C.Real","offers":[{"title":"Default Title","offer_id":45222879625285,"sku":null,"price":5000.0,"currency_code":"JPY","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0679\/3386\/4005\/files\/17a2553342de2e3fd8a5bb54a0d04feb.png?v=1767865254","url":"https:\/\/hcrhcr.com\/zh\/products\/%e4%ba%ba%e5%8f%82%e4%ba%94%e5%ae%9d%e8%8c%b6","provider":"H.C.Real","version":"1.0","type":"link"}