{"product_id":"ovios-59-o-shape-modular-couch-plush-corduroy-fabric-no-assembly-required","title":"59\" O-Shape Modular Couch, Plush Corduroy Fabric, No Assembly Required","description":"\u003cstyle\u003e\n  @media only screen and (max-width: 600px) {\n      .image-container {\n          display: none;\n          \n      }\n\n      .mobile-image-container {\n          margin: 0;\n          padding: 0;\n          list-style-type: none;\n          margin-left: 0 !important;\n          padding: 0 !important;\n      }\n\n      .mobile-image-container li {\n          width: 100%;\n          margin-bottom: 20px;\n      }\n\n      .mobile-image-container img {\n          width: 100%;\n          height: auto;\n          margin: 0px;\n      }\n  }\n\n  @media only screen and (min-width: 601px) {\n      .mobile-image-container {\n          display: none;\n       \n      }\n  }\n#collapse .content ul {\nlist-style-type: none;\n}\n#collapse .item:first-of-type b,\n#collapse .item:first-of-type strong {\nletter-spacing: normal;\n}\n\u003c\/style\u003e\n\u003cdiv class=\"customDetailBox card__section\" id=\"collapse\"\u003e\n\u003cdiv class=\"topTitle\"\u003ePRODUCT OVERVIEW\u003c\/div\u003e\n\u003cdiv class=\"main\"\u003e\n\u003cdiv class=\"item active\"\u003e\n\u003cdiv class=\"itemTitle\"\u003eFEATURES\u003c\/div\u003e\n\u003cdiv class=\"content\"\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan style=\"color: #000000;\"\u003e\u003cstrong\u003e[ Boneless \u0026amp; Modern Design\u003c\/strong\u003e\u003cstrong\u003e ]\u003c\/strong\u003e The sleek and contemporary design of the sofa bed enhances the modern aesthetic of any room.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"color: #000000;\"\u003e\u003cstrong\u003e[ O Shape Shape\u003c\/strong\u003e\u003cstrong\u003e ]\u003c\/strong\u003e The unique O shape design adds a distinctive touch to your living space.\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"color: #000000;\"\u003e\u003cstrong\u003e[ Plush Corduroy Fabric\u003c\/strong\u003e\u003cstrong\u003e ]\u003c\/strong\u003e Indulge in our plush corduroy fabric, as soft as silk under your fingertips. This subtly opulent material balances softness and warmth, offering constant comfort. Its unique texture and soft sheen stand out, delivering gentle pampering, regardless of the season. Elevate your tactile experience with this extraordinary fabric\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"color: #000000;\"\u003e\u003cstrong\u003e[ No Assembly Required\u003c\/strong\u003e\u003cstrong\u003e ]\u003c\/strong\u003e Escape the typical furniture setup hassle with our modular cloud lounge. Simply unbox all parts and lightly tap each segment to boost its springiness and poof, bringing it back to its photogenic glory. Complete revival may take up to around 72 hours. Delight in the ease of a no-assembly nirvana!\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"color: #000000;\"\u003e\u003cstrong\u003e[ Flexible Sofa Set\u003c\/strong\u003e\u003cstrong\u003e ]\u003c\/strong\u003e Perfect for living spaces, apartment, bedrooms, guest quarters, and kiddo's play zones, our floor sofa wears many hats while enticing youngsters to romp on its cushy surface. Its modular blueprint allows breezy navigation through snug corridors and tight entrances, making sure every nook is put to use\u003c\/span\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"item active\"\u003e\n\u003cdiv class=\"itemTitle\"\u003eHIGHLIGHTS\u003c\/div\u003e\n\u003cdiv class=\"itemTitle\"\u003e\u003c\/div\u003e\n\u003cdiv class=\"content\"\u003e\n\u003cul class=\"mobile-image-container\"\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_9.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_10.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_11.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_12.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_13.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_14.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_15.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003cli\u003e\u003cimg class=\"tupian\" alt=\"Ovios O-Shaped Boneless Sofa\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0115\/5281\/7252\/files\/MIUA_16.jpg?v=1772959713\"\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cstyle\u003e\n@font-face {\n  font-family: 'arial'; \n  src: url('\/\/purpleleafshop.com\/cdn\/shop\/t\/172\/assets\/arial.ttf?v=96637986765718172581767866644') format('truetype');\n}\n.product_desciption_custom {\n  font-family: \"arial\" !important;\n}\n.customTabs {\n  li {\n    position: relative;\n    padding: 0 15px;\n  }\n  li::before {\n    content: \"\";\n    width: 1px;\n    height: 50%;\n    position: absolute;\n    left: 0;\n    top: 50%;\n    transform: translateY(-50%);\n    background: #000\n  }\n  li::after {\n    content: \"\";\n    width: 1px;\n    height: 50%;\n    position: absolute;\n    right: 0;\n    top: 50%;\n    transform: translateY(-50%);\n    background: #000\n  }\n}\n.customTop {\n  width: 127px!important;\n  flex-direction: column;\n  right: 10px;\n  bottom: 100px;\n  text-align: right;\n  display: block !important;\n  position: fixed;\n  z-index: 50;\n  cursor: pointer;\n}\n.customStickyBtn {\n  z-index: 50;\n  justify-content: space-evenly;\n  background: #fff;\n  \/* width: 127px!important;\n  flex-direction: column;\n  right: 10px;\n  bottom: 50px;\n  text-align: right;\n  display: block !important;\n  position: fixed;\n  z-index: 50; *\/\n\n}\n.customStickyBtn .customCart, .customStickyBtn .customBuy {\n    width: 35%;\n    \/* width: 127px;\n    height: 36px; *\/\n    color: #fff !important;\n    background-color: #7c189f !important;\n    padding: 0;\n    font-size: 14px;\n    border-radius: 5px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n\n}\n.customStickyBtn .customCart img, .customStickyBtn .customBuy img {\n  height: 25px;\n  width: fit-content;\n  margin-right: 5px;\n}\n\u003c\/style\u003e\n\u003cstyle\u003e\n.customDetailBox b,.customDetailBox strong {\n  letter-spacing: 1px;\n}\n#collapse {\n    width: 100%;\n    margin: 10px auto;\n    list-style-type: none;\n    color: #000;\n}\n\n.topTitle {\n    font-size: 20px;\n    font-weight: bold;\n    margin-bottom: 20px;\n    letter-spacing: 1px;\n}\n\n.item {\n    padding: 15px 0;\n    position: relative;\n}\n\n.item::after {\n    content: \"\";\n    height: 1px;\n    width: 100%;\n    background-color: #000;\n    position: absolute;\n    bottom: 0;\n    left: 50%;\n    transform: translateX(-50%);\n}\n\n.itemTitle {\n    font-weight: bold;\n    font-size: 16px;\n    position: relative;\n    display: flex;\n    align-items: center;\n    cursor: pointer;\n    letter-spacing: 1px;\n}\n\n.iconAngel {\n    width: auto!important;\n    margin: 0 0 0 5px !important;\n    transform: rotate(-90deg);\n    transition: all .3s;\n}\n\n.tableCustom {\n  width: max-content!important;\n  margin-right: 1px;\n  border-collapse: separate;\n}\n\n.tableCustom td, .tableCustom th {\n  padding: 20px 32px;\n  text-align: left;\n}\n\n.tableCustom tr {\n  border-top: none!important;\n}\n\n.productSizeImgBox {\n    display: flex;\n    overflow-x: scroll;\n}\n\n.productSizeImgBox img, .productSizeImgBox img {\n    box-shadow: 0 0 8px 0px #d5d5d5;\n}\n\n\n\n.content {\n    font-size: 15px;\n    margin-top: 8px;\n    height: 0;\n    overflow: hidden;\n    transition: all .3s;\n    will-change: height;\n}\n\n\n.content img {\n    width: 100%;\n  margin: 0 0 10px 0;\n}\n\n.item.active .iconAngel {\n    transform: rotate(0deg);\n}\n\n.item.active .content {\n    height: auto;\n}\n\n\n.contrast {\n    width: 100%;\n    padding-bottom: 30px;\n    overflow: hidden;\n}\n\n.contrast .title {\n    font-weight: bold;\n    font-size: 20px;\n    color: #000000;\n    margin-top: 53px;\n}\n\n.mainBox {\n    margin-top: 30px;\n    display: flex;\n    position: relative;\n    width: 100%;\n    overflow-x: scroll;\n}\n\n.leftBox {\n    display: flex;\n    position: sticky;\n    left: 0;\n    z-index: 4;\n}\n\n.itemBox .inBox {\n    width: 270px;\n    height: 345px;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    background-color: #fff;\n}\n\n.itemBox.border {\n    border: 1px solid #000;\n}\n\n.itemBox.center .bottomContent div {\n    justify-content: center;\n}\n\n.imgBox {\n    width: 215px;\n    height: 209px;\n    img {\n      margin: 0!important;\n    }\n}\n\n.pTitle {\n    margin-top: 40px;\n    font-weight: bold;\n    font-size: 14px;\n    color: #000000;\n}\n\n.pBtn {\n    width: 90px;\n    height: 31px;\n    margin-top: 3px;\n    background: #7B189F;\n    border-radius: 5px;\n    font-weight: 400;\n    font-size: 12px;\n    color: #FFFFFF!important;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    text-decoration: none!important;\n}\n\n.bottomContent div {\n    height: 52px;\n    background: #F0F0F0;\n    display: flex;\n    align-items: center;\n    padding: 0 20px;\n    \/* font-family: OpenSans; *\/\n    font-weight: 400;\n    font-size: 14px;\n    color: #000000;\n}\n\n.bottomContent div.deep {\n    background: #DADADA;\n}\n\n.rightBox {\n    display: flex;\n}\n\n@media screen and (max-width: 768px) {\n    .contrast {\n      padding: 0;\n    }\n    .leftBox {\n        width: 50%;\n        box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5);\n    }\n    .content .boxp{\n      text-align: justify;\n    }\n    .content p {\n      text-align: justify;\n    }\n    .productSizeImgBox .mobile-image-container {\n        display: flex;\n    }\n    .itemBox {\n        flex-shrink: 0;\n        width: 100%;\n    }\n    .itemBox .inBox {\n        width: 100%;\n        height: 210px;\n        background-color: transparent;\n    }\n    .leftBox .itemBox:nth-child(1) {\n        position: absolute;\n        background: transparent;\n        left: 0;\n        top: 0;\n    }\n    .leftBox .itemBox:nth-child(1) .bottomContent \u003e div {\n        background-color: transparent;\n        align-items: start;\n        font-weight: bold;\n        padding-top: 0px;\n        height: 43px;\n    }\n    .imgBox {\n        width: 100%;\n        height: 145px;\n    }\n    .imgBox img {\n      margin: 0 auto !important;\n      height: 100%;\n    }\n    .pBtn {\n      height: 25px;\n    }\n    .pTitle {\n        margin-top: initial;\n        padding: 0 5px;\n        text-align: center;\n        line-height: normal;\n    }\n    .bottomContent div {\n        height: 30px;\n        background: #F0F0F0;\n        padding: 13px 5px 4px 5px;\n        \/* font-family: OpenSans; *\/\n        font-weight: 400;\n        font-size: 12px;\n        color: #000000;\n        box-sizing: content-box !important;\n        line-height: normal;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        display: -webkit-box;\n        -webkit-line-clamp: 2;\n        -webkit-box-orient: vertical;\n        overflow-wrap: break-word;\n    }\n    .rightBox {\n        display: flex;\n        overflow: scroll;\n        width: 50%;\n    }\n}\n@media screen and (min-width: 768px) {\n    .productSizeImgBox .image-container {\n        display: flex;\n    }\n    .tableCustom td:first-child, .tableCustom th:first-child {\n        position: sticky;\n        left: 0px;\n        z-index: 2;\n        background-color: #FFFFFF;\n    }\n}\n\u003c\/style\u003e\n\u003cstyle\u003e\n@media only screen and (max-width: 600px) {\n    .image-container {\n        display: none;\n        \n    }\n\n    .mobile-image-container {\n        margin: 0;\n        padding: 0;\n        list-style-type: none;\n        margin-left: 0 !important;\n        padding: 0 !important;\n    }\n\n    .mobile-image-container li {\n        width: 100%;\n        margin-bottom: 20px;\n    }\n\n    .mobile-image-container img {\n        width: 100%;\n        height: auto;\n    }\n}\n\n@media only screen and (min-width: 601px) {\n    .mobile-image-container {\n        display: none;\n        \n    }\n}\n\u003c\/style\u003e\n\u003cstyle\u003e\n.swiperTitle {\n  font-size: 24px;\n  font-weight: bold;\n  text-align: center\n}\n.carousel-section {\n  width: 100%;\n  max-width: 1464px;\n  margin: 30px auto;\n  position: relative;\n}\n\n.carousel-container {\n  position: relative;\n  overflow: hidden;\n}\n\n.carousel-track {\n  display: flex;\n  transition: transform 0.5s ease-in-out;\n}\n\n.carousel-img {\n  min-width: 100%;\n  object-fit: cover;\n}\n\n\n.desktop-carousel .carousel-img {\n  max-height: 600px;\n}\n\n\n.mobile-carousel .mobile-img {\n  width: 100%;\n  height: auto;\n}\n\n.carousel-btn {\n  position: absolute;\n  top: 50%;\n  transform: translateY(-50%);\n  background-color: rgba(0, 0, 0, 0.4);\n  color: #fff;\n  border: none;\n  font-size: 2rem;\n  padding: 10px;\n  cursor: pointer;\n  z-index: 10;\n}\n\n.carousel-btn.left {\n  left: 10px;\n}\n\n.carousel-btn.right {\n  right: 10px;\n}\n\n.carousel-topbar {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  box-sizing: border-box;\n  background: rgba(0, 0, 0, 0.88);\n  z-index: 3;\n  padding: 8px 12px;\n}\n\n.carousel-topbar-inner {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 75px;\n  max-width: 100%;\n  overflow-y: hidden;\n  overflow-x: auto;\n  \n  -webkit-overflow-scrolling: touch;\n  overscroll-behavior-x: contain;\n  \n  scrollbar-width: none;\n  flex-wrap: nowrap;\n  \n  white-space: nowrap;\n \n  cursor: grab;\n  \n}\n\n.carousel-topbar-inner::-webkit-scrollbar {\n  display: none;\n}\n\n.carousel-topbar-inner.dragging {\n  cursor: grabbing;\n  user-select: none;\n}\n\n.carousel-tab {\n  flex: 0 0 auto;\n  \n  color: rgba(255, 255, 255, 0.78);\n  background: transparent;\n  border: none;\n  font-size: 18px;\n  line-height: 1.2;\n  padding: 12px 2px;\n  cursor: pointer;\n  position: relative;\n  white-space: nowrap;\n}\n\n.carousel-tab:focus {\n  outline: none;\n}\n\n.carousel-tab.active {\n  color: #fff;\n  font-weight: 600;\n}\n\n.carousel-tab.active::after {\n  content: \"\";\n  position: absolute;\n  left: 0;\n  right: 0;\n  bottom: 3px;\n  margin: 0 auto;\n  width: 80%;\n  height: 2px;\n  background: #fff;\n}\n\n.video video {\n  width: 100%;\n}\n\n\n@media only screen and (max-width: 600px) {\n  .desktop-carousel {\n    display: none;\n  }\n\n  .carousel-topbar-inner {\n    gap: 16px;\n  }\n\n  .carousel-tab {\n    font-size: 13px;\n  }\n  \n  .carousel-topbar-inner {\n    justify-content: flex-start;\n  }\n  .topbarCenter .carousel-topbar-inner {\n    justify-content: center;\n  }\n}\n\n@media only screen and (min-width: 601px) {\n  .mobile-carousel {\n    display: none;\n  }\n}\n\u003c\/style\u003e\n\u003cstyle\u003e\n   .tableCustom {\n  width: 100%;\n  border-collapse: collapse;  \n  border: 1px solid black;    \n  \n}\n\n\n.tableCustom td,\n.tableCustom th {\n  padding: 12px 15px;\n  text-align: left;\n  border-bottom: 1px solid #e0e0e0; \n  border-right: 1px solid #e0e0e0;   \n}\n\n\n.tableCustom td:last-child,\n.tableCustom th:last-child {\n  border-right: none;\n}\n\n\n.tableCustom tr:last-child td {\n  border-bottom: none;\n}\n\n\n.tableCustom th {\n  background-color: #f8f9fa;\n  font-weight: 600;\n  color: #333;\n}\n\n.footerTable {\n  text-align: left;\n  margin-bottom: 30px;\n}\n\n.footerTable .table-wrapper {\n  white-space: initial;\n}\n\n.footerTable .tableBox {\n  margin-top: 0;\n}\n\n.footerTable .a-text-bold {\n  font-weight: bold;\n}\n\n.footerTable .tableBigTitle {\n  font-size: 24px;\n  font-weight: bold;\n  margin: 20px 0;\n  text-align: center\n}\n\n.footerTable .tableBox {\n  border-bottom: 1px solid #d5d9d9;\n  width: 100%;\n}\n\n.footerTable th {\n  width: 30%;\n}\n\n.footerTable td, .footerTable th {\n  padding: 8px 16px 8px 0!important;\n  vertical-align: top;\n  border-top: 1px solid #d5d9d9;\n}\n\u003c\/style\u003e\n\u003cp\u003e\u003cscript\u003e\ndocument.getElementById('topBtn').addEventListener('click', scrollToTop);\nfunction scrollToTop() {\n  window.scrollTo({\n    top: 0,\n    behavior: 'smooth'\n  });\n}\n\u003c\/script\u003e \u003cscript\u003e\nconsole.log(123)\nlet item = document.querySelectorAll('.item');\nlet itemTitle = document.querySelectorAll('.itemTitle');\nfor (let i = 0; i \u003c item.length; i++) {\n    itemTitle[i].addEventListener('click', function() {\n        if (item[i].className.includes('active')) {\n            item[i].className = 'item';\n        } else {\n            item[i].className = 'item active';\n        }\n    })\n}\n\u003c\/script\u003e \u003cscript\u003e\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n  const containers = findCarouselContainers();\n  const instances = containers.map((el) =\u003e new Carousel(el));\n\n  instances.forEach((ins) =\u003e ins.init());\n\n  \n  window.addEventListener(\"resize\", function () {\n    instances.forEach((ins) =\u003e ins.rebind());\n  });\n});\n\n\nfunction findCarouselContainers() {\n  const explicit = Array.from(\n    document.querySelectorAll(\".carousel-container\")\n  );\n  if (explicit.length) return explicit;\n\n  const tracks = Array.from(\n    document.querySelectorAll(\".desktop-carousel, .mobile-carousel\")\n  );\n  const set = new Set();\n  tracks.forEach((t) =\u003e {\n    if (t.parentElement) set.add(t.parentElement);\n  });\n  return Array.from(set);\n}\n\nclass Carousel {\n  constructor(container) {\n    this.container = container;\n    this.leftBtn = container.querySelector(\".carousel-btn.left\");\n    this.rightBtn = container.querySelector(\".carousel-btn.right\");\n    this.desktopTrack = container.querySelector(\".desktop-carousel\");\n    this.mobileTrack = container.querySelector(\".mobile-carousel\");\n\n    this.currentSlide = 0;\n    this.currentTrack = null;\n    this.slides = [];\n    this.autoPlayInterval = null;\n\n    \n    this.topbarEl = null;\n    this.topbarInnerEl = null;\n    this.labels = [];\n  }\n\n  enableDragScroll() {\n    const el = this.topbarInnerEl;\n    if (!el) return;\n\n    let isDown = false;\n    let startX = 0;\n    let startScroll = 0;\n    let moved = false;\n\n    const getX = (e) =\u003e (e.touches ? e.touches[0].pageX : e.pageX);\n\n    const onDown = (e) =\u003e {\n      isDown = true;\n      moved = false;\n      el.classList.add(\"dragging\");\n      startX = getX(e);\n      startScroll = el.scrollLeft;\n    };\n\n    const onMove = (e) =\u003e {\n      if (!isDown) return;\n      const x = getX(e);\n      const dx = x - startX;\n      if (Math.abs(dx) \u003e 3) moved = true;\n      el.scrollLeft = startScroll - dx;\n    };\n\n    const onUp = () =\u003e {\n      isDown = false;\n      el.classList.remove(\"dragging\");\n      \n      setTimeout(() =\u003e {\n        moved = false;\n      }, 0);\n    };\n\n    el.addEventListener(\"mousedown\", onDown);\n    el.addEventListener(\"mousemove\", onMove);\n    el.addEventListener(\"mouseup\", onUp);\n    el.addEventListener(\"mouseleave\", onUp);\n    el.addEventListener(\"touchstart\", onDown, {\n      passive: true,\n    });\n    el.addEventListener(\"touchmove\", onMove, {\n      passive: true,\n    });\n    el.addEventListener(\"touchend\", onUp);\n\n    \n    this.preventClickWhenDrag = (btn) =\u003e {\n      btn.addEventListener(\n        \"click\",\n        (evt) =\u003e {\n          if (moved) evt.preventDefault();\n        },\n        true\n      );\n    };\n  }\n\n  getActiveTrack() {\n    const desktopVisible =\n      this.desktopTrack \u0026\u0026\n      window.getComputedStyle(this.desktopTrack).display !== \"none\";\n    return desktopVisible ? this.desktopTrack : this.mobileTrack;\n  }\n  \n\n  ensureTopbar() {\n    if (!this.currentTrack) return;\n\n    const isNewCustom = this.container.classList.contains(\"newCustom\");\n    if (!isNewCustom) return;\n\n    const parent = this.container;\n    \n    const pos = window.getComputedStyle(parent).position;\n    if (pos === \"static\") parent.style.position = \"relative\";\n\n    \n    this.topbarEl = parent.querySelector(\".carousel-topbar\");\n    \n    if (!this.topbarEl) {\n      this.topbarEl = document.createElement(\"div\");\n      this.topbarEl.className = \"carousel-topbar\";\n      this.topbarInnerEl = document.createElement(\"div\");\n      this.topbarInnerEl.className = \"carousel-topbar-inner\";\n      this.topbarEl.appendChild(this.topbarInnerEl);\n      parent.insertBefore(this.topbarEl, this.currentTrack);\n    } else {\n      this.topbarInnerEl = this.topbarEl.querySelector(\n        \".carousel-topbar-inner\"\n      );\n      this.topbarInnerEl.innerHTML = \"\";\n    }\n  }\n\n  parseContainerLabelsAttr() {\n    const raw = this.container.getAttribute(\"data-labels\");\n    if (!raw) return null;\n    try {\n      const json = JSON.parse(raw);\n      if (Array.isArray(json)) return json;\n    } catch (e) {\n      \n    }\n    return raw\n      .split(\"|\")\n      .map((s) =\u003e s.trim())\n      .filter(Boolean);\n  }\n\n  buildLabels() {\n    \n    const fromContainer = this.parseContainerLabelsAttr();\n    if (fromContainer \u0026\u0026 fromContainer.length) {\n      this.labels = fromContainer.slice();\n      return;\n    }\n    this.labels = Array.from(this.slides).map((img, i) =\u003e {\n      return img.dataset.label || img.alt || `第${i + 1}张`;\n    });\n  }\n\n  buildTabs() {\n    if (!this.topbarInnerEl) return;\n    this.topbarInnerEl.innerHTML = \"\";\n    this.labels.forEach((text, idx) =\u003e {\n      const btn = document.createElement(\"button\");\n      btn.type = \"button\";\n      btn.className =\n        \"carousel-tab\" + (idx === this.currentSlide ? \" active\" : \"\");\n      btn.textContent = text;\n      btn.setAttribute(\"data-index\", String(idx));\n      btn.addEventListener(\"click\", () =\u003e {\n        if (!this.slides.length) return;\n        this.currentSlide = idx;\n        this.update(true);\n        this.restartAutoPlay();\n      });\n     \n      if (typeof this.preventClickWhenDrag === \"function\") {\n        this.preventClickWhenDrag(btn);\n      }\n      this.topbarInnerEl.appendChild(btn);\n    });\n    this.enableDragScroll \u0026\u0026 this.enableDragScroll();\n    this.adjustParentPadding();\n    this.keepActiveTabVisible(\"auto\"); \n  }\n\n  keepActiveTabVisible(behavior = \"auto\") {\n    if (!this.topbarInnerEl) return;\n    const active = this.topbarInnerEl.querySelector(\".carousel-tab.active\");\n    if (!active) return;\n\n    const margin = 6; \n    \n    requestAnimationFrame(() =\u003e {\n      const elRect = this.topbarInnerEl.getBoundingClientRect();\n      const itemRect = active.getBoundingClientRect();\n\n      \n      const leftOverflow = itemRect.left - (elRect.left + margin);\n      const rightOverflow = itemRect.right - (elRect.right - margin);\n\n      let delta = 0;\n      if (leftOverflow \u003c 0) {\n        \n        delta = leftOverflow;\n      } else if (rightOverflow \u003e 0) {\n        \n        delta = rightOverflow;\n      }\n\n      \n      if (itemRect.width \u003e= elRect.width) {\n        delta = itemRect.left - elRect.left;\n      }\n\n      if (delta !== 0) {\n        this.topbarInnerEl.scrollBy({\n          left: delta,\n          behavior,\n        });\n      }\n    });\n  }\n\n  adjustParentPadding() {\n    if (!this.topbarEl) return;\n    const safeTop =\n      parseFloat(\n        getComputedStyle(document.documentElement).getPropertyValue(\n          \"env(safe-area-inset-top)\"\n        )\n      ) || 0;\n    this.container.style.paddingTop =\n      this.topbarEl.offsetHeight + safeTop + \"px\";\n  }\n\n  updateActiveTab() {\n    if (!this.topbarInnerEl) return;\n    const tabs = this.topbarInnerEl.querySelectorAll(\".carousel-tab\");\n    tabs.forEach((t, i) =\u003e {\n      if (i === this.currentSlide) t.classList.add(\"active\");\n      else t.classList.remove(\"active\");\n    });\n  }\n\n  update(fromUI = false) {\n    if (this.currentTrack) {\n      this.currentTrack.style.transform = `translateX(-${\n        this.currentSlide * 100\n      }%)`;\n    }\n    this.updateActiveTab();\n    this.adjustParentPadding();\n    \n    this.keepActiveTabVisible(fromUI ? \"smooth\" : \"auto\");\n  }\n\n  bindControls() {\n    if (this.leftBtn) {\n      this.leftBtn.addEventListener(\n        \"click\",\n        (this.onLeftClickBound = () =\u003e {\n          if (!this.currentTrack || !this.slides.length) return;\n          this.currentSlide =\n            (this.currentSlide - 1 + this.slides.length) %\n            this.slides.length;\n          this.update(true);\n          this.restartAutoPlay();\n        })\n      );\n    }\n    if (this.rightBtn) {\n      this.rightBtn.addEventListener(\n        \"click\",\n        (this.onRightClickBound = () =\u003e {\n          if (!this.currentTrack || !this.slides.length) return;\n          this.currentSlide = (this.currentSlide + 1) % this.slides.length;\n          this.update(true);\n          this.restartAutoPlay();\n        })\n      );\n    }\n  }\n\n  startAutoPlay() {\n    this.stopAutoPlay();\n    if(this.container.dataset.autoplay \u0026\u0026 this.container.dataset.autoplay === 'false') return\n    this.autoPlayInterval = setInterval(() =\u003e {\n      if (!this.currentTrack || this.slides.length === 0) return;\n      this.currentSlide = (this.currentSlide + 1) % this.slides.length;\n      this.update();\n    }, this.container.dataset.time || 5000);\n  }\n  stopAutoPlay() {\n    if (this.autoPlayInterval) {\n      clearInterval(this.autoPlayInterval);\n      this.autoPlayInterval = null;\n    }\n  }\n  restartAutoPlay() {\n    this.stopAutoPlay();\n    this.startAutoPlay();\n  }\n\n  init() {\n    this.currentTrack = this.getActiveTrack();\n    this.slides = this.currentTrack\n      ? this.currentTrack.querySelectorAll(\"img\")\n      : [];\n    this.currentSlide = 0;\n\n    this.ensureTopbar();\n    this.buildLabels();\n    this.buildTabs();\n    this.bindControls();\n    this.update();\n    this.startAutoPlay();\n  }\n\n  \n  rebind() {\n    this.currentTrack = this.getActiveTrack();\n    this.slides = this.currentTrack\n      ? this.currentTrack.querySelectorAll(\"img\")\n      : [];\n    this.currentSlide = Math.min(\n      this.currentSlide,\n      Math.max(this.slides.length - 1, 0)\n    );\n\n    this.ensureTopbar();\n    this.buildLabels();\n    this.buildTabs();\n    this.update();\n    this.restartAutoPlay();\n  }\n}\n\u003c\/script\u003e\u003c\/p\u003e","brand":"Ovios Furniture","offers":[{"title":"Grey \/ O-Shaped","offer_id":49541141659896,"sku":"MIUMIU910","price":35.0,"currency_code":"USD","in_stock":true},{"title":"Black \/ O-Shaped","offer_id":49541141692664,"sku":"MIUMIU430","price":35.0,"currency_code":"USD","in_stock":true},{"title":"Beige \/ O-Shaped","offer_id":49541141725432,"sku":"MIUMIU240","price":35.0,"currency_code":"USD","in_stock":true},{"title":"Pink \/ O-Shaped","offer_id":49541141758200,"sku":"MIUMIU750","price":35.0,"currency_code":"USD","in_stock":true},{"title":"Green \/ O-Shaped","offer_id":49541141790968,"sku":"MIUMIU670","price":35.0,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0832\/2721\/4072\/files\/MIUMIU_15.jpg?v=1782118649","url":"https:\/\/qrae4h-hx.myshopify.com\/products\/ovios-59-o-shape-modular-couch-plush-corduroy-fabric-no-assembly-required","provider":"Prime Home Lounges","version":"1.0","type":"link"}