{
  "version": 3,
  "sources": ["/cdn/shop/t/9/assets/snapfit-quick-view.js?cv=4"],
  "sourcesContent": ["class SnapFitQuickView extends HTMLElement {\r\n  constructor() {\r\n    super();\r\n    this.isOpen = false;\r\n    this.currentProduct = null;\r\n    this.init();\r\n  }\r\n\r\n  init() {\r\n    this.createModal();\r\n    this.bindEvents();\r\n  }\r\n\r\n  createModal() {\r\n    this.innerHTML = `\r\n      <div class=\"snapfit-quick-view-overlay\" style=\"display: none;\">\r\n        <div class=\"snapfit-quick-view-modal\">\r\n          <!-- Header -->\r\n          <div class=\"snapfit-quick-view-header\">\r\n            <div class=\"snapfit-quick-view-tags\">\r\n              <span class=\"snapfit-tag snapfit-tag--new\">NEW</span>\r\n              <span class=\"snapfit-tag snapfit-tag--sale\">SALE</span>\r\n            </div>\r\n            <div class=\"snapfit-quick-view-actions\">\r\n              <button class=\"snapfit-favorite-btn\" aria-label=\"Add to favorites\">\r\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n                  <path d=\"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\" fill=\"currentColor\"/>\r\n                </svg>\r\n              </button>\r\n              <button class=\"snapfit-close-btn\" aria-label=\"Close quick view\">\r\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n                  <path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" fill=\"currentColor\"/>\r\n                </svg>\r\n              </button>\r\n            </div>\r\n          </div>\r\n\r\n          <!-- Content -->\r\n          <div class=\"snapfit-quick-view-content\">\r\n            <!-- Image Section -->\r\n            <div class=\"snapfit-quick-view-image-section\">\r\n              <div class=\"snapfit-quick-view-main-image\">\r\n                <img id=\"quick-view-main-image\" src=\"\" alt=\"\" width=\"400\" height=\"500\">\r\n              </div>\r\n              <div class=\"snapfit-quick-view-thumbnails\">\r\n                <button class=\"snapfit-thumbnail active\" data-image-index=\"0\">\r\n                  <img src=\"\" alt=\"\" width=\"60\" height=\"75\">\r\n                </button>\r\n                <button class=\"snapfit-thumbnail\" data-image-index=\"1\">\r\n                  <img src=\"\" alt=\"\" width=\"60\" height=\"75\">\r\n                </button>\r\n                <button class=\"snapfit-thumbnail\" data-image-index=\"2\">\r\n                  <img src=\"\" alt=\"\" width=\"60\" height=\"75\">\r\n                </button>\r\n              </div>\r\n            </div>\r\n\r\n            <!-- Product Details -->\r\n            <div class=\"snapfit-quick-view-details\">\r\n              <h2 class=\"snapfit-product-title\"></h2>\r\n              <div class=\"snapfit-product-price\">\r\n                <span class=\"snapfit-current-price\"></span>\r\n                <span class=\"snapfit-compare-price\"></span>\r\n              </div>\r\n              \r\n              <!-- Color Selection -->\r\n              <div class=\"snapfit-color-selection\" style=\"display: none;\">\r\n                <label>Color:</label>\r\n                <div class=\"snapfit-color-swatches\">\r\n                  <!-- Color swatches will be dynamically generated -->\r\n                </div>\r\n              </div>\r\n\r\n              <!-- Size Selection -->\r\n              <div class=\"snapfit-size-selection\" style=\"display: none;\">\r\n                <label>Size:</label>\r\n                <div class=\"snapfit-size-options\">\r\n                  <!-- Size options will be dynamically generated -->\r\n                </div>\r\n              </div>\r\n\r\n              <!-- Inline size assistance (shown below size selector) -->\r\n              <button type=\"button\" class=\"snapfit-whats-my-size-btn\" style=\"display: none;\">\r\n                <span class=\"icon\" aria-hidden=\"true\">\r\n                  <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\r\n                    <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"#2FA66A\"/>\r\n                    <g transform=\"rotate(-45 12 12)\">\r\n                      <rect x=\"7\" y=\"10\" width=\"10\" height=\"4\" rx=\"1\" fill=\"#ffffff\"/>\r\n                      <rect x=\"9\" y=\"10\" width=\"1\" height=\"4\" fill=\"#2FA66A\"/>\r\n                      <rect x=\"11\" y=\"10\" width=\"1\" height=\"4\" fill=\"#2FA66A\"/>\r\n                      <rect x=\"13\" y=\"10\" width=\"1\" height=\"4\" fill=\"#2FA66A\"/>\r\n                      <rect x=\"15\" y=\"10\" width=\"1\" height=\"4\" fill=\"#2FA66A\"/>\r\n                    </g>\r\n                  </svg>\r\n                </span>\r\n                <span>What's My Size?</span>\r\n              </button>\r\n\r\n              <!-- Quantity -->\r\n              <div class=\"snapfit-quantity-section\">\r\n                <label>Quantity:</label>\r\n                <div class=\"snapfit-quantity-controls\">\r\n                  <button class=\"snapfit-quantity-btn\" data-action=\"decrease\">-</button>\r\n                  <input type=\"number\" class=\"snapfit-quantity-input\" value=\"1\" min=\"1\" max=\"99\">\r\n                  <button class=\"snapfit-quantity-btn\" data-action=\"increase\">+</button>\r\n                </div>\r\n              </div>\r\n\r\n                             <!-- Action Buttons -->\r\n               <div class=\"snapfit-action-buttons\">\r\n                 <button class=\"snapfit-add-to-cart-btn\">Add to Cart</button>\r\n               </div>\r\n\r\n              <!-- Product Description -->\r\n              <div class=\"snapfit-product-description\" aria-live=\"polite\" role=\"status\">\r\n                <!-- Dynamic content will be loaded here -->\r\n              </div>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    `;\r\n\r\n    // Add styles\r\n    const style = document.createElement('style');\r\n    style.textContent = `\r\n      .snapfit-quick-view-overlay {\r\n        position: fixed;\r\n        top: 0;\r\n        left: 0;\r\n        width: 100%;\r\n        height: 100%;\r\n        background: rgba(0, 0, 0, 0.5);\r\n        z-index: 10002;\r\n        display: flex;\r\n        align-items: center;\r\n        justify-content: center;\r\n        opacity: 0;\r\n        transition: opacity 0.3s ease;\r\n      }\r\n\r\n      .snapfit-quick-view-overlay.show {\r\n        opacity: 1;\r\n      }\r\n\r\n      .snapfit-quick-view-modal {\r\n        background: white;\r\n        border-radius: 12px;\r\n        max-width: 900px;\r\n        width: 90%;\r\n        max-height: 90vh;\r\n        overflow-y: auto;\r\n        position: relative;\r\n        transform: scale(0.9);\r\n        transition: transform 0.3s ease;\r\n      }\r\n\r\n      .snapfit-quick-view-overlay.show .snapfit-quick-view-modal {\r\n        transform: scale(1);\r\n      }\r\n\r\n      .snapfit-quick-view-header {\r\n        display: flex;\r\n        justify-content: space-between;\r\n        align-items: center;\r\n        padding: 20px 24px;\r\n        border-bottom: 1px solid #e5eaf2;\r\n      }\r\n\r\n      .snapfit-quick-view-tags {\r\n        display: flex;\r\n        gap: 8px;\r\n      }\r\n\r\n      .snapfit-tag {\r\n        padding: 4px 8px;\r\n        border-radius: 4px;\r\n        font-size: 12px;\r\n        font-weight: 600;\r\n        text-transform: uppercase;\r\n      }\r\n\r\n      .snapfit-tag--new {\r\n        background: #7AC943;\r\n        color: white;\r\n      }\r\n\r\n      .snapfit-tag--sale {\r\n        background: #FF6B6B;\r\n        color: white;\r\n      }\r\n\r\n      .snapfit-quick-view-actions {\r\n        display: flex;\r\n        gap: 12px;\r\n      }\r\n\r\n      .snapfit-favorite-btn,\r\n      .snapfit-close-btn {\r\n        background: none;\r\n        border: none;\r\n        cursor: pointer;\r\n        padding: 8px;\r\n        border-radius: 6px;\r\n        color: #666;\r\n        transition: all 0.2s ease;\r\n      }\r\n\r\n      /* Hide favorite button per requirements */\r\n      .snapfit-favorite-btn { display: none !important; }\r\n\r\n      .snapfit-favorite-btn:hover,\r\n      .snapfit-close-btn:hover {\r\n        background: #f5f5f5;\r\n        color: #333;\r\n      }\r\n\r\n      .snapfit-quick-view-content {\r\n        display: grid;\r\n        grid-template-columns: 1fr 1fr;\r\n        gap: 32px;\r\n        padding: 24px;\r\n      }\r\n\r\n      .snapfit-quick-view-image-section {\r\n        display: flex;\r\n        flex-direction: column;\r\n        gap: 16px;\r\n      }\r\n\r\n      .snapfit-quick-view-main-image {\r\n        border-radius: 8px;\r\n        overflow: hidden;\r\n        background: #ffffff;\r\n        width: 100%;\r\n        /* Lock visual area to consistent ratio to prevent layout shift */\r\n        aspect-ratio: 4 / 5;\r\n        min-height: 360px;\r\n        display: block;\r\n      }\r\n\r\n      .snapfit-quick-view-main-image img {\r\n        width: 100%;\r\n        height: 100%;\r\n        object-fit: contain;\r\n        display: block;\r\n      }\r\n\r\n      .snapfit-quick-view-thumbnails {\r\n        display: flex;\r\n        gap: 8px;\r\n      }\r\n\r\n      .snapfit-thumbnail {\r\n        width: 60px;\r\n        height: 75px;\r\n        border: 2px solid transparent;\r\n        border-radius: 6px;\r\n        overflow: hidden;\r\n        cursor: pointer;\r\n        background: none;\r\n        padding: 0;\r\n        transition: border-color 0.2s ease;\r\n      }\r\n\r\n      .snapfit-thumbnail.active {\r\n        border-color: #004AAD;\r\n      }\r\n\r\n      .snapfit-thumbnail img {\r\n        width: 100%;\r\n        height: 100%;\r\n        object-fit: cover;\r\n      }\r\n\r\n      .snapfit-quick-view-details {\r\n        display: flex;\r\n        flex-direction: column;\r\n        gap: 20px;\r\n      }\r\n\r\n      .snapfit-product-title {\r\n        font-family: 'Roboto', sans-serif;\r\n        font-size: 24px;\r\n        font-weight: bold;\r\n        color: #333;\r\n        margin: 0;\r\n      }\r\n\r\n      .snapfit-product-price {\r\n        display: flex;\r\n        gap: 12px;\r\n        align-items: center;\r\n      }\r\n\r\n      .snapfit-current-price {\r\n        font-size: 20px;\r\n        font-weight: bold;\r\n        color: #004AAD;\r\n      }\r\n\r\n      .snapfit-compare-price {\r\n        font-size: 16px;\r\n        color: #999;\r\n        text-decoration: line-through;\r\n      }\r\n\r\n      .snapfit-color-selection,\r\n      .snapfit-size-selection,\r\n      .snapfit-quantity-section {\r\n        display: flex;\r\n        flex-direction: column;\r\n        gap: 8px;\r\n      }\r\n\r\n      .snapfit-color-selection label,\r\n      .snapfit-size-selection label,\r\n      .snapfit-quantity-section label {\r\n        font-weight: 600;\r\n        color: #333;\r\n        font-size: 14px;\r\n      }\r\n\r\n      .snapfit-color-swatches {\r\n        display: flex;\r\n        gap: 8px;\r\n      }\r\n\r\n      .snapfit-color-swatch {\r\n        width: 40px;\r\n        height: 40px;\r\n        border: 1px solid #ddd;\r\n        border-radius: 50%;\r\n        cursor: pointer;\r\n        transition: all 0.2s ease;\r\n        position: relative;\r\n      }\r\n\r\n      .snapfit-color-swatch.active {\r\n        border: 1px solid #ddd;\r\n      }\r\n\r\n      .snapfit-color-swatch.active::before {\r\n        content: '';\r\n        position: absolute;\r\n        top: -4px;\r\n        left: -4px;\r\n        right: -4px;\r\n        bottom: -4px;\r\n        border: 2px solid #7474748a;\r\n        border-radius: 50%;\r\n        pointer-events: none;\r\n      }\r\n\r\n      .snapfit-size-options {\r\n        display: flex;\r\n        gap: 8px;\r\n        flex-wrap: wrap;\r\n      }\r\n\r\n      .snapfit-size-option {\r\n        padding: 8px 16px;\r\n        border: 1px solid #e5eaf2;\r\n        border-radius: 6px;\r\n        background: white;\r\n        cursor: pointer;\r\n        transition: all 0.2s ease;\r\n        font-size: 14px;\r\n      }\r\n\r\n      .snapfit-size-option:hover {\r\n        border-color: #004AAD;\r\n      }\r\n\r\n      .snapfit-size-option.active {\r\n        background: #004AAD;\r\n        color: white;\r\n        border-color: #004AAD;\r\n      }\r\n\r\n      .snapfit-quantity-controls {\r\n        display: flex;\r\n        align-items: center;\r\n        gap: 8px;\r\n      }\r\n\r\n      .snapfit-quantity-btn {\r\n        width: 36px;\r\n        height: 36px;\r\n        border: 1px solid #e5eaf2;\r\n        background: white;\r\n        border-radius: 6px;\r\n        cursor: pointer;\r\n        font-size: 18px;\r\n        transition: all 0.2s ease;\r\n      }\r\n\r\n      .snapfit-quantity-btn:hover {\r\n        background: #f5f5f5;\r\n      }\r\n\r\n      .snapfit-quantity-input {\r\n        width: 60px;\r\n        height: 36px;\r\n        border: 1px solid #e5eaf2;\r\n        border-radius: 6px;\r\n        text-align: center;\r\n        font-size: 14px;\r\n      }\r\n\r\n      .snapfit-action-buttons {\r\n        display: flex;\r\n        flex-direction: column;\r\n        gap: 12px;\r\n      }\r\n\r\n      .snapfit-add-to-cart-btn {\r\n        background: #004AAD;\r\n        color: white;\r\n        border: none;\r\n        padding: 16px 24px;\r\n        border-radius: 30px;\r\n        font-size: 16px;\r\n        font-weight: 600;\r\n        cursor: pointer;\r\n        transition: background-color 0.2s ease;\r\n      }\r\n\r\n      .snapfit-add-to-cart-btn:hover {\r\n        background: #003d8f;\r\n      }\r\n\r\n      .snapfit-whats-my-size-btn {\r\n        background: transparent;\r\n        color: #0B5D3B; /* green like the recommendation */\r\n        border: none;\r\n        padding: 6px 0 0 0;\r\n        font-size: 14px;\r\n        font-weight: 600;\r\n        cursor: pointer;\r\n        text-align: left;\r\n        align-self: flex-start;\r\n        display: inline-flex;\r\n        align-items: center;\r\n        gap: 8px;\r\n      }\r\n\r\n      .snapfit-product-description {\r\n        color: #666;\r\n        font-size: 14px;\r\n        line-height: 1.6;\r\n      }\r\n\r\n      /* Loading state for description */\r\n      .description-loading {\r\n        display: flex;\r\n        flex-direction: column;\r\n        align-items: center;\r\n        gap: 12px;\r\n        padding: 20px;\r\n        background: #f8f9fa;\r\n        border-radius: 6px;\r\n        min-height: 80px;\r\n        justify-content: center;\r\n      }\r\n\r\n      .loading-spinner {\r\n        width: 24px;\r\n        height: 24px;\r\n        border: 2px solid #e5e7eb;\r\n        border-top: 2px solid #004AAD;\r\n        border-radius: 50%;\r\n        animation: spin 1s linear infinite;\r\n      }\r\n\r\n      @keyframes spin {\r\n        0% { transform: rotate(0deg); }\r\n        100% { transform: rotate(360deg); }\r\n      }\r\n\r\n      .description-error {\r\n        color: #dc2626;\r\n        font-size: 14px;\r\n        padding: 12px;\r\n        background: #fef2f2;\r\n        border: 1px solid #fecaca;\r\n        border-radius: 6px;\r\n        text-align: center;\r\n      }\r\n\r\n      @media (max-width: 768px) {\r\n        .snapfit-quick-view-content {\r\n          grid-template-columns: 1fr;\r\n          gap: 20px;\r\n          padding: 16px;\r\n        }\r\n\r\n        .snapfit-quick-view-header {\r\n          padding: 16px;\r\n        }\r\n\r\n        .snapfit-quick-view-modal {\r\n          width: 95%;\r\n          max-height: 95vh;\r\n        }\r\n\r\n        .snapfit-quick-view-thumbnails {\r\n          justify-content: center;\r\n        }\r\n\r\n        .snapfit-size-options {\r\n          justify-content: center;\r\n        }\r\n      }\r\n    `;\r\n    document.head.appendChild(style);\r\n  }\r\n\r\n  bindEvents() {\r\n    // Close button\r\n    this.querySelector('.snapfit-close-btn').addEventListener('click', () => {\r\n      this.close();\r\n    });\r\n\r\n    // Overlay click to close\r\n    this.querySelector('.snapfit-quick-view-overlay').addEventListener('click', (e) => {\r\n      if (e.target.classList.contains('snapfit-quick-view-overlay')) {\r\n        this.close();\r\n      }\r\n    });\r\n\r\n    // Escape key to close\r\n    document.addEventListener('keydown', (e) => {\r\n      if (e.key === 'Escape' && this.isOpen) {\r\n        this.close();\r\n      }\r\n    });\r\n\r\n    // Add to cart\r\n    this.querySelector('.snapfit-add-to-cart-btn').addEventListener('click', () => {\r\n      this.addToCart();\r\n    });\r\n\r\n    // What's My Size button (inline under size)\r\n    const whatsBtn = this.querySelector('.snapfit-whats-my-size-btn');\r\n    if (whatsBtn) {\r\n      whatsBtn.addEventListener('click', (e) => {\r\n        e.preventDefault();\r\n        this.openSizeWidget();\r\n      });\r\n    }\r\n\r\n\r\n\r\n    // Favorite button\r\n    this.querySelector('.snapfit-favorite-btn').addEventListener('click', () => {\r\n      this.toggleFavorite();\r\n    });\r\n\r\n    // Listen for child selection changes to update \"What's My Size?\" button\r\n    document.addEventListener('childSelected', () => {\r\n      if (this.isOpen) {\r\n        this.updateWhatsMySizeButton();\r\n      }\r\n    });\r\n\r\n    document.addEventListener('childDeselected', () => {\r\n      if (this.isOpen) {\r\n        this.updateWhatsMySizeButton();\r\n      }\r\n    });\r\n  }\r\n\r\n  open(productData) {\r\n    console.log('\uD83C\uDFAF QUICK-VIEW VERSION: 1.003 - Description Loading Fix - ' + new Date().toISOString());\r\n\r\n    this.currentProduct = productData;\r\n    this.populateProductData(productData);\r\n\r\n    const overlay = this.querySelector('.snapfit-quick-view-overlay');\r\n    overlay.style.display = 'flex';\r\n\r\n    // Trigger animation\r\n    setTimeout(() => {\r\n      overlay.classList.add('show');\r\n    }, 10);\r\n\r\n    this.isOpen = true;\r\n    document.body.style.overflow = 'hidden';\r\n\r\n    // Load product description asynchronously\r\n    this.loadProductDescription(productData);\r\n  }\r\n\r\n  close() {\r\n    const overlay = this.querySelector('.snapfit-quick-view-overlay');\r\n    overlay.classList.remove('show');\r\n    \r\n    setTimeout(() => {\r\n      overlay.style.display = 'none';\r\n      this.isOpen = false;\r\n      document.body.style.overflow = '';\r\n    }, 300);\r\n  }\r\n\r\n  populateProductData(productData) {\r\n    this.currentProduct = productData;\r\n    \r\n    // Set product title\r\n    this.querySelector('.snapfit-product-title').textContent = productData.title || 'Product Title';\r\n    \r\n    // Set prices\r\n    const currentPrice = this.querySelector('.snapfit-current-price');\r\n    const comparePrice = this.querySelector('.snapfit-compare-price');\r\n    \r\n    currentPrice.textContent = productData.price || '$29.99';\r\n    if (productData.compare_at_price && productData.compare_at_price > productData.price) {\r\n      comparePrice.textContent = productData.compare_at_price;\r\n      comparePrice.style.display = 'inline';\r\n    } else {\r\n      comparePrice.style.display = 'none';\r\n    }\r\n    \r\n    // Set main image\r\n    const mainImage = this.querySelector('#quick-view-main-image');\r\n    if (productData.featured_image) {\r\n      mainImage.src = productData.featured_image;\r\n      mainImage.alt = productData.title || 'Product Image';\r\n    }\r\n    \r\n    // Set thumbnails (if multiple images)\r\n    if (productData.images && productData.images.length > 0) {\r\n      this.querySelectorAll('.snapfit-thumbnail').forEach((thumb, index) => {\r\n        if (productData.images[index]) {\r\n          thumb.querySelector('img').src = productData.images[index];\r\n          thumb.style.display = 'block';\r\n        } else {\r\n          thumb.style.display = 'none';\r\n        }\r\n      });\r\n    }\r\n    \r\n    // Generate variant options dynamically\r\n    this.generateVariantOptions(productData);\r\n    \r\n    // Check if child is selected and show/hide \"What's My Size?\" button\r\n    this.updateWhatsMySizeButton();\r\n\r\n    // NEW: Dynamic description handling\r\n    this.loadProductDescription(productData);\r\n  }\r\n\r\n  switchImage(imageIndex) {\r\n    // Update active thumbnail\r\n    this.querySelectorAll('.snapfit-thumbnail').forEach(thumb => {\r\n      thumb.classList.remove('active');\r\n    });\r\n    this.querySelector(`[data-image-index=\"${imageIndex}\"]`).classList.add('active');\r\n    \r\n    const mainImage = this.querySelector('#quick-view-main-image');\r\n    if (this.currentProduct.images && this.currentProduct.images[imageIndex]) {\r\n      mainImage.src = this.currentProduct.images[imageIndex];\r\n    }\r\n  }\r\n\r\n  generateVariantOptions(productData) {\r\n    // Generate color swatches if product has color options\r\n    if (productData.options && productData.options.length > 0) {\r\n      const colorOption = productData.options.find(opt => \r\n        opt.name.toLowerCase().includes('color') || \r\n        opt.name.toLowerCase().includes('colour')\r\n      );\r\n      \r\n      if (colorOption) {\r\n        this.generateColorSwatches(colorOption);\r\n        this.querySelector('.snapfit-color-selection').style.display = 'block';\r\n      }\r\n      \r\n      const sizeOption = productData.options.find(opt => \r\n        opt.name.toLowerCase().includes('size')\r\n      );\r\n      \r\n      if (sizeOption) {\r\n        this.generateSizeOptions(sizeOption);\r\n        this.querySelector('.snapfit-size-selection').style.display = 'block';\r\n      }\r\n    }\r\n    \r\n    // Add event listeners for dynamically generated elements\r\n    this.addDynamicEventListeners();\r\n  }\r\n  \r\n  addDynamicEventListeners() {\r\n    // Thumbnail clicks\r\n    this.querySelectorAll('.snapfit-thumbnail').forEach(thumb => {\r\n      thumb.addEventListener('click', () => {\r\n        this.switchImage(parseInt(thumb.dataset.imageIndex));\r\n      });\r\n    });\r\n    \r\n    // Quantity controls\r\n    this.querySelectorAll('.snapfit-quantity-btn').forEach(btn => {\r\n      btn.addEventListener('click', () => {\r\n        this.changeQuantity(btn.dataset.action);\r\n      });\r\n    });\r\n  }\r\n  \r\n  generateColorSwatches(colorOption) {\r\n    const swatchesContainer = this.querySelector('.snapfit-color-swatches');\r\n    swatchesContainer.innerHTML = '';\r\n    \r\n    colorOption.values.forEach((value, index) => {\r\n      const swatch = document.createElement('button');\r\n      swatch.className = 'snapfit-color-swatch';\r\n      swatch.dataset.color = value;\r\n      swatch.dataset.optionIndex = colorOption.position - 1;\r\n      swatch.dataset.valueIndex = index;\r\n      \r\n      // Try to get color from variant metafields or use a default color map\r\n      const colorValue = this.getColorValue(value);\r\n      swatch.style.backgroundColor = colorValue;\r\n      if (colorValue === '#ffffff') {\r\n        swatch.style.border = '1px solid #e5e7eb';\r\n      }\r\n      \r\n      swatch.addEventListener('click', () => this.selectColor(value));\r\n      \r\n      if (index === 0) {\r\n        swatch.classList.add('active');\r\n      }\r\n      \r\n      swatchesContainer.appendChild(swatch);\r\n    });\r\n  }\r\n  \r\n  generateSizeOptions(sizeOption) {\r\n    const sizeContainer = this.querySelector('.snapfit-size-options');\r\n    sizeContainer.innerHTML = '';\r\n    \r\n    // Get recommended size for current product and child\r\n    const recommendedSize = this.getRecommendedSizeForCurrentProduct();\r\n    \r\n    sizeOption.values.forEach((value, index) => {\r\n      const sizeBtn = document.createElement('button');\r\n      sizeBtn.className = 'snapfit-size-option';\r\n      sizeBtn.dataset.size = value;\r\n      sizeBtn.dataset.optionIndex = sizeOption.position - 1;\r\n      sizeBtn.dataset.valueIndex = index;\r\n      sizeBtn.textContent = value.toUpperCase();\r\n      \r\n      sizeBtn.addEventListener('click', () => this.selectSize(value));\r\n      \r\n      // Select recommended size if available, otherwise fall back to first size\r\n      if (recommendedSize && value === recommendedSize) {\r\n        sizeBtn.classList.add('active');\r\n      } else if (index === 0 && !recommendedSize) {\r\n        sizeBtn.classList.add('active');\r\n      }\r\n      \r\n      sizeContainer.appendChild(sizeBtn);\r\n    });\r\n  }\r\n  \r\n  getColorValue(colorName) {\r\n    // Map common color names to hex values\r\n    const colorMap = {\r\n      'navy': '#1e3a8a',\r\n      'blue': '#3b82f6',\r\n      'red': '#dc2626',\r\n      'white': '#ffffff',\r\n      'black': '#000000',\r\n      'gray': '#6b7280',\r\n      'grey': '#6b7280',\r\n      'green': '#10b981',\r\n      'yellow': '#f59e0b',\r\n      'orange': '#f97316',\r\n      'purple': '#8b5cf6',\r\n      'pink': '#ec4899',\r\n      'brown': '#a16207'\r\n    };\r\n    \r\n    return colorMap[colorName.toLowerCase()] || '#6b7280'; // Default gray\r\n  }\r\n\r\n  selectColor(color) {\r\n    this.querySelectorAll('.snapfit-color-swatch').forEach(swatch => {\r\n      swatch.classList.remove('active');\r\n    });\r\n    this.querySelector(`[data-color=\"${color}\"]`).classList.add('active');\r\n    \r\n    // Update product image based on selected color\r\n    this.updateVariantMedia();\r\n  }\r\n\r\n  selectSize(size) {\r\n    this.querySelectorAll('.snapfit-size-option').forEach(option => {\r\n      option.classList.remove('active');\r\n    });\r\n    this.querySelector(`[data-size=\"${size}\"]`).classList.add('active');\r\n    \r\n    // Update product image based on selected size\r\n    this.updateVariantMedia();\r\n  }\r\n  \r\n  updateVariantMedia() {\r\n    const selectedColor = this.querySelector('.snapfit-color-swatch.active')?.dataset.color;\r\n    const selectedSize = this.querySelector('.snapfit-size-option.active')?.dataset.size;\r\n    \r\n    if (!selectedColor && !selectedSize) return;\r\n    \r\n    // Find the matching variant using the same logic as addToCart\r\n    const matchingVariant = this.findSelectedVariant(selectedColor, selectedSize);\r\n    \r\n    if (matchingVariant) {\r\n      const mainImage = this.querySelector('#quick-view-main-image');\r\n      const variantSrc = matchingVariant?.featured_image?.src || matchingVariant?.image || matchingVariant?.image?.src;\r\n      if (variantSrc) {\r\n        mainImage.src = variantSrc;\r\n        mainImage.alt = `${this.currentProduct.title} - ${selectedColor || ''} ${selectedSize || ''}`.trim();\r\n      }\r\n    }\r\n  }\r\n\r\n  changeQuantity(action) {\r\n    const input = this.querySelector('.snapfit-quantity-input');\r\n    let value = parseInt(input.value) || 1;\r\n    \r\n    if (action === 'increase') {\r\n      value = Math.min(value + 1, 99);\r\n    } else if (action === 'decrease') {\r\n      value = Math.max(value - 1, 1);\r\n    }\r\n    \r\n    input.value = value;\r\n  }\r\n\r\n  addToCart() {\r\n    const quantity = parseInt(this.querySelector('.snapfit-quantity-input').value) || 1;\r\n    const selectedSize = this.querySelector('.snapfit-size-option.active')?.dataset.size;\r\n    const selectedColor = this.querySelector('.snapfit-color-swatch.active')?.dataset.color;\r\n    \r\n    \r\n    // Find the selected variant\r\n    const selectedVariant = this.findSelectedVariant(selectedColor, selectedSize);\r\n    \r\n    \r\n    if (!selectedVariant) {\r\n      alert('Please select all required options before adding to cart.');\r\n      return;\r\n    }\r\n    \r\n    // Add to cart using Shopify Cart API\r\n    this.addVariantToCart(selectedVariant.id, quantity);\r\n  }\r\n  \r\n  findSelectedVariant(selectedColor, selectedSize) {\r\n    if (!this.currentProduct || !this.currentProduct.variants) return null;\r\n    \r\n    const normalize = (v) => String(v ?? '').trim().toLowerCase();\r\n    const colorV = normalize(selectedColor);\r\n    const sizeV = normalize(selectedSize);\r\n\r\n    // Determine which option index represents size vs color, based on product options names\r\n    const optionMap = this.getOptionIndexMap();\r\n    const colorIdx = optionMap.colorIndex; // 1-based\r\n    const sizeIdx = optionMap.sizeIndex;   // 1-based\r\n\r\n    const byAll = this.currentProduct.variants.find(variant => {\r\n      const vColor = normalize(variant[`option${colorIdx}`]);\r\n      const vSize = normalize(variant[`option${sizeIdx}`]);\r\n      if (colorV && sizeV) return vColor === colorV && vSize === sizeV;\r\n      if (colorV) return vColor === colorV;\r\n      if (sizeV) return vSize === sizeV;\r\n      return false;\r\n    });\r\n\r\n    // Fallback: try swapped interpretation if option names are inconsistent\r\n    const bySwap = !byAll ? this.currentProduct.variants.find(variant => {\r\n      const v1 = normalize(variant.option1);\r\n      const v2 = normalize(variant.option2);\r\n      if (colorV && sizeV) return v1 === colorV && v2 === sizeV || v1 === sizeV && v2 === colorV;\r\n      if (colorV) return v1 === colorV || v2 === colorV;\r\n      if (sizeV) return v1 === sizeV || v2 === sizeV;\r\n      return false;\r\n    }) : null;\r\n\r\n    const foundVariant = byAll || bySwap || null;\r\n    return foundVariant;\r\n  }\r\n\r\n  // Map option names to indices (1-based) for color and size\r\n  getOptionIndexMap() {\r\n    const map = { colorIndex: 1, sizeIndex: 2 };\r\n    try {\r\n      const opts = Array.isArray(this.currentProduct?.options) ? this.currentProduct.options : [];\r\n      opts.forEach((opt, idx) => {\r\n        const name = String(opt?.name || '').toLowerCase();\r\n        if (name.includes('color') || name.includes('colour')) map.colorIndex = idx + 1;\r\n        if (name.includes('size')) map.sizeIndex = idx + 1;\r\n      });\r\n    } catch (_) {}\r\n    return map;\r\n  }\r\n  \r\n  async addVariantToCart(variantId, quantity) {\r\n    try {\r\n      \r\n      // Dispatch cart:request-start event for loading overlay\r\n      document.dispatchEvent(new CustomEvent('cart:request-start', {\r\n        detail: { \r\n          timestamp: Date.now(),\r\n          source: 'snapfit-quick-view',\r\n          operation: 'add-to-cart',\r\n          variantId: variantId\r\n        }\r\n      }));\r\n      \r\n      const response = await fetch('/cart/add.js', {\r\n        method: 'POST',\r\n        headers: {\r\n          'Content-Type': 'application/json',\r\n        },\r\n        body: JSON.stringify({\r\n          id: variantId,\r\n          quantity: quantity,\r\n          // Attach child context like the recommendations modal does\r\n          properties: (() => {\r\n            try {\r\n              const childName = window.collectionRecommendationsService?.currentChild?.name || window.stateService?.get?.('currentChild')?.name;\r\n              return childName ? { For: childName } : undefined;\r\n            } catch (_) {\r\n              return undefined;\r\n            }\r\n          })()\r\n        })\r\n      });\r\n      \r\n      \r\n      if (response.ok) {\r\n        const result = await response.json();\r\n        \r\n        // Show success message\r\n        this.showSuccessMessage(`Added ${quantity} item(s) to cart!`);\r\n        \r\n        // Close quick view\r\n        this.close();\r\n        \r\n        // Use PubSub system to refresh cart drawer (same as product page)\r\n        if (typeof publish === 'function' && typeof PUB_SUB_EVENTS !== 'undefined') {\r\n          publish(PUB_SUB_EVENTS.cartUpdate, {\r\n            source: 'snapfit-quick-view',\r\n            productVariantId: variantId,\r\n            cartData: result\r\n          });\r\n          \r\n          // Wait for cart drawer refresh and for the added variant to be present, then open it\r\n          this.waitForCartDrawerRefreshAndOpen(variantId);\r\n          \r\n        } else {\r\n          console.warn('\u26A0\uFE0F PubSub system not available, using manual refresh...');\r\n          this.refreshCartAndOpenDrawer();\r\n        }\r\n        \r\n      } else {\r\n        const errorText = await response.text();\r\n        console.error('\u274C Cart API error:', response.status, errorText);\r\n        throw new Error(`Failed to add to cart: ${response.status}`);\r\n      }\r\n    } catch (error) {\r\n      console.error('\u274C Error adding to cart:', error);\r\n      this.showErrorMessage('Failed to add item to cart. Please try again.');\r\n    } finally {\r\n      // Dispatch cart:request-complete event for loading overlay\r\n      document.dispatchEvent(new CustomEvent('cart:request-complete', {\r\n        detail: { \r\n          timestamp: Date.now(),\r\n          source: 'snapfit-quick-view',\r\n          operation: 'add-to-cart',\r\n          variantId: variantId\r\n        }\r\n      }));\r\n    }\r\n  }\r\n  \r\n  showSuccessMessage(message) {\r\n    // Create a temporary success message\r\n    const successDiv = document.createElement('div');\r\n    successDiv.style.cssText = `\r\n      position: fixed;\r\n      top: 20px;\r\n      right: 20px;\r\n      background: #10b981;\r\n      color: white;\r\n      padding: 12px 20px;\r\n      border-radius: 8px;\r\n      z-index: 10003;\r\n      font-weight: 600;\r\n    `;\r\n    successDiv.textContent = message;\r\n    \r\n    document.body.appendChild(successDiv);\r\n    \r\n    // Remove after 3 seconds\r\n    setTimeout(() => {\r\n      if (successDiv.parentNode) {\r\n        successDiv.parentNode.removeChild(successDiv);\r\n      }\r\n    }, 3000);\r\n  }\r\n  \r\n  showErrorMessage(message) {\r\n    // Create a temporary error message\r\n    const errorDiv = document.createElement('div');\r\n    errorDiv.style.cssText = `\r\n      position: fixed;\r\n      top: 20px;\r\n      right: 20px;\r\n      background: #dc2626;\r\n      color: white;\r\n      padding: 12px 20px;\r\n      border-radius: 8px;\r\n      z-index: 10003;\r\n      font-weight: 600;\r\n    `;\r\n    errorDiv.textContent = message;\r\n    \r\n    document.body.appendChild(errorDiv);\r\n    \r\n    // Remove after 3 seconds\r\n    setTimeout(() => {\r\n      if (errorDiv.parentNode) {\r\n        errorDiv.parentNode.removeChild(errorDiv);\r\n      }\r\n    }, 3000);\r\n  }\r\n\r\n  async waitForCartDrawerRefreshAndOpen(expectedVariantId) {\r\n    \r\n    return new Promise((resolve, reject) => {\r\n      let hasResolved = false;\r\n      \r\n      const timeout = setTimeout(() => {\r\n        if (hasResolved) return;\r\n        hasResolved = true;\r\n        \r\n        document.removeEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n        document.removeEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n        console.warn('\u23F0 Timeout: Cart drawer did not refresh within 10 seconds, opening anyway...');\r\n        this.openCartDrawer();\r\n        reject(new Error('Timeout: Cart drawer did not refresh within 10 seconds'));\r\n      }, 10000); // 10 second timeout\r\n      \r\n      const onCartDrawerRefreshed = (event) => {\r\n        if (hasResolved) return;\r\n        // Now wait until the specific variant row is present\r\n        this.waitUntilVariantPresentInDrawer(expectedVariantId, 5000)\r\n          .then(() => {\r\n            if (hasResolved) return;\r\n            hasResolved = true;\r\n            clearTimeout(timeout);\r\n            document.removeEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n            document.removeEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n            setTimeout(() => this.openCartDrawer(), 50);\r\n            resolve();\r\n          })\r\n          .catch(() => {\r\n            if (hasResolved) return;\r\n            hasResolved = true;\r\n            clearTimeout(timeout);\r\n            document.removeEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n            document.removeEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n            // Open anyway if we can't confirm\r\n            setTimeout(() => this.openCartDrawer(), 50);\r\n            resolve();\r\n          });\r\n      };\r\n      \r\n      const onCartItemsRefreshed = (event) => {\r\n        if (hasResolved) return;\r\n        this.waitUntilVariantPresentInDrawer(expectedVariantId, 5000)\r\n          .then(() => {\r\n            if (hasResolved) return;\r\n            hasResolved = true;\r\n            clearTimeout(timeout);\r\n            document.removeEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n            document.removeEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n            setTimeout(() => this.openCartDrawer(), 50);\r\n            resolve();\r\n          })\r\n          .catch(() => {\r\n            if (hasResolved) return;\r\n            hasResolved = true;\r\n            clearTimeout(timeout);\r\n            document.removeEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n            document.removeEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n            setTimeout(() => this.openCartDrawer(), 50);\r\n            resolve();\r\n          });\r\n      };\r\n      \r\n      // Listen for cart drawer refresh event\r\n      document.addEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n      \r\n      // Also listen for cart items refresh (in case user is on cart page)\r\n      document.addEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n      \r\n      // Also check if cart drawer is already refreshed (in case event fired before we started listening)\r\n      const cartDrawerItems = document.querySelector('cart-drawer-items');\r\n      if (cartDrawerItems && cartDrawerItems.hasAttribute('data-refreshed')) {\r\n        if (hasResolved) return;\r\n        this.waitUntilVariantPresentInDrawer(expectedVariantId, 2000)\r\n          .then(() => {\r\n            hasResolved = true;\r\n            clearTimeout(timeout);\r\n            document.removeEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n            document.removeEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n            setTimeout(() => this.openCartDrawer(), 50);\r\n            resolve();\r\n          })\r\n          .catch(() => {\r\n            hasResolved = true;\r\n            clearTimeout(timeout);\r\n            document.removeEventListener('cart-drawer:refreshed', onCartDrawerRefreshed);\r\n            document.removeEventListener('cart-items:refreshed', onCartItemsRefreshed);\r\n            setTimeout(() => this.openCartDrawer(), 50);\r\n            resolve();\r\n          });\r\n      }\r\n    });\r\n  }\r\n\r\n  waitUntilVariantPresentInDrawer(variantId, maxWaitMs = 3000) {\r\n    if (!variantId) return Promise.resolve();\r\n    const start = Date.now();\r\n    const poll = (resolve, reject) => {\r\n      const rows = document.querySelectorAll('cart-drawer-items [data-variant-id], cart-drawer-items input[data-quantity-variant-id]');\r\n      let found = false;\r\n      rows.forEach((el) => {\r\n        const idAttr = el.getAttribute('data-variant-id') || el.getAttribute('data-quantity-variant-id');\r\n        if (idAttr && String(idAttr) === String(variantId)) {\r\n          found = true;\r\n        }\r\n      });\r\n      if (found) {\r\n        return resolve();\r\n      }\r\n      if (Date.now() - start > maxWaitMs) {\r\n        return reject(new Error('variant not found in drawer in time'));\r\n      }\r\n      setTimeout(() => poll(resolve, reject), 50);\r\n    };\r\n    return new Promise(poll);\r\n  }\r\n\r\n  openCartDrawer() {\r\n    const cartDrawer = document.querySelector('cart-drawer');\r\n    if (cartDrawer) {\r\n      cartDrawer.open();\r\n    } else {\r\n      console.error('\u274C Cart drawer not found when trying to open');\r\n    }\r\n  }\r\n\r\n  async refreshCartAndOpenDrawer() {\r\n    try {\r\n      \r\n      // Find cart drawer\r\n      const cartDrawer = document.querySelector('cart-drawer');\r\n      if (!cartDrawer) {\r\n        console.error('\u274C Cart drawer not found');\r\n        return;\r\n      }\r\n      \r\n      // Use the proper cart refresh method - fetch cart drawer section\r\n      const drawerResponse = await fetch('/cart?section_id=cart-drawer');\r\n      if (!drawerResponse.ok) {\r\n        throw new Error('Failed to fetch cart drawer section');\r\n      }\r\n      \r\n      const drawerHtml = await drawerResponse.text();\r\n      \r\n      // Parse the HTML and update cart drawer items\r\n      const drawerParser = new DOMParser();\r\n      const drawerDoc = drawerParser.parseFromString(drawerHtml, 'text/html');\r\n      \r\n      // Update cart drawer items\r\n      const drawerItems = document.querySelector('cart-drawer-items');\r\n      const newDrawerItems = drawerDoc.querySelector('cart-drawer-items');\r\n      \r\n      \r\n      if (drawerItems && newDrawerItems) {\r\n        drawerItems.innerHTML = newDrawerItems.innerHTML;\r\n      } else {\r\n        console.warn('\u26A0\uFE0F Could not find cart drawer items elements');\r\n        \r\n        // Try alternative approach - update the entire cart drawer content\r\n        const currentDrawer = document.querySelector('#CartDrawer');\r\n        const newDrawer = drawerDoc.querySelector('#CartDrawer');\r\n        \r\n        if (currentDrawer && newDrawer) {\r\n          currentDrawer.innerHTML = newDrawer.innerHTML;\r\n        } else {\r\n          console.error('\u274C Could not find cart drawer elements for alternative update');\r\n        }\r\n      }\r\n      \r\n      // Wait a bit for rendering to complete, then open\r\n      setTimeout(() => {\r\n        cartDrawer.open();\r\n      }, 100);\r\n      \r\n    } catch (error) {\r\n      console.error('\u274C Error refreshing cart:', error);\r\n      // Fallback: try to open cart drawer anyway\r\n      const cartDrawer = document.querySelector('cart-drawer');\r\n      if (cartDrawer) {\r\n        cartDrawer.open();\r\n      }\r\n    }\r\n  }\r\n\r\n  updateWhatsMySizeButton() {\r\n    const whatsMySizeBtn = this.querySelector('.snapfit-whats-my-size-btn');\r\n    const childSelector = document.querySelector('child-selector');\r\n    \r\n    if (childSelector && childSelector.selectedChild) {\r\n      // Show inline helper \"For X we recommend Y\" instead of button\r\n      if (whatsMySizeBtn) whatsMySizeBtn.style.display = 'none';\r\n      this.updateRecommendedSizeDisplay();\r\n    } else {\r\n      // Show a small inline link under size to open widget\r\n      this.updateRecommendedSizeDisplay(null);\r\n      if (whatsMySizeBtn) {\r\n        whatsMySizeBtn.style.display = 'inline-flex';\r\n      }\r\n    }\r\n  }\r\n\r\n  openSizeWidget() {\r\n    // Close quick view first\r\n    this.close();\r\n    // Open kids-sizing-widget via global helper if available, else dispatch event\r\n    if (typeof window.showKidsSizingWidget === 'function') {\r\n      try {\r\n        window.showKidsSizingWidget();\r\n        return;\r\n      } catch (_) {}\r\n    }\r\n    // Fallback: ensure widget element exists and call its show()\r\n    let widget = document.querySelector('kids-sizing-widget');\r\n    if (!widget) {\r\n      widget = document.createElement('kids-sizing-widget');\r\n      document.body.appendChild(widget);\r\n    }\r\n    if (typeof widget.show === 'function') {\r\n      widget.show();\r\n    } else {\r\n      // Last resort: dispatch event for any listeners\r\n      const event = new CustomEvent('openSizeWidget');\r\n      document.dispatchEvent(event);\r\n      // Also try hash route used by the widget\r\n      try { window.location.hash = '#size-widget'; } catch (_) {}\r\n    }\r\n  }\r\n\r\n  toggleFavorite() {\r\n    const btn = this.querySelector('.snapfit-favorite-btn');\r\n    btn.classList.toggle('active');\r\n    \r\n    if (btn.classList.contains('active')) {\r\n      btn.style.color = '#FF6B6B';\r\n    } else {\r\n      btn.style.color = '#666';\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Compute recommended size for the current product based on\r\n   * the selected child and global size category mapping.\r\n   */\r\n  getRecommendedSizeForCurrentProduct() {\r\n    try {\r\n      const service = window.collectionRecommendationsService;\r\n      const productId = this.currentProduct?.id;\r\n      if (!service || !service.currentChild || !productId) return null;\r\n\r\n      // Determine the product size category from the global mapping\r\n      const map = window.sizeCategoriesByProduct || {};\r\n      const byId = map[String(productId)] || map[productId];\r\n      let sizeCategory = byId?.sizeCategory;\r\n      if (!sizeCategory && this.currentProduct?.title) {\r\n        const found = Object.values(map).find(p => p?.title === this.currentProduct.title);\r\n        if (found) sizeCategory = found.sizeCategory;\r\n      }\r\n      if (!sizeCategory) return null;\r\n\r\n      // Extract child's size recommendations (array of {category, size, ...})\r\n      const child = service.currentChild;\r\n      let details = null;\r\n      if (Array.isArray(child?.sizes)) {\r\n        details = child.sizes;\r\n      } else if (Array.isArray(child?.sizes?.details)) {\r\n        details = child.sizes.details;\r\n      }\r\n      if (!Array.isArray(details) || details.length === 0) return null;\r\n\r\n      const catLower = String(sizeCategory).toLowerCase();\r\n      const match = details.find(d => String(d?.category || '').toLowerCase() === catLower);\r\n      return match?.size || null;\r\n    } catch (_) {\r\n      return null;\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Render or clear the recommended size helper below the size selection.\r\n   * If explicitSize is null/undefined, it will be recomputed.\r\n   */\r\n  updateRecommendedSizeDisplay(explicitSize) {\r\n    // Ensure a container exists just below the size selection\r\n    let helper = this.querySelector('.snapfit-recommended-size');\r\n    const sizeSection = this.querySelector('.snapfit-size-selection');\r\n    if (!helper) {\r\n      helper = document.createElement('div');\r\n      helper.className = 'snapfit-recommended-size';\r\n      helper.style.cssText = 'margin-top: 4px; font-size: 13px; color: #0B5D3B; font-weight: 600;';\r\n      if (sizeSection && sizeSection.parentNode) {\r\n        sizeSection.parentNode.insertBefore(helper, sizeSection.nextSibling);\r\n      }\r\n    }\r\n\r\n    const service = window.collectionRecommendationsService;\r\n    const childName = service?.currentChild?.name;\r\n    const size = explicitSize === undefined ? this.getRecommendedSizeForCurrentProduct() : explicitSize;\r\n\r\n    if (childName && size) {\r\n      helper.textContent = `For ${childName} we recommend ${size}`;\r\n      helper.style.display = 'block';\r\n    } else {\r\n      helper.textContent = '';\r\n      helper.style.display = 'none';\r\n    }\r\n  }\r\n  // NEW: Dynamic description handling\r\n  async loadProductDescription(productData) {\r\n    const descriptionContainer = this.querySelector('.snapfit-product-description');\r\n    \r\n    // Show loading state\r\n    descriptionContainer.innerHTML = `\r\n      <div class=\"description-loading\" aria-busy=\"true\">\r\n        <div class=\"loading-spinner\"></div>\r\n        <p>Loading product details...</p>\r\n      </div>\r\n    `;\r\n    descriptionContainer.setAttribute('aria-busy', 'true');\r\n\r\n    try {\r\n      // Check if description already available in productData\r\n      if (productData.description && productData.description.trim()) {\r\n        this.updateDescriptionContent(productData.description);\r\n        return;\r\n      }\r\n\r\n      // Fetch from API using QuickViewService\r\n      if (window.__snapfitCore && window.__snapfitCore.quickViewService) {\r\n        const description = await window.__snapfitCore.quickViewService.loadProductDescription(productData.handle);\r\n        this.updateDescriptionContent(description);\r\n      } else {\r\n        throw new Error('QuickViewService not available');\r\n      }\r\n    } catch (error) {\r\n      console.error('[QuickView] Failed to load product description:', error);\r\n      this.showFallbackDescription();\r\n    } finally {\r\n      descriptionContainer.removeAttribute('aria-busy');\r\n    }\r\n  }\r\n\r\n  updateDescriptionContent(description) {\r\n    const descriptionContainer = this.querySelector('.snapfit-product-description');\r\n    descriptionContainer.innerHTML = `<p>${description || 'No description available.'}</p>`;\r\n    descriptionContainer.setAttribute('aria-live', 'polite');\r\n  }\r\n\r\n  showFallbackDescription() {\r\n    const descriptionContainer = this.querySelector('.snapfit-product-description');\r\n    descriptionContainer.innerHTML = `\r\n      <div class=\"description-error\">\r\n        <p>Unable to load description. High-quality school uniform designed for comfort and durability. Made from breathable fabric that's easy to care for and maintains its shape throughout the school day.</p>\r\n      </div>\r\n    `;\r\n  }\r\n\r\n  // Optional: Listen for EventBus events for more decoupled updates (if needed)\r\n  connectEventListeners() {\r\n    if (window.__snapfitCore && window.__snapfitCore.eventBus) {\r\n      const eventBus = window.__snapfitCore.eventBus;\r\n\r\n      eventBus.on('quickViewDescriptionLoaded', ({ description }) => {\r\n        if (this.isOpen) {\r\n          this.updateDescriptionContent(description);\r\n        }\r\n      });\r\n\r\n      eventBus.on('quickViewDescriptionError', () => {\r\n        if (this.isOpen) {\r\n          this.showFallbackDescription();\r\n        }\r\n      });\r\n    }\r\n  }\r\n}\r\n\r\n// Register the custom element\r\ncustomElements.define('snapfit-quick-view', SnapFitQuickView);\r\n\r\n// Global function to open quick view from anywhere\r\nwindow.openSnapFitQuickView = function(productData) {\r\n  let quickView = document.querySelector('snapfit-quick-view');\r\n  if (!quickView) {\r\n    quickView = document.createElement('snapfit-quick-view');\r\n    document.body.appendChild(quickView);\r\n    // Connect event listeners after creation\r\n    quickView.connectEventListeners();\r\n  }\r\n  quickView.open(productData);\r\n};\r\n"],
  "mappings": "AAAA,MAAM,yBAAyB,WAAY,CACzC,aAAc,CACZ,MAAM,EACN,KAAK,OAAS,GACd,KAAK,eAAiB,KACtB,KAAK,KAAK,CACZ,CAEA,MAAO,CACL,KAAK,YAAY,EACjB,KAAK,WAAW,CAClB,CAEA,aAAc,CACZ,KAAK,UAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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