{"product_id":"ceiling-fan-lights-msl-fl-8018-black","title":"XiGLOW シーリングファンライト MSL-FL-8018 | 10-12畳（直径132cm）・リモコン調光調色（ブラック）","description":"\u003cstyle\u003e\n  \/* ----- 普通圖片（前9張）去除間距 ----- *\/\n  .normal-images {\n    margin: 0;\n    padding: 0;\n  }\n  .normal-images img {\n    display: block;\n    width: 100%;\n    height: auto;\n    margin: 0;\n    padding: 0;\n  }\n\n  \/* ----- 輪播容器（最後3張） ----- *\/\n  .carousel-container {\n    position: relative;\n    width: 100%;\n    max-width: 1464px;\n    margin: 0 auto;\n    overflow: hidden;\n  }\n  .carousel-wrapper {\n    display: flex;\n    transition: transform 0.3s ease;\n    cursor: grab;\n  }\n  .carousel-wrapper img {\n    width: 100%;\n    flex-shrink: 0;\n    display: block;\n    user-select: none;\n  }\n\n  \/* 左右箭頭 - 正圓形 *\/\n  .carousel-btn {\n    position: absolute;\n    top: 50%;\n    transform: translateY(-50%);\n    width: 44px;\n    height: 44px;\n    border-radius: 50%;\n    background: rgba(0, 0, 0, 0.5);\n    color: white;\n    border: none;\n    cursor: pointer;\n    font-size: 22px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    z-index: 2;\n    transition: background 0.2s;\n    padding: 0;\n  }\n  .carousel-btn:hover {\n    background: rgba(0, 0, 0, 0.8);\n  }\n  .carousel-btn.prev {\n    left: 10px;\n  }\n  .carousel-btn.next {\n    right: 10px;\n  }\n\n  \/* 底部指示點 *\/\n  .dots {\n    text-align: center;\n    margin-top: 12px;\n  }\n  .dot {\n    display: inline-block;\n    width: 12px;\n    height: 12px;\n    margin: 0 6px;\n    background: #ccc;\n    border-radius: 50%;\n    cursor: pointer;\n    transition: background 0.3s;\n  }\n  .dot.active {\n    background: #333;\n  }\n\u003c\/style\u003e\n\n\u003c!-- ===== 前9張圖片（普通排列） ===== --\u003e\n\u003cdiv class=\"normal-images\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_1_01.jpg?v=1786591352\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_1_02.jpg?v=1786591355\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_2.jpg?v=1786591362\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_3_9d829c71-0be1-4aa5-86d8-dd2d07fa2620.jpg?v=1786591358\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_4.jpg?v=1786591345\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_5.jpg?v=1786591362\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_6.jpg?v=1786591356\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_7.jpg?v=1786591341\" alt=\"\"\u003e\n  \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_8.jpg?v=1786591332\" alt=\"\"\u003e\n\u003c\/div\u003e\n\n\u003c!-- ===== 最後3張圖片（輪播） ===== --\u003e\n\u003cdiv class=\"carousel-container\" id=\"carousel\"\u003e\n  \u003cdiv class=\"carousel-wrapper\" id=\"carouselWrapper\"\u003e\n    \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_9.jpg?v=1786591345\" alt=\"Slide 1\"\u003e\n    \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_10.jpg?v=1786591363\" alt=\"Slide 2\"\u003e\n    \u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/A_11.jpg?v=1786591345\" alt=\"Slide 3\"\u003e\n  \u003c\/div\u003e\n\n  \u003c!-- 左右箭頭（圓形） --\u003e\n  \u003cbutton class=\"carousel-btn prev\" id=\"prevBtn\"\u003e❮\u003c\/button\u003e\n  \u003cbutton class=\"carousel-btn next\" id=\"nextBtn\"\u003e❯\u003c\/button\u003e\n\n  \u003c!-- 底部三點 --\u003e\n  \u003cdiv class=\"dots\" id=\"dotsContainer\"\u003e\n    \u003cspan class=\"dot active\" data-index=\"0\"\u003e\u003c\/span\u003e\n    \u003cspan class=\"dot\" data-index=\"1\"\u003e\u003c\/span\u003e\n    \u003cspan class=\"dot\" data-index=\"2\"\u003e\u003c\/span\u003e\n  \u003c\/div\u003e\n\u003c\/div\u003e\n\n\u003cscript\u003e\n  (function() {\n    const container = document.getElementById('carousel');\n    const wrapper = document.getElementById('carouselWrapper');\n    const images = wrapper.querySelectorAll('img');\n    const dots = document.querySelectorAll('.dot');\n    const prevBtn = document.getElementById('prevBtn');\n    const nextBtn = document.getElementById('nextBtn');\n\n    let currentIndex = 0;\n    const total = images.length;\n    let startX = 0;\n    let isDragging = false;\n    let currentTranslate = 0;\n    let startTransform = 0;\n\n    \/\/ 更新輪播位置與點狀態\n    function updateCarousel() {\n      const width = container.clientWidth;\n      const newTranslate = -currentIndex * width;\n      wrapper.style.transform = `translateX(${newTranslate}px)`;\n      currentTranslate = newTranslate;\n      dots.forEach((dot, i) =\u003e {\n        dot.classList.toggle('active', i === currentIndex);\n      });\n    }\n\n    \/\/ 下一張\n    function nextSlide() {\n      currentIndex = (currentIndex + 1) % total;\n      updateCarousel();\n    }\n\n    \/\/ 上一張\n    function prevSlide() {\n      currentIndex = (currentIndex - 1 + total) % total;\n      updateCarousel();\n    }\n\n    \/\/ 跳至指定張\n    function goToSlide(index) {\n      if (index \u003e= 0 \u0026\u0026 index \u003c total) {\n        currentIndex = index;\n        updateCarousel();\n      }\n    }\n\n    \/\/ ---- 事件綁定（使用 addEventListener） ----\n    prevBtn.addEventListener('click', prevSlide);\n    nextBtn.addEventListener('click', nextSlide);\n\n    dots.forEach((dot) =\u003e {\n      dot.addEventListener('click', function() {\n        const index = parseInt(this.getAttribute('data-index'));\n        goToSlide(index);\n      });\n    });\n\n    \/\/ ---- 滑鼠／觸控拖曳 ----\n    function onDragStart(e) {\n      isDragging = true;\n      startX = e.type === 'mousedown' ? e.pageX : e.touches[0].clientX;\n      startTransform = currentTranslate;\n      wrapper.style.transition = 'none';\n      wrapper.style.cursor = 'grabbing';\n    }\n\n    function onDragMove(e) {\n      if (!isDragging) return;\n      const x = e.type === 'mousemove' ? e.pageX : e.touches[0].clientX;\n      const delta = x - startX;\n      wrapper.style.transform = `translateX(${startTransform + delta}px)`;\n    }\n\n    function onDragEnd() {\n      if (!isDragging) return;\n      isDragging = false;\n      wrapper.style.transition = 'transform 0.3s ease';\n      wrapper.style.cursor = 'grab';\n\n      const width = container.clientWidth;\n      const movedBy = currentTranslate - startTransform;\n      const threshold = width * 0.2;\n\n      if (Math.abs(movedBy) \u003e threshold) {\n        if (movedBy \u003e 0 \u0026\u0026 currentIndex \u003e 0) {\n          currentIndex--;\n        } else if (movedBy \u003c 0 \u0026\u0026 currentIndex \u003c total - 1) {\n          currentIndex++;\n        }\n      }\n      updateCarousel();\n    }\n\n    wrapper.addEventListener('mousedown', onDragStart);\n    window.addEventListener('mousemove', onDragMove);\n    window.addEventListener('mouseup', onDragEnd);\n    wrapper.addEventListener('touchstart', onDragStart);\n    window.addEventListener('touchmove', onDragMove);\n    window.addEventListener('touchend', onDragEnd);\n    wrapper.addEventListener('dragstart', (e) =\u003e e.preventDefault());\n\n    \/\/ 視窗改變時重新計算\n    window.addEventListener('resize', updateCarousel);\n\n    \/\/ 初始化\n    updateCarousel();\n  })();\n\u003c\/script\u003e","brand":"xiglow","offers":[{"title":"Default Title","offer_id":52254758830378,"sku":null,"price":18999.0,"currency_code":"JPY","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0972\/9543\/4026\/files\/1_4a9fd19b-3183-4cfc-a6c4-2fadd256a1af.jpg?v=1786591369","url":"https:\/\/xiglow.com\/products\/ceiling-fan-lights-msl-fl-8018-black","provider":"xiglow","version":"1.0","type":"link"}