@lime-bundles/widget 3.4.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/index.cjs +4763 -2363
- package/dist/index.d.cts +6 -15
- package/dist/index.d.ts +6 -15
- package/dist/index.js +4759 -2367
- package/dist/lime-bundle.global.js +1180 -454
- package/dist/lime-bundle.global.js.map +1 -1
- package/docs/css-variables.md +50 -70
- package/docs/hydrogen.md +1 -1
- package/docs/react-nextjs.md +4 -2
- package/docs/web-component.md +1 -1
- package/package.json +4 -3
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var LimeBundles=(()=>{var
|
|
1
|
+
"use strict";var LimeBundles=(()=>{var pt=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var gr=Object.prototype.hasOwnProperty;var xr=(e,t)=>{for(var n in t)pt(e,n,{get:t[n],enumerable:!0})},vr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fr(t))!gr.call(e,o)&&o!==n&&pt(e,o,{get:()=>t[o],enumerable:!(r=hr(t,o))||r.enumerable});return e};var yr=e=>vr(pt({},"__esModule",{value:!0}),e);var Vo={};xr(Vo,{LimeBundleElement:()=>Re,trackInputMode:()=>ut});var wr=Object.defineProperty,Wt=(e,t)=>{for(var n in t)wr(e,n,{get:t[n],enumerable:!0})},Bt=class extends Error{constructor(e){super(e.map(t=>t.message).join("; ")),this.errors=e,this.name="StorefrontApiError"}},_r="2025-10";async function Cr(e){if(e)return typeof e=="function"?await e():e}function jt(e){return!!(e.country||e.language||e.buyer)}function ht(e){let t=e.apiVersion??_r,n=`https://${e.shopDomain}/api/${t}/graphql.json`;return{async query(r,o,i){let a={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":e.accessToken};e.buyerIp&&(a["Shopify-Storefront-Buyer-IP"]=e.buyerIp);let l=await Cr(e.buyer),d={...o??{}};e.country&&(d.country=e.country),e.language&&(d.language=e.language),l&&(d.buyer=l);let s=await fetch(n,{method:"POST",headers:a,body:JSON.stringify({query:r,variables:d}),signal:i?.signal});if(!s.ok)throw new Bt([{message:`Storefront API error: ${s.status} ${s.statusText}`}]);let c=await s.json();if(c.errors?.length)throw new Bt(c.errors);return c.data}}}function $t(e){return e.replace(/query\s+(\w+)\s*(?:\(([^)]*)\))?\s*\{/,(t,n,r)=>{let o=(r||"").trim(),i="$country: CountryCode, $language: LanguageCode, $buyer: BuyerInput",a=o?`${o}, ${i}`:i;return`query ${n}(${a}) @inContext(country: $country, language: $language, buyer: $buyer) {`})}var Gt=`#graphql
|
|
2
2
|
query BundleMetaobject($id: ID!) {
|
|
3
3
|
metaobject(id: $id) {
|
|
4
4
|
id
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
id
|
|
12
12
|
title
|
|
13
13
|
handle
|
|
14
|
+
productType
|
|
14
15
|
featuredImage { url altText }
|
|
15
16
|
priceRange {
|
|
16
17
|
minVariantPrice { amount currencyCode }
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
id
|
|
40
41
|
title
|
|
41
42
|
handle
|
|
43
|
+
productType
|
|
42
44
|
featuredImage { url altText }
|
|
43
45
|
priceRange {
|
|
44
46
|
minVariantPrice { amount currencyCode }
|
|
@@ -69,6 +71,7 @@
|
|
|
69
71
|
id
|
|
70
72
|
title
|
|
71
73
|
handle
|
|
74
|
+
productType
|
|
72
75
|
featuredImage { url altText }
|
|
73
76
|
priceRange {
|
|
74
77
|
minVariantPrice { amount currencyCode }
|
|
@@ -97,15 +100,18 @@
|
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
|
-
`,
|
|
101
|
-
query
|
|
103
|
+
`,Kt=`#graphql
|
|
104
|
+
query ShopSettings {
|
|
102
105
|
shop {
|
|
103
|
-
metafield(namespace: "$app", key: "custom_css") {
|
|
106
|
+
customCss: metafield(namespace: "$app", key: "custom_css") {
|
|
107
|
+
value
|
|
108
|
+
}
|
|
109
|
+
outOfStockBehavior: metafield(namespace: "$app", key: "out_of_stock_behavior") {
|
|
104
110
|
value
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
|
-
`,
|
|
114
|
+
`,Yt=`#graphql
|
|
109
115
|
query BundlesForProduct($handle: String!) {
|
|
110
116
|
product(handle: $handle) {
|
|
111
117
|
id
|
|
@@ -125,6 +131,7 @@
|
|
|
125
131
|
id
|
|
126
132
|
title
|
|
127
133
|
handle
|
|
134
|
+
productType
|
|
128
135
|
featuredImage { url altText }
|
|
129
136
|
priceRange {
|
|
130
137
|
minVariantPrice { amount currencyCode }
|
|
@@ -153,6 +160,7 @@
|
|
|
153
160
|
id
|
|
154
161
|
title
|
|
155
162
|
handle
|
|
163
|
+
productType
|
|
156
164
|
featuredImage { url altText }
|
|
157
165
|
priceRange {
|
|
158
166
|
minVariantPrice { amount currencyCode }
|
|
@@ -183,6 +191,7 @@
|
|
|
183
191
|
id
|
|
184
192
|
title
|
|
185
193
|
handle
|
|
194
|
+
productType
|
|
186
195
|
featuredImage { url altText }
|
|
187
196
|
priceRange {
|
|
188
197
|
minVariantPrice { amount currencyCode }
|
|
@@ -215,49 +224,21 @@
|
|
|
215
224
|
}
|
|
216
225
|
}
|
|
217
226
|
}
|
|
218
|
-
`,
|
|
227
|
+
`,Jt=`#graphql
|
|
219
228
|
mutation CartCreate($input: CartInput!) {
|
|
220
229
|
cartCreate(input: $input) {
|
|
221
230
|
cart { id checkoutUrl }
|
|
222
231
|
userErrors { field message }
|
|
223
232
|
}
|
|
224
233
|
}
|
|
225
|
-
`,
|
|
234
|
+
`,Xt=`#graphql
|
|
226
235
|
mutation CartLinesAdd($cartId: ID!, $lines: [CartLineInput!]!) {
|
|
227
236
|
cartLinesAdd(cartId: $cartId, lines: $lines) {
|
|
228
237
|
cart { id checkoutUrl }
|
|
229
238
|
userErrors { field message }
|
|
230
239
|
}
|
|
231
240
|
}
|
|
232
|
-
`;var pt={min:1,max:99},ae=class extends Error{constructor(e,t){super(e),this.reason=t,this.name="BundleParseError"}},J={header:{textColor:"#555555",headerStyle:"solid",gradientStart:"#C1E67A",gradientEnd:"#B2D572",saveBadgeBgColor:"#C1E67A",saveBadgeTextColor:"#555555",saveBadgeBorderColor:"#555555",saveBadgeBorderWidth:2,saveBadgeBorderRadius:4,countdownBgColor:"#B2D57247",countdownTextColor:"#555555"},layout:{backgroundColor:"#FCFCFC",borderColor:"#E5E5E5",borderWidth:1,borderRadius:8},productList:{textColor:"#555555",imageBorderWidth:0,imageBorderColor:"#E5E5E5",imageBorderRadius:4,thumbnailRatio:"square",variantBorderWidth:1,variantBorderColor:"#E5E5E5",variantBorderRadius:4,showPrice:!0,showCompareAtPrice:!0,showCountBubble:!0,countBubbleBgColor:"#E9F1D9",countBubbleTextColor:"#555555"},pricing:{showSaveBadge:!0,showComparePrice:!0,showPerUnitPrice:!0,showItemCount:!0,showCompareAtPrice:!0},cta:{ctaText:"Add to cart",primaryColor:"#C1E67A",buttonTextColor:"#555555",borderWidth:0,borderColor:"#C1E67A",borderRadius:4},savingsBar:{visible:!0,bgColor:"#B2D57247",textColor:"#555555",borderWidth:0,borderColor:"#B2D57247",borderRadius:4},countdown:{showCountdown:!0},popularBadge:{visible:!0,text:"Most Popular",bgColor:"#1A1A1A",textColor:"#FFFFFF",borderWidth:0,borderColor:"#1A1A1A",borderRadius:12},outOfStockBehavior:"show_greyed_out",showLowStockBadge:!0,lowStockThreshold:10,lowStockBgColor:"#FEF3C7",lowStockTextColor:"#92400E",showSearch:!0,mixMatchShowQuantitySelector:!0,pickerBgColor:"#FCFCFC",pickerTextColor:"#555555",pickerBorderWidth:0,pickerBorderColor:"#E5E5E5",pickerBorderRadius:8,pickerSearchBorderWidth:1,pickerSearchBorderColor:"#E5E5E5",pickerSearchBorderRadius:8,pickerProductBorderWidth:0,pickerProductBorderColor:"#E5E5E5",pickerProductBorderRadius:8,pickerThumbnailRatio:"square",pickerShowCountBubble:!0,pickerCountBubbleBgColor:"#E9F1D9",pickerCountBubbleTextColor:"#555555",pickerAddBgColor:"#C1E67A",pickerAddLabelColor:"#555555",pickerAddBorderWidth:0,pickerAddBorderColor:"#C1E67A",pickerAddBorderRadius:4,pickerVariantBorderWidth:1,pickerVariantBorderColor:"#555555",pickerVariantBorderRadius:4,pickerQtyStepperBorderWidth:1,pickerQtyStepperBorderColor:"#555555",pickerQtyStepperBorderRadius:4,tierBorderColor:"#E5E5E5",tierBorderWidth:1,tierBorderRadius:12,tierSelectedBorderColor:"#1A1A1A",tierSelectedBorderWidth:2,defaultTier:"first"};function er(e){if(!e||typeof e!="object")return J;let t=e;return{...J,...t,defaultTier:tr(t.defaultTier),header:{...J.header,...t.header??{}},layout:{...J.layout,...t.layout??{}},productList:{...J.productList,...t.productList??{}},pricing:{...J.pricing,...t.pricing??{}},cta:{...J.cta,...t.cta??{}},savingsBar:{...J.savingsBar,...t.savingsBar??{}},countdown:{...J.countdown,...t.countdown??{}},popularBadge:{...J.popularBadge,...t.popularBadge??{}}}}function tr(e){return e==="first"||e==="best_value"||typeof e=="number"&&Number.isInteger(e)&&e>=0?e:J.defaultTier}function rr(e){return{primaryColor:e.cta.primaryColor,backgroundColor:e.layout.backgroundColor,textColor:e.productList.textColor,borderColor:e.layout.borderColor,borderWidth:e.layout.borderWidth,buttonTextColor:e.cta.buttonTextColor,ctaBorderWidth:e.cta.borderWidth,ctaBorderColor:e.cta.borderColor,ctaBorderRadius:e.cta.borderRadius,savingsBarBgColor:e.savingsBar.bgColor,savingsBarTextColor:e.savingsBar.textColor,savingsBarBorderWidth:e.savingsBar.borderWidth,savingsBarBorderColor:e.savingsBar.borderColor,savingsBarBorderRadius:e.savingsBar.borderRadius,borderRadius:e.layout.borderRadius,headerTextColor:e.header.textColor,saveBadgeBgColor:e.header.saveBadgeBgColor,saveBadgeTextColor:e.header.saveBadgeTextColor,saveBadgeBorderColor:e.header.saveBadgeBorderColor,saveBadgeBorderWidth:e.header.saveBadgeBorderWidth,saveBadgeBorderRadius:e.header.saveBadgeBorderRadius,countdownBgColor:e.header.countdownBgColor,countdownTextColor:e.header.countdownTextColor,headerStyle:e.header.headerStyle,headerGradientStart:e.header.gradientStart,headerGradientEnd:e.header.gradientEnd,showSaveBadge:e.pricing.showSaveBadge,imageBorderWidth:e.productList.imageBorderWidth,imageBorderColor:e.productList.imageBorderColor,imageBorderRadius:e.productList.imageBorderRadius,thumbnailRatio:e.productList.thumbnailRatio,variantBorderWidth:e.productList.variantBorderWidth,variantBorderColor:e.productList.variantBorderColor,variantBorderRadius:e.productList.variantBorderRadius,countBubbleBgColor:e.productList.countBubbleBgColor,countBubbleTextColor:e.productList.countBubbleTextColor,showProductPrice:e.productList.showPrice,showProductCompareAtPrice:e.productList.showCompareAtPrice,showCountBubble:e.productList.showCountBubble,showCountdown:e.countdown.showCountdown,ctaText:e.cta.ctaText,outOfStockBehavior:e.outOfStockBehavior,showLowStockBadge:e.showLowStockBadge,lowStockThreshold:e.lowStockThreshold,lowStockBgColor:e.lowStockBgColor,lowStockTextColor:e.lowStockTextColor,showComparePrice:e.pricing.showComparePrice,showPerUnitPrice:e.pricing.showPerUnitPrice,showItemCount:e.pricing.showItemCount,showCompareAtPrice:e.pricing.showCompareAtPrice,showMostPopular:e.popularBadge.visible,popularBadgeText:e.popularBadge.text,popularBadgeBgColor:e.popularBadge.bgColor,popularBadgeTextColor:e.popularBadge.textColor,popularBadgeBorderWidth:e.popularBadge.borderWidth,popularBadgeBorderColor:e.popularBadge.borderColor,popularBadgeBorderRadius:e.popularBadge.borderRadius,showSearch:e.showSearch,pickerBgColor:e.pickerBgColor,pickerTextColor:e.pickerTextColor,pickerBorderWidth:e.pickerBorderWidth,pickerBorderColor:e.pickerBorderColor,pickerBorderRadius:e.pickerBorderRadius,pickerSearchBorderWidth:e.pickerSearchBorderWidth,pickerSearchBorderColor:e.pickerSearchBorderColor,pickerSearchBorderRadius:e.pickerSearchBorderRadius,pickerProductBorderWidth:e.pickerProductBorderWidth,pickerProductBorderColor:e.pickerProductBorderColor,pickerProductBorderRadius:e.pickerProductBorderRadius,pickerThumbnailRatio:e.pickerThumbnailRatio,pickerShowCountBubble:e.pickerShowCountBubble,pickerCountBubbleBgColor:e.pickerCountBubbleBgColor,pickerCountBubbleTextColor:e.pickerCountBubbleTextColor,pickerAddBgColor:e.pickerAddBgColor,pickerAddLabelColor:e.pickerAddLabelColor,pickerAddBorderWidth:e.pickerAddBorderWidth,pickerAddBorderColor:e.pickerAddBorderColor,pickerAddBorderRadius:e.pickerAddBorderRadius,pickerVariantBorderWidth:e.pickerVariantBorderWidth,pickerVariantBorderColor:e.pickerVariantBorderColor,pickerVariantBorderRadius:e.pickerVariantBorderRadius,pickerQtyStepperBorderWidth:e.pickerQtyStepperBorderWidth,pickerQtyStepperBorderColor:e.pickerQtyStepperBorderColor,pickerQtyStepperBorderRadius:e.pickerQtyStepperBorderRadius,tierBorderColor:e.tierBorderColor,tierBorderWidth:e.tierBorderWidth,tierBorderRadius:e.tierBorderRadius,tierSelectedBorderColor:e.tierSelectedBorderColor,tierSelectedBorderWidth:e.tierSelectedBorderWidth,defaultTier:e.defaultTier,...e.popularBadge.tierIndex!==void 0&&{mostPopularTierIndex:e.popularBadge.tierIndex}}}var nr={primaryColor:"--lb-primary-color",backgroundColor:"--lb-bg",textColor:"--lb-text",imageBorderWidth:"--lb-image-border-width",imageBorderColor:"--lb-image-border-color",imageBorderRadius:"--lb-image-border-radius",variantBorderWidth:"--lb-variant-border-width",variantBorderColor:"--lb-variant-border-color",variantBorderRadius:"--lb-variant-radius",countBubbleBgColor:"--lb-qty-badge-bg",countBubbleTextColor:"--lb-qty-badge-color",borderColor:"--lb-border",borderWidth:"--lb-border-width",buttonTextColor:"--lb-btn-text",borderRadius:"--lb-radius",headerTextColor:"--lb-header-text",saveBadgeBgColor:"--lb-save-badge-bg",saveBadgeTextColor:"--lb-save-badge-text",saveBadgeBorderColor:"--lb-save-badge-border-color",saveBadgeBorderWidth:"--lb-save-badge-border-width",saveBadgeBorderRadius:"--lb-save-badge-radius",countdownBgColor:"--lb-countdown-bg",countdownTextColor:"--lb-countdown-text",ctaBorderWidth:"--lb-cta-border-width",ctaBorderColor:"--lb-cta-border-color",ctaBorderRadius:"--lb-cta-radius",savingsBarBgColor:"--lb-savings-bar-bg",savingsBarTextColor:"--lb-savings-bar-text",savingsBarBorderWidth:"--lb-savings-bar-border-width",savingsBarBorderColor:"--lb-savings-bar-border-color",savingsBarBorderRadius:"--lb-savings-bar-radius",tierBorderColor:"--lb-tier-border-color",tierBorderWidth:"--lb-tier-border-width",tierBorderRadius:"--lb-tier-radius",tierSelectedBorderColor:"--lb-tier-selected-border-color",tierSelectedBorderWidth:"--lb-tier-selected-border-width",popularBadgeBgColor:"--lb-popular-badge-bg",popularBadgeTextColor:"--lb-popular-badge-text",popularBadgeBorderWidth:"--lb-popular-badge-border-width",popularBadgeBorderColor:"--lb-popular-badge-border-color",popularBadgeBorderRadius:"--lb-popular-badge-radius",headerGradientStart:"--lb-header-start",headerGradientEnd:"--lb-header-end",pickerBgColor:"--lb-picker-bg",pickerTextColor:"--lb-picker-text",pickerBorderWidth:"--lb-picker-border-width",pickerBorderColor:"--lb-picker-border-color",pickerBorderRadius:"--lb-picker-radius",pickerSearchBorderWidth:"--lb-picker-search-border-width",pickerSearchBorderColor:"--lb-picker-search-border-color",pickerSearchBorderRadius:"--lb-picker-search-radius",pickerProductBorderWidth:"--lb-picker-product-border-width",pickerProductBorderColor:"--lb-picker-product-border-color",pickerProductBorderRadius:"--lb-picker-product-radius",pickerCountBubbleBgColor:"--lb-picker-qty-badge-bg",pickerCountBubbleTextColor:"--lb-picker-qty-badge-color",pickerAddBgColor:"--lb-picker-add-bg",pickerAddLabelColor:"--lb-picker-add-label",pickerAddBorderWidth:"--lb-picker-add-border-width",pickerAddBorderColor:"--lb-picker-add-border-color",pickerAddBorderRadius:"--lb-picker-add-radius",pickerVariantBorderWidth:"--lb-picker-variant-border-width",pickerVariantBorderColor:"--lb-picker-variant-border-color",pickerVariantBorderRadius:"--lb-picker-variant-radius",pickerQtyStepperBorderWidth:"--lb-picker-qty-stepper-border-width",pickerQtyStepperBorderColor:"--lb-picker-qty-stepper-border-color",pickerQtyStepperBorderRadius:"--lb-picker-qty-stepper-radius"},or=new Set(["borderRadius","borderWidth","saveBadgeBorderWidth","saveBadgeBorderRadius","tierBorderWidth","tierBorderRadius","tierSelectedBorderWidth","savingsBarBorderWidth","savingsBarBorderRadius","ctaBorderWidth","ctaBorderRadius","popularBadgeBorderWidth","popularBadgeBorderRadius","imageBorderWidth","imageBorderRadius","variantBorderWidth","variantBorderRadius","pickerBorderWidth","pickerBorderRadius","pickerSearchBorderWidth","pickerSearchBorderRadius","pickerProductBorderWidth","pickerProductBorderRadius","pickerAddBorderWidth","pickerAddBorderRadius","pickerVariantBorderWidth","pickerVariantBorderRadius","pickerQtyStepperBorderWidth","pickerQtyStepperBorderRadius"]);function bt(e,t){let r=rr(t);for(let[i,a]of Object.entries(nr)){let l=r[i];if(l==null)continue;let d=or.has(i)?`${l}px`:String(l);e.style.setProperty(a,d)}e.style.setProperty("--lb-product-price-display",t.productList.showPrice?"block":"none"),e.style.setProperty("--lb-product-compare-display",t.productList.showCompareAtPrice?"inline":"none"),e.style.setProperty("--lb-qty-badge-display",t.productList.showCountBubble?"flex":"none"),e.style.setProperty("--lb-picker-qty-badge-display",t.pickerShowCountBubble?"flex":"none"),e.style.setProperty("--lb-variant-chevron",Ye(t.productList.variantBorderColor)),e.style.setProperty("--lb-picker-variant-chevron",Ye(t.pickerVariantBorderColor)),t.header.headerStyle==="solid"?e.style.setProperty("--lb-header-bg",t.header.gradientStart):e.style.setProperty("--lb-header-bg",`linear-gradient(135deg, ${t.header.gradientStart}, ${t.header.gradientEnd})`);let o=Xe(t.productList.thumbnailRatio);e.style.setProperty("--lb-thumbnail-aspect-ratio",o.aspectRatio),e.style.setProperty("--lb-thumbnail-img-fit",o.imgFit),e.style.setProperty("--lb-thumbnail-img-height",o.imgHeight);let n=Xe(t.pickerThumbnailRatio);e.style.setProperty("--lb-picker-thumbnail-aspect-ratio",n.aspectRatio),e.style.setProperty("--lb-picker-thumbnail-img-fit",n.imgFit),e.style.setProperty("--lb-picker-thumbnail-img-height",n.imgHeight)}function Ye(e){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='${e.replace(/#/g,"%23")}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`}function Xe(e){switch(e){case"tall":return{aspectRatio:"3 / 4",imgFit:"cover",imgHeight:"100%"};case"wide":return{aspectRatio:"4 / 3",imgFit:"cover",imgHeight:"100%"};case"original":return{aspectRatio:"auto",imgFit:"contain",imgHeight:"auto"};default:return{aspectRatio:"1 / 1",imgFit:"cover",imgHeight:"100%"}}}var ir=new Set(["fixed","mix_match","volume"]),ar=new Set(["active"]);function qe(e,t){try{return lr(e,t)}catch(r){if(r instanceof ae)return null;throw r}}function lr(e,t){let r=new Map(t.map(k=>[k.key,k])),o=r.get("title")?.value??"Bundle",n=r.get("bundle_type")?.value,i=r.get("status")?.value;if(!n||!ir.has(n))throw new ae(`Invalid or missing bundle_type: ${n??"null"}`,"invalid_type");let a=n;if(!i||!ar.has(i))throw new ae(`Bundle is not active: status=${i??"null"}`,"inactive");let l=i,d=r.get("starts_at")?.value??null,s=r.get("ends_at")?.value??null,p=new Date;if(d){let k=new Date(d);if(Number.isNaN(k.getTime()))throw new ae(`Invalid starts_at: ${d}`,"invalid_type");if(k>p)throw new ae(`Bundle not yet started: starts_at=${d}`,"not_started")}if(s){let k=new Date(s);if(Number.isNaN(k.getTime()))throw new ae(`Invalid ends_at: ${s}`,"invalid_type");if(k<p)throw new ae(`Bundle has expired: ends_at=${s}`,"expired")}let u=dr(r),C=sr(r),m=cr(r),g={id:e,title:o,description:r.get("description")?.value||null,status:l,products:u,discountConfig:C,widgetConfig:m,startsAt:d,endsAt:s,discountLabel:r.get("discount_label")?.value??null,selectedVariantIds:ur(r),productQuantities:Je(r,"product_quantities"),variantQuantities:Je(r,"variant_quantities"),linkGroup:mr(r),marketVisibility:br(r),marketIds:hr(r)};switch(a){case"fixed":return{...g,bundleType:"fixed"};case"volume":return{...g,bundleType:"volume",volumeTiers:gr(r)};case"mix_match":return{...g,bundleType:"mix_match",minQuantity:vr(r,"min_quantity",{min:1}),maxQuantity:null,productRules:pr(r)}}}function dr(e){let t=[],r=e.get("products");if(r?.reference&&"variants"in r.reference&&t.push(r.reference),r?.references?.nodes)for(let n of r.references.nodes)"variants"in n?t.push(n):"products"in n&&n.products?.nodes&&t.push(...n.products.nodes);let o=e.get("collection");if(o?.references?.nodes)for(let n of o.references.nodes)"products"in n&&n.products?.nodes&&t.push(...n.products.nodes);return t}function sr(e){return{discountType:e.get("discount_type")?.value??"percentage",discountValue:parseFloat(e.get("discount_value")?.value??"0"),allowStacking:e.get("allow_stacking")?.value==="true"}}function cr(e){return er(ce(e,"widget_config"))}function ur(e){let t=ce(e,"selected_variant_ids");if(!Array.isArray(t))return null;let r=[];for(let o of t)Array.isArray(o)?r.push(o.filter(n=>typeof n=="string")):r.push([]);return r}function Je(e,t){let r=ce(e,t);if(!r||typeof r!="object"||Array.isArray(r))return{};let o={};for(let[n,i]of Object.entries(r)){let a=typeof i=="number"?i:Number(i);Number.isFinite(a)&&a>=0&&a<=99&&(o[n]=Math.floor(a))}return o}function pr(e){let t=ce(e,"product_rules");if(!t||typeof t!="object"||Array.isArray(t))return{};let r={};for(let[o,n]of Object.entries(t)){if(!n||typeof n!="object"||Array.isArray(n))continue;let{min:i,max:a}=n,l=typeof i=="number"?i:Number(i),d=typeof a=="number"?a:Number(a);if(!Number.isFinite(l)||!Number.isFinite(d))continue;let s=Math.max(1,Math.min(99,Math.floor(l))),p=Math.max(s,Math.min(99,Math.floor(d)));r[o]={min:s,max:p}}return r}function br(e){return e.get("market_visibility")?.value==="specific"?"specific":"all"}function hr(e){let t=e.get("markets")?.value;if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.filter(o=>typeof o=="string"):[]}catch{return[]}}function mr(e){let t=e.get("link_group_id")?.value;if(!t)return null;let r=e.get("link_group_is_primary")?.value==="true",o=null;if(r){let n=ce(e,"link_group_variants");Array.isArray(n)&&(o=n.filter(i=>typeof i=="object"&&i!==null).map(i=>{let a=typeof i.metaobjectId=="string"?i.metaobjectId:null,l=typeof i.weight=="number"&&Number.isFinite(i.weight)?Math.max(0,Math.min(100,Math.floor(i.weight))):null;return a===null||l===null?null:{metaobjectId:a,weight:l}}).filter(i=>i!==null))}return{id:t,isPrimary:r,variants:o}}function gr(e){let t=ce(e,"volume_tiers");return Array.isArray(t)?t.filter(r=>typeof r=="object"&&r!==null).map(fr):[]}function fr(e){let t=Number(e.minQuantity??0),r={minQuantity:Number.isFinite(t)&&t>=0?t:0};return typeof e.percentage=="number"&&Number.isFinite(e.percentage)&&(r.percentage=e.percentage),typeof e.amount=="number"&&Number.isFinite(e.amount)&&(r.amount=e.amount),r}function ce(e,t){let r=e.get(t)?.value;if(!r)return null;try{return JSON.parse(r)}catch{return null}}function vr(e,t,r={}){let o=e.get(t)?.value;if(!o)return null;let n=parseInt(o,10);return isNaN(n)||r.min!==void 0&&n<r.min?null:n}function we(e,t,r){let o=e.variantQuantities[r];return o!==void 0?o:e.productQuantities[t]??1}async function ht(e,t){await ft(e,{shopDomain:e.shopDomain,eventType:"bundle_impression",bundleGid:t.bundleGid,bundleType:t.bundleType,productId:t.productId,linkGroupId:t.linkGroupId,occurredAt:new Date().toISOString()})}async function mt(e,t){await ft(e,{shopDomain:e.shopDomain,eventType:"bundle_add_to_cart",...t,occurredAt:new Date().toISOString()})}function gt(e,t){if(typeof IntersectionObserver>"u")return t(),()=>{};let r=new IntersectionObserver(o=>{for(let n of o)n.isIntersecting&&(t(),r.unobserve(n.target))},{threshold:.5});return r.observe(e),()=>r.disconnect()}async function ft(e,t){let r=`${e.appUrl}/api/analytics`,o=JSON.stringify(t);try{(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:o})).ok||(await new Promise(i=>setTimeout(i,2e3)),await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:o}))}catch{try{typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(r,o)}catch{}}}var xr=!1;function yr(){return typeof document<"u"}function wr(){if(!yr())return!1;if(xr)return!0;if(typeof window>"u")return!1;let e=window.Shopify;try{return e?.customerPrivacy?.analyticsProcessingAllowed?.()===!0}catch{return!1}}var Ze="lb_session",Cr=720*60*60,kr=720*60*60;function vt(e){return`__Host-_lb_ab_${e}`}async function xt(e,t,r={}){if(typeof document>"u"||t.length===0)return null;let o=new Set(t.map(l=>l.metaobjectId));if(r.forceLiveMetaobjectId&&o.has(r.forceLiveMetaobjectId))return{variantMetaobjectId:r.forceLiveMetaobjectId,persisted:!1,forcedLive:!0};let n=_r(e);if(n&&o.has(n))return{variantMetaobjectId:n,persisted:!0,forcedLive:!1};if(!wr())return null;let i=Sr(),a=Er(i,e,t);return a?(Br(e,a),{variantMetaobjectId:a,persisted:!0,forcedLive:!1}):null}function _r(e){if(typeof document>"u")return null;let r=`${vt(e)}=`,n=document.cookie.split(";").map(l=>l.trim()).find(l=>l.startsWith(r));if(!n)return null;let i=n.substring(r.length),a;try{a=decodeURIComponent(i)}catch{return null}return a.startsWith("gid://shopify/Metaobject/")?a:null}function Br(e,t){if(typeof document>"u")return;let r=vt(e),o=encodeURIComponent(t);document.cookie=`${r}=${o}; Path=/; Max-Age=${kr}; SameSite=Lax; Secure`}function Sr(){if(typeof document>"u")return et();let t=document.cookie.split(";").map(o=>o.trim()).find(o=>o.startsWith(`${Ze}=`))?.split("=")[1];if(t)return t;let r=et();return document.cookie=`${Ze}=${r}; path=/; max-age=${Cr}; SameSite=Lax; Secure`,r}function et(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Er(e,t,r){if(r.length===0)return null;let o=Tr(`${e}:${t}`)%1e4,n=0;for(let i of r)if(!(typeof i?.metaobjectId!="string"||typeof i?.weight!="number")&&(n+=Math.max(0,i.weight)*100,o<n))return i.metaobjectId;return r[r.length-1].metaobjectId}function Tr(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return t>>>0}var tt=1e4,Ar=[[/@import/i,"@import rules"],[/@charset/i,"@charset declarations"],[/expression\s*\(/i,"CSS expressions"],[/-moz-binding/i,"-moz-binding"],[/-webkit-binding/i,"-webkit-binding"],[/behavior\s*:/i,"behavior property"]],Lr=/^(https:|\/[^/]|\.\/|\.\.\/|#)/;function Ve(e){if(e.length>tt)return{ok:!1,error:`CSS exceeds ${tt.toLocaleString("en-US")} character limit`};let t=e.replace(/\/\*[\s\S]*?\*\//g,"");try{t=t.replace(/\\([0-9a-fA-F]{1,6})[ \t\n\f]?/g,(n,i)=>{let a=parseInt(i,16);return a<0||a>1114111?"\uFFFD":String.fromCodePoint(a)}),t=t.replace(/\\\r?\n/g,""),t=t.replace(/\\([^\n\r\f0-9a-fA-F])/g,"$1")}catch{return{ok:!1,error:"CSS contains invalid unicode escape sequences"}}t=t.replace(/</g,"").replace(/>/g,"");for(let[n,i]of Ar)if(n.test(t))return{ok:!1,error:`CSS contains blocked pattern: ${i}`};let r=/url\s*\(\s*([\s\S]*?)\s*\)/gi,o;for(;(o=r.exec(t))!==null;){let n=o[1].trim();if((n.startsWith("'")||n.startsWith('"'))&&(n=n.slice(1)),(n.endsWith("'")||n.endsWith('"'))&&(n=n.slice(0,-1)),n=n.trim(),n&&!Lr.test(n))return{ok:!1,error:"CSS url() values must use https:// or relative paths"}}return{ok:!0,css:t}}var Pr="lb-custom-css-";function yt(e,t){if(typeof document>"u"||!t)return!1;let r=Ve(t);if(!r.ok||!r.css.trim())return!1;let o=Pr+Mr(e),n=document.getElementById(o);return n||(n=document.createElement("style"),n.id=o,n.setAttribute("data-lime-bundles","custom-css"),document.head.appendChild(n)),n.textContent!==r.css&&(n.textContent=r.css),!0}function Mr(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function Ir(e,t){let r=typeof e=="string"?parseFloat(e):e;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(r)}catch{return`${t} ${r.toFixed(2)}`}}var Rr={CL:"cl",CM:"cm",FLOZ:"fl oz",FT:"ft",FT2:"ft\xB2",G:"g",GAL:"gal",IN:"in",ITEM:"each",KG:"kg",L:"l",LB:"lb",M:"m",M2:"m\xB2",M3:"m\xB3",MG:"mg",ML:"ml",MM:"mm",OZ:"oz",PT:"pt",QT:"qt",UNKNOWN:"",YD:"yd"};function le(e,t,r){if(!e||!t||t.referenceUnit==="UNKNOWN")return null;let o=parseFloat(e.amount);if(!Number.isFinite(o))return null;let n=Rr[t.referenceUnit]??"";if(!n)return null;let i=e.currencyCode||r||"USD",a=Ir(o,i),l=t.referenceValue,d=l===1?n:`${l}${n}`;return`${a}/${d}`}function j(e){if(e==null)return 0;let t=typeof e=="string"?parseFloat(e):e;return Number.isFinite(t)?Math.round(t*100):0}function D(e,t){try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e/100)}catch{return`${t} ${(e/100).toFixed(2)}`}}function wt(e,t){return Math.max(0,e-Math.floor(e*t/100))}function Oe(e,t=e.productQuantities,r=e.widgetConfig.pricing.showSaveBadge){let{discountType:o,discountValue:n}=e.discountConfig,i=[],a=0,l=0;for(let u of e.products){let C=u.variants.nodes.find(x=>x.availableForSale)??u.variants.nodes[0];if(!C)continue;let m=j(C.price.amount),g=t[u.id]??1,k=m*g,A=C.compareAtPrice?j(C.compareAtPrice.amount):null;if(i.push({unitCents:m,qty:g,lineCents:k,compareCents:A}),a+=k,o==="percentage"){let x=wt(m,n);l+=x*g}else l+=k}o==="fixed_amount"&&(l=Math.max(0,a-Math.round(n*100)));let d=Math.max(0,a-l),s=e.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",p="";return r&&d>0&&(o==="percentage"&&n>0?p=`-${Math.round(n)}%`:o==="fixed_amount"&&n>0&&(p=`-${D(Math.round(n*100),s)}`)),{rows:i,totalCents:a,saleCents:l,savingsCents:d,headerBadge:p,currency:s}}function Ce(e,t){if(t.discountType==="percentage"){let r=Math.floor(e*t.discountValue/100);return Math.max(0,e-r)}return Math.max(0,e-Math.round(t.discountValue*100))}var U=152;function re(e,t={}){if(!e)return"";try{let r=new URL(e);return t.width!==void 0&&r.searchParams.set("width",String(t.width)),t.height!==void 0&&r.searchParams.set("height",String(t.height)),t.crop&&r.searchParams.set("crop",t.crop),r.toString()}catch{return e}}function Ct(e){if(!Number.isFinite(e)||e<=0)return"";let t=Math.floor(e/1e3),r=Math.floor(t/86400),o=Math.floor(t%86400/3600),n=Math.floor(t%3600/60),i=t%60,a=l=>String(l).padStart(2,"0");return r>0?`${r}d ${a(o)}h ${a(n)}m ${a(i)}s`:`${a(o)}h ${a(n)}m ${a(i)}s`}var Fe={};ot(Fe,{computePosition:()=>qr,emptyTypeAheadState:()=>Hr,handleKey:()=>Fr,pushTypeAheadChar:()=>Ur});var Dr=4;function qr({trigger:e,viewportHeight:t,desiredHeight:r,margin:o=Dr,clip:n}){let i=n?Math.min(t,n.bottom):t,a=n?Math.max(0,n.top):0,l=Math.max(0,i-e.bottom-o),d=Math.max(0,e.top-a-o),s=r<=l?"down":d>l?"up":"down",u=Math.min(r,s==="down"?l:d),C=s==="down"?e.bottom+o:e.top-o-u;return{placement:s,maxHeight:u,offsetTop:C,offsetLeft:e.left,width:e.width}}var Ie={type:"passthrough",preventDefault:!1};function Re(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function rt(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}function Vr(e,t){if(e.length===0)return-1;for(let r=1;r<=e.length;r++){let o=(t+r)%e.length;if(!e[o].disabled)return o}return t}function Or(e,t){if(e.length===0)return-1;for(let r=1;r<=e.length;r++){let o=(t-r+e.length)%e.length;if(!e[o].disabled)return o}return t}function nt(e){return e.length===1&&e!==" "&&/\S/.test(e)}function Fr(e,t){if(e.ctrlKey||e.metaKey||e.altKey)return Ie;let{key:r}=e,{isOpen:o,activeIndex:n,selectedIndex:i,options:a}=t;if(!o)switch(r){case"Enter":case" ":case"ArrowDown":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Re(a),preventDefault:!0};case"ArrowUp":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:rt(a),preventDefault:!0};default:return nt(r)?{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Re(a),preventDefault:!0}:Ie}switch(r){case"ArrowDown":return{type:"move-active",activeIndex:Vr(a,n),preventDefault:!0};case"ArrowUp":return{type:"move-active",activeIndex:Or(a,n),preventDefault:!0};case"Home":return{type:"move-active",activeIndex:Re(a),preventDefault:!0};case"End":return{type:"move-active",activeIndex:rt(a),preventDefault:!0};case"Enter":case" ":return n>=0&&!a[n]?.disabled?{type:"commit",index:n,preventDefault:!0}:{type:"passthrough",preventDefault:!0};case"Escape":return{type:"close",commit:!1,restoreFocus:!0,preventDefault:!0};case"Tab":return{type:"close",commit:!1,restoreFocus:!1,preventDefault:!1};default:return nt(r)?{type:"type-ahead",char:r,preventDefault:!1}:Ie}}var Nr=500;function Hr(){return{buffer:"",lastTime:0}}function Ur(e,t,r,o,n=Nr){if(t.length!==1)return{newState:e,matchedIndex:null};let a=(r-e.lastTime>n?"":e.buffer)+t.toLowerCase(),l={buffer:a,lastTime:r};for(let d=0;d<o.length;d++){let s=o[d];if(!s.disabled&&s.label.toLowerCase().startsWith(a))return{newState:l,matchedIndex:d}}return{newState:l,matchedIndex:null}}var $r={};ot($r,{findVariantByOptions:()=>Wr,isOptionValueAvailable:()=>zr,toPickerVariant:()=>jr});function Wr(e,t){if(e.length===0)return null;for(let r of e){if(r.optionValues.length!==t.length)continue;let o=!0;for(let n=0;n<r.optionValues.length;n++)if(r.optionValues[n]!==t[n]){o=!1;break}if(o)return r}return null}function zr(e,t,r,o){for(let n of e){if(!n.available||n.optionValues[t]!==r)continue;let i=!0;for(let a=0;a<n.optionValues.length;a++)if(a!==t&&n.optionValues[a]!==o[a]){i=!1;break}if(i)return!0}return!1}function jr(e){return{id:e.id,optionValues:e.selectedOptions.map(t=>t.value),available:e.availableForSale}}function Z(e,t){return e.availableForSale?e.currentlyNotInStock||e.quantityAvailable==null?!0:e.quantityAvailable>=t:!1}function ue(e,t,r,o){return!o||e.quantityAvailable==null||e.quantityAvailable<t?!1:e.quantityAvailable<=r}function Ne(e,t,r){if(!e.availableForSale)return 0;if(e.currentlyNotInStock)return Math.max(0,t-r);let o=e.quantityAvailable==null?Number.POSITIVE_INFINITY:e.quantityAvailable;return Math.max(0,Math.min(t,o)-r)}var{computePosition:Qr,emptyTypeAheadState:Gr,handleKey:Kr,pushTypeAheadChar:Yr}=Fe,Xr=32,Jr=8,Zr=8,G=[];function _e(e){let t=e.composedPath();for(let r=G.length-1;r>=0;r--){let o=G[r];!t.includes(o.shell)&&!t.includes(o.listbox)&&o.close()}}function kt(){for(let e=G.length-1;e>=0;e--)G[e].close()}var Be=!1;function en(){Be||(document.addEventListener("pointerdown",_e,!0),window.addEventListener("scroll",_e,!0),window.addEventListener("resize",kt),Be=!0)}function tn(){!Be||G.length>0||(document.removeEventListener("pointerdown",_e,!0),window.removeEventListener("scroll",_e,!0),window.removeEventListener("resize",kt),Be=!1)}function ke(e){let t=[];for(let r=0;r<e.options.length;r++){let o=e.options[r];t.push({disabled:o.disabled,label:o.textContent||o.value})}return t}function rn(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function nn(e){let t=e.ownerDocument?.defaultView;if(!t)return null;let r=e.parentElement;for(;r&&r!==e.ownerDocument.body;){let n=t.getComputedStyle(r).overflowY;if(n==="auto"||n==="scroll"||n==="hidden")return r;r=r.parentElement}return null}var on=["lb-bundle-variant-select","lb-mix-match__variant-select"],an=on.map(e=>`select.${e}:not(.lb-dropdown-state)`).join(", ");function ln(e){let t=e;if(e.classList.contains("lb-dropdown-state"))return t.__lbDropdownInstance??null;let r=e.ownerDocument,o=e.getRootNode(),n=e.getAttribute("aria-label")??"",i=`lb-dd-${Math.random().toString(36).slice(2,9)}`;e.classList.add("lb-dropdown-state"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");let a=r.createElement("div");a.className="lb-dropdown",a.setAttribute("data-lb-dropdown","");let l=r.createElement("button");l.type="button",l.className="lb-dropdown-trigger",l.setAttribute("role","combobox"),l.setAttribute("aria-haspopup","listbox"),l.setAttribute("aria-expanded","false");let d=`${i}-listbox`;l.setAttribute("aria-controls",d),n&&l.setAttribute("aria-label",n);let s=r.createElement("span");s.className="lb-dropdown-trigger-value";let p=r.createElement("span");p.className="lb-dropdown-chevron",p.setAttribute("aria-hidden","true"),l.appendChild(s),l.appendChild(p);let u=r.createElement("ul");u.id=d,u.className="lb-dropdown-listbox",u.setAttribute("role","listbox"),n&&u.setAttribute("aria-label",n),u.hidden=!0,a.appendChild(l),e.parentNode?.insertBefore(a,e.nextSibling);let C=e.closest("[data-modal-overlay]");C?(C.appendChild(u),u.setAttribute("data-lb-dropdown-portal","")):a.appendChild(u);let m=!1,g=-1,k=Gr(),A=[],x;function E(){l.disabled=e.disabled;let v=ke(e),b=e.selectedIndex;for(s.textContent=b>=0&&v[b]?v[b].label:"";u.firstChild;)u.removeChild(u.firstChild);A=[];for(let w=0;w<v.length;w++){let R=r.createElement("li");R.id=`${i}-opt-${w}`,R.className="lb-dropdown-option",R.setAttribute("role","option"),R.setAttribute("aria-selected",w===b?"true":"false"),v[w].disabled&&R.setAttribute("aria-disabled","true"),R.setAttribute("data-value",e.options[w].value),R.setAttribute("data-index",String(w)),R.textContent=v[w].label,u.appendChild(R),A.push(R)}}function _(v){if(g>=0&&A[g]&&A[g].classList.remove("is-active"),g=v,v>=0&&A[v]){let b=A[v];b.classList.add("is-active"),l.setAttribute("aria-activedescendant",b.id);let w=b.offsetTop,R=w+b.offsetHeight,ne=u.scrollTop,Y=ne+u.clientHeight;w<ne?u.scrollTop=w:R>Y&&(u.scrollTop=R-u.clientHeight)}else l.setAttribute("aria-activedescendant","")}function O(){let v=l.getBoundingClientRect();if(v.width===0)return!1;let w=Math.min(A.length||1,Zr)*Xr+Jr,R=nn(l),ne=R?(()=>{let ee=R.getBoundingClientRect();return{top:ee.top,bottom:ee.bottom}})():void 0,Y=Qr({trigger:{top:v.top,bottom:v.bottom,left:v.left,width:v.width},viewportHeight:window.innerHeight,desiredHeight:w,clip:ne});return u.setAttribute("data-placement",Y.placement),u.style.maxHeight=`${Y.maxHeight}px`,u.hasAttribute("data-lb-dropdown-portal")&&(u.style.top=`${Y.offsetTop}px`,u.style.left=`${Y.offsetLeft}px`,u.style.width=`${Y.width}px`),!0}function h(){if(m)return;for(let w=G.length-1;w>=0;w--)G[w]!==x&&G[w].close();m=!0,u.hidden=!1,l.setAttribute("aria-expanded","true"),O()||requestAnimationFrame(()=>O());let v=ke(e),b=e.selectedIndex;b>=0&&v[b]&&!v[b].disabled?_(b):_(rn(v)),G.push(x),G.length===1&&en()}function M(v){if(!m)return;m=!1,u.hidden=!0,l.setAttribute("aria-expanded","false"),l.setAttribute("aria-activedescendant",""),g>=0&&A[g]&&A[g].classList.remove("is-active"),g=-1;let b=G.indexOf(x);b>=0&&G.splice(b,1),G.length===0&&tn(),v&&l.focus()}function L(v){let b=e.options[v];if(!(!b||b.disabled)){if(e.value!==b.value){e.value=b.value;let w=new Event("change",{bubbles:!0});e.dispatchEvent(w)}E(),M(!0)}}function y(v){switch(v.type){case"open":h(),v.activeIndex>=0&&_(v.activeIndex);return;case"close":M(v.restoreFocus);return;case"move-active":_(v.activeIndex);return;case"commit":L(v.index);return;case"type-ahead":{let b=ke(e),w=Yr(k,v.char,Date.now(),b);k=w.newState,w.matchedIndex!==null&&(m||h(),_(w.matchedIndex));return}case"passthrough":return;default:{let b=v}}}function B(v){let b=ke(e),w=Kr({key:v.key,ctrlKey:v.ctrlKey,metaKey:v.metaKey,altKey:v.altKey,shiftKey:v.shiftKey},{isOpen:m,activeIndex:g,selectedIndex:e.selectedIndex,options:b});w.preventDefault&&v.preventDefault(),y(w)}function f(v){v.preventDefault(),m?M(!1):h()}function q(v){let b=v.target;for(;b&&b!==u;){if(b.classList?.contains("lb-dropdown-option")){let w=parseInt(b.getAttribute("data-index")??"",10);if(!Number.isNaN(w)){L(w);return}}b=b.parentElement}}function P(v){let b=v.target;for(;b&&b!==u;){if(b.classList?.contains("lb-dropdown-option")){if(b.getAttribute("aria-disabled")==="true")return;let w=parseInt(b.getAttribute("data-index")??"",10);!Number.isNaN(w)&&w!==g&&_(w);return}b=b.parentElement}}function T(){setTimeout(()=>{if(!m)return;let v=o.activeElement??r.activeElement;a.contains(v)||M(!1)},0)}function S(){E()}let I=new MutationObserver(()=>{E()});I.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","value","selected"]});let F=v=>v.preventDefault();l.addEventListener("click",f),l.addEventListener("keydown",B),a.addEventListener("focusout",T),u.addEventListener("mousedown",F),u.addEventListener("click",q),u.addEventListener("mousemove",P),e.addEventListener("change",S);function te(){m&&M(!1),I.disconnect(),l.removeEventListener("click",f),l.removeEventListener("keydown",B),a.removeEventListener("focusout",T),u.removeEventListener("mousedown",F),u.removeEventListener("click",q),u.removeEventListener("mousemove",P),e.removeEventListener("change",S),a.parentNode&&a.parentNode.removeChild(a),u.parentNode&&u.parentNode.removeChild(u),e.classList.remove("lb-dropdown-state"),e.removeAttribute("aria-hidden"),e.removeAttribute("tabindex"),delete t.__lbDropdownInstance}return x={shell:a,listbox:u,select:e,close:()=>M(!1),destroy:te},t.__lbDropdownInstance=x,E(),x}function Se(e){let t=e.querySelectorAll(an),r=[];return t.forEach(o=>{let n=ln(o);n&&r.push(n)}),r}function Ee(e){e.querySelectorAll("select.lb-dropdown-state").forEach(r=>{let o=r.__lbDropdownInstance;o&&o.destroy()})}function pe(e){let t=dn(e);if(t===null||t<=Date.now())return null;let r=t,o=document.createElement("div");o.className="lb-bundle-countdown",o.setAttribute("data-countdown","");let n=document.createElement("div");n.className="lb-bundle-countdown__label";let i=document.createElement("span");i.textContent="Ends in",n.appendChild(i),o.appendChild(n);let a=document.createElement("span");a.className="lb-bundle-countdown__timer",a.setAttribute("data-countdown-timer",""),o.appendChild(a);let l=null;function d(){let p=r-Date.now();if(p<=0){o.style.display="none",s();return}a.textContent=Ct(p)}function s(){l!==null&&(clearInterval(l),l=null)}return d(),l=setInterval(d,1e3),{el:o,stop:s}}function dn(e){let t=Date.parse(e);return Number.isFinite(t)?t:null}function be(e){let t=document.createElement("button");t.type="button",t.className="lb-bundle-cta",t.setAttribute("data-add-bundle","");let r=document.createElement("span");r.className="lb-cta-label",r.setAttribute("data-cta-label",""),r.textContent=e,t.appendChild(r);let o=document.createElement("span");return o.className="lb-cta-spinner",o.setAttribute("data-cta-spinner",""),o.setAttribute("aria-hidden","true"),o.innerHTML='<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 2a10 10 0 0 1 10 10" /></svg>',t.appendChild(o),t}function He(e,t){let r=e.querySelector("[data-cta-label]");r&&(r.textContent=t)}function c(e,t,r={}){let o=document.createElement(e);t&&(o.className=t);for(let[n,i]of Object.entries(r))o.setAttribute(n,i);return o}var sn=`
|
|
233
|
-
<svg class="lb-bundle-placeholder-icon" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
|
|
234
|
-
<rect x="4" y="4" width="20" height="20" rx="3"></rect>
|
|
235
|
-
<line x1="4" y1="20" x2="24" y2="20"></line>
|
|
236
|
-
<circle cx="10" cy="12" r="2"></circle>
|
|
237
|
-
</svg>`;function _t(e,t,r,o){let n=t.widgetConfig,i=(x,E)=>we(t,x,E),a=[],l=0;if(t.products.forEach((x,E)=>{let _=cn(t,x,E);_.qty!==0&&(_.isOos&&(l++,n.outOfStockBehavior==="hide")||a.push(_))}),a.length===0)return;let d=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",s=c("div","lb-fixed",{"data-discount-type":t.discountConfig.discountType,"data-discount-value":String(t.discountConfig.discountValue)}),p=un(t,d);if(s.appendChild(p.el),n.countdown.showCountdown&&t.endsAt){let x=pe(t.endsAt);x&&(s.appendChild(x.el),o?.(x.stop))}let u=c("div","lb-fixed__products"),C=[];a.forEach(x=>{let E=bn(x,d,i,{enabled:n.showLowStockBadge,threshold:n.lowStockThreshold},()=>{A()});C.push(E),u.appendChild(E.el)}),s.appendChild(u),s.appendChild(c("div","lb-bundle-divider"));let m=hn(t);s.appendChild(m.el);let g=n.savingsBar.visible?mn():null;g&&s.appendChild(g.el);let k=gn(t,l,()=>{let x=a.filter(E=>E.selected).map(E=>({merchandiseId:E.selected.id,quantity:E.qty,attributes:[{key:"_lime_bundle_gid",value:t.id},{key:"_lime_bundle_type",value:t.bundleType}]}));x.length!==0&&r(x)});s.appendChild(k),s.appendChild(c("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),s.appendChild(c("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),e.appendChild(s),Se(s),o?.(()=>Ee(s)),A();function A(){let x=a.reduce((O,h)=>{if(!h.selected)return O;let M=j(h.selected.price.amount);return O+M*h.qty},0),E=fn(x,t.discountConfig,a),_=Math.max(0,x-E);m.update({totalCents:x,saleCents:E,savingsCents:_,currency:d}),g&&g.update({savingsCents:_,currency:d}),p.refresh(pn(t,x,E,d))}}function cn(e,t,r){let o=e.selectedVariantIds?.[r]??null,n=o&&o.length>0?t.variants.nodes.filter(p=>o.includes(p.id)):t.variants.nodes,i=n.find(p=>Z(p,we(e,t.id,p.id)))??null,a=n,l=!i,d=i??n[0]??null,s=d?we(e,t.id,d.id):1;return{product:t,eligibleVariants:a,selected:d,qty:s,isOos:l}}function un(e,t){let r=e.widgetConfig,o=c("div","lb-bundle-header"),n=c("div","lb-bundle-header__content"),i=c("h3","lb-bundle-title");if(i.textContent=e.title,n.appendChild(i),e.description){let d=c("p","lb-bundle-subtitle");d.textContent=e.description,n.appendChild(d)}o.appendChild(n);let a=c("span","lb-bundle-header__badge",{"data-header-badge":""});o.appendChild(a);let l=Oe(e,e.productQuantities,r.pricing.showSaveBadge);return l.headerBadge?a.textContent=l.headerBadge:a.style.display="none",{el:o,refresh(d){if(!r.pricing.showSaveBadge){a.style.display="none";return}d?(a.textContent=d,a.style.display=""):a.style.display="none"}}}function pn(e,t,r,o){if(!e.widgetConfig.pricing.showSaveBadge)return"";let n=t-r;if(n<=0)return"";let i=e.discountConfig;return i.discountType==="percentage"&&i.discountValue>0?`-${Math.round(i.discountValue)}%`:i.discountType==="fixed_amount"&&i.discountValue>0?`-${D(Math.round(i.discountValue*100),o)}`:`-${D(n,o)}`}function bn(e,t,r,o,n){let i=c("div",e.isOos?"lb-bundle-product-row lb-bundle-product-row--oos":"lb-bundle-product-row",{"data-product-id":e.product.id.replace(/^.*\//,""),...e.isOos?{"aria-disabled":"true"}:{}}),a=c("div","lb-bundle-thumbnail",{"data-thumbnail":""}),l=e.selected?.image??e.product.featuredImage??null,d=null;l?(d=document.createElement("img"),d.src=re(l.url,{width:U,height:U,crop:"center"}),d.alt=l.altText??e.product.title,d.width=U,d.height=U,d.loading="lazy",a.appendChild(d)):a.insertAdjacentHTML("beforeend",sn);let s=null;e.isOos||(s=c("span","lb-bundle-qty-badge",{"data-qty-badge":""}),s.textContent=String(e.qty),a.appendChild(s)),i.appendChild(a);let p=c("div","lb-bundle-product-info"),u=document.createElement("a");if(u.className="lb-bundle-product-name",u.href=`/products/${e.product.handle}`,u.textContent=e.product.title,p.appendChild(u),e.isOos){let C=c("span","lb-bundle-oos-label");C.textContent="Out of stock",p.appendChild(C)}else if(e.selected){if(e.eligibleVariants.length===1&&e.product.variants.nodes.length>1){let _=c("span","lb-bundle-variant-badge");_.textContent=e.eligibleVariants[0].title,p.appendChild(_)}let m=c("span","lb-bundle-product-prices"),g=c("span","lb-bundle-product-compare-price",{"data-product-compare-price":""}),k=c("span","lb-bundle-product-price",{"data-product-price":""});m.appendChild(g),m.appendChild(k),p.appendChild(m);let A=c("span","lb-bundle-product-unit-price",{"data-product-unit-price":""});A.setAttribute("hidden",""),p.appendChild(A);let x=c("span","lb-bundle-low-stock-badge",{"data-low-stock-badge":""});x.setAttribute("hidden",""),p.appendChild(x);let E=_=>{let O=j(_.price.amount);if(k.textContent=D(O,t),_.compareAtPrice){let y=j(_.compareAtPrice.amount);y>O?(g.textContent=D(y,t),g.removeAttribute("hidden")):g.setAttribute("hidden","")}else g.setAttribute("hidden","");let h=le(_.unitPrice,_.unitPriceMeasurement,t);h?(A.textContent=h,A.removeAttribute("hidden")):A.setAttribute("hidden","");let M=_.image??e.product.featuredImage;d&&M&&(d.src=re(M.url,{width:U,height:U,crop:"center"}),d.alt=M.altText??e.product.title);let L=r(e.product.id,_.id);ue(_,L,o.threshold,o.enabled)?(x.textContent=`Only ${_.quantityAvailable} left`,x.removeAttribute("hidden")):x.setAttribute("hidden","")};if(E(e.selected),e.eligibleVariants.length>1){let _=e.eligibleVariants[0].selectedOptions.map(P=>P.name),O=e.product.id.replace(/^.*\//,""),h=[],M=P=>e.eligibleVariants.find(T=>T.selectedOptions.every((S,I)=>S.value===P[I])&&T.selectedOptions.length===P.length)??null,L=P=>{P.selectedOptions.forEach((T,S)=>{let I=h[S];I&&I.value!==T.value&&(I.value=T.value)})},y=(P,T,S)=>e.eligibleVariants.some(I=>!Z(I,r(e.product.id,I.id))||I.selectedOptions[P]?.value!==T?!1:I.selectedOptions.every((F,te)=>te===P||F.value===S[te])),B=P=>{h.forEach((T,S)=>{Array.from(T.options).forEach(I=>{I.disabled=!y(S,I.value,P)})})},f=()=>{let P=h.map(S=>S.value),T=M(P);if(!T){e.selected&&(L(e.selected),B(e.selected.selectedOptions.map(S=>S.value)));return}e.selected=T,e.qty=r(e.product.id,T.id),s&&(s.textContent=String(e.qty)),E(T),B(T.selectedOptions.map(S=>S.value)),n()},q=c("div","lb-bundle-variant-option-groups");_.forEach((P,T)=>{let S=c("div","lb-bundle-variant-option-group"),I=c("span","lb-bundle-variant-option-label");I.textContent=P,S.appendChild(I);let F=document.createElement("select");F.className="lb-bundle-variant-select",F.setAttribute("data-variant-option",""),F.setAttribute("data-option-position",String(T+1)),F.name=`lb-variant-${O}-${T+1}`,F.setAttribute("aria-label",P);let te=new Set;e.eligibleVariants.forEach(v=>{let b=v.selectedOptions[T]?.value;if(!b||te.has(b))return;te.add(b);let w=document.createElement("option");w.value=b,w.textContent=b,e.selected?.selectedOptions[T]?.value===b&&(w.selected=!0),F.appendChild(w)}),F.addEventListener("change",f),h.push(F),S.appendChild(F),q.appendChild(S)}),p.appendChild(q),e.selected&&B(e.selected.selectedOptions.map(P=>P.value))}}return i.appendChild(p),{el:i,state:e}}function hn(e){let t=c("div","lb-bundle-pricing"),r=c("span","lb-bundle-pricing__label");r.textContent="Bundle price",t.appendChild(r);let o=c("span","lb-bundle-pricing__prices"),n=c("span","lb-bundle-compare-price",{"data-compare-price":""});n.style.display="none",o.appendChild(n);let i=c("span","lb-bundle-sale-price",{"data-sale-price":""});return o.appendChild(i),t.appendChild(o),{el:t,update({totalCents:a,saleCents:l,savingsCents:d,currency:s}){i.textContent=D(l,s),e.widgetConfig.pricing.showCompareAtPrice&&d>0?(n.textContent=D(a,s),n.style.display=""):n.style.display="none"}}}function mn(){let e=c("div","lb-bundle-savings-bar",{"data-savings-bar":""}),t=document.createElement("span");t.textContent="You save",e.appendChild(t);let r=c("span","",{"data-savings-amount":""});return e.appendChild(r),{el:e,update({savingsCents:o,currency:n}){if(o<=0){e.style.display="none";return}e.style.display="",r.textContent=D(o,n)}}}function gn(e,t,r){let o=t>0?`${t} item${t===1?"":"s"} out of stock`:e.widgetConfig.cta.ctaText||"Add to cart",n=be(o);return t>0?n.disabled=!0:n.addEventListener("click",()=>{n.disabled||r()}),n}function fn(e,t,r){if(t.discountType==="percentage"){let o=0;for(let n of r){if(!n.selected)continue;let i=j(n.selected.price.amount),a=Math.floor(i*t.discountValue/100),l=Math.max(0,i-a);o+=l*n.qty}return o}return Math.max(0,e-Math.round(t.discountValue*100))}var St=`
|
|
238
|
-
<svg class="lb-bundle-placeholder-icon" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
|
|
239
|
-
<rect x="4" y="4" width="20" height="20" rx="3"></rect>
|
|
240
|
-
<line x1="4" y1="20" x2="24" y2="20"></line>
|
|
241
|
-
<circle cx="10" cy="12" r="2"></circle>
|
|
242
|
-
</svg>`,vn=`
|
|
243
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
244
|
-
<line x1="9" y1="3" x2="9" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
245
|
-
<line x1="3" y1="9" x2="15" y2="9" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
246
|
-
</svg>`,Et=`
|
|
247
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
248
|
-
<line x1="5" y1="5" x2="15" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
249
|
-
<line x1="15" y1="5" x2="5" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
250
|
-
</svg>`,xn=`
|
|
251
|
-
<svg width="16" height="16" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
252
|
-
<path d="M14.348 5.652a.5.5 0 0 0-.707 0L10 9.293 6.36 5.652a.5.5 0 1 0-.708.707L9.293 10l-3.641 3.641a.5.5 0 0 0 .708.707L10 10.707l3.641 3.641a.5.5 0 0 0 .707-.707L10.707 10l3.641-3.641a.5.5 0 0 0 0-.707z"/>
|
|
253
|
-
</svg>`,yn=`
|
|
254
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
255
|
-
<line x1="3" y1="7" x2="11" y2="7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
256
|
-
</svg>`,wn=`
|
|
257
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
258
|
-
<line x1="7" y1="3" x2="7" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
259
|
-
<line x1="3" y1="7" x2="11" y2="7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
|
260
|
-
</svg>`;function $e(e,t){return e.productRules[t]??pt}function Ue(e,t,r){let o=0;for(let n of e)n.productId===t&&n.variantId===r&&(o+=n.quantity);return o}function Tt(e,t,r,o){let n=t.widgetConfig,i=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",a=t.minQuantity??1,l=n.mixMatchShowQuantitySelector!==!1,d=Pn(t,n.outOfStockBehavior);if(d.filter(y=>!y.isOos).length<a)return;let p=[],u=c("div","lb-mix-match",{"data-required-quantity":String(a)}),C=kn(t);if(u.appendChild(C),n.countdown.showCountdown&&t.endsAt){let y=pe(t.endsAt);y&&(u.appendChild(y.el),o?.(y.stop))}let m=_n(a);u.appendChild(m.el);let g=c("div","lb-mix-match__slots",{"data-selection-slots":""});u.appendChild(g),u.appendChild(c("div","lb-bundle-divider"));let k=En(n.pricing.showCompareAtPrice);u.appendChild(k.el);let A=n.savingsBar.visible?Tn():null;A&&u.appendChild(A.el);let x=be(`Select ${a} items to unlock`);x.disabled=!0,x.addEventListener("click",()=>{x.disabled||r(Cn(p,t))});let E=An(t,d,i,{showSearch:n.showSearch,showQtySelector:l,selections:p,onAdd:(y,B,f)=>_(y,B,f),isComplete:()=>p.length>=a,getFocusAfterAdd:()=>g.querySelector(".lb-mix-match__slot--empty")??x});u.appendChild(E.el),u.appendChild(x),u.appendChild(c("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),u.appendChild(c("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),e.appendChild(u),o?.(()=>Ee(u)),h();function _(y,B,f){if(p.length>=a)return;let q=$e(t,y.id),P=Ne(B,q.max,Ue(p,y.id,B.id));if(P<q.min)return;let T=Math.max(q.min,Math.min(f,P));p.push({productId:y.id,productTitle:y.title,variantId:B.id,variantTitle:B.title,imageUrl:B.image?.url??y.featuredImage?.url??null,priceCents:j(B.price.amount),compareCents:B.compareAtPrice?j(B.compareAtPrice.amount):null,unitPriceLabel:le(B.unitPrice,B.unitPriceMeasurement,i),quantity:T}),h()}function O(y){y<0||y>=p.length||(p.splice(y,1),h())}function h(){M(),m.update(p.length),k.update(p,t,i),A&&A.update(p,t,i),E.refreshCounts(),L()}function M(){g.innerHTML="";let y=Math.max(a,p.length);for(let B=0;B<y;B++){let f=p[B];f?g.appendChild(Sn(f,B,i,()=>O(B))):g.appendChild(Bn(B,()=>E.open()))}}function L(){let y=p.length;y<a?(x.disabled=!0,He(x,`Select ${a-y} more to unlock`)):(x.disabled=!1,He(x,n.cta.ctaText||"Add to cart"))}}function Cn(e,t){let r=new Map;for(let o of e){let n=`${o.productId}::${o.variantId}`,i=r.get(n);i?i.quantity+=o.quantity:r.set(n,{variantId:o.variantId,quantity:o.quantity})}return Array.from(r.values()).map(o=>({merchandiseId:o.variantId,quantity:o.quantity,attributes:[{key:"_lime_bundle_gid",value:t.id},{key:"_lime_bundle_type",value:t.bundleType}]}))}function kn(e){let t=e.widgetConfig,r=c("div","lb-bundle-header"),o=c("div","lb-bundle-header__content"),n=c("h3","lb-bundle-title");if(n.textContent=e.title,o.appendChild(n),r.appendChild(o),t.pricing.showSaveBadge){let{discountType:i,discountValue:a}=e.discountConfig,l=null;if(i==="percentage"&&a>0?l=`-${Math.round(a)}%`:i==="fixed_amount"&&a>0&&(l=`-${D(Math.round(a*100),e.products[0]?.priceRange.minVariantPrice.currencyCode??"USD")}`),l){let d=c("span","lb-bundle-header__badge");d.textContent=l,r.appendChild(d)}}return r}function _n(e){let t=c("div","lb-mix-match__progress"),r=c("div","lb-mix-match__progress-labels"),o=c("span","lb-mix-match__progress-count",{"data-progress-count":"","aria-live":"polite"});o.textContent=`0 of ${e} selected`,r.appendChild(o);let n=c("span","lb-mix-match__progress-remaining",{"data-progress-remaining":"","aria-live":"polite"});n.textContent=`${e} more to go`,r.appendChild(n),t.appendChild(r);let i=c("div","lb-mix-match__progress-track",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e)}),a=c("div","lb-mix-match__progress-fill",{"data-progress-fill":""});a.style.width="0%",i.appendChild(a),t.appendChild(i);function l(d){let s=Math.min(100,d/e*100);o.textContent=`${d} of ${e} selected`,d>=e?n.textContent="Complete":n.textContent=`${e-d} more to go`,a.style.width=`${s}%`,i.setAttribute("aria-valuenow",String(Math.min(d,e)))}return{el:t,update:l}}function Bn(e,t){let r=c("div","lb-bundle-product-row lb-mix-match__slot lb-mix-match__slot--empty",{"data-slot":String(e+1),tabindex:"0",role:"button","aria-label":"Add a product to the bundle"}),o=c("div","lb-mix-match__empty-thumb");o.innerHTML=vn,r.appendChild(o);let n=c("span","lb-mix-match__empty-text");return n.textContent="Choose an item",r.appendChild(n),r.addEventListener("click",t),r.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),t())}),r}function Sn(e,t,r,o){let n=c("div","lb-bundle-product-row lb-mix-match__slot lb-mix-match__slot--filled",{"data-slot":String(t+1)}),i=c("div","lb-bundle-thumbnail",{"data-thumbnail":""});if(e.imageUrl){let g=document.createElement("img");g.src=re(e.imageUrl,{width:U,height:U,crop:"center"}),g.alt=e.productTitle,g.width=U,g.height=U,g.loading="lazy",i.appendChild(g)}else i.insertAdjacentHTML("beforeend",St);let a=c("span","lb-bundle-qty-badge");a.textContent=`\xD7${e.quantity}`,i.appendChild(a),n.appendChild(i);let l=c("div","lb-mix-match__filled-info"),d=c("span","lb-mix-match__filled-title");if(d.textContent=e.productTitle,l.appendChild(d),e.variantTitle&&e.variantTitle!=="Default Title"){let g=c("span","lb-mix-match__filled-variant");g.textContent=e.variantTitle,l.appendChild(g)}let s=e.priceCents*e.quantity,p=e.compareCents!==null?e.compareCents*e.quantity:null,u=c("span","lb-mix-match__filled-price");if(p!==null&&p>s){let g=c("span","lb-mix-match__filled-compare");g.textContent=D(p,r),u.appendChild(g)}let C=document.createElement("span");if(C.textContent=D(s,r),u.appendChild(C),l.appendChild(u),e.unitPriceLabel){let g=c("span","lb-bundle-product-unit-price");g.textContent=e.unitPriceLabel,l.appendChild(g)}n.appendChild(l);let m=document.createElement("button");return m.type="button",m.className="lb-mix-match__slot-remove",m.setAttribute("aria-label",`Remove ${e.productTitle}`),m.innerHTML=Et,m.addEventListener("click",g=>{g.stopPropagation(),o()}),n.appendChild(m),n}function En(e){let t=c("div","lb-bundle-pricing",{"data-pricing-section":""});t.style.display="none";let r=c("span","lb-bundle-pricing__label");r.textContent="Bundle price",t.appendChild(r);let o=c("span","lb-bundle-pricing__prices"),n=c("span","lb-bundle-compare-price",{"data-compare-price":""});e&&o.appendChild(n);let i=c("span","lb-bundle-sale-price",{"data-sale-price":""});o.appendChild(i),t.appendChild(o);function a(l,d,s){if(l.length===0){t.style.display="none";return}t.style.display="";let p=l.reduce((C,m)=>C+m.priceCents*m.quantity,0),u=Ce(p,d.discountConfig);e&&p>u?(n.textContent=D(p,s),n.style.display=""):n.style.display="none",i.textContent=D(u,s)}return{el:t,update:a}}function Tn(){let e=c("div","lb-bundle-savings-bar",{"data-savings-bar":""});e.style.display="none";let t=document.createElement("span");t.textContent="You save",e.appendChild(t);let r=c("span","",{"data-savings-amount":""});e.appendChild(r);function o(n,i,a){if(n.length===0){e.style.display="none";return}let l=n.reduce((p,u)=>p+u.priceCents*u.quantity,0),d=Ce(l,i.discountConfig),s=Math.max(0,l-d);if(s<=0){e.style.display="none";return}e.style.display="",r.textContent=D(s,a)}return{el:e,update:o}}function An(e,t,r,o){let n=c("div","lb-mix-match__modal-overlay",{"data-modal-overlay":"","data-bundle-gid":e.id});n.style.display="none";let i=c("div","lb-mix-match__modal",{role:"dialog","aria-modal":"true","aria-labelledby":`lb-modal-title-${Bt(e.id)}`,tabindex:"-1"}),a=c("div","lb-mix-match__modal-header"),l=c("h4","lb-mix-match__modal-title",{id:`lb-modal-title-${Bt(e.id)}`});l.textContent="Pick an item",a.appendChild(l);let d=document.createElement("button");d.type="button",d.className="lb-mix-match__modal-close",d.setAttribute("data-modal-close",""),d.setAttribute("aria-label","Close"),d.innerHTML=Et,d.addEventListener("click",L),a.appendChild(d),i.appendChild(a);let s=null,p=null;if(o.showSearch){let f=c("div","lb-mix-match__modal-search");s=document.createElement("input"),s.type="text",s.className="lb-mix-match__modal-search-input",s.setAttribute("data-modal-search",""),s.setAttribute("role","searchbox"),s.setAttribute("aria-label","Search products"),s.setAttribute("placeholder","Search products"),s.autocomplete="off",s.addEventListener("input",()=>E()),f.appendChild(s),p=document.createElement("button"),p.type="button",p.className="lb-mix-match__modal-search-clear",p.setAttribute("data-modal-search-clear",""),p.setAttribute("aria-label","Clear search"),p.style.display="none",p.innerHTML=xn,p.addEventListener("click",()=>{s&&(s.value="",E(),s.focus())}),f.appendChild(p),i.appendChild(f)}let u=c("div","lb-mix-match__modal-list",{"data-modal-list":""});i.appendChild(u);let C=c("div","lb-mix-match__modal-empty",{"data-modal-empty":""});C.style.display="none";let m=document.createElement("p");m.textContent="No products match your search.",C.appendChild(m),i.appendChild(C);let g=c("span","lb-visually-hidden",{"data-modal-live":"","aria-live":"polite"});i.appendChild(g),n.appendChild(i);let k=!1,A=[];function x(){k||(k=!0,u.innerHTML="",t.forEach(f=>{let q=$e(e,f.product.id),P=f.variants,T=f.variants.find(V=>Z(V,q.min))??f.firstAvailableVariant??f.variants[0];if(!T)return;let S=T,I=c("div",f.isOos?"lb-mix-match__modal-product lb-mix-match__modal-product--sold-out":"lb-mix-match__modal-product",{"data-product-id":f.product.id.replace(/^.*\//,"")}),F=c("div","lb-mix-match__modal-product-thumb"),v=(f.variants.find(V=>Z(V,q.min))??f.variants[0]??null)?.image??f.product.featuredImage??null,b=null;v?(b=document.createElement("img"),b.src=re(v.url,{width:U,height:U,crop:"center"}),b.alt=v.altText??f.product.title,b.width=U,b.height=U,b.loading="lazy",F.appendChild(b)):F.insertAdjacentHTML("beforeend",St);let w=c("span","lb-bundle-qty-badge");w.hidden=!0,F.appendChild(w),I.appendChild(F);let R=c("div","lb-mix-match__modal-product-info"),ne=c("p","lb-mix-match__modal-product-title");ne.textContent=f.product.title,R.appendChild(ne);let Y=c("p","lb-mix-match__modal-product-price");Y.textContent=D(j(S.price.amount),r),R.appendChild(Y);let ee=c("p","lb-mix-match__modal-product-unit-price lb-bundle-product-unit-price"),ze=le(S.unitPrice,S.unitPriceMeasurement,r);ze?ee.textContent=ze:ee.hidden=!0,R.appendChild(ee);let he=c("span","lb-bundle-low-stock-badge",{"data-low-stock-badge":""});he.hidden=!0,R.appendChild(he);let je=V=>{ue(V,q.min,e.widgetConfig.lowStockThreshold,e.widgetConfig.showLowStockBadge)?(he.textContent=`Only ${V.quantityAvailable} left`,he.hidden=!1):he.hidden=!0};je(S);let Qe=()=>{let V=Ue(o.selections,f.product.id,S.id),X=Ne(S,q.max,V),oe=Math.max(q.min,X);return{min:q.min,max:oe,cap:X}},K=null,ve=null;!f.isOos&&o.showQtySelector&&(ve=c("div","lb-bundle-variant-option-group lb-mix-match__qty-stepper-group"),K=Ln({initial:q.min,getBounds:()=>{let{min:V,max:X}=Qe();return{min:V,max:X}}}),ve.appendChild(K.el));let me={el:I,product:f.product,variant:T,refreshFromSelections:()=>{}},de=[];if(P.length>1){let V=P[0].selectedOptions.map($=>$.name),X=f.product.id.replace(/^.*\//,""),oe=$=>P.find(N=>N.selectedOptions.length===$.length&&N.selectedOptions.every((Q,H)=>Q.value===$[H]))??null,xe=$=>{$.selectedOptions.forEach((N,Q)=>{let H=de[Q];H&&H.value!==N.value&&(H.value=N.value)})},ie=($,N,Q)=>P.some(H=>!Z(H,q.min)||H.selectedOptions[$]?.value!==N?!1:H.selectedOptions.every((z,ge)=>ge===$||z.value===Q[ge])),Pe=$=>{de.forEach((N,Q)=>{Array.from(N.options).forEach(H=>{H.disabled=!ie(Q,H.value,$)})})},$t=()=>{let $=de.map(z=>z.value),N=oe($);if(!N){xe(S),Pe(S.selectedOptions.map(z=>z.value));return}S=N,me.variant=N,Y.textContent=D(j(S.price.amount),r);let Q=le(S.unitPrice,S.unitPriceMeasurement,r);Q?(ee.textContent=Q,ee.hidden=!1):(ee.textContent="",ee.hidden=!0);let H=S.image??f.product.featuredImage;b&&H&&(b.src=re(H.url,{width:U,height:U,crop:"center"}),b.alt=H.altText??f.product.title),Pe(N.selectedOptions.map(z=>z.value)),je(S),me.refreshFromSelections()},Ge=c("div","lb-bundle-variant-option-groups");V.forEach(($,N)=>{let Q=c("div","lb-bundle-variant-option-group"),H=c("span","lb-bundle-variant-option-label");H.textContent=$,Q.appendChild(H);let z=document.createElement("select");z.className="lb-mix-match__variant-select",z.setAttribute("data-variant-option",""),z.setAttribute("data-option-position",String(N+1)),z.name=`lb-variant-${X}-${N+1}`,z.setAttribute("aria-label",$);let ge=new Set;P.forEach(Wt=>{let se=Wt.selectedOptions[N]?.value;if(!se||ge.has(se))return;ge.add(se);let ye=document.createElement("option");ye.value=se,ye.textContent=se,T.selectedOptions[N]?.value===se&&(ye.selected=!0),z.appendChild(ye)}),z.addEventListener("change",$t),de.push(z),Q.appendChild(z),Ge.appendChild(Q)}),R.appendChild(Ge),Pe(T.selectedOptions.map($=>$.value))}else if(P.length===1&&T.title!=="Default Title"){let V=c("span","lb-mix-match__filled-variant");V.textContent=T.title,R.appendChild(V)}if(f.isOos){let V=c("span","lb-mix-match__modal-sold-out-label");V.textContent="Sold out",R.appendChild(V)}I.appendChild(R);let W=null,Ut=()=>{if(!W){de.forEach(ie=>{ie.disabled=!0}),K&&K.setExternallyDisabled(!0);return}let{cap:V}=Qe(),X=Ue(o.selections,f.product.id,S.id);X>0?(w.textContent=String(X),w.hidden=!1):w.hidden=!0,o.selections.some(ie=>ie.productId===f.product.id)?(W.disabled=!0,W.textContent="Added",W.setAttribute("aria-label",`Added ${f.product.title}`),I.classList.add("lb-mix-match__modal-product--in-bundle")):(W.textContent="Add",W.setAttribute("aria-label",`Add ${f.product.title}`),I.classList.remove("lb-mix-match__modal-product--in-bundle"),W.disabled=o.isComplete()||V<q.min);let xe=W.disabled;de.forEach(ie=>{ie.disabled=xe}),K&&K.setExternallyDisabled(xe)};if(!f.isOos){let V=c("div","lb-mix-match__modal-product-actions");ve&&V.appendChild(ve),W=document.createElement("button"),W.type="button",W.className="lb-mix-match__modal-add",W.textContent="Add",W.setAttribute("aria-label",`Add ${f.product.title}`),W.addEventListener("click",()=>{if(!W||W.disabled||o.isComplete())return;let X=K?K.value():q.min;o.onAdd(f.product,S,X),K&&K.reset(q.min);let oe=o.getFocusAfterAdd();oe&&(_=oe),L()}),V.appendChild(W),R.appendChild(V)}me.refreshFromSelections=()=>{K&&K.refresh(),Ut()},me.refreshFromSelections(),A.push(me),u.appendChild(I)}),Se(u),B())}function E(){if(!s)return;let f=s.value.trim().toLowerCase();p&&(p.style.display=f?"":"none");let q=0;A.forEach(P=>{let T=!f||P.product.title.toLowerCase().includes(f);P.el.style.display=T?"":"none",T&&q++}),C.style.display=q===0&&f?"":"none"}let _=null;function O(f){if(f.key==="Escape"){f.preventDefault(),L();return}f.key==="Tab"&&Mn(f,i)}let h=!1;function M(){h||o.isComplete()||(h=!0,x(),_=n.getRootNode().activeElement,n.style.display="",n.classList.add("lb-mix-match__modal-overlay--open"),i.focus(),document.addEventListener("keydown",O),n.addEventListener("click",y))}function L(){h&&(h=!1,n.classList.remove("lb-mix-match__modal-overlay--open"),n.style.display="none",document.removeEventListener("keydown",O),n.removeEventListener("click",y),_ instanceof HTMLElement&&_.focus())}function y(f){f.target===n&&L()}function B(){A.forEach(f=>f.refreshFromSelections())}return{el:n,open:M,close:L,refreshCounts:B}}function Ln(e){let t=c("div","lb-mix-match__qty-stepper",{role:"group","aria-label":"Quantity"}),r=document.createElement("button");r.type="button",r.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--minus",r.setAttribute("aria-label","Decrease quantity"),r.innerHTML=yn,t.appendChild(r);let o=c("span","lb-mix-match__qty-stepper-value",{"aria-live":"polite"});t.appendChild(o);let n=document.createElement("button");n.type="button",n.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--plus",n.setAttribute("aria-label","Increase quantity"),n.innerHTML=wn,t.appendChild(n);let i=l(e.initial,e.getBounds()),a=!1;function l(s,p){return Math.max(p.min,Math.min(p.max,s))}function d(){let s=e.getBounds();i=l(i,s),o.textContent=String(i),r.disabled=a||i<=s.min,n.disabled=a||i>=s.max}return r.addEventListener("click",()=>{let s=e.getBounds();i=l(i-1,s),d()}),n.addEventListener("click",()=>{let s=e.getBounds();i=l(i+1,s),d()}),d(),{el:t,value:()=>i,reset(s){i=l(s,e.getBounds()),d()},refresh:d,setExternallyDisabled(s){a=s,d()}}}function Pn(e,t){let r=[],o=new Set;for(let n of e.products){if(o.has(n.id))continue;o.add(n.id);let i=$e(e,n.id),a=n.variants.nodes.filter(d=>Z(d,i.min)),l=a.length===0;l&&t==="hide"||r.push({product:n,variants:n.variants.nodes,firstAvailableVariant:a[0]??null,isOos:l})}return r}function Mn(e,t){let r=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(r.length===0)return;let o=r[0],n=r[r.length-1],i=t.getRootNode().activeElement;e.shiftKey&&i===o?(e.preventDefault(),n.focus()):!e.shiftKey&&i===n&&(e.preventDefault(),o.focus())}function Bt(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function Mt(e,t,r,o){let n=t.widgetConfig,i=t.products[0],a=t.volumeTiers[0]?.minQuantity??1,l=i?.variants.nodes.find(h=>Z(h,a));if(!l&&n.outOfStockBehavior==="hide")return;let d=l?j(l.price.amount):0,s=l?.price.currencyCode??"USD",p=t.discountConfig.discountType,u=t.volumeTiers.map((h,M)=>{let L;if(p==="fixed_amount"){let y=Math.round((h.amount??0)*100);L=Math.max(0,d-y)}else{let y=h.percentage??0,B=Math.floor(d*y/100);L=Math.max(0,d-B)}return{tier:h,index:M,qty:h.minQuantity,pricePerUnitCents:L,basePricePerUnitCents:d}}),C=qn(u),m=n.defaultTier==="best_value"?C:0;typeof n.defaultTier=="number"&&(m=Pt(n.defaultTier,0,u.length-1));let g=n.popularBadge.tierIndex!==void 0?Pt(n.popularBadge.tierIndex,0,u.length-1):C,k=c("div","lb-volume");if(k.appendChild(In(t,u,m,s,p)),n.countdown.showCountdown&&t.endsAt){let h=pe(t.endsAt);h&&(k.appendChild(h.el),o?.(h.stop))}let A=c("div","lb-volume__tiers",{role:"radiogroup","aria-label":"Quantity tiers","data-tier-group":""});u.forEach(h=>{let M=Rn(h,h.index===m,s,n.popularBadge.visible&&h.index===g?n.popularBadge.text:null,n.pricing.showComparePrice,n.pricing.showPerUnitPrice);M.addEventListener("click",()=>O(h.index)),M.addEventListener("keydown",L=>{if(L.key==="Enter"||L.key===" "){L.preventDefault(),O(h.index);return}if(L.key==="ArrowDown"||L.key==="ArrowRight"||L.key==="ArrowUp"||L.key==="ArrowLeft"){L.preventDefault();let y=L.key==="ArrowDown"||L.key==="ArrowRight"?1:-1,B=(h.index+y+u.length)%u.length;O(B),A.children[B]?.focus()}}),A.appendChild(M)}),k.appendChild(A),k.appendChild(c("div","lb-bundle-divider"));let x=At(u,m,s,n.pricing.showItemCount,n.pricing.showCompareAtPrice);k.appendChild(x);let E=n.savingsBar.visible?Lt(u,m,s):null;E&&k.appendChild(E);let _=Dn(t,()=>{if(!l)return;let h=u[m];h&&r([{merchandiseId:l.id,quantity:h.qty,attributes:[{key:"_lime_bundle_gid",value:t.id},{key:"_lime_bundle_type",value:t.bundleType}]}])});if(l&&ue(l,a,n.lowStockThreshold,n.showLowStockBadge)){let h=c("span","lb-bundle-low-stock-badge",{"data-low-stock-badge":""});h.textContent=`Only ${l.quantityAvailable} left`,k.appendChild(h)}k.appendChild(_),k.appendChild(c("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),k.appendChild(c("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),e.appendChild(k);function O(h){if(h===m||h<0||h>=u.length)return;m=h,Array.from(A.children).forEach((y,B)=>{y.setAttribute("aria-checked",String(B===h)),y.tabIndex=B===h?0:-1});let M=At(u,h,s,n.pricing.showItemCount,n.pricing.showCompareAtPrice);if(x.replaceWith(M),x=M,E){let y=Lt(u,h,s);E.replaceWith(y),E=y}let L=k.querySelector("[data-header-badge]");if(L){let y=It(u[h],s,p);y?(L.textContent=y,L.style.display=""):L.style.display="none"}}}function In(e,t,r,o,n){let i=e.widgetConfig,a=c("div","lb-bundle-header"),l=c("div","lb-bundle-header__content"),d=c("h3","lb-bundle-title");if(d.textContent=e.title,l.appendChild(d),a.appendChild(l),i.pricing.showSaveBadge){let s=It(t[r],o,n);if(s){let p=c("span","lb-bundle-header__badge",{"data-header-badge":""});p.textContent=s,a.appendChild(p)}}return a}function Rn(e,t,r,o,n,i){let a=c("div","lb-volume__tier",{role:"radio","aria-checked":String(t),tabindex:t?"0":"-1","data-tier-index":String(e.index),"data-tier-qty":String(e.qty)}),l=c("span","lb-volume__radio");l.appendChild(c("span","lb-volume__radio-dot")),a.appendChild(l);let d=c("span","lb-volume__tier-grid"),s=c("span","lb-volume__tier-label");s.textContent=`Buy ${e.qty}`,d.appendChild(s);let p=c("span","lb-volume__tier-price");if(n&&e.pricePerUnitCents<e.basePricePerUnitCents){let C=c("span","lb-volume__tier-compare");C.textContent=D(e.basePricePerUnitCents,r),p.appendChild(C)}if(i){let C=document.createElement("span");C.setAttribute("data-tier-price-each",""),C.textContent=D(e.pricePerUnitCents,r),p.appendChild(C);let m=c("span","lb-volume__tier-unit");m.textContent=" each",p.appendChild(m)}d.appendChild(p),a.appendChild(d);let u=c("span","lb-volume__tier-badge");return o?u.textContent=o:u.style.display="none",a.appendChild(u),a}function At(e,t,r,o,n){let i=e[t],a=i?i.pricePerUnitCents*i.qty:0,l=i?i.basePricePerUnitCents*i.qty:0,d=Math.max(0,l-a),s=c("div","lb-bundle-pricing"),p=c("span","lb-bundle-pricing__label",{"data-total-label":""});if(p.textContent="Total",o&&i){let m=document.createElement("span");m.setAttribute("data-item-count",""),m.textContent=` (${i.qty} item${i.qty===1?"":"s"})`,p.appendChild(m)}s.appendChild(p);let u=c("span","lb-bundle-pricing__prices");if(n&&d>0){let m=c("span","lb-bundle-compare-price",{"data-compare-price":""});m.textContent=D(l,r),u.appendChild(m)}let C=c("span","lb-bundle-sale-price",{"data-total-price":""});return C.textContent=D(a,r),u.appendChild(C),s.appendChild(u),s}function Lt(e,t,r){let o=e[t],n=o?o.pricePerUnitCents*o.qty:0,i=o?o.basePricePerUnitCents*o.qty:0,a=Math.max(0,i-n),l=c("div","lb-bundle-savings-bar",{"data-savings-bar":""});a<=0&&(l.style.display="none");let d=document.createElement("span");d.textContent="You save",l.appendChild(d);let s=c("span","",{"data-savings-amount":""});return s.textContent=D(a,r),l.appendChild(s),l}function Dn(e,t){let r=e.products[0],o=e.volumeTiers[0]?.minQuantity??1,n=r?.variants.nodes.some(l=>Z(l,o)),i=n?e.widgetConfig.cta.ctaText||"Add to cart":"Sold out",a=be(i);return n||(a.disabled=!0),a.addEventListener("click",()=>{a.disabled||t()}),a}function It(e,t,r){if(!e)return null;let{tier:o}=e;if(r==="fixed_amount"){let n=o.amount??0;return n>0?`-${D(Math.round(n*100),t)}`:null}if(r==="percentage"){let n=o.percentage??0;return n>0?`-${Math.round(n)}%`:null}return null}function qn(e){let t=0,r=0;return e.forEach((o,n)=>{let i=o.basePricePerUnitCents-o.pricePerUnitCents;i>t&&(t=i,r=n)}),r}function Pt(e,t,r){return Math.max(t,Math.min(r,e))}var Vn=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","Enter"," ","Escape"]),Te=new Set,Ae=!1;function Rt(e){let t=e==="using-mouse"?"using-keyboard":"using-mouse";for(let r of Te)r.classList.add(e),r.classList.remove(t)}function Dt(e){Vn.has(e.key)&&Rt("using-keyboard")}function qt(){Rt("using-mouse")}function On(){Ae||(Ae=!0,document.addEventListener("keydown",Dt,!0),document.addEventListener("pointerdown",qt,!0))}function Fn(){Ae&&(Ae=!1,document.removeEventListener("keydown",Dt,!0),document.removeEventListener("pointerdown",qt,!0))}function Le(e){return e.classList.add("using-mouse"),e.classList.remove("using-keyboard"),Te.add(e),On(),()=>{Te.delete(e),e.classList.remove("using-mouse"),e.classList.remove("using-keyboard"),Te.size===0&&Fn()}}var We=`/* Lime Bundles \u2014 shared base styles for all bundle widget types */
|
|
241
|
+
`;var ft="show_greyed_out";function Zt(e){return e==="hide"?"hide":ft}var ae=class extends Error{constructor(e,t){super(e),this.reason=t,this.name="BundleParseError"}},qt={none:0,subtle:6,rounded:12,round:18},ie={header:{countdownBgColor:"#B4DC7F47",countdownTextColor:"#555555"},layout:{backgroundColor:"#FCFCFC",borderColor:"#E5E5E5",borderWidth:1,borderRadius:"subtle"},productList:{textColor:"#555555",thumbnailRatio:"square",showPrice:!0,showCompareAtPrice:!0,showUnitPrice:!0,showQuantity:!0},pricing:{showComparePrice:!0,showPerUnitPrice:!0,showItemCount:!0,showCompareAtPrice:!0},cta:{ctaText:"Add to cart",primaryColor:"#B4DC7F",buttonTextColor:"#555555",borderWidth:0,borderColor:"#B4DC7F"},savingsBar:{visible:!0},countdown:{showCountdown:!0},popularBadge:{visible:!0,text:"Most Popular",bgColor:"#1A1A1A",textColor:"#FFFFFF",borderWidth:0,borderColor:"#1A1A1A"},showLowStockBadge:!0,lowStockThreshold:10,lowStockBgColor:"#FEF3C7",lowStockTextColor:"#92400E",showSearch:!0,mixMatchShowTypeFilters:!0,mixMatchShowQuantitySelector:!0,pickerBgColor:"#FCFCFC",pickerTextColor:"#555555",pickerBorderWidth:1,pickerBorderColor:"#E5E5E5",pickerBorderRadius:"subtle",pickerThumbnailRatio:"square",pickerAddBgColor:"#B4DC7F",pickerAddLabelColor:"#555555",pickerAddBorderWidth:0,pickerAddBorderColor:"#B4DC7F",defaultTier:"first"};function kr(e){if(!e||typeof e!="object")return ie;let t=e;return{...ie,...t,defaultTier:Sr(t.defaultTier),pickerBorderRadius:Rt(t.pickerBorderRadius),header:{...ie.header,...t.header??{}},layout:{...ie.layout,...t.layout??{},borderRadius:Rt(t.layout?.borderRadius)},productList:{...ie.productList,...t.productList??{}},pricing:{...ie.pricing,...t.pricing??{}},cta:{...ie.cta,...t.cta??{}},savingsBar:{...ie.savingsBar,...t.savingsBar??{}},countdown:{...ie.countdown,...t.countdown??{}},popularBadge:{...ie.popularBadge,...t.popularBadge??{}}}}function Sr(e){return e==="first"||e==="best_value"||typeof e=="number"&&Number.isInteger(e)&&e>=0?e:ie.defaultTier}function Rt(e){return e==="none"||e==="subtle"||e==="rounded"||e==="round"?e:ie.layout.borderRadius}function Tr(e){return{primaryColor:e.cta.primaryColor,backgroundColor:e.layout.backgroundColor,textColor:e.productList.textColor,borderColor:e.layout.borderColor,borderWidth:e.layout.borderWidth,buttonTextColor:e.cta.buttonTextColor,ctaBorderWidth:e.cta.borderWidth,ctaBorderColor:e.cta.borderColor,borderRadius:qt[e.layout.borderRadius],countdownBgColor:e.header.countdownBgColor,countdownTextColor:e.header.countdownTextColor,thumbnailRatio:e.productList.thumbnailRatio,showProductPrice:e.productList.showPrice,showProductCompareAtPrice:e.productList.showCompareAtPrice,showProductUnitPrice:e.productList.showUnitPrice,showProductQuantity:e.productList.showQuantity,showCountdown:e.countdown.showCountdown,ctaText:e.cta.ctaText,showLowStockBadge:e.showLowStockBadge,lowStockThreshold:e.lowStockThreshold,lowStockBgColor:e.lowStockBgColor,lowStockTextColor:e.lowStockTextColor,showComparePrice:e.pricing.showComparePrice,showPerUnitPrice:e.pricing.showPerUnitPrice,showItemCount:e.pricing.showItemCount,showCompareAtPrice:e.pricing.showCompareAtPrice,showMostPopular:e.popularBadge.visible,popularBadgeText:e.popularBadge.text,popularBadgeBgColor:e.popularBadge.bgColor,popularBadgeTextColor:e.popularBadge.textColor,popularBadgeBorderWidth:e.popularBadge.borderWidth,popularBadgeBorderColor:e.popularBadge.borderColor,showSearch:e.showSearch,mixMatchShowTypeFilters:e.mixMatchShowTypeFilters,pickerBgColor:e.pickerBgColor,pickerTextColor:e.pickerTextColor,pickerBorderWidth:e.pickerBorderWidth,pickerBorderColor:e.pickerBorderColor,pickerBorderRadius:qt[e.pickerBorderRadius],pickerThumbnailRatio:e.pickerThumbnailRatio,pickerAddBgColor:e.pickerAddBgColor,pickerAddLabelColor:e.pickerAddLabelColor,pickerAddBorderWidth:e.pickerAddBorderWidth,pickerAddBorderColor:e.pickerAddBorderColor,defaultTier:e.defaultTier,...e.popularBadge.tierIndex!==void 0&&{mostPopularTierIndex:e.popularBadge.tierIndex}}}var Er={primaryColor:"--lb-primary-color",backgroundColor:"--lb-bg",textColor:"--lb-text",borderColor:"--lb-border",borderWidth:"--lb-border-width",buttonTextColor:"--lb-btn-text",borderRadius:"--lb-radius",countdownBgColor:"--lb-countdown-bg",countdownTextColor:"--lb-countdown-text",ctaBorderWidth:"--lb-cta-border-width",ctaBorderColor:"--lb-cta-border-color",popularBadgeBgColor:"--lb-popular-badge-bg",popularBadgeTextColor:"--lb-popular-badge-text",popularBadgeBorderWidth:"--lb-popular-badge-border-width",popularBadgeBorderColor:"--lb-popular-badge-border-color",pickerBgColor:"--lb-picker-bg",pickerTextColor:"--lb-picker-text",pickerBorderWidth:"--lb-picker-border-width",pickerBorderColor:"--lb-picker-border-color",pickerBorderRadius:"--lb-picker-radius",pickerAddBgColor:"--lb-picker-add-bg",pickerAddLabelColor:"--lb-picker-add-label",pickerAddBorderWidth:"--lb-picker-add-border-width",pickerAddBorderColor:"--lb-picker-add-border-color"},Mr=new Set(["borderRadius","borderWidth","ctaBorderWidth","popularBadgeBorderWidth","pickerBorderWidth","pickerBorderRadius","pickerAddBorderWidth"]);function en(e,t){let n=Tr(t);for(let[i,a]of Object.entries(Er)){let l=n[i];if(l==null)continue;let d=Mr.has(i)?`${l}px`:String(l);e.style.setProperty(a,d)}e.style.setProperty("--lb-product-price-display",t.productList.showPrice?"block":"none"),e.style.setProperty("--lb-product-compare-display",t.productList.showCompareAtPrice?"inline":"none"),e.style.setProperty("--lb-product-unit-price-display",t.productList.showUnitPrice?"block":"none"),e.style.setProperty("--lb-product-qty-chip-display",t.productList.showQuantity?"inline-flex":"none"),e.style.setProperty("--lb-product-qty-inline-display",t.productList.showQuantity?"inline":"none"),e.style.setProperty("--lb-variant-chevron",Nt(t.layout.borderColor)),e.style.setProperty("--lb-picker-variant-chevron",Nt(t.pickerBorderColor));let r=Ot(t.productList.thumbnailRatio);e.style.setProperty("--lb-thumbnail-aspect-ratio",r.aspectRatio),e.style.setProperty("--lb-thumbnail-img-fit",r.imgFit),e.style.setProperty("--lb-thumbnail-img-height",r.imgHeight);let o=Ot(t.pickerThumbnailRatio);e.style.setProperty("--lb-picker-thumbnail-aspect-ratio",o.aspectRatio),e.style.setProperty("--lb-picker-thumbnail-img-fit",o.imgFit),e.style.setProperty("--lb-picker-thumbnail-img-height",o.imgHeight)}function Nt(e){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='${e.replace(/#/g,"%23")}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`}function Ot(e){switch(e){case"tall":return{aspectRatio:"3 / 4",imgFit:"cover",imgHeight:"100%"};case"wide":return{aspectRatio:"4 / 3",imgFit:"cover",imgHeight:"100%"};case"original":return{aspectRatio:"auto",imgFit:"contain",imgHeight:"auto"};default:return{aspectRatio:"1 / 1",imgFit:"cover",imgHeight:"100%"}}}var Ir=new Set(["fixed","mix_match","volume","bogo","multi_step"]),Ar=new Set(["active"]);function gt(e,t){try{return Lr(e,t)}catch(n){if(n instanceof ae)return null;throw n}}function Lr(e,t){let n=new Map(t.map(C=>[C.key,C])),r=n.get("title")?.value??"Bundle",o=n.get("bundle_type")?.value,i=n.get("status")?.value;if(!o||!Ir.has(o))throw new ae(`Invalid or missing bundle_type: ${o??"null"}`,"invalid_type");let a=o;if(!i||!Ar.has(i))throw new ae(`Bundle is not active: status=${i??"null"}`,"inactive");let l=i,d=n.get("starts_at")?.value??null,s=n.get("ends_at")?.value??null,c=new Date;if(d){let C=new Date(d);if(Number.isNaN(C.getTime()))throw new ae(`Invalid starts_at: ${d}`,"invalid_type");if(C>c)throw new ae(`Bundle not yet started: starts_at=${d}`,"not_started")}if(s){let C=new Date(s);if(Number.isNaN(C.getTime()))throw new ae(`Invalid ends_at: ${s}`,"invalid_type");if(C<c)throw new ae(`Bundle has expired: ends_at=${s}`,"expired")}let u=Rr(n),p=Nr(n),v=Or(n),g={id:e,title:r,description:n.get("description")?.value||null,status:l,products:u,discountConfig:p,widgetConfig:v,startsAt:d,endsAt:s,discountLabel:n.get("discount_label")?.value??null,selectedVariantIds:Hr(n),productQuantities:Ht(n,"product_quantities"),variantQuantities:Ht(n,"variant_quantities"),marketVisibility:Dr(n),marketIds:Fr(n),abTestId:n.get("ab_test_id")?.value||null,abWeight:Vr(n)};switch(a){case"fixed":return{...g,bundleType:"fixed"};case"volume":return{...g,bundleType:"volume",volumeTiers:Ur(n)};case"mix_match":return{...g,bundleType:"mix_match",minQuantity:Qr(n,"min_quantity",{min:1}),maxQuantity:null,productRules:Oe(n,"product_rules"),variantRules:Oe(n,"variant_rules")};case"bogo":return{...g,bundleType:"bogo",...qr(n)};case"multi_step":return{...g,bundleType:"multi_step",steps:Pr(n),productRules:Oe(n,"product_rules"),variantRules:Oe(n,"variant_rules"),collectionProductIds:Br(n)}}}function Pr(e){let t=xe(e,"steps");if(!Array.isArray(t))throw new ae("Invalid or missing steps","invalid_type");let n=o=>Array.isArray(o)?o.filter(i=>typeof i=="string"):[],r=[];for(let o of t){if(!o||typeof o!="object"||Array.isArray(o))continue;let i=o;if(typeof i.name!="string")continue;let a=typeof i.minQuantity=="number"?i.minQuantity:Number(i.minQuantity),l=Number.isFinite(a)&&a>=1?Math.floor(a):1,d=null;typeof i.maxQuantity=="number"&&Number.isFinite(i.maxQuantity)&&(d=Math.max(l,Math.floor(i.maxQuantity))),r.push({name:i.name,minQuantity:l,maxQuantity:d,productIds:n(i.productIds),collectionIds:n(i.collectionIds)})}if(r.length===0)throw new ae("multi_step bundle has no valid steps","invalid_type");return r}function Br(e){let t={},n=e.get("collection");if(!n?.references?.nodes)return t;for(let r of n.references.nodes)!("products"in r)||!r.products?.nodes||(t[r.id]=r.products.nodes.map(o=>o.id));return t}function qr(e){let t=xe(e,"bogo_config");if(!t||typeof t!="object"||Array.isArray(t))throw new ae("Invalid or missing bogo_config","invalid_type");let n=t,r=typeof n.buyProductId=="string"?n.buyProductId:"",o=typeof n.getProductId=="string"?n.getProductId:"";if(!r||!o)throw new ae("bogo_config is missing buy/get product ids","invalid_type");let i=a=>{let l=typeof a=="number"?a:Number(a);return!Number.isFinite(l)||l<1?1:Math.min(99,Math.floor(l))};return{buyProductId:r,getProductId:o,buyQuantity:i(n.buyQuantity),getQuantity:i(n.getQuantity)}}function Rr(e){let t=[],n=e.get("products");if(n?.reference&&"variants"in n.reference&&t.push(n.reference),n?.references?.nodes)for(let o of n.references.nodes)"variants"in o?t.push(o):"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);let r=e.get("collection");if(r?.references?.nodes)for(let o of r.references.nodes)"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);return t}function Nr(e){return{discountType:e.get("discount_type")?.value??"percentage",discountValue:parseFloat(e.get("discount_value")?.value??"0"),allowStacking:e.get("allow_stacking")?.value==="true"}}function Or(e){return kr(xe(e,"widget_config"))}function Hr(e){let t=xe(e,"selected_variant_ids");if(!Array.isArray(t))return null;let n=[];for(let r of t)Array.isArray(r)?n.push(r.filter(o=>typeof o=="string")):n.push([]);return n}function Ht(e,t){let n=xe(e,t);if(!n||typeof n!="object"||Array.isArray(n))return{};let r={};for(let[o,i]of Object.entries(n)){let a=typeof i=="number"?i:Number(i);Number.isFinite(a)&&a>=0&&a<=99&&(r[o]=Math.floor(a))}return r}function Oe(e,t){let n=xe(e,t);if(!n||typeof n!="object"||Array.isArray(n))return{};let r={};for(let[o,i]of Object.entries(n)){if(!i||typeof i!="object"||Array.isArray(i))continue;let{min:a,max:l,required:d}=i,s=typeof a=="number"?a:Number(a),c=typeof l=="number"?l:Number(l);if(!Number.isFinite(s)||!Number.isFinite(c))continue;let u=Math.max(1,Math.min(99,Math.floor(s))),p=Math.max(u,Math.min(99,Math.floor(c)));r[o]=d===!0?{min:u,max:p,required:!0}:{min:u,max:p}}return r}function Dr(e){return e.get("market_visibility")?.value==="specific"?"specific":"all"}function Fr(e){let t=e.get("markets")?.value;if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>typeof r=="string"):[]}catch{return[]}}function Vr(e){let t=e.get("ab_weight")?.value;if(!t)return 0;let n=Number.parseInt(t,10);return Number.isNaN(n)?0:Math.min(100,Math.max(0,n))}function Ur(e){let t=xe(e,"volume_tiers");return Array.isArray(t)?t.filter(n=>typeof n=="object"&&n!==null).map(zr):[]}function zr(e){let t=Number(e.minQuantity??0),n={minQuantity:Number.isFinite(t)&&t>=0?t:0};return typeof e.percentage=="number"&&Number.isFinite(e.percentage)&&(n.percentage=e.percentage),typeof e.amount=="number"&&Number.isFinite(e.amount)&&(n.amount=e.amount),n}function xe(e,t){let n=e.get(t)?.value;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Qr(e,t,n={}){let r=e.get(t)?.value;if(!r)return null;let o=parseInt(r,10);return isNaN(o)||n.min!==void 0&&o<n.min?null:o}function Dt(e){return e.split("/").pop()??e}function tn(e,t){if(e.marketVisibility!=="specific")return!0;if(!t)return!1;let n=Dt(t);return e.marketIds.some(r=>Dt(r)===n)}function xt(e,t,n){let r=e.variantQuantities[n];return r!==void 0?r:e.productQuantities[t]??1}function nn(e,t){let n=e.steps[t];if(!n)return[];let r=new Set(n.productIds),o=new Set;for(let l of n.collectionIds)for(let d of e.collectionProductIds[l]??[])o.add(d);let i=new Set,a=[];for(let l of e.products)i.has(l.id)||!r.has(l.id)&&!o.has(l.id)||(i.add(l.id),a.push(l));return a}async function rn(e,t){await ln(e,{shopDomain:e.shopDomain,eventType:"bundle_impression",bundleGid:t.bundleGid,bundleType:t.bundleType,productId:t.productId,occurredAt:new Date().toISOString()})}async function on(e,t){await ln(e,{shopDomain:e.shopDomain,eventType:"bundle_add_to_cart",...t,occurredAt:new Date().toISOString()})}function an(e,t){if(typeof IntersectionObserver>"u")return t(),()=>{};let n=new IntersectionObserver(r=>{for(let o of r)o.isIntersecting&&(t(),n.unobserve(o.target))},{threshold:.5});return n.observe(e),()=>n.disconnect()}async function ln(e,t){let n=`${e.appUrl}/api/analytics`,r=JSON.stringify(t);try{(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r})).ok||(await new Promise(i=>setTimeout(i,2e3)),await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r}))}catch{try{typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(n,r)}catch{}}}var Ft=1e4,Wr=[[/@import/i,"@import rules"],[/@charset/i,"@charset declarations"],[/expression\s*\(/i,"CSS expressions"],[/-moz-binding/i,"-moz-binding"],[/-webkit-binding/i,"-webkit-binding"],[/behavior\s*:/i,"behavior property"]],jr=/^(https:|\/[^/]|\.\/|\.\.\/|#)/;function vt(e){if(e.length>Ft)return{ok:!1,error:`CSS exceeds ${Ft.toLocaleString("en-US")} character limit`};let t=e.replace(/\/\*[\s\S]*?\*\//g,"");try{t=t.replace(/\\([0-9a-fA-F]{1,6})[ \t\n\f]?/g,(o,i)=>{let a=parseInt(i,16);return a<0||a>1114111?"\uFFFD":String.fromCodePoint(a)}),t=t.replace(/\\\r?\n/g,""),t=t.replace(/\\([^\n\r\f0-9a-fA-F])/g,"$1")}catch{return{ok:!1,error:"CSS contains invalid unicode escape sequences"}}t=t.replace(/</g,"").replace(/>/g,"");for(let[o,i]of Wr)if(o.test(t))return{ok:!1,error:`CSS contains blocked pattern: ${i}`};let n=/url\s*\(\s*([\s\S]*?)\s*\)/gi,r;for(;(r=n.exec(t))!==null;){let o=r[1].trim();if((o.startsWith("'")||o.startsWith('"'))&&(o=o.slice(1)),(o.endsWith("'")||o.endsWith('"'))&&(o=o.slice(0,-1)),o=o.trim(),o&&!jr.test(o))return{ok:!1,error:"CSS url() values must use https:// or relative paths"}}return{ok:!0,css:t}}var $r="lb-custom-css-";function sn(e,t){if(typeof document>"u"||!t)return!1;let n=vt(t);if(!n.ok||!n.css.trim())return!1;let r=$r+Gr(e),o=document.getElementById(r);return o||(o=document.createElement("style"),o.id=r,o.setAttribute("data-lime-bundles","custom-css"),document.head.appendChild(o)),o.textContent!==n.css&&(o.textContent=n.css),!0}function Gr(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function Kr(e,t){let n=typeof e=="string"?parseFloat(e):e;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(n)}catch{return`${t} ${n.toFixed(2)}`}}function De(e,t,n){return t==="percentage"?Math.max(0,e*(1-n/100)):Math.max(0,e-n)}var Yr={CL:"cl",CM:"cm",FLOZ:"fl oz",FT:"ft",FT2:"ft\xB2",G:"g",GAL:"gal",IN:"in",ITEM:"each",KG:"kg",L:"l",LB:"lb",M:"m",M2:"m\xB2",M3:"m\xB3",MG:"mg",ML:"ml",MM:"mm",OZ:"oz",PT:"pt",QT:"qt",UNKNOWN:"",YD:"yd"};function dn(e,t,n){if(!e||!t||t.referenceUnit==="UNKNOWN")return null;let r=parseFloat(e.amount);if(!Number.isFinite(r))return null;let o=Yr[t.referenceUnit]??"";if(!o)return null;let i=e.currencyCode||n||"USD",a=Kr(r,i),l=t.referenceValue,d=l===1?o:`${l}${o}`;return`${a}/${d}`}var ve={};Wt(ve,{computePosition:()=>Xr,emptyTypeAheadState:()=>ro,firstEnabled:()=>He,handleKey:()=>to,pushTypeAheadChar:()=>oo});var Jr=4;function Xr({trigger:e,viewportHeight:t,desiredHeight:n,margin:r=Jr,clip:o}){let i=o?Math.min(t,o.bottom):t,a=o?Math.max(0,o.top):0,l=Math.max(0,i-e.bottom-r),d=Math.max(0,e.top-a-r),s=n<=l?"down":d>l?"up":"down",u=Math.min(n,s==="down"?l:d),p=s==="down"?e.bottom+r:e.top-r-u;return{placement:s,maxHeight:u,offsetTop:p,offsetLeft:e.left,width:e.width}}var mt={type:"passthrough",preventDefault:!1};function He(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function Vt(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}function Zr(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t+n)%e.length;if(!e[r].disabled)return r}return t}function eo(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t-n+e.length)%e.length;if(!e[r].disabled)return r}return t}function Ut(e){return e.length===1&&e!==" "&&/\S/.test(e)}function to(e,t){if(e.ctrlKey||e.metaKey||e.altKey)return mt;let{key:n}=e,{isOpen:r,activeIndex:o,selectedIndex:i,options:a}=t;if(!r)switch(n){case"Enter":case" ":case"ArrowDown":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:He(a),preventDefault:!0};case"ArrowUp":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Vt(a),preventDefault:!0};default:return Ut(n)?{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:He(a),preventDefault:!0}:mt}switch(n){case"ArrowDown":return{type:"move-active",activeIndex:Zr(a,o),preventDefault:!0};case"ArrowUp":return{type:"move-active",activeIndex:eo(a,o),preventDefault:!0};case"Home":return{type:"move-active",activeIndex:He(a),preventDefault:!0};case"End":return{type:"move-active",activeIndex:Vt(a),preventDefault:!0};case"Enter":case" ":return o>=0&&!a[o]?.disabled?{type:"commit",index:o,preventDefault:!0}:{type:"passthrough",preventDefault:!0};case"Escape":return{type:"close",commit:!1,restoreFocus:!0,preventDefault:!0};case"Tab":return{type:"close",commit:!1,restoreFocus:!1,preventDefault:!1};default:return Ut(n)?{type:"type-ahead",char:n,preventDefault:!1}:mt}}var no=500;function ro(){return{buffer:"",lastTime:0}}function oo(e,t,n,r,o=no){if(t.length!==1)return{newState:e,matchedIndex:null};let a=(n-e.lastTime>o?"":e.buffer)+t.toLowerCase(),l={buffer:a,lastTime:n};for(let d=0;d<r.length;d++){let s=r[d];if(!s.disabled&&s.label.toLowerCase().startsWith(a))return{newState:l,matchedIndex:d}}return{newState:l,matchedIndex:null}}var io={};Wt(io,{findVariantByOptions:()=>ao,isOptionValueAvailable:()=>lo,toPickerVariant:()=>so});function ao(e,t){if(e.length===0)return null;for(let n of e){if(n.optionValues.length!==t.length)continue;let r=!0;for(let o=0;o<n.optionValues.length;o++)if(n.optionValues[o]!==t[o]){r=!1;break}if(r)return n}return null}function lo(e,t,n,r){for(let o of e){if(!o.available||o.optionValues[t]!==n)continue;let i=!0;for(let a=0;a<o.optionValues.length;a++)if(a!==t&&o.optionValues[a]!==r[a]){i=!1;break}if(i)return!0}return!1}function so(e){return{id:e.id,optionValues:e.selectedOptions.map(t=>t.value),available:e.availableForSale}}var zt="_lb_v",bt=null;function co(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t>>>=0;return t>>>0}function cn(){try{let e=window.localStorage.getItem(zt);if(e)return e;let t=Qt();return window.localStorage.setItem(zt,t),t}catch{return bt||(bt=Qt()),bt}}function Qt(){return Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10)}function uo(e,t,n){let r=e.slice().sort((a,l)=>a.id<l.id?-1:a.id>l.id?1:0),o=co(t+":"+n)%100,i=0;for(let a of r)if(i+=Math.max(0,a.abWeight),o<i)return a;return r[r.length-1]}function un(e,t){let n=new Map;for(let o of e){if(!o.abTestId)continue;let i=n.get(o.abTestId);i?i.push(o):n.set(o.abTestId,[o])}if(n.size===0)return e.slice();let r=new Map;return n.forEach((o,i)=>{if(o.length===1){r.set(i,o[0]);return}r.set(i,uo(o,t,i))}),e.filter(o=>!o.abTestId||r.get(o.abTestId)===o)}function pn(e,t){return e.availableForSale?e.currentlyNotInStock||e.quantityAvailable==null?!0:e.quantityAvailable>=t:!1}function mn(e){let t=e.slice(e.lastIndexOf("/")+1),n=Number(t);return Number.isFinite(n)&&t!==""?n:e}function Fe(e){if(!e)return 0;let t=parseFloat(e);return Number.isFinite(t)?Math.round(t*100):0}function po(e,t,n){return{id:mn(e.id),title:e.title,options:(e.selectedOptions??[]).map(r=>r.value),available:pn(e,t),price:Fe(e.price?.amount),compareAtPrice:Fe(e.compareAtPrice?.amount),unitPrice:dn(e.unitPrice,e.unitPriceMeasurement,n),image:e.image?.url??null}}function _e(e,t,n){let r=n.allowedVariantIds,o=e.variants.nodes.filter(s=>!r||r.length===0||r.includes(s.id)),i=e.priceRange.minVariantPrice.currencyCode,a=xt(n.quantities,e.id,o[0]?.id??""),l=o.map(s=>{let c=xt(n.quantities,e.id,s.id),u=po(s,c,i);return c!==a&&(u.quantity=c),u}),d=l.find(s=>s.available)??l[0];return{productId:mn(e.id),title:e.title,url:e.handle?"/products/"+e.handle:null,featuredImage:e.featuredImage?.url??null,quantity:a,selectedVariantId:d?d.id:"",optionNames:(o[0]?.selectedOptions??[]).map(s=>s.name),variants:l}}function Ve(e){return e.products.map((t,n)=>_e(t,e.id,{quantities:{productQuantities:e.productQuantities,variantQuantities:e.variantQuantities},allowedVariantIds:e.selectedVariantIds?.[n]??null}))}function Y(e,t){for(let n=0;n<e.variants.length;n++)if(String(e.variants[n].id)===String(t))return e.variants[n];return e.variants[0]}function bn(e,t){if(!e.variants||!t)return null;for(let n=0;n<e.variants.length;n++){let r=e.variants[n];if(!r.options||r.options.length!==t.length)continue;let o=!0;for(let i=0;i<r.options.length;i++)if(r.options[i]!==t[i]){o=!1;break}if(o)return r}return null}function hn(e,t,n,r){for(let o=0;o<e.length;o++){let i=e[o];if(i.available===!1||!i.options||i.options[t]!==n)continue;let a=!0;for(let l=0;l<i.options.length;l++)if(l!==t&&i.options[l]!==r[l]){a=!1;break}if(a)return!0}return!1}function fn(e){let t=[];for(let n=0;n<e.length;n++){let r=Y(e[n],e[n].selectedVariantId),o=r.quantity||e[n].quantity||1;t.push({variantId:Number(e[n].selectedVariantId),quantity:o,priceCents:(r.price||0)*o})}return t}function mo(e,t,n){let r=0,o=0;for(let i=0;i<e.length;i++){let a=Y(e[i],e[i].selectedVariantId),l=a.quantity||e[i].quantity||1,d=a.price*l;if(r+=d,t==="percentage"){let s=Math.floor(a.price*n/100);o+=(a.price-s)*l}else o+=d}if(t==="fixed_amount"&&(o=Math.max(0,r-Math.round(n*100))),t==="flat_price"){let i=Math.round(n*100);o=i<r?i:r}return{totalPrice:r,salePrice:o,savings:r-o}}function yt(e,t,n){let r=e.classList?.contains("lb-fixed")?e:e.querySelector(".lb-fixed");if(!r)return;let{totalPrice:o,salePrice:i,savings:a}=mo(t,r.getAttribute("data-discount-type")||"",parseFloat(r.getAttribute("data-discount-value")??"")||0),l=e.querySelector("[data-sale-price]"),d=e.querySelector("[data-compare-price]"),s=e.querySelector("[data-savings-bar]"),c=e.querySelector("[data-savings-amount]"),u=e.querySelector("[data-savings-percent]");if(l&&(l.textContent=n(i)),d&&(a>0?(d.textContent=n(o),d.style.display=""):d.style.display="none"),s)if(a>0){if(c&&(c.textContent=n(a)),u){let p=o>0?Math.round(a*100/o):0;u.textContent="("+p+"%)"}s.style.display=""}else s.style.display="none"}function le(e){return t=>{try{return new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(t/100)}catch{return e+" "+(t/100).toFixed(2)}}}var bo="_lime_bundle_gid",ho="_lime_bundle_type";function se(e,t){return[{key:bo,value:e},{key:ho,value:t}]}function Ue(e,t,n){let r=e.querySelectorAll("[data-variant-option]");if(!r.length)return;function o(s){return parseInt(s.getAttribute("data-option-position")??"",10)}function i(){let s=[];for(let c=0;c<r.length;c++){let u=o(r[c]);!u||u<1||(s[u-1]=r[c].value)}return s}function a(s){if(!(!s||!s.options))for(let c=0;c<r.length;c++){let u=o(r[c]);if(!u||u<1)continue;let p=s.options[u-1];r[c].value!==p&&(r[c].value=p)}}function l(s,c){for(let u=0;u<r.length;u++){let p=r[u],v=o(p);if(!v||v<1)continue;let g=p.options;for(let C=0;C<g.length;C++)g[C].disabled=!hn(s.variants,v-1,g[C].value,c)}}let d=t();if(d){let s=Y(d,d.selectedVariantId);s&&s.options&&l(d,s.options)}for(let s=0;s<r.length;s++)r[s].addEventListener("change",c=>{c.stopPropagation();let u=t();if(!u)return;let p=bn(u,i());if(!p){let v=Y(u,u.selectedVariantId);a(v),v&&v.options&&l(u,v.options);return}u.selectedVariantId=p.id,l(u,p.options),n(p,u)})}function ze(e,t,n){if(!t.variants.length)return;let r=e.querySelector(".lb-bundle-variant-badge");r&&!r.textContent&&(r.textContent=n.title);let o=e.querySelector(".lb-bundle-variant-option-groups");o&&!o.children.length&&fo(o,t,n)}function fo(e,t,n){let r=t.optionNames||[];for(let o=0;o<r.length;o++){let i=document.createElement("div");i.className="lb-bundle-variant-option-group";let a=document.createElement("span");a.className="lb-bundle-variant-option-label",a.textContent=r[o],i.appendChild(a);let l=document.createElement("select");l.className="lb-bundle-variant-select",l.setAttribute("data-variant-option",""),l.setAttribute("data-option-position",String(o+1)),l.setAttribute("data-product-id",String(t.productId)),l.name="lb-variant-"+t.productId+"-"+(o+1),l.setAttribute("aria-label",r[o]);let d=Object.create(null);for(let s of t.variants){let c=s.options&&s.options[o];if(!c||d[c])continue;d[c]=!0;let u=document.createElement("option");u.value=c,u.textContent=c,n.options&&n.options[o]===c&&(u.selected=!0),l.appendChild(u)}i.appendChild(l),e.appendChild(i)}}var wt=new WeakMap;function Qe(e,t,n){let r=e.querySelector("[data-thumbnail]");if(!r)return;let o=r.querySelector("img");if(!wt.has(e)){let a=n||(o?o.src:null);a&&wt.set(e,a)}let i=t.image||wt.get(e)||null;if(i)if(o)o.src=i,o.srcset="";else{let a=document.createElement("img");a.src=i,a.loading="lazy",a.alt="",r.textContent="",r.appendChild(a)}}function go(e,t){let n=e.querySelector("[data-qty-inline]");n&&(n.textContent="\xD7"+t)}function _t(e,t,n,r){if(!t)return;Qe(e,t,n.featuredImage),go(e,t.quantity||n.quantity||1);let o=e.querySelector("[data-product-price]");o&&t.price!=null&&(o.textContent=r(t.price));let i=e.querySelector("[data-product-compare-price]");if(i){let l=t.compareAtPrice;l&&l>t.price?(i.textContent=r(l),i.hidden=!1):(i.textContent="",i.hidden=!0)}let a=e.querySelector("[data-product-unit-price]");a&&(t.unitPrice?(a.textContent=t.unitPrice,a.hidden=!1):(a.textContent="",a.hidden=!0))}function q(e,t,n){let r=document.createElement(e);r.className=t;for(let o in n)r.setAttribute(o,n[o]);return r}function We(e,t,n){let r=e.variants.length,o=q("div","lb-bundle-product-row");n.isOos&&(o.classList.add("lb-bundle-product-row--oos"),o.setAttribute("aria-disabled","true")),o.setAttribute("data-product-id",String(e.productId)),n.bogoRole&&o.setAttribute("data-bogo-role",n.bogoRole),o.appendChild(q("div","lb-bundle-thumbnail",{"data-thumbnail":""}));let i=q("div","lb-bundle-product-info"),a=document.createElement(n.href?"a":"span");if(a.className="lb-bundle-product-name",n.href&&(a.href=n.href),a.textContent=e.title??"",i.appendChild(a),n.isOos){let d=q("span","lb-bundle-oos-label");return d.textContent=t.outOfStock||"Out of stock",i.appendChild(d),o.appendChild(i),o}r===1&&e.variants[0]?.title!=="Default Title"&&i.appendChild(q("span","lb-bundle-variant-badge"));let l=q("span","lb-bundle-product-prices");if(l.appendChild(q("span","lb-bundle-product-compare-price",{"data-product-compare-price":"",hidden:""})),l.appendChild(q("span","lb-bundle-product-price",{"data-product-price":""})),n.inlineQuantity!=null){let d=q("span","lb-bundle-qty-inline",{"data-qty-inline":""});d.textContent="\xD7"+n.inlineQuantity,l.appendChild(d)}if(i.appendChild(l),i.appendChild(q("span","lb-bundle-product-unit-price",{"data-product-unit-price":""})),r>1&&i.appendChild(q("div","lb-bundle-variant-option-groups",{style:"--lb-row-option-count: "+(e.optionNames.length||1)})),o.appendChild(i),n.inlineQuantity==null&&o.appendChild(q("span","lb-bundle-qty-chip",{"data-qty-inline":""})),n.badgeText){let d=q("span","lb-bogo__badge");d.textContent=n.badgeText,o.appendChild(d)}return o}function de(e,t){let n=q("div",e),r=q("div","lb-bundle-header"),o=q("h3","lb-bundle-title");if(o.textContent=t.title,r.appendChild(o),t.subtitle){let p=q("p","lb-bundle-subtitle");p.textContent=t.subtitle,r.appendChild(p)}if(n.appendChild(r),t.endsAt){let p=q("div","lb-bundle-countdown",{"data-countdown":""}),v=q("span","lb-bundle-countdown-label");v.textContent=t.countdownLabel??"Ends in",p.appendChild(v),p.appendChild(q("span","lb-bundle-countdown-timer",{"data-countdown-timer":""})),n.appendChild(p)}let i=q("div",e+"__products lb-edge-fade");n.appendChild(i),n.appendChild(q("div","lb-bundle-divider"));let a=q("div","lb-bundle-summary"),l=q("div","lb-bundle-summary__text"),d=q("span","lb-bundle-summary__label");if(d.textContent=t.summaryLabel??"Bundle price",l.appendChild(d),t.withItemCount&&d.appendChild(q("span","",{"data-item-count":""})),t.showSavingsBar){let p=q("p","lb-bundle-savings-line",{"data-savings-bar":"",style:"display:none"});p.appendChild(document.createTextNode("Save ")),p.appendChild(q("span","",{"data-savings-amount":""})),p.appendChild(document.createTextNode(" ")),p.appendChild(q("span","",{"data-savings-percent":""})),l.appendChild(p)}a.appendChild(l);let s=q("span","lb-bundle-summary__prices");t.showComparePrice&&s.appendChild(q("span","lb-bundle-compare-price",{"data-compare-price":""})),s.appendChild(q("span","lb-bundle-sale-price",{[t.totalPriceSlot?"data-total-price":"data-sale-price"]:""})),a.appendChild(s),n.appendChild(a);let c=q("button","lb-bundle-cta",{type:"button","data-add-bundle":""}),u=q("span","lb-cta-label",{"data-cta-label":""});return u.textContent=t.ctaText,c.appendChild(u),n.appendChild(c),n.appendChild(q("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),n.appendChild(q("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),{root:n,products:i,cta:c}}function gn(e,t){let n=q("div","lb-volume__tiers lb-edge-fade",{role:"radiogroup","aria-label":t,"data-tier-group":""});return e.forEach((r,o)=>{let i=q("div","lb-volume__tier",{role:"radio","aria-checked":r.selected?"true":"false",tabindex:r.selected?"0":"-1","data-tier-index":String(o),"data-tier-qty":String(r.quantity),"data-tier-pct":String(r.percent),"data-tier-amt":String(r.amountCents)}),a=q("span","lb-volume__radio");a.appendChild(q("span","lb-volume__radio-dot")),i.appendChild(a);let l=q("span","lb-volume__tier-info"),d=q("span","lb-volume__tier-label");d.textContent=r.label,l.appendChild(d);let s=q("span","lb-volume__tier-price");if(s.appendChild(q("span","lb-volume__tier-compare")),s.appendChild(q("span","",{"data-tier-price-each":""})),l.appendChild(s),i.appendChild(l),r.badgeLabel||r.savingsLabel){let c=q("span","lb-volume__tier-right");if(r.badgeLabel){let u=q("span","lb-volume__tier-badge");u.textContent=r.badgeLabel,c.appendChild(u)}if(r.savingsLabel){let u=q("span","lb-volume__tier-savings");u.textContent=r.savingsLabel,c.appendChild(u)}i.appendChild(c)}n.appendChild(i)}),n}function je(e){let t=q("div","lb-mix-match__progress",{"data-progress":""}),n=q("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e)});for(let o=0;o<e;o++)n.appendChild(q("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));t.appendChild(n);let r=q("div","lb-mix-match__progress-labels");return r.appendChild(q("span","lb-mix-match__progress-count",{"data-progress-count":"","aria-live":"polite"})),r.appendChild(q("span","lb-mix-match__progress-remaining",{"data-progress-remaining":"","aria-live":"polite"})),t.appendChild(r),t}function Ce(e){return e<10?"0"+e:String(e)}function ce(e){e._lbCountdownInterval&&(clearInterval(e._lbCountdownInterval),e._lbCountdownInterval=null);let t=e.querySelector("[data-countdown]");if(!t)return;let n=e.closest(".lb-bundle-widget"),r=n&&n.getAttribute("data-ends-at");if(!r){t.style.display="none";return}let o=new Date(r).getTime();if(isNaN(o)){t.style.display="none";return}let i=t.querySelector("[data-countdown-timer]");if(!i)return;let a;function l(){let d=o-Date.now();if(d<=0){n&&(n.style.display="none"),a&&clearInterval(a);return}let s=Math.floor(d/864e5),c=Math.floor(d%864e5/36e5),u=Math.floor(d%36e5/6e4),p=Math.floor(d%6e4/1e3);i.textContent=s>0?s+"d "+Ce(c)+"h "+Ce(u)+"m "+Ce(p)+"s":Ce(c)+"h "+Ce(u)+"m "+Ce(p)+"s"}l(),o-Date.now()>0&&(a=setInterval(l,1e3),e._lbCountdownInterval=a)}var ue={locale:"en",addItem:"Add",addedItem:"Added",removeItem:"Remove",swapItem:"Swap",required:"Required",soldOut:"Sold out",outOfStock:"Out of stock",itemsOutOfStock:"__COUNT__ items out of stock",quantity:"Quantity",increaseQuantity:"Increase quantity",decreaseQuantity:"Decrease quantity",allTypes:"All",editSelection:"Edit selection",addToCart:"Add to cart",bundlePrice:"Bundle price",save:"Save",complete:"Complete",ofSelected:"__COUNT__ of __TOTAL__ added",moreToGo:"__COUNT__ more to go",nProductsShown:"__COUNT__ products shown",bundleComplete:"Your bundle is complete",chooseMoreUnlock:"Choose __COUNT__ more to unlock __PCT__% off",chooseMoreComplete:"Choose __COUNT__ more to complete your bundle",stepOf:"Step __STEP__ of __TOTAL__",stepsCompleted:"__COUNT__ of __TOTAL__ steps completed",each:" each",buyQty:"Buy __COUNT__",needsSpots:{one:"Needs __COUNT__ spot",other:"Needs __COUNT__ spots"}};function xn(e){let t=e.ownerDocument,n=t&&t.defaultView;if(!n)return null;let r=e.parentElement;for(;r&&r!==t.body;){let o=n.getComputedStyle(r).overflowY;if(o==="auto"||o==="scroll"||o==="hidden")return r;r=r.parentElement}return null}var re=[],$e=!1;function xo(e,t){if(e.composedPath){let r=e.composedPath();for(let o=0;o<r.length;o++)if(r[o]===t.shell||r[o]===t.listbox)return!0;return!1}let n=e.target;return t.shell.contains(n)||t.listbox.contains(n)}function Ge(e){for(let t=re.length-1;t>=0;t--)xo(e,re[t])||re[t].close()}function vn(){for(let e=re.length-1;e>=0;e--)re[e].close()}function vo(){$e||(document.addEventListener("pointerdown",Ge,!0),window.addEventListener("resize",vn),window.addEventListener("scroll",Ge,!0),$e=!0)}function yo(){$e&&(document.removeEventListener("pointerdown",Ge,!0),window.removeEventListener("resize",vn),window.removeEventListener("scroll",Ge,!0),$e=!1)}function yn(e){re.push(e),re.length===1&&vo()}function wn(e){let t=re.indexOf(e);t>=0&&re.splice(t,1),re.length===0&&yo()}function _n(e){for(let t=re.length-1;t>=0;t--)re[t]!==e&&re[t].close()}var wo=32,_o=8,Co=8,Ct=new WeakMap;function Cn(e){return Ct.get(e)}function kn(e){if(e.classList.contains("lb-dropdown-state"))return null;let t=document,n=e.getAttribute("aria-label")||"",r="lb-dd-"+Math.random().toString(36).slice(2,9);e.classList.add("lb-dropdown-state"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");let o=t.createElement("div");o.className="lb-dropdown",o.setAttribute("data-lb-dropdown","");let i=t.createElement("button");i.type="button",i.className="lb-dropdown-trigger",i.setAttribute("role","combobox"),i.setAttribute("aria-haspopup","listbox"),i.setAttribute("aria-expanded","false");let a=r+"-listbox";i.setAttribute("aria-controls",a),n&&i.setAttribute("aria-label",n);let l=t.createElement("span");l.className="lb-dropdown-trigger-value";let d=t.createElement("span");d.className="lb-dropdown-chevron",d.setAttribute("aria-hidden","true"),i.appendChild(l),i.appendChild(d);let s=t.createElement("ul");s.id=a,s.className="lb-dropdown-listbox",s.setAttribute("role","listbox"),n&&s.setAttribute("aria-label",n),s.hidden=!0,o.appendChild(i),e.parentNode?.insertBefore(o,e.nextSibling);let c=e.closest("[data-modal-overlay]");c?(c.appendChild(s),s.setAttribute("data-lb-dropdown-portal","")):o.appendChild(s);let u=!1,p=-1,v=ve.emptyTypeAheadState(),g=[];function C(){let P=[];for(let T=0;T<e.options.length;T++){let h=e.options[T];P.push({disabled:h.disabled,label:h.textContent||h.value})}return P}function I(){i.disabled=e.disabled;let P=C(),T=e.selectedIndex;for(l.textContent=T>=0&&P[T]?P[T].label:"";s.firstChild;)s.removeChild(s.firstChild);g=[];for(let h=0;h<P.length;h++){let M=t.createElement("li");M.id=r+"-opt-"+h,M.className="lb-dropdown-option",M.setAttribute("role","option"),M.setAttribute("aria-selected",h===T?"true":"false"),P[h].disabled&&M.setAttribute("aria-disabled","true"),M.setAttribute("data-value",e.options[h].value),M.setAttribute("data-index",String(h)),M.textContent=P[h].label,s.appendChild(M),g.push(M)}}function b(P){if(p>=0&&g[p]&&g[p].classList.remove("is-active"),p=P,P<0||!g[P]){i.setAttribute("aria-activedescendant","");return}let T=g[P];T.classList.add("is-active"),i.setAttribute("aria-activedescendant",T.id);let h=T.offsetTop,M=h+T.offsetHeight,D=s.scrollTop,f=D+s.clientHeight;h<D?s.scrollTop=h:M>f&&(s.scrollTop=M-s.clientHeight)}function A(){let P=i.getBoundingClientRect();if(P.width===0)return!1;let h=Math.min(g.length||1,Co)*wo+_o,M=xn(i),D=M?{top:M.getBoundingClientRect().top,bottom:M.getBoundingClientRect().bottom}:void 0,f=ve.computePosition({trigger:{top:P.top,bottom:P.bottom,left:P.left,width:P.width},viewportHeight:window.innerHeight,desiredHeight:h,clip:D});return s.setAttribute("data-placement",f.placement),s.style.maxHeight=f.maxHeight+"px",s.hasAttribute("data-lb-dropdown-portal")&&(s.style.top=f.offsetTop+"px",s.style.left=f.offsetLeft+"px",s.style.width=f.width+"px"),!0}function O(){if(u)return;_n($),u=!0,s.hidden=!1,i.setAttribute("aria-expanded","true"),A()||requestAnimationFrame(()=>{A()});let P=C(),T=e.selectedIndex;T>=0&&P[T]&&!P[T].disabled?b(T):b(ve.firstEnabled(P)),yn($)}function k(P){u&&(u=!1,s.hidden=!0,i.setAttribute("aria-expanded","false"),i.setAttribute("aria-activedescendant",""),p>=0&&g[p]&&g[p].classList.remove("is-active"),p=-1,wn($),P&&i.focus())}function m(P){let T=e.options[P];!T||T.disabled||(e.value!==T.value&&(e.value=T.value,e.dispatchEvent(new Event("change",{bubbles:!0}))),I(),k(!0))}function w(P){let T=C(),h=ve.handleKey({key:P.key,ctrlKey:P.ctrlKey,metaKey:P.metaKey,altKey:P.altKey,shiftKey:P.shiftKey},{isOpen:u,activeIndex:p,selectedIndex:e.selectedIndex,options:T});switch(h.preventDefault&&P.preventDefault(),h.type){case"open":O(),h.activeIndex>=0&&b(h.activeIndex);break;case"close":k(h.restoreFocus);break;case"move-active":b(h.activeIndex);break;case"commit":m(h.index);break;case"type-ahead":{let M=ve.pushTypeAheadChar(v,h.char,Date.now(),T);v=M.newState,M.matchedIndex!==null&&(u||O(),b(M.matchedIndex));break}}}function E(P){P.preventDefault(),u?k(!1):O()}function x(P){let T=P.target;for(;T&&T!==s;){if(T.classList&&T.classList.contains("lb-dropdown-option")){let h=parseInt(T.getAttribute("data-index")??"",10);return isNaN(h)?null:h}T=T.parentNode}return null}function z(P){let T=x(P);T!==null&&m(T)}function F(P){let T=P.target;for(;T&&T!==s;){if(T.classList&&T.classList.contains("lb-dropdown-option")){if(T.getAttribute("aria-disabled")==="true")return;let h=parseInt(T.getAttribute("data-index")??"",10);!isNaN(h)&&h!==p&&b(h);return}T=T.parentNode}}function Q(){setTimeout(()=>{u&&(o.contains(document.activeElement)||k(!1))},0)}function W(){I()}let te=new MutationObserver(()=>{I()});te.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","value","selected"]});function ne(P){P.preventDefault()}i.addEventListener("click",E),i.addEventListener("keydown",w),o.addEventListener("focusout",Q),s.addEventListener("mousedown",ne),s.addEventListener("click",z),s.addEventListener("mousemove",F),e.addEventListener("change",W);function K(){u&&k(!1),te.disconnect(),i.removeEventListener("click",E),i.removeEventListener("keydown",w),o.removeEventListener("focusout",Q),s.removeEventListener("mousedown",ne),s.removeEventListener("click",z),s.removeEventListener("mousemove",F),e.removeEventListener("change",W),o.parentNode?.removeChild(o),s.parentNode?.removeChild(s),e.classList.remove("lb-dropdown-state"),e.removeAttribute("aria-hidden"),e.removeAttribute("tabindex"),Ct.delete(e)}let $={shell:o,listbox:s,select:e,close:()=>k(!1),destroy:K};return Ct.set(e,$),I(),$}var ko="select.lb-bundle-variant-select:not(.lb-dropdown-state), select.lb-mix-match__variant-select:not(.lb-dropdown-state)";function Sn(e){let n=(e??document).querySelectorAll(ko);for(let r=0;r<n.length;r++)kn(n[r])}function Tn(e){let n=(e??document).querySelectorAll("select.lb-dropdown-state");for(let r=0;r<n.length;r++)Cn(n[r])?.destroy()}function he(e){return Sn(e),()=>Tn(e)}function En(e,t,n,r,o){let i=t.widgetConfig,a=Ve(t);if(!a.length)return;let l=a.filter(p=>!p.variants.some(v=>v.available));if(n==="hide"&&l.length>0)return;let d=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",s=le(d),c=ue,u=de("lb-fixed",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||c.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});u.root.setAttribute("data-discount-type",t.discountConfig.discountType),u.root.setAttribute("data-discount-value",String(t.discountConfig.discountValue));for(let p of a){let v=!p.variants.some(I=>I.available),g=We(p,c,{isOos:v,href:p.url});if(u.products.appendChild(g),v)continue;let C=Y(p,p.selectedVariantId);ze(g,p,C),_t(g,C,p,s),Ue(g,()=>p,(I,b)=>{_t(g,I,b,s),yt(u.root,a,s)})}if(l.length>0){u.cta.disabled=!0;let p=u.cta.querySelector("[data-cta-label]");p&&(p.textContent=(c.itemsOutOfStock||"__COUNT__ items out of stock").split("__COUNT__").join(String(l.length)))}else u.cta.addEventListener("click",()=>{r(fn(a).map(p=>({merchandiseId:"gid://shopify/ProductVariant/"+p.variantId,quantity:p.quantity,attributes:se(t.id,t.bundleType)})))});e.appendChild(u.root),ce(u.root),yt(u.root,a,s),o?.(he(u.root))}function J(e,t){let n=e;for(let r in t)n=n.split("__"+r+"__").join(String(t[r]));return n}function Ke(e,t){let n=t.needsSpots;if(!n)return"Needs "+e+" spots";let r=new Intl.PluralRules(t.locale||"en").select(e);return J(n[r]||n.other||"__COUNT__",{COUNT:e})}function Ye(e,t,n){return J(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function Mn(e,t){return e>0?J(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function In(e,t,n,r){if(e<=0)return r.bundleComplete||"Your bundle is complete";let o=t==="percentage"&&n?Math.round(n):0;return o>0?J(r.chooseMoreUnlock||"Choose __COUNT__ more to unlock __PCT__% off",{COUNT:e,PCT:o}):J(r.chooseMoreComplete||"Choose __COUNT__ more to complete your bundle",{COUNT:e})}var So={min:1,max:99};function X(e,t,n){if(n!=null){let o=t["gid://shopify/ProductVariant/"+n];if(o&&typeof o.min=="number"&&typeof o.max=="number")return o}let r=t["gid://shopify/Product/"+e];return!r||typeof r.min!="number"||typeof r.max!="number"?So:r}function pe(e,t){if(e==null)return;let n=t["gid://shopify/ProductVariant/"+e];if(!(!n||typeof n.min!="number"||typeof n.max!="number"))return n}function Je(e,t){let n=e??{};if(!t)return n;let r=Object.keys(t);if(r.length===0)return n;let o={...n};for(let i of r)o[i]=t[i];return o}function Xe(e,t,n){return X(e,t,n).min}function oe(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n].quantity||1;return t}function me(e,t){for(let n=0;n<e.length;n++)if(e[n]&&e[n].variantId===t)return n;return-1}function An(e,t){let n=me(e,t);return n===-1?0:e[n].quantity||0}function Ln(e,t){return e.min<=t}function Pn(e,t,n,r=0,o=0,i){let a=Math.min(e.max-o,r+t);return typeof i=="number"&&(a=Math.min(a,i)),typeof n=="number"?Math.min(a,n):a}var Bn=[120,180,240],kt=[480,600,768,1024],qn="60px",Rn="(max-width: 767px) 45vw, 228px";function ke(e,t){return e&&(/[?&]width=\d+/.test(e)?e.replace(/([?&])width=\d+/,"$1width="+t):e+(e.indexOf("?")===-1?"?":"&")+"width="+t)}function Me(e,t){return e?t.map(n=>ke(e,n)+" "+n+"w").join(", "):""}function Ze(e,t){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function Se(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():""}var Nn=600;function et(e,t,n){let{t:r,rulesMap:o,capacity:i,formatMoney:a}=n,l=X(e.id,o),d=document.createElement("div");d.className="lb-mix-match__modal-product",e.available||(d.className+=" lb-mix-match__modal-product--sold-out"),d.setAttribute("data-product-item",""),d.setAttribute("data-title",Se(e.title)),d.setAttribute("data-type",e.type||"");let s=!1,c=!1,u=document.createElement("div");u.className="lb-mix-match__modal-product-thumb";let p=document.createElement("span");p.className="lb-mix-match__modal-added-badge",p.textContent=r.addedItem||"Added",p.hidden=!0,u.appendChild(p);let v=e.variants.find(f=>f.available)??null,g=v&&v.image||e.featuredImage;if(g){let f=document.createElement("img");f.src=ke(g,Nn),f.srcset=Me(g,kt),f.sizes=Rn,f.alt=e.title,f.loading="lazy",u.appendChild(f)}d.appendChild(u);let C=document.createElement("div");C.className="lb-mix-match__modal-product-info";let I=document.createElement("p");if(I.className="lb-mix-match__modal-product-title",e.url){let f=document.createElement("a");f.href=e.url,f.target="_blank",f.rel="noopener noreferrer",f.textContent=e.title,I.appendChild(f)}else I.textContent=e.title;C.appendChild(I);let b=v??(e.variants.length>0?e.variants[0]:null),A=f=>X(e.id,o,f?f.id:null),O=b?A(b).min:1,k=document.createElement("p");k.className="lb-mix-match__modal-product-price",k.setAttribute("data-row-price","");let m=document.createElement("span");m.setAttribute("data-row-price-sale",""),b&&(m.textContent=a(b.price*O)),k.appendChild(m);let w=document.createElement("s");w.className="lb-mix-match__modal-product-compare",w.setAttribute("data-row-compare",""),k.appendChild(w),C.appendChild(k);function E(f,H,_){let y=H&&H.compareAtPrice?H.compareAtPrice*_:0,L=H?H.price*_:0;y>L?(f.textContent=a(y),f.hidden=!1):(f.textContent="",f.hidden=!0)}E(w,b,O);let x=document.createElement("p");x.className="lb-mix-match__modal-product-unit-price lb-bundle-product-unit-price",x.setAttribute("data-row-unit-price","");let z=b?b.unitPrice:null;z?x.textContent=z:x.hidden=!0,C.appendChild(x);let F=null,Q=null,W=A(b).min,te=A(b).max,ne=null,K=null;if(e.available&&n.showQtySelector){F=document.createElement("div"),F.className="lb-bundle-variant-option-group lb-mix-match__qty-stepper-group";let f=document.createElement("div");f.className="lb-mix-match__qty-stepper",f.setAttribute("role","group"),f.setAttribute("aria-label",r.quantity||"Quantity");let H=document.createElement("button");H.type="button",H.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--minus",H.setAttribute("aria-label",r.decreaseQuantity||"Decrease quantity"),H.textContent="\u2212",Q=document.createElement("span"),Q.className="lb-mix-match__qty-stepper-value",Q.setAttribute("data-row-qty",""),Q.setAttribute("aria-live","polite"),Q.textContent=String(A(b).min);let _=document.createElement("button");_.type="button",_.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--plus",_.setAttribute("aria-label",r.increaseQuantity||"Increase quantity"),_.textContent="+",f.appendChild(H),f.appendChild(Q),f.appendChild(_),F.appendChild(f);let y=Q;ne=()=>{y.textContent=String(W),y.setAttribute("data-qty",String(W)),H.disabled=c||W<=A(b).min,_.disabled=c||W>=te},K=(S,N=0)=>{let B=S?S.id:null,R=B===null?0:i.ownQty(B),V=B===null?0:i.productUnitsElsewhere(e.id,B),U=B===null?0:i.swapUnits(e.id,B),G=S?S.inventoryQuantity:null,Z=Math.max(0,N-R),be=typeof G=="number"?Math.max(0,G-Z):void 0,ge=pe(B,o)?.max,ee=A(S).min;te=U>0?typeof be=="number"?Math.min(U,be):U:Pn(l,i.remainingSpots(),be,R,V,ge),te<ee?W=ee:(W>te&&(W=te),W<ee&&(W=ee)),ne()};let L=()=>{b&&i.commitQty(b.id,W)&&n.onCommittedQtyChanged()};H.addEventListener("click",()=>{W>A(b).min&&(W-=1),ne(),L()}),_.addEventListener("click",()=>{W<te&&(W+=1),ne(),L()}),b?K(b):ne()}let $=e.variants.slice(),P=[];if($.length>1){let f=e.optionNames||[];b=$.find(B=>B.available!==!1)??$[0];let H=()=>{let B=P.map(R=>R.value);for(let R of $)if(!(!R.options||R.options.length!==B.length)&&R.options.every((V,U)=>V===B[U]))return R;return null},_=B=>{if(!(!B||!B.options))for(let R=0;R<P.length&&R<B.options.length;R++)P[R].value!==B.options[R]&&(P[R].value=B.options[R])},y=(B,R,V)=>{for(let U of $){if(U.available===!1||!U.options||U.options[B]!==R)continue;let G=!0;for(let Z=0;Z<U.options.length;Z++)if(Z!==B&&U.options[Z]!==V[Z]){G=!1;break}if(G)return!0}return!1},L=B=>{for(let R=0;R<P.length;R++){let V=P[R];for(let U=0;U<V.options.length;U++)V.options[U].disabled=!y(R,V.options[U].value,B)}},S=()=>{let B=H();if(!B){_(b),b?.options&&L(b.options);return}b=B,d.setAttribute("data-selected-variant-id",String(B.id));let R=A(B).min;m.textContent=a(B.price*R),E(w,B,R),B.unitPrice?(x.textContent=B.unitPrice,x.hidden=!1):(x.textContent="",x.hidden=!0);let V=u.querySelector("img"),U=B.image||e.featuredImage;V&&U&&(V.src=ke(U,Nn),V.srcset=Me(U,kt)),K?.(B,i.variantUnitsElsewhere(B.id)),B.options&&L(B.options),D()},N=document.createElement("div");N.className="lb-bundle-variant-option-groups";for(let B=0;B<f.length;B++){let R=f[B],V=document.createElement("div");V.className="lb-bundle-variant-option-group";let U=document.createElement("span");U.className="lb-bundle-variant-option-label",U.textContent=R,V.appendChild(U);let G=document.createElement("select");G.className="lb-mix-match__variant-select",G.setAttribute("data-variant-option",""),G.setAttribute("data-option-position",String(B+1)),G.name="lb-variant-"+e.id+"-"+(B+1),G.setAttribute("aria-label",R);let Z=Object.create(null),be=b?.options?.[B];for(let ge of $){let ee=ge.options&&ge.options[B];if(!ee||Z[ee])continue;Z[ee]=!0;let Ne=document.createElement("option");Ne.value=ee,Ne.textContent=ee,ee===be&&(Ne.selected=!0),G.appendChild(Ne)}G.addEventListener("change",S),P.push(G),V.appendChild(G),N.appendChild(V)}C.appendChild(N),b&&(d.setAttribute("data-selected-variant-id",String(b.id)),b.options&&L(b.options))}else if($.length===1&&$[0].title!=="Default Title"){let f=document.createElement("span");f.className="lb-mix-match__filled-variant",f.textContent=$[0].title,C.appendChild(f)}let T=null;e.available&&(T=document.createElement("span"),T.className="lb-mix-match__modal-needs-spots",T.hidden=!0,C.appendChild(T));let h=null;if(e.available){let f=document.createElement("div");f.className="lb-mix-match__modal-product-actions",F&&f.appendChild(F),h=document.createElement("button"),h.type="button",h.className="lb-mix-match__modal-add",h.textContent=r.addItem||"Add",h.setAttribute("aria-label",(r.addItem||"Add")+" "+e.title),h.setAttribute("data-add-product",String(t)),f.appendChild(h),C.appendChild(f)}else{let f=document.createElement("span");f.className="lb-mix-match__modal-sold-out-label",f.textContent=r.soldOut||"Sold out",d.setAttribute("aria-disabled","true"),C.appendChild(f)}d.appendChild(C);let M=b?b.id:null;function D(){if(!b)return;let f=b,H=f.inventoryQuantity,_=typeof H=="number"?i.variantUnitsElsewhere(f.id):0,y=i.isInBundle(f.id);if(K){let V=i.ownQty(f.id);V>0?W=V:M!==f.id&&(W=A(f).min),M=f.id,K(f,_)}let L=i.swapUnits(e.id,f.id),S=A(f),N=L>=S.min,B=i.remainingSpots(),R=!y&&!N&&!Ln(S,B);if(T&&(R&&B>0?(T.textContent=Ke(S.min,r),T.hidden=!1):T.hidden=!0),h)if(y)h.disabled=!1,i.canRemove(f.id)?(h.textContent=r.removeItem||"Remove",h.setAttribute("aria-label",(r.removeItem||"Remove")+" "+e.title),h.classList.remove("lb-mix-match__modal-add--required")):(h.disabled=!0,h.textContent=r.required||"Required",h.setAttribute("aria-label",e.title+" is required and cannot be removed"),h.classList.add("lb-mix-match__modal-add--required")),h.classList.add("lb-mix-match__modal-add--added"),d.classList.add("lb-mix-match__modal-product--in-bundle"),p.hidden=!1;else{let V=r.swapItem||"Swap",U=N?V:r.addItem||"Add";h.textContent=U,h.setAttribute("aria-label",U+" "+e.title),h.classList.remove("lb-mix-match__modal-add--added"),h.classList.remove("lb-mix-match__modal-add--required"),d.classList.remove("lb-mix-match__modal-product--in-bundle"),p.hidden=!0;let G=typeof H=="number"?Math.max(0,H-_)<S.min:!1;if(N)h.disabled=G;else{let Z=l.max-i.productUnitsElsewhere(e.id,f.id)<S.min;h.disabled=G||Z||R||i.isFull()}}s=!e.available,c=!e.available||!y&&!!h?.disabled,ne?.();for(let V of P)V.disabled=s}return{el:d,refresh:D}}var To='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';function tt(e){let t=e.querySelectorAll(To),n=[];for(let r=0;r<t.length;r++)t[r].offsetParent!==null&&n.push(t[r]);return n}var St=0,Ie=0;function nt(){if(Ie++,Ie>1)return;St=window.pageYOffset||document.documentElement.scrollTop;let e=document.body;e.style.position="fixed",e.style.top="-"+St+"px",e.style.left="0",e.style.right="0",e.style.overflow="hidden"}function rt(){if(Ie<=0||(Ie--,Ie>0))return;let e=document.body;e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.overflow="",window.scrollTo(0,St)}var Ae="__all__",Eo=300,Mo=200;function On(e){let{container:t,data:n,t:r,eligibleProducts:o,items:i}=e,a=t.querySelector("[data-modal-overlay]");a&&e.portalTarget&&e.portalTarget.appendChild(a);let l=h=>a?a.querySelector(h):null,d=l('[role="dialog"]'),s=l("[data-modal-search]"),c=l("[data-modal-search-clear]"),u=l("[data-modal-list]"),p=l("[data-modal-empty]"),v=l("[data-modal-live]"),g=l("[data-modal-close]"),C=l("[data-modal-done]"),I=l("[data-modal-footer-count]"),b=l("[data-modal-subtitle]"),A=l("[data-modal-filters]"),O=n.showTypeFilters!==!1,k=Ae,m=!1,w=!1,E=!1,x=[];function z(){for(let h of x)h.refresh()}function F(){let h=Math.min(oe(i),e.requiredQty),M=Math.max(0,e.requiredQty-h);I&&(I.textContent=Ye(h,e.requiredQty,r)),b&&(b.textContent=In(M,n.discountType,n.discountValue,r))}function Q(){z(),F()}function W(){if(u){e.dropdown?.unbindAll(u),u.innerHTML="",x=[];for(let h=0;h<o.length;h++){let M=et(o[h],h,{t:r,rulesMap:e.rulesMap,showQtySelector:e.showQtySelector,capacity:e.rowCapacity,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),Q()}});x.push(M),u.appendChild(M.el)}e.dropdown?.bindAll(u),u.addEventListener("click",te)}}function te(h){let M=h.target.closest("[data-add-product]");if(!M||M.disabled)return;let D=parseInt(M.getAttribute("data-add-product")??"",10),f=o[D];if(!f)return;let H=M.closest(".lb-mix-match__modal-product"),_=H&&H.getAttribute("data-selected-variant-id"),y=(_?f.variants.find(R=>R.id===parseInt(_,10)):null)??null;if(y||(y=f.variants.find(R=>R.available)??null),!y)return;if(e.isInBundle(y.id)){e.removeVariant(y.id),Q();return}let L=H?.querySelector("[data-row-qty]"),S=L?Math.max(1,parseInt(L.getAttribute("data-qty")||L.textContent||"",10)||1):Xe(f.id,e.rulesMap,y.id),N={productId:f.id,variantId:y.id,title:f.title,url:f.url||null,variantTitle:y.title,featuredImage:y.image||f.featuredImage||null,price:y.price,compareAtPrice:y.compareAtPrice||null,unitPrice:y.unitPrice||null,quantity:S},B=e.swapUnitsFor(f.id,y.id);if(B>0){e.swapVariant(N,Math.min(S,B)),Q();return}e.atCapacity()||(e.addSelection(N),Q())}function ne(){if(!A||!O)return;let h=[],M=Object.create(null);for(let D of o){let f=(D.type||"").trim();f&&!M[f]&&(M[f]=!0,h.push(f))}if(h.length<2){A.style.display="none",d?.classList.add("lb-mix-match__modal--filters-hidden");return}A.innerHTML="";for(let D of[Ae,...h]){let f=document.createElement("button");f.type="button",f.className="lb-mix-match__filter",f.setAttribute("data-filter",D),f.setAttribute("aria-pressed",D===k?"true":"false"),D===k&&f.classList.add("lb-mix-match__filter--active"),f.textContent=D===Ae?r.allTypes||"All":D,f.addEventListener("click",()=>{k=D,K(),$(s?s.value:"")}),A.appendChild(f)}}function K(){if(!A)return;let h=A.querySelectorAll("[data-filter]");for(let M=0;M<h.length;M++){let D=h[M].getAttribute("data-filter")===k;h[M].classList.toggle("lb-mix-match__filter--active",D),h[M].setAttribute("aria-pressed",D?"true":"false")}}function $(h){if(!u)return;let M=Se(h),D=u.querySelectorAll("[data-product-item]"),f=0;for(let H=0;H<D.length;H++){let _=D[H].getAttribute("data-title")??"",y=D[H].getAttribute("data-type")||"",L=(!M||_.indexOf(M)!==-1)&&(k===Ae||y===k);D[H].classList.toggle("lb-hidden",!L),L&&f++}p&&(p.style.display=f===0&&M.length>0?"":"none"),c&&(c.style.display=h.length>0?"":"none"),v&&(v.textContent=J(r.nProductsShown||"__COUNT__ products shown",{COUNT:f}))}if(s){let h=Ze(()=>$(s.value),Mo);s.addEventListener("input",h)}c&&c.addEventListener("click",()=>{s&&(s.value="",$(""),s.focus())});function P(){!a||E||(E=!0,m||(W(),m=!0),w||(ne(),w=!0),Q(),k=Ae,K(),s&&(s.value=""),$(s?s.value:""),a.style.display="",a.offsetHeight,a.classList.add("lb-mix-match__modal-overlay--open"),nt(),setTimeout(()=>{s?s.focus():d?.focus()},50))}function T(){if(!a||!E)return;E=!1,a.classList.remove("lb-mix-match__modal-overlay--open"),rt(),setTimeout(()=>{E||(a.style.display="none")},Eo);let h=e.fallbackFocus;h&&typeof h.focus=="function"&&setTimeout(()=>h.focus(),0)}if(g?.addEventListener("click",T),C?.addEventListener("click",T),a){let h=null;a.addEventListener("mousedown",M=>{h=M.target}),a.addEventListener("mouseup",M=>{M.target===a&&h===a&&T(),h=null})}return document.addEventListener("keydown",h=>{if(E){if(h.key==="Escape"){h.preventDefault(),T();return}if(h.key==="Tab"&&d){let M=tt(d);if(M.length===0){h.preventDefault();return}let D=M[0],f=M[M.length-1];h.shiftKey&&document.activeElement===D?(h.preventDefault(),f.focus()):!h.shiftKey&&document.activeElement===f&&(h.preventDefault(),D.focus())}}}),{open:P,close:T,isOpen:()=>E,refresh:Q,overlay:a}}function Hn(e,t){return Math.max(0,t-oe(e))}function Tt(e,t){return oe(e)>=t}function Dn(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].variantId===t&&(n+=e[r].quantity||0);return n}function ot(e,t,n){let r=0;for(let o=0;o<e.length;o++){let i=e[o];i&&i.productId===t&&i.variantId!==n&&(r+=i.quantity||0)}return r}function Te(e,t,n){if(pe(t.variantId,n)?.required)return!1;let r=X(t.productId,n);if(!r.required)return!0;let o=0;for(let i=0;i<e.length;i++){let a=e[i];a!==t&&a.productId===t.productId&&(o+=a.quantity||1)}return o>=r.min}function Et(e,t,n,r){let o=X(t,r);return!o.required||o.max!==o.min||me(e,n)!==-1?0:ot(e,t,n)}function Io(){let e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","16"),t.setAttribute("height","16"),t.setAttribute("viewBox","0 0 20 20"),t.setAttribute("fill","none");for(let[n,r,o,i]of[["5","5","15","15"],["15","5","5","15"]]){let a=document.createElementNS(e,"line");a.setAttribute("x1",n),a.setAttribute("y1",r),a.setAttribute("x2",o),a.setAttribute("y2",i),a.setAttribute("stroke","currentColor"),a.setAttribute("stroke-width","2"),a.setAttribute("stroke-linecap","round"),t.appendChild(a)}return t}function it(e,t,n,r,o,i){let a=document.createElement("div");a.className="lb-mix-match__slot lb-mix-match__slot--filled";let l=document.createElement("div");if(l.className="lb-bundle-thumbnail",e.featuredImage){let g=document.createElement("img");g.src=ke(e.featuredImage,240),g.srcset=Me(e.featuredImage,Bn),g.sizes=qn,g.alt=e.title,g.loading="lazy",l.appendChild(g)}a.appendChild(l);let d=document.createElement("div");d.className="lb-mix-match__filled-info";let s=document.createElement("button");if(s.type="button",s.className="lb-mix-match__filled-title",s.textContent=e.title,s.setAttribute("aria-label",(t.editSelection||"Edit selection")+": "+e.title),d.appendChild(s),e.variantTitle&&e.variantTitle!=="Default Title"){let g=document.createElement("span");g.className="lb-mix-match__filled-variant",g.textContent=e.variantTitle,d.appendChild(g)}let c=document.createElement("span");c.className="lb-mix-match__filled-price";let u=e.compareAtPrice||0;if(u>e.price){let g=document.createElement("s");g.className="lb-mix-match__filled-compare",g.textContent=n(u),c.appendChild(g)}let p=document.createElement("span");p.className="lb-bundle-product-price",p.textContent=n(e.price),c.appendChild(p);let v=document.createElement("span");if(v.className="lb-bundle-qty-inline",v.textContent="\xD7"+(e.quantity||1),c.appendChild(v),d.appendChild(c),e.unitPrice){let g=document.createElement("span");g.className="lb-bundle-product-unit-price",g.textContent=e.unitPrice,d.appendChild(g)}if(a.appendChild(d),r){let g=document.createElement("button");g.type="button",g.className="lb-mix-match__slot-remove",g.setAttribute("aria-label",(t.removeItem||"Remove")+" "+e.title),g.appendChild(Io()),g.addEventListener("click",C=>{C.stopPropagation(),o()}),a.appendChild(g)}else{let g=document.createElement("span");g.className="lb-mix-match__slot-required",g.textContent=t.required||"Required",a.appendChild(g)}return a.addEventListener("click",i),a}function Fn(e,t,n,r,o){let i=r.translations||{},a=e.querySelector("[data-selection-slots]");if(a){a.innerHTML="";for(let s=0;s<t.length;s++){let c=s;a.appendChild(it(t[c],i,o.formatMoney,Te(t,t[c],o.rulesMap),()=>o.onRemove(c),o.onEdit))}}let l=e.querySelector("[data-add-product-trigger]");l&&(l.style.display=oe(t)>=n?"none":"");let d=e.querySelector("[data-add-bundle]");if(d){d.disabled=oe(t)<n;let s=d.querySelector("[data-cta-label]");s&&(s.textContent=d.getAttribute("data-cta-text")||i.addToCart||"Add to cart")}}function Vn(e,t,n,r,o,i){let a=e.querySelector("[data-pricing-section]");if(oe(t)<n){a&&(a.style.display="none");return}a&&(a.style.display="");let l=0;for(let d=0;d<t.length;d++)l+=t[d].price*(t[d].quantity||1);l>0&&r.discountType&&i(e,o(l,r.discountType,r.discountValue??0),l)}function Un(e,t,n,r,o){let i=Math.min(oe(n),r),a=Math.max(0,r-i),l=[e];t&&l.push(t);for(let d of l){let s=d.querySelectorAll("[data-progress-segment]");for(let v=0;v<s.length;v++)s[v].classList.toggle("lb-mix-match__progress-segment--filled",v<i);let c=d.querySelector("[data-progress-count]");c&&(c.textContent=Ye(i,r,o));let u=d.querySelector("[data-progress-remaining]");u&&(u.textContent=Mn(a,o));let p=d.querySelector(".lb-mix-match__progress-segments");p&&p.setAttribute("aria-valuenow",String(i))}}function at(e){return(t,n,r)=>{let o=t.querySelector("[data-sale-price]"),i=t.querySelector("[data-compare-price]"),a=t.querySelector("[data-savings-bar]"),l=t.querySelector("[data-savings-amount]"),d=t.querySelector("[data-savings-percent]"),s=r-n;if(o&&(o.textContent=e(n)),i&&(s>0?(i.textContent=e(r),i.style.display=""):i.style.display="none"),a)if(s>0){if(l&&(l.textContent=e(s)),d){let c=r>0?Math.round(s*100/r):0;d.textContent="("+c+"%)"}a.style.display=""}else a.style.display="none"}}function zn(e,t,n,r){let o=c=>c.variants.find(u=>u.available)??null,i=(c,u,p)=>({productId:c.id,variantId:u.id,title:c.title,url:c.url||null,variantTitle:u.title,featuredImage:c.featuredImage||null,price:u.price,compareAtPrice:u.compareAtPrice||null,unitPrice:u.unitPrice||null,quantity:p}),a=[];for(let c of e){if(!c.available||!c.variants)continue;let u=!1;for(let g of c.variants){let C=pe(g.id,t);!C?.required||!g.available||(a.push(i(c,g,Math.max(1,C.min))),u=!0)}if(u)continue;let p=X(c.id,t);if(!p.required)continue;let v=o(c);v&&a.push(i(c,v,Math.max(1,p.min)))}if(a.length||!r?.enabled)return a;let l=c=>c.available&&X(c.id,t).min<=n,d=(r.currentProductId!=null?e.find(c=>c.id===r.currentProductId&&l(c)):null)??e.find(l);if(!d)return[];let s=o(d);return s?[i(d,s,X(d.id,t).min)]:[]}function Qn(e){let t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("viewBox","0 0 20 20"),n.setAttribute("fill","none");for(let[r,o,i,a]of e){let l=document.createElementNS(t,"line");l.setAttribute("x1",r),l.setAttribute("y1",o),l.setAttribute("x2",i),l.setAttribute("y2",a),l.setAttribute("stroke","currentColor"),l.setAttribute("stroke-width","2"),l.setAttribute("stroke-linecap","round"),n.appendChild(l)}return n}function j(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let o in n)r.setAttribute(o,n[o]);return r}function lt(e){let t="lb-modal-title-"+e.domId,n=j("div","lb-mix-match__modal-overlay",{"data-modal-overlay":"","data-bundle-gid":e.bundleGid,style:"display: none;"}),r=j("div","lb-mix-match__modal"+(e.showTypeFilters?"":" lb-mix-match__modal--filters-hidden"),{role:"dialog","aria-modal":"true","aria-labelledby":t,tabindex:"-1"}),o=j("div","lb-mix-match__modal-header"),i=j("div","lb-mix-match__modal-header-top"),a=j("div","lb-mix-match__modal-heading"),l=j("h4","lb-mix-match__modal-title",{id:t});e.wizard&&l.setAttribute("tabindex","-1"),l.textContent="Add to your bundle",a.appendChild(l),a.appendChild(j("p","lb-mix-match__modal-subtitle",{"data-modal-subtitle":""})),i.appendChild(a);let d=j("button","lb-mix-match__modal-close",{type:"button","data-modal-close":"","aria-label":"Close"});d.appendChild(Qn([["5","5","15","15"],["15","5","5","15"]])),i.appendChild(d),o.appendChild(i);let s=j("div","lb-mix-match__progress lb-mix-match__modal-progress",{"data-progress":""}),c=j("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e.segmentCount??0)});if(e.wizard)c.setAttribute("data-modal-step-segments","");else for(let C=0;C<(e.segmentCount??0);C++)c.appendChild(j("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));if(s.appendChild(c),o.appendChild(s),r.appendChild(o),e.showSearch){let C=j("div","lb-mix-match__modal-search"),I=j("input","lb-mix-match__modal-search-input",{type:"text","data-modal-search":"",role:"searchbox","aria-label":"Search products",placeholder:"Search products",autocomplete:"off"});C.appendChild(I);let b=j("button","lb-mix-match__modal-search-clear",{type:"button","data-modal-search-clear":"","aria-label":"Clear search",style:"display: none;"});b.appendChild(Qn([["5","5","15","15"],["15","5","5","15"]])),C.appendChild(b),r.appendChild(C)}e.showTypeFilters&&r.appendChild(j("div","lb-mix-match__filters",{"data-modal-filters":"",role:"group","aria-label":"Filter by type"})),r.appendChild(j("div","lb-mix-match__modal-list",{"data-modal-list":""}));let u=j("div","lb-mix-match__modal-empty",{"data-modal-empty":"",style:"display: none;"}),p=document.createElement("p");p.textContent="No products match your search",u.appendChild(p),r.appendChild(u),r.appendChild(j("span","lb-visually-hidden",{"data-modal-live":"","aria-live":"polite"}));let v=j("div",e.wizard?"lb-mix-match__modal-footer lb-multi-step__modal-footer":"lb-mix-match__modal-footer");if(e.wizard){let C=j("button","lb-multi-step__modal-back",{type:"button","data-modal-back":"",style:"display: none;"});C.textContent="Back",v.appendChild(C)}if(v.appendChild(j("span","lb-mix-match__modal-footer-count",{"data-modal-footer-count":"","aria-live":"polite"})),e.wizard){let C=j("button","lb-mix-match__modal-done",{type:"button","data-modal-next":"",style:"display: none;"});C.textContent="Next",v.appendChild(C)}let g=j("button","lb-mix-match__modal-done",{type:"button","data-modal-done":"",...e.wizard?{style:"display: none;"}:{}});return g.textContent="Done",v.appendChild(g),r.appendChild(v),n.appendChild(r),n}function Wn(e,t,n,r,o){let i=t.widgetConfig,a=ue,l=t.minQuantity||1,d=Je(t.productRules,t.variantRules),c=Ve(t).map(m=>({id:Number(m.productId),title:m.title??"",url:m.url??null,type:"",featuredImage:m.featuredImage??null,available:m.variants.some(w=>w.available),optionNames:m.optionNames,variants:m.variants.map(w=>({id:Number(w.id),title:w.title,options:w.options,available:w.available,price:w.price,compareAtPrice:w.compareAtPrice,unitPrice:w.unitPrice,image:w.image,inventoryQuantity:null}))}));if(!c.length)return;let u=c.filter(m=>m.available).length;if(n==="hide"&&u===0)return;let p=le(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),v=de("lb-mix-match",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||a.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});v.root.setAttribute("data-required-quantity",String(l)),v.products.before(je(l));let g=document.createElement("div");g.className="lb-mix-match__slots lb-edge-fade",g.setAttribute("data-selection-slots",""),v.products.replaceWith(g);let C=document.createElement("button");C.type="button",C.className="lb-mix-match__add-product",C.setAttribute("data-add-product-trigger",""),C.textContent=(a.addItem,"Add a product"),g.after(C);let I=lt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:!0,showTypeFilters:!1,segmentCount:l,wizard:!1});v.root.appendChild(I);let b=zn(c,d,l),A={remainingSpots:()=>Hn(b,l),ownQty:m=>An(b,m),variantUnitsElsewhere:m=>Dn(b,m),productUnitsElsewhere:(m,w)=>ot(b,m,w),swapUnits:(m,w)=>Et(b,m,w,d),isInBundle:m=>me(b,m)!==-1,canRemove:m=>{let w=me(b,m);return w!==-1&&Te(b,b[w],d)},isFull:()=>Tt(b,l),commitQty:(m,w)=>{let E=me(b,m);return E===-1||b[E].quantity===w?!1:(b[E].quantity=w,!0)}};function O(){Fn(v.root,b,l,t,{formatMoney:p,rulesMap:d,onRemove:m=>{Te(b,b[m],d)&&(b.splice(m,1),O(),k.isOpen()&&k.refresh())},onEdit:()=>k.open()}),Vn(v.root,b,l,t,(m,w,E)=>De(m,w,E),at(p)),Un(v.root,k.overlay,b,l,a)}let k=On({container:v.root,data:{translations:a,discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},t:a,rulesMap:d,eligibleProducts:c,requiredQty:l,showQtySelector:!0,items:b,formatMoney:p,rowCapacity:A,dropdown:void 0,portalTarget:null,fallbackFocus:C,onSelectionChanged:O,addSelection:m=>{if(oe(b)+(m.quantity||1)>l)return;let w=pe(m.variantId,d)?.max,E=X(m.productId,d).max-ot(b,m.productId,m.variantId);typeof w=="number"&&(E=Math.min(E,w)),!((m.quantity||1)>E)&&(b.push(m),O())},removeVariant:m=>{let w=me(b,m);w===-1||!Te(b,b[w],d)||(b.splice(w,1),O())},swapVariant:(m,w)=>{let E=0;for(let x=b.length-1;x>=0&&E<w;x--){let z=b[x];if(z.productId!==m.productId||z.variantId===m.variantId)continue;let F=Math.min(z.quantity||1,w-E);F>=(z.quantity||1)?b.splice(x,1):z.quantity=(z.quantity||1)-F,E+=F}E>0&&(m.quantity=E,b.push(m),O())},swapUnitsFor:(m,w)=>Et(b,m,w,d),isInBundle:m=>me(b,m)!==-1,atCapacity:()=>Tt(b,l)});C.addEventListener("click",()=>{k.isOpen()||k.open()}),v.cta.addEventListener("click",()=>{oe(b)<l||r(b.map(m=>({merchandiseId:"gid://shopify/ProductVariant/"+m.variantId,quantity:m.quantity||1,attributes:se(t.id,t.bundleType)})))}),e.appendChild(v.root),ce(v.root),O(),o?.(he(v.root))}function Ao(e,t,n){if(t==="fixed_amount"){let o=parseInt(n.getAttribute("data-tier-amt")??"",10)||0;return Math.max(0,e-o)}let r=parseInt(n.getAttribute("data-tier-pct")??"",10)||0;return Math.max(0,e-Math.floor(e*r/100))}function Lo(e,t,n){let r=parseInt(n.getAttribute("data-tier-qty")??"",10),o=Ao(e,t,n),i=o*r,a=e*r;return{qty:r,priceEach:o,totalPrice:i,undiscountedTotal:a,totalSavings:a-i}}function Po(e,t){if(!t.itemCount)return null;let n=new Intl.PluralRules(t.locale||"en").select(e);return" ("+(t.itemCount[n]||t.itemCount.other||"__COUNT__").split("__COUNT__").join(String(e))+")"}function jn(e,t,n,r,o,i,a){for(let b=0;b<t.length;b++)t[b].setAttribute("aria-checked",b===o?"true":"false"),t[b].setAttribute("tabindex",b===o?"0":"-1");let{qty:l,totalPrice:d,undiscountedTotal:s,totalSavings:c}=Lo(n,r,t[o]),u=e.querySelector("[data-item-count]");if(u){let b=Po(l,i);b!==null&&(u.textContent=b)}let p=e.querySelector("[data-total-price]");p&&(p.textContent=a(d));let v=e.querySelector("[data-compare-price]");v&&(c>0?(v.textContent=a(s),v.style.display=""):v.style.display="none");let g=e.querySelector("[data-savings-bar]"),C=e.querySelector("[data-savings-amount]"),I=e.querySelector("[data-savings-percent]");if(g)if(c>0){if(C&&(C.textContent=a(c)),I){let b=s>0?Math.round(c*100/s):0;I.textContent="("+b+"%)"}g.style.display=""}else g.style.display="none"}function $n(e,t,n,r){let o=t.widgetConfig,i=t.products[0];if(!i)return;let a=i.variants.nodes,l=a.find(m=>m.availableForSale)??a[0];if(!l)return;let d=a.some(m=>m.availableForSale);if(n==="hide"&&!d)return;let s=Fe(l.price.amount),c=t.discountConfig.discountType,u=le(i.priceRange.minVariantPrice.currencyCode),p=ue,v=o.popularBadge?.visible?Math.floor((t.volumeTiers.length-1)/2):-1,g=0,C=t.volumeTiers.map((m,w)=>{let E=c==="fixed_amount"?0:Math.round(m.percentage??0),x=c==="fixed_amount"?Math.round((m.amount??0)*100):0,z=c==="fixed_amount"?Math.max(0,s-x):Math.max(0,s-Math.floor(s*E/100)),F=s>0?Math.round((s-z)*100/s):0;return{quantity:m.minQuantity,percent:E,amountCents:x,label:J(p.buyQty||"Buy __COUNT__",{COUNT:m.minQuantity}),savingsLabel:F>0?"Save "+F+"%":null,badgeLabel:w===v?o.popularBadge?.text||"Most popular":null,selected:w===g}});if(!C.length)return;let I=de("lb-volume",{title:t.title,subtitle:t.description,summaryLabel:"Total",withItemCount:!0,totalPriceSlot:!0,showSavingsBar:o.savingsBar?.visible!==!1,showComparePrice:o.pricing?.showCompareAtPrice!==!1,ctaText:o.cta?.ctaText||p.addToCart||"Add to cart",endsAt:o.countdown?.showCountdown===!1?null:t.endsAt}),b=gn(C,"Select quantity");I.products.replaceWith(b);let A=b.querySelectorAll("[data-tier-index]"),O=g,k=()=>jn(I.root,A,s,c,O,p,u);if(b.addEventListener("click",m=>{let w=m.target.closest("[data-tier-index]");w&&(O=parseInt(w.getAttribute("data-tier-index")??"",10)||0,k())}),b.addEventListener("keydown",m=>{m.key==="ArrowDown"||m.key==="ArrowRight"?(m.preventDefault(),O=Math.min(O+1,A.length-1),k(),A[O].focus()):(m.key==="ArrowUp"||m.key==="ArrowLeft")&&(m.preventDefault(),O=Math.max(O-1,0),k(),A[O].focus())}),d)I.cta.addEventListener("click",()=>{let m=parseInt(A[O].getAttribute("data-tier-qty")??"",10);r([{merchandiseId:l.id,quantity:m,attributes:se(t.id,t.bundleType)}])});else{I.cta.disabled=!0;let m=I.cta.querySelector("[data-cta-label]");m&&(m.textContent=p.outOfStock||"Out of stock")}e.appendChild(I.root),ce(I.root),k()}function st(e,t){return e-Math.floor(e*t/100)}function Bo(e,t,n,r){let o=Y(e[0],e[0].selectedVariantId),i=Y(e[1],e[1].selectedVariantId),a=o.price*n+i.price*r,l=o.price*n+st(i.price,t)*r;return{totalPrice:a,salePrice:l,savings:a-l}}function Mt(e,t,n,r,o){let i=e.querySelector("[data-product-price]"),a=e.querySelector("[data-product-compare-price]");if(i){if(r&&n>0){i.textContent=o(st(t.price,n)),a&&(a.textContent=o(t.price),a.hidden=!1);return}if(i.textContent=o(t.price),a){let l=t.compareAtPrice;l&&l>t.price?(a.textContent=o(l),a.hidden=!1):(a.textContent="",a.hidden=!0)}}}function It(e,t,n,r,o,i){let{totalPrice:a,salePrice:l,savings:d}=Bo(t,n,r,o),s=e.querySelector("[data-sale-price]"),c=e.querySelector("[data-compare-price]"),u=e.querySelector("[data-savings-bar]"),p=e.querySelector("[data-savings-amount]"),v=e.querySelector("[data-savings-percent]");if(s&&(s.textContent=i(l)),c&&(d>0?(c.textContent=i(a),c.style.display=""):c.style.display="none"),u)if(d>0){if(p&&(p.textContent=i(d)),v){let g=a>0?Math.round(d*100/a):0;v.textContent="("+g+"%)"}u.style.display=""}else u.style.display="none"}function Gn(e,t,n,r){let o=Y(e[0],e[0].selectedVariantId),i=Y(e[1],e[1].selectedVariantId),a={variantId:Number(e[0].selectedVariantId),quantity:n,priceCents:(o.price||0)*n},l=st(i.price||0,t)*r;return String(e[0].selectedVariantId)===String(e[1].selectedVariantId)?[{variantId:a.variantId,quantity:n+r,priceCents:(a.priceCents??0)+l}]:[a,{variantId:Number(e[1].selectedVariantId),quantity:r,priceCents:l}]}function Kn(e,t,n,r,o){let i=t.widgetConfig,a=t.products.find(A=>A.id===t.buyProductId),l=t.products.find(A=>A.id===t.getProductId);if(!a||!l)return;let d=t.buyQuantity,s=t.getQuantity,c=t.discountConfig.discountValue,u={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},p=[{..._e(a,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[0]??null}),role:"buy"},{..._e(l,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[1]??null}),role:"get"}],v=p.filter(A=>!A.variants.some(O=>O.available)).length;if(n==="hide"&&v>0)return;let g=le(a.priceRange.minVariantPrice.currencyCode),C=ue,I=de("lb-bogo",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||C.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});I.root.setAttribute("data-discount-value",String(c)),I.root.setAttribute("data-buy-qty",String(d)),I.root.setAttribute("data-get-qty",String(s));let b=c>=100?"Free":c+"% off";if(p.forEach((A,O)=>{let k=O===1,m=!A.variants.some(x=>x.available),w=We(A,C,{isOos:m,href:A.url,bogoRole:A.role,inlineQuantity:k?s:d,badgeText:k&&!m?b:null});if(I.products.appendChild(w),m)return;let E=Y(A,A.selectedVariantId);ze(w,A,E),Qe(w,E,A.featuredImage),Mt(w,E,c,k,g),Ue(w,()=>A,x=>{Qe(w,x,A.featuredImage),Mt(w,x,c,k,g),It(I.root,p,c,d,s,g)})}),v>0){I.cta.disabled=!0;let A=I.cta.querySelector("[data-cta-label]");A&&(A.textContent=(C.itemsOutOfStock||"__COUNT__ items out of stock").split("__COUNT__").join(String(v)))}else I.cta.addEventListener("click",()=>{r(Gn(p,c,d,s).map(A=>({merchandiseId:"gid://shopify/ProductVariant/"+A.variantId,quantity:A.quantity,attributes:se(t.id,t.bundleType)})))});e.appendChild(I.root),ce(I.root),It(I.root,p,c,d,s,g),o?.(he(I.root))}function At(e,t,n){return J(n.stepOf||"Step __STEP__ of __TOTAL__",{STEP:e+1,TOTAL:t})}function Le(e,t,n){return J(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function Yn(e,t,n){return J(n.stepsCompleted||"__COUNT__ of __TOTAL__ steps completed",{COUNT:e,TOTAL:t})}function Jn(e,t){return e>0?J(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function fe(e,t){let n=0;for(let r=0;r<e[t].length;r++)n+=e[t][r].quantity||1;return n}function ye(e,t,n){return fe(e,n)>=(t[n].minQuantity||1)}function Ee(e,t,n){let r=t[n].maxQuantity;return r==null?1/0:Math.max(0,r-fe(e,n))}function Pe(e,t){for(let n=0;n<t.length;n++)if(!ye(e,t,n))return!1;return!0}function Be(e,t,n){if(pe(t.variantId,n)?.required)return!1;let r=X(t.productId,n);if(!r.required)return!0;let o=0;for(let i of e)for(let a of i)a!==t&&a.productId===t.productId&&(o+=a.quantity||1);return o>=r.min}function Lt(e,t,n,r,o){let i=X(n,o);if(!i.required||i.max!==i.min||we(e,t,r)!==-1)return 0;let a=0;for(let l of e[t])l.productId===n&&l.variantId!==r&&(a+=l.quantity||1);return a}function we(e,t,n){for(let r=0;r<e[t].length;r++)if(e[t][r].variantId===n)return r;return-1}function Xn(e){let{container:t,steps:n,selections:r,t:o}=e;for(let i=0;i<n.length;i++){let a=n[i].minQuantity||1,l=t.querySelector('[data-step-count="'+i+'"]');l&&(l.textContent=Le(Math.min(fe(r,i),a),a,o),l.classList.toggle("lb-multi-step__group-count--met",ye(r,n,i)));let d=t.querySelector('[data-step-slots="'+i+'"]');if(d){d.innerHTML="";for(let s=0;s<r[i].length;s++){let c=i,u=s,p=r[c][u];d.appendChild(it(p,o,e.formatMoney,Be(r,p,e.rulesMap),()=>e.onRemove(c,u),()=>e.onEdit(c)))}}}for(let i=0;i<n.length;i++){let a=t.querySelector('[data-step-trigger="'+i+'"]');a&&(a.style.display=Ee(r,n,i)===0?"none":"")}}function Zn(e,t,n,r){let{container:o,steps:i,selections:a}=e,l=o.querySelector("[data-pricing-section]");if(!Pe(a,i)){l&&(l.style.display="none");return}l&&(l.style.display="");let d=0;for(let s of a)for(let c of s)d+=c.price*(c.quantity||1);d>0&&t.discountType&&r(o,n(d,t.discountType,t.discountValue??0),d)}function er(e){let{container:t,steps:n,selections:r,t:o}=e,i=0;for(let u=0;u<n.length;u++)ye(r,n,u)&&(i+=1);let a=n.length-i,l=t.querySelectorAll("[data-progress] [data-progress-segment]");for(let u=0;u<l.length;u++)l[u].classList.toggle("lb-mix-match__progress-segment--filled",u<i);let d=t.querySelector("[data-progress-count]");d&&(d.textContent=Yn(i,n.length,o));let s=t.querySelector("[data-progress-remaining]");s&&(s.textContent=Jn(a,o));let c=t.querySelector(".lb-mix-match__progress-segments");c&&c.setAttribute("aria-valuenow",String(i))}function tr(e){let t=e.container.querySelector("[data-add-bundle]");if(!t)return;t.disabled=!Pe(e.selections,e.steps);let n=t.querySelector("[data-cta-label]");n&&(n.textContent=t.getAttribute("data-cta-text")||e.t.addToCart||"Add to cart")}function nr(e){let t=Object.create(null),n=[];for(let r of e)for(let o of r){let i=o.quantity||1,a=String(o.variantId);t[a]?(t[a].quantity+=i,t[a].priceCents=(t[a].priceCents??0)+(o.price||0)*i):(t[a]={variantId:o.variantId,quantity:i,priceCents:(o.price||0)*i},n.push(a))}return n.map(r=>t[r])}var qe="__all__",qo=300,Ro=200;function rr(e){let{container:t,steps:n,selections:r,t:o}=e,i=t.querySelector("[data-modal-overlay]");i&&e.portalTarget&&e.portalTarget.appendChild(i);let a=_=>i?i.querySelector(_):null,l=a('[role="dialog"]'),d=a(".lb-mix-match__modal-title"),s=a("[data-modal-search]"),c=a("[data-modal-search-clear]"),u=a("[data-modal-list]"),p=a("[data-modal-empty]"),v=a("[data-modal-live]"),g=a("[data-modal-close]"),C=a("[data-modal-back]"),I=a("[data-modal-next]"),b=a("[data-modal-done]"),A=a("[data-modal-footer-count]"),O=a("[data-modal-subtitle]"),k=a("[data-modal-step-segments]"),m=a("[data-modal-filters]"),w=qe,E=!1,x=0,z=[],F=_=>n[_].eligibleProducts||[],Q={remainingSpots:()=>Ee(r,n,x),ownQty:_=>{let y=we(r,x,_);return y===-1?0:r[x][y].quantity||0},variantUnitsElsewhere:_=>{let y=0;for(let L of r)for(let S of L)S.variantId===_&&(y+=S.quantity||0);return y},productUnitsElsewhere:(_,y)=>{let L=0;for(let S=0;S<r.length;S++)for(let N of r[S])N.productId===_&&(S===x&&N.variantId===y||(L+=N.quantity||0));return L},swapUnits:(_,y)=>Lt(r,x,_,y,e.rulesMap),isInBundle:_=>we(r,x,_)!==-1,canRemove:_=>{let y=we(r,x,_);return y!==-1&&e.canRemove(r[x][y])},isFull:()=>Ee(r,n,x)===0,commitQty:(_,y)=>{let L=we(r,x,_);return L===-1||r[x][L].quantity===y?!1:(r[x][L].quantity=y,!0)}};function W(_){if(!k)return;let y=n[_].minQuantity||1;k.innerHTML="",k.setAttribute("aria-valuemax",String(y));for(let L=0;L<y;L++){let S=document.createElement("span");S.className="lb-mix-match__progress-segment",S.setAttribute("data-progress-segment",""),k.appendChild(S)}te()}function te(){if(!k)return;let _=n[x].minQuantity||1,y=Math.min(fe(r,x),_),L=k.querySelectorAll("[data-progress-segment]");for(let S=0;S<L.length;S++)L[S].classList.toggle("lb-mix-match__progress-segment--filled",S<y);k.setAttribute("aria-valuenow",String(y))}function ne(){let _=n[x].minQuantity||1,y=Math.min(fe(r,x),_);A&&(A.textContent=Le(y,_,o)),O&&(O.textContent=At(x,n.length,o)+" \xB7 "+(n[x].name||""));let L=ye(r,n,x),S=x===n.length-1;C&&(C.style.display=x>0?"":"none"),I&&(I.style.display=S?"none":"",I.disabled=!L),b&&(b.style.display=S?"":"none",b.disabled=!L),te()}function K(){for(let _ of z)_.refresh();ne()}function $(_){if(!u)return;e.dropdown?.unbindAll(u),u.innerHTML="",z=[];let y=F(_);for(let L=0;L<y.length;L++){let S=et(y[L],L,{t:o,rulesMap:e.rulesMap,capacity:Q,showQtySelector:e.showQtySelector,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),K()}});z.push(S),u.appendChild(S.el)}e.dropdown?.bindAll(u)}function P(_){let y=_.target.closest("[data-add-product]");if(!y||y.disabled)return;let S=F(x)[parseInt(y.getAttribute("data-add-product")??"",10)];if(!S)return;let N=y.closest(".lb-mix-match__modal-product"),B=N&&N.getAttribute("data-selected-variant-id"),R=(B?S.variants.find(ee=>ee.id===parseInt(B,10)):null)??null;if(R||(R=S.variants.find(ee=>ee.available)??null),!R)return;let V=we(r,x,R.id);if(V!==-1){if(!e.canRemove(r[x][V]))return;r[x].splice(V,1),e.onSelectionChanged(),K();return}let U=N?.querySelector("[data-row-qty]"),G=U?Math.max(1,parseInt(U.getAttribute("data-qty")||U.textContent||"",10)||1):Xe(S.id,e.rulesMap,R.id),Z={productId:S.id,variantId:R.id,title:S.title,url:S.url||null,variantTitle:R.title,featuredImage:R.image||S.featuredImage||null,price:R.price,compareAtPrice:R.compareAtPrice||null,unitPrice:R.unitPrice||null,quantity:G},be=Lt(r,x,S.id,R.id,e.rulesMap);if(be>0){e.swapVariant(x,Z,Math.min(G,be)),K();return}let ge=Ee(r,n,x);ge!==1/0&&G>ge||(r[x].push(Z),e.onSelectionChanged(),K())}u&&u.addEventListener("click",P);function T(_){if(!m||!e.showTypeFilters)return;let y=[],L=Object.create(null);for(let S of F(_)){let N=(S.type||"").trim();N&&!L[N]&&(L[N]=!0,y.push(N))}if(y.length<2){m.style.display="none",l?.classList.add("lb-mix-match__modal--filters-hidden");return}m.style.display="",l?.classList.remove("lb-mix-match__modal--filters-hidden"),m.innerHTML="";for(let S of[qe,...y]){let N=document.createElement("button");N.type="button",N.className="lb-mix-match__filter",N.setAttribute("data-filter",S),N.setAttribute("aria-pressed",S===w?"true":"false"),S===w&&N.classList.add("lb-mix-match__filter--active"),N.textContent=S===qe?o.allTypes||"All":S,N.addEventListener("click",()=>{w=S,h(),M(s?s.value:"")}),m.appendChild(N)}}function h(){if(!m)return;let _=m.querySelectorAll("[data-filter]");for(let y=0;y<_.length;y++){let L=_[y].getAttribute("data-filter")===w;_[y].classList.toggle("lb-mix-match__filter--active",L),_[y].setAttribute("aria-pressed",L?"true":"false")}}function M(_){if(!u)return;let y=Se(_),L=u.querySelectorAll("[data-product-item]"),S=0;for(let N=0;N<L.length;N++){let B=L[N].getAttribute("data-title")??"",R=L[N].getAttribute("data-type")||"",V=(!y||B.indexOf(y)!==-1)&&(w===qe||R===w);L[N].classList.toggle("lb-hidden",!V),V&&S++}p&&(p.style.display=S===0&&y.length>0?"":"none"),c&&(c.style.display=_.length>0?"":"none"),v&&(v.textContent=J(o.nProductsShown||"__COUNT__ products shown",{COUNT:S}))}if(s){let _=Ze(()=>M(s.value),Ro);s.addEventListener("input",_)}c&&c.addEventListener("click",()=>{s&&(s.value="",M(""),s.focus())});function D(_,y={}){if(x=Math.max(0,Math.min(n.length-1,_)),$(x),T(x),w=qe,h(),s&&(s.value=""),M(""),W(x),K(),v){let L=n[x].minQuantity||1;v.textContent=At(x,n.length,o)+". "+(n[x].name||"")+". "+Le(Math.min(fe(r,x),L),L,o)}!y.skipFocus&&d&&typeof d.focus=="function"&&d.focus()}function f(_){!i||E||(E=!0,D(typeof _=="number"?_:0,{skipFocus:!0}),i.style.display="",i.offsetHeight,i.classList.add("lb-mix-match__modal-overlay--open"),nt(),setTimeout(()=>{s?s.focus():l?.focus()},50))}function H(){if(!i||!E)return;E=!1,i.classList.remove("lb-mix-match__modal-overlay--open"),rt(),setTimeout(()=>{E||(i.style.display="none")},qo);let _=t.querySelector('[data-step-trigger="'+x+'"]'),y=_&&_.offsetParent!==null?_:e.ctaButton;y&&typeof y.focus=="function"&&setTimeout(()=>y.focus(),0)}if(g?.addEventListener("click",H),b?.addEventListener("click",H),C?.addEventListener("click",()=>{x>0&&D(x-1)}),I?.addEventListener("click",()=>{x<n.length-1&&ye(r,n,x)&&D(x+1)}),i){let _=null;i.addEventListener("mousedown",y=>{_=y.target}),i.addEventListener("mouseup",y=>{y.target===i&&_===i&&H(),_=null})}return document.addEventListener("keydown",_=>{if(E){if(_.key==="Escape"){_.preventDefault(),H();return}if(_.key==="Tab"&&l){let y=tt(l);if(y.length===0){_.preventDefault();return}let L=y[0],S=y[y.length-1];_.shiftKey&&document.activeElement===L?(_.preventDefault(),S.focus()):!_.shiftKey&&document.activeElement===S&&(_.preventDefault(),L.focus())}}}),{open:f,close:H,isOpen:()=>E,refresh:K}}function or(e,t,n,r,o){let i=t.widgetConfig,a=ue,l=Je(t.productRules,t.variantRules),d=t.steps??[];if(!d.length)return;let s={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},c=d.map((k,m)=>nn(t,m).map(w=>{let E=_e(w,t.id,{quantities:s,allowedVariantIds:null});return{id:Number(E.productId),title:E.title??"",url:E.url??null,type:w.productType??"",featuredImage:E.featuredImage??null,available:E.variants.some(x=>x.available),optionNames:E.optionNames,variants:E.variants.map(x=>({id:Number(x.id),title:x.title,options:x.options,available:x.available,price:x.price,compareAtPrice:x.compareAtPrice,unitPrice:x.unitPrice,image:x.image,inventoryQuantity:null}))}})),u=c.some(k=>k.some(m=>m.available));if(n==="hide"&&!u)return;let p=le(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),v=de("lb-multi-step",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||a.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});v.products.before(je(d.length));let g=document.createElement("div");g.className="lb-multi-step__groups",d.forEach((k,m)=>{let w=document.createElement("div");w.className="lb-multi-step__group",w.setAttribute("data-step-group",String(m));let E=document.createElement("div");E.className="lb-multi-step__group-heading";let x=document.createElement("span");x.className="lb-multi-step__group-name",x.textContent=k.name,E.appendChild(x);let z=document.createElement("span");z.className="lb-multi-step__group-count",z.setAttribute("data-step-count",String(m)),E.appendChild(z),w.appendChild(E);let F=document.createElement("div");F.className="lb-mix-match__slots lb-edge-fade",F.setAttribute("data-step-slots",String(m)),w.appendChild(F);let Q=document.createElement("button");Q.type="button",Q.className="lb-mix-match__add-product",Q.setAttribute("data-step-trigger",String(m)),Q.textContent="Add a product",w.appendChild(Q),g.appendChild(w)}),v.products.replaceWith(g);let C=lt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:!0,showTypeFilters:!0,segmentCount:null,wizard:!0});v.root.appendChild(C);let I=d.map(()=>[]),b={container:v.root,steps:d.map((k,m)=>({name:k.name,minQuantity:k.minQuantity,maxQuantity:k.maxQuantity,eligibleProducts:c[m]})),selections:I,t:a,rulesMap:l,formatMoney:p,onRemove:(k,m)=>{let w=I[k][m];!w||!Be(I,w,l)||(I[k].splice(m,1),A(),O.isOpen()&&O.refresh())},onEdit:k=>O.open(k)};function A(){Xn(b),Zn(b,{discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},(k,m,w)=>De(k,m,w),at(p)),er(b),tr(b)}let O=rr({container:v.root,steps:b.steps,selections:I,t:a,rulesMap:l,showQtySelector:!0,showTypeFilters:!0,formatMoney:p,dropdown:void 0,portalTarget:null,ctaButton:v.cta,onSelectionChanged:A,swapVariant:(k,m,w)=>{let E=0,x=I[k];for(let z=x.length-1;z>=0&&E<w;z--){let F=x[z];if(F.productId!==m.productId||F.variantId===m.variantId)continue;let Q=Math.min(F.quantity||1,w-E);Q>=(F.quantity||1)?x.splice(z,1):F.quantity=(F.quantity||1)-Q,E+=Q}E>0&&(m.quantity=E,x.push(m),A())},canRemove:k=>Be(I,k,l)});v.root.querySelectorAll("[data-step-trigger]").forEach(k=>{k.addEventListener("click",()=>{O.isOpen()||O.open(parseInt(k.getAttribute("data-step-trigger")??"",10)||0)})}),v.cta.addEventListener("click",()=>{Pe(I,b.steps)&&r(nr(I).map(k=>({merchandiseId:"gid://shopify/ProductVariant/"+k.variantId,quantity:k.quantity,attributes:se(t.id,t.bundleType)})))}),e.appendChild(v.root),ce(v.root),A(),o?.(he(v.root))}var No=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","Enter"," ","Escape"]),dt=new Set,ct=!1;function ir(e){let t=e==="using-mouse"?"using-keyboard":"using-mouse";for(let n of dt)n.classList.add(e),n.classList.remove(t)}function ar(e){No.has(e.key)&&ir("using-keyboard")}function lr(){ir("using-mouse")}function Oo(){ct||(ct=!0,document.addEventListener("keydown",ar,!0),document.addEventListener("pointerdown",lr,!0))}function Ho(){ct&&(ct=!1,document.removeEventListener("keydown",ar,!0),document.removeEventListener("pointerdown",lr,!0))}function ut(e){return e.classList.add("using-mouse"),e.classList.remove("using-keyboard"),dt.add(e),Oo(),()=>{dt.delete(e),e.classList.remove("using-mouse"),e.classList.remove("using-keyboard"),dt.size===0&&Ho()}}var Pt=`/* Lime Bundles \u2014 shared base styles for all bundle widget types */
|
|
261
242
|
|
|
262
243
|
.lb-bundle-widget.lb-bundle-widget,
|
|
263
244
|
.lb-bundle-widget.lb-bundle-widget * {
|
|
@@ -268,12 +249,18 @@
|
|
|
268
249
|
/* Internal CSS-only vars (not merchant-configurable). */
|
|
269
250
|
--lb-thumbnail-bg: #F0F0F0;
|
|
270
251
|
--lb-widget-pad: 20px;
|
|
271
|
-
--lb-progress-color: var(--lb-primary-color);
|
|
272
252
|
/* Cap on the per-bundle product/slot/tier list height \u2014 keeps long
|
|
273
253
|
bundles from pushing the CTA off-screen. The list scrolls
|
|
274
|
-
internally with the
|
|
275
|
-
|
|
254
|
+
internally (with the .lb-edge-fade treatment) when content exceeds
|
|
255
|
+
this. */
|
|
276
256
|
--lb-list-max-height: 360px;
|
|
257
|
+
/* Depth of the soft fade at a scroll list's clipped edge. */
|
|
258
|
+
--lb-edge-fade-size: 20px;
|
|
259
|
+
/* Derived "small" corner radius for inner controls (thumbnails, variant
|
|
260
|
+
selects, the qty chip). One step tighter than the global --lb-radius so
|
|
261
|
+
small elements stay proportionate. Both come from the global radius
|
|
262
|
+
preset; nothing else sets a radius. */
|
|
263
|
+
--lb-radius-sm: max(0px, calc(var(--lb-radius) - 4px));
|
|
277
264
|
|
|
278
265
|
font-family: inherit;
|
|
279
266
|
font-size: 16px;
|
|
@@ -288,12 +275,40 @@
|
|
|
288
275
|
max-width: 440px;
|
|
289
276
|
}
|
|
290
277
|
|
|
291
|
-
/*
|
|
278
|
+
/* Edge fade \u2014 the shared treatment for inset scroll lists (fixed products,
|
|
279
|
+
mix & match slots, volume tiers). The native scrollbar channel is hidden;
|
|
280
|
+
instead the clipped edge of the list softly fades so content melts away
|
|
281
|
+
rather than ending in a hard cut against an app-chrome scrollbar. JS
|
|
282
|
+
(LB.attachEdgeFade) toggles data-edge-fade so an edge fades ONLY when content
|
|
283
|
+
is actually scrolled past it \u2014 never at rest \u2014 which keeps the first/last
|
|
284
|
+
card and the volume "Most popular" badge from ever being dimmed. Without JS
|
|
285
|
+
the list simply scrolls with no bar and no fade (a safe, quiet fallback). */
|
|
286
|
+
.lb-edge-fade {
|
|
287
|
+
scrollbar-width: none;
|
|
288
|
+
}
|
|
289
|
+
.lb-edge-fade::-webkit-scrollbar {
|
|
290
|
+
width: 0;
|
|
291
|
+
height: 0;
|
|
292
|
+
}
|
|
293
|
+
.lb-edge-fade[data-edge-fade="top"] {
|
|
294
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size));
|
|
295
|
+
mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size));
|
|
296
|
+
}
|
|
297
|
+
.lb-edge-fade[data-edge-fade="bottom"] {
|
|
298
|
+
-webkit-mask-image: linear-gradient(to top, transparent 0, #000 var(--lb-edge-fade-size));
|
|
299
|
+
mask-image: linear-gradient(to top, transparent 0, #000 var(--lb-edge-fade-size));
|
|
300
|
+
}
|
|
301
|
+
.lb-edge-fade[data-edge-fade="both"] {
|
|
302
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size), #000 calc(100% - var(--lb-edge-fade-size)), transparent 100%);
|
|
303
|
+
mask-image: linear-gradient(to bottom, transparent 0, #000 var(--lb-edge-fade-size), #000 calc(100% - var(--lb-edge-fade-size)), transparent 100%);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Countdown timer bar \u2014 a full-bleed "limited time" strip sitting below the
|
|
307
|
+
title, with the same breathing room the title gives the product list. */
|
|
292
308
|
.lb-bundle-countdown {
|
|
293
309
|
margin: 0 calc(-1 * var(--lb-widget-pad)) 20px;
|
|
294
310
|
padding: 12px 20px;
|
|
295
311
|
background: var(--lb-countdown-bg);
|
|
296
|
-
border-top: 1px solid color-mix(in srgb, var(--lb-text) 6%, transparent);
|
|
297
312
|
display: flex;
|
|
298
313
|
align-items: center;
|
|
299
314
|
justify-content: space-between;
|
|
@@ -328,8 +343,13 @@
|
|
|
328
343
|
letter-spacing: 0.02em;
|
|
329
344
|
}
|
|
330
345
|
|
|
331
|
-
/* Hide wrapper when the inner snippet rendered nothing (product OOS / unfulfillable)
|
|
332
|
-
|
|
346
|
+
/* Hide wrapper when the inner snippet rendered nothing (product OOS / unfulfillable).
|
|
347
|
+
The --loading class is excluded: the web component's skeleton has none of the
|
|
348
|
+
snippet root classes, so this rule matched it and beat its own display:block,
|
|
349
|
+
hiding the skeleton it renders on the first frame. */
|
|
350
|
+
.lb-bundle-widget:not(.lb-bundle-widget--loading):not(
|
|
351
|
+
:has(.lb-fixed, .lb-mix-match, .lb-volume, .lb-bogo, .lb-multi-step)
|
|
352
|
+
) {
|
|
333
353
|
display: none;
|
|
334
354
|
}
|
|
335
355
|
|
|
@@ -339,93 +359,52 @@
|
|
|
339
359
|
rendered DOM alternates <style><widget><style><widget>. The \`+\` combinator
|
|
340
360
|
requires immediate adjacency and would match nothing; \`~\` matches every
|
|
341
361
|
widget after the first regardless of elements between. Single-widget pages
|
|
342
|
-
stay unaffected (no prior \`.lb-bundle-widget\` sibling to match against).
|
|
343
|
-
Only \`margin-top\` \u2014 do NOT override \`padding-top\` here. The gradient header
|
|
344
|
-
uses \`margin-top: calc(-1 * var(--lb-widget-pad))\` to reach the widget's
|
|
345
|
-
inner border edge, assuming padding-top == --lb-widget-pad. Changing
|
|
346
|
-
padding-top on the subsequent widget breaks that math and leaves a visible
|
|
347
|
-
gap above the header. */
|
|
362
|
+
stay unaffected (no prior \`.lb-bundle-widget\` sibling to match against). */
|
|
348
363
|
.lb-bundle-widget ~ .lb-bundle-widget {
|
|
349
364
|
margin-top: 24px;
|
|
350
365
|
}
|
|
351
366
|
|
|
352
|
-
/* Header \u2014
|
|
367
|
+
/* Header \u2014 a plain section-heading title block in the merchant's own type.
|
|
368
|
+
No colored band, no full-bleed, no save-badge pill: the widget reads as a
|
|
369
|
+
part of the store, not as third-party app chrome. The 16px below holds
|
|
370
|
+
whether the title is followed by the product list or the countdown strip. */
|
|
353
371
|
.lb-bundle-header {
|
|
354
|
-
margin:
|
|
355
|
-
padding: 20px 20px;
|
|
356
|
-
background: var(--lb-header-bg);
|
|
357
|
-
/* Match the widget's inner border curve so there's no background gap at the top corners. */
|
|
358
|
-
border-radius: max(0px, calc(var(--lb-radius) - var(--lb-border-width))) max(0px, calc(var(--lb-radius) - var(--lb-border-width))) 0 0;
|
|
359
|
-
display: flex;
|
|
360
|
-
align-items: center;
|
|
361
|
-
justify-content: space-between;
|
|
362
|
-
gap: 16px;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/* When countdown follows header, remove header bottom margin */
|
|
366
|
-
.lb-bundle-header:has(+ .lb-bundle-countdown) {
|
|
367
|
-
margin-bottom: 0;
|
|
372
|
+
margin: 0 0 16px;
|
|
368
373
|
}
|
|
369
374
|
|
|
370
375
|
.lb-bundle-header__content {
|
|
371
|
-
flex: 1;
|
|
372
376
|
min-width: 0;
|
|
373
377
|
}
|
|
374
378
|
|
|
375
379
|
.lb-bundle-title {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
+
/* Weight 600 (not 700): the receipt's sale price is the widget's heaviest,
|
|
381
|
+
largest element, so the title steps down to clear the hierarchy. */
|
|
382
|
+
font-size: 18px;
|
|
383
|
+
font-weight: 600;
|
|
384
|
+
line-height: 24px;
|
|
385
|
+
letter-spacing: -0.01em;
|
|
380
386
|
color: var(--lb-text);
|
|
381
387
|
margin: 0;
|
|
382
388
|
}
|
|
383
389
|
|
|
384
|
-
.lb-bundle-header .lb-bundle-title {
|
|
385
|
-
color: var(--lb-header-text);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
390
|
.lb-bundle-subtitle {
|
|
389
|
-
font-size:
|
|
391
|
+
font-size: 14px;
|
|
390
392
|
font-weight: 400;
|
|
391
393
|
line-height: 20px;
|
|
392
394
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
393
395
|
margin: 4px 0 0;
|
|
394
396
|
}
|
|
395
397
|
|
|
396
|
-
.lb-bundle-header .lb-bundle-subtitle {
|
|
397
|
-
color: var(--lb-header-text);
|
|
398
|
-
opacity: 0.85;
|
|
399
|
-
margin-top: 8px;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.lb-bundle-header:has(.lb-bundle-subtitle) {
|
|
403
|
-
align-items: flex-start;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.lb-bundle-header__badge {
|
|
407
|
-
background: var(--lb-save-badge-bg);
|
|
408
|
-
color: var(--lb-save-badge-text);
|
|
409
|
-
border: var(--lb-save-badge-border-width) solid var(--lb-save-badge-border-color);
|
|
410
|
-
font-size: 16px;
|
|
411
|
-
font-weight: 700;
|
|
412
|
-
line-height: 1;
|
|
413
|
-
padding: 4px 12px;
|
|
414
|
-
border-radius: var(--lb-save-badge-radius);
|
|
415
|
-
white-space: nowrap;
|
|
416
|
-
flex-shrink: 0;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
398
|
/* Override Dawn's \`div:empty { display: none }\` reset for decorative elements */
|
|
420
399
|
.lb-bundle-divider:empty,
|
|
421
|
-
.lb-mix-match__progress-
|
|
400
|
+
.lb-mix-match__progress-segment:empty {
|
|
422
401
|
display: block;
|
|
423
402
|
}
|
|
424
403
|
|
|
425
404
|
/* Divider */
|
|
426
405
|
.lb-bundle-divider {
|
|
427
|
-
height:
|
|
428
|
-
background:
|
|
406
|
+
height: var(--lb-border-width);
|
|
407
|
+
background: var(--lb-border);
|
|
429
408
|
margin: 16px 0;
|
|
430
409
|
}
|
|
431
410
|
|
|
@@ -445,7 +424,7 @@
|
|
|
445
424
|
ratio. Default keeps the historical 1:1 behaviour. */
|
|
446
425
|
aspect-ratio: var(--lb-thumbnail-aspect-ratio, 1 / 1);
|
|
447
426
|
background: var(--lb-thumbnail-bg);
|
|
448
|
-
border-radius:
|
|
427
|
+
border-radius: var(--lb-radius-sm);
|
|
449
428
|
overflow: hidden;
|
|
450
429
|
display: flex;
|
|
451
430
|
align-items: center;
|
|
@@ -473,7 +452,7 @@
|
|
|
473
452
|
|
|
474
453
|
.lb-bundle-product-name {
|
|
475
454
|
font-size: 16px;
|
|
476
|
-
font-weight:
|
|
455
|
+
font-weight: 600;
|
|
477
456
|
line-height: 20px;
|
|
478
457
|
color: var(--lb-text);
|
|
479
458
|
margin: 0;
|
|
@@ -481,8 +460,16 @@
|
|
|
481
460
|
display: block;
|
|
482
461
|
}
|
|
483
462
|
|
|
484
|
-
|
|
463
|
+
/* The underline fades in \u2014 text-decoration itself can't transition, but
|
|
464
|
+
its color can. Links only: plain titles carry no hover affordance. */
|
|
465
|
+
a.lb-bundle-product-name {
|
|
485
466
|
text-decoration: underline;
|
|
467
|
+
text-decoration-color: transparent;
|
|
468
|
+
transition: text-decoration-color 0.25s ease;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
a.lb-bundle-product-name:hover {
|
|
472
|
+
text-decoration-color: currentColor;
|
|
486
473
|
}
|
|
487
474
|
|
|
488
475
|
a.lb-bundle-product-name:focus-visible {
|
|
@@ -499,6 +486,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
499
486
|
font-weight: 400;
|
|
500
487
|
line-height: 20px;
|
|
501
488
|
color: var(--lb-text);
|
|
489
|
+
font-variant-numeric: tabular-nums;
|
|
502
490
|
}
|
|
503
491
|
|
|
504
492
|
.lb-bundle-product-prices {
|
|
@@ -506,7 +494,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
506
494
|
align-items: baseline;
|
|
507
495
|
gap: 6px;
|
|
508
496
|
flex-wrap: wrap;
|
|
509
|
-
margin-top:
|
|
497
|
+
margin-top: 4px;
|
|
510
498
|
}
|
|
511
499
|
|
|
512
500
|
.lb-bundle-product-compare-price {
|
|
@@ -517,6 +505,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
517
505
|
line-height: 20px;
|
|
518
506
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
519
507
|
text-decoration: line-through;
|
|
508
|
+
font-variant-numeric: tabular-nums;
|
|
520
509
|
}
|
|
521
510
|
|
|
522
511
|
/* Setting \`display\` above outranks the UA [hidden] rule \u2014 restore it so rows
|
|
@@ -530,7 +519,10 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
530
519
|
toggle: present in admin \u2192 shown; absent \u2192 hidden. Styled as muted
|
|
531
520
|
secondary text beneath the price row so it doesn't compete visually. */
|
|
532
521
|
.lb-bundle-product-unit-price {
|
|
533
|
-
|
|
522
|
+
/* Fallback is the "on" branch; Liquid sets 'none' when the merchant disables
|
|
523
|
+
productList.showUnitPrice. The [hidden] rule below still wins for rows
|
|
524
|
+
whose variant has no unit price at all. */
|
|
525
|
+
display: var(--lb-product-unit-price-display, block);
|
|
534
526
|
font-size: 12px;
|
|
535
527
|
line-height: 16px;
|
|
536
528
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
@@ -550,16 +542,16 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
550
542
|
.lb-bundle-variant-badge,
|
|
551
543
|
.lb-mix-match__slot--filled .lb-mix-match__filled-variant {
|
|
552
544
|
display: block;
|
|
553
|
-
font-size:
|
|
545
|
+
font-size: 14px;
|
|
554
546
|
line-height: 20px;
|
|
555
547
|
margin-top: 2px;
|
|
556
548
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
557
549
|
}
|
|
558
550
|
|
|
559
551
|
/* Per-option variant pickers. Each option's label + select sit inside a
|
|
560
|
-
.lb-bundle-variant-option-group (flex column,
|
|
552
|
+
.lb-bundle-variant-option-group (flex column, 4px gap between label and
|
|
561
553
|
select); the groups stack inside a .lb-bundle-variant-option-groups
|
|
562
|
-
parent (flex column,
|
|
554
|
+
parent (flex column, 8px gap between groups). The parent owns the top
|
|
563
555
|
offset from the preceding unit-price line, so individual labels and
|
|
564
556
|
selects don't carry their own vertical margins. */
|
|
565
557
|
.lb-bundle-variant-option-groups {
|
|
@@ -572,7 +564,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
572
564
|
.lb-bundle-variant-option-group {
|
|
573
565
|
display: flex;
|
|
574
566
|
flex-direction: column;
|
|
575
|
-
gap:
|
|
567
|
+
gap: 4px;
|
|
576
568
|
}
|
|
577
569
|
|
|
578
570
|
.lb-bundle-variant-option-label {
|
|
@@ -630,87 +622,94 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
630
622
|
white-space: nowrap;
|
|
631
623
|
}
|
|
632
624
|
|
|
633
|
-
/*
|
|
634
|
-
|
|
625
|
+
/* Receipt summary \u2014 a column: the total row, then one quiet savings line.
|
|
626
|
+
The sale price is the widget's #1 element (largest, heaviest), so the eye
|
|
627
|
+
lands on what the bundle costs. Inherits the widget's global text color. */
|
|
628
|
+
.lb-bundle-summary {
|
|
635
629
|
display: flex;
|
|
636
|
-
align-items:
|
|
630
|
+
align-items: center;
|
|
637
631
|
justify-content: space-between;
|
|
638
|
-
padding: 4px 0 8px;
|
|
639
632
|
gap: 12px;
|
|
633
|
+
margin-bottom: 16px;
|
|
640
634
|
}
|
|
641
635
|
|
|
642
|
-
.
|
|
643
|
-
|
|
636
|
+
/* Left column \u2014 the label over the savings line. Paired with the price stack on
|
|
637
|
+
the right and vertically centred against it, so the summary stays balanced
|
|
638
|
+
whether or not a savings line / compare price is present (e.g. an undiscounted
|
|
639
|
+
bundle reads as a clean "label \u2026 total" on one centred line). */
|
|
640
|
+
.lb-bundle-summary__text {
|
|
641
|
+
display: flex;
|
|
642
|
+
flex-direction: column;
|
|
643
|
+
gap: 2px;
|
|
644
|
+
min-width: 0;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.lb-bundle-summary__label {
|
|
648
|
+
font-size: 15px;
|
|
644
649
|
font-weight: 400;
|
|
645
|
-
line-height:
|
|
650
|
+
line-height: 1.4;
|
|
651
|
+
text-transform: uppercase;
|
|
652
|
+
color: color-mix(in srgb, var(--lb-text) 70%, transparent);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* Savings line \u2014 the one savings signal, quiet text under the label. No pill,
|
|
656
|
+
no lime: lime is reserved for the CTA. JS toggles its display when savings
|
|
657
|
+
reach/leave zero (the [data-savings-bar] hook name is unchanged). */
|
|
658
|
+
.lb-bundle-savings-line {
|
|
659
|
+
font-size: 13px;
|
|
660
|
+
font-weight: 400;
|
|
661
|
+
line-height: 1.4;
|
|
662
|
+
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
663
|
+
margin: 0;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.lb-bundle-savings-line [data-savings-amount] {
|
|
646
667
|
color: var(--lb-text);
|
|
647
|
-
|
|
668
|
+
font-variant-numeric: tabular-nums;
|
|
648
669
|
}
|
|
649
670
|
|
|
650
|
-
|
|
671
|
+
/* Right column \u2014 the struck original over the bundle total ("was / now"),
|
|
672
|
+
vertically centred against the label/savings column on the left. */
|
|
673
|
+
.lb-bundle-summary__prices {
|
|
651
674
|
display: flex;
|
|
652
|
-
|
|
653
|
-
|
|
675
|
+
flex-direction: column;
|
|
676
|
+
align-items: flex-end;
|
|
677
|
+
gap: 1px;
|
|
678
|
+
flex-shrink: 0;
|
|
679
|
+
text-align: right;
|
|
654
680
|
}
|
|
655
681
|
|
|
656
682
|
.lb-bundle-sale-price {
|
|
657
|
-
font-size:
|
|
658
|
-
font-weight:
|
|
659
|
-
line-height: 1;
|
|
683
|
+
font-size: 24px;
|
|
684
|
+
font-weight: 600;
|
|
685
|
+
line-height: 1.1;
|
|
660
686
|
letter-spacing: -0.02em;
|
|
661
687
|
color: var(--lb-text);
|
|
688
|
+
font-variant-numeric: tabular-nums;
|
|
662
689
|
}
|
|
663
690
|
|
|
664
691
|
.lb-bundle-compare-price {
|
|
665
|
-
font-size:
|
|
692
|
+
font-size: 14px;
|
|
666
693
|
font-weight: 400;
|
|
667
|
-
line-height:
|
|
668
|
-
color: color-mix(in srgb, var(--lb-text)
|
|
694
|
+
line-height: 1.3;
|
|
695
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
669
696
|
text-decoration: line-through;
|
|
697
|
+
font-variant-numeric: tabular-nums;
|
|
670
698
|
}
|
|
671
699
|
|
|
672
|
-
/*
|
|
673
|
-
.lb-bundle-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
font-size:
|
|
681
|
-
font-weight:
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
margin-bottom: 12px;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/* Quantity badge \u2014 overlay on thumbnail top-right */
|
|
689
|
-
.lb-bundle-qty-badge.lb-bundle-qty-badge {
|
|
690
|
-
position: absolute;
|
|
691
|
-
top: -8px;
|
|
692
|
-
right: -8px;
|
|
693
|
-
/* --lb-qty-badge-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
694
|
-
display: var(--lb-qty-badge-display, flex);
|
|
695
|
-
align-items: center;
|
|
696
|
-
justify-content: center;
|
|
697
|
-
width: 24px;
|
|
698
|
-
height: 24px;
|
|
699
|
-
border-radius: 50%;
|
|
700
|
-
background: var(--lb-qty-badge-bg);
|
|
701
|
-
border: var(--lb-image-border-width) solid var(--lb-image-border-color);
|
|
702
|
-
color: var(--lb-qty-badge-color);
|
|
703
|
-
font-size: 12px;
|
|
704
|
-
font-weight: 700;
|
|
705
|
-
line-height: 0;
|
|
706
|
-
text-align: center;
|
|
707
|
-
z-index: 1;
|
|
708
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
/* Override Dawn's \`div:empty\` for savings bar when hidden */
|
|
712
|
-
.lb-bundle-savings-bar:empty {
|
|
713
|
-
display: none;
|
|
700
|
+
/* Inline quantity \u2014 "\xD72" beside the product price (mix & match chosen-product
|
|
701
|
+
cards). Quiet, theme-inherited; the fixed widget uses .lb-bundle-qty-chip in
|
|
702
|
+
the card's right slot instead. */
|
|
703
|
+
.lb-bundle-qty-inline {
|
|
704
|
+
/* Fallback is the "on" branch; Liquid sets 'none' when the merchant disables
|
|
705
|
+
productList.showQuantity. The fixed widget's chip carries its own var
|
|
706
|
+
because it is a flex box, not inline text. */
|
|
707
|
+
display: var(--lb-product-qty-inline-display, inline);
|
|
708
|
+
font-size: 13px;
|
|
709
|
+
font-weight: 400;
|
|
710
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
711
|
+
font-variant-numeric: tabular-nums;
|
|
712
|
+
white-space: nowrap;
|
|
714
713
|
}
|
|
715
714
|
|
|
716
715
|
/* CTA button.
|
|
@@ -726,13 +725,13 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
726
725
|
width: 100%;
|
|
727
726
|
padding: 12px 16px;
|
|
728
727
|
border: var(--lb-cta-border-width) solid var(--lb-cta-border-color);
|
|
729
|
-
border-radius: var(--lb-
|
|
728
|
+
border-radius: var(--lb-radius);
|
|
730
729
|
font-size: 16px;
|
|
731
730
|
font-weight: 600;
|
|
732
731
|
line-height: 20px;
|
|
733
732
|
cursor: pointer;
|
|
734
733
|
text-align: center;
|
|
735
|
-
transition: opacity 0.
|
|
734
|
+
transition: opacity 0.25s ease;
|
|
736
735
|
font-family: inherit;
|
|
737
736
|
}
|
|
738
737
|
|
|
@@ -790,22 +789,50 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
790
789
|
visibility: visible;
|
|
791
790
|
}
|
|
792
791
|
|
|
792
|
+
/* Transient "Added" confirmation \u2014 JS swaps the label text on success; a quick
|
|
793
|
+
pop draws the eye to the state change. No bounce. */
|
|
794
|
+
.lb-bundle-cta[data-added="true"] .lb-cta-label {
|
|
795
|
+
animation: lb-cta-added-pop 0.22s cubic-bezier(0.25, 1, 0.5, 1);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
@keyframes lb-cta-added-pop {
|
|
799
|
+
from { opacity: 0.5; transform: scale(0.96); }
|
|
800
|
+
to { opacity: 1; transform: scale(1); }
|
|
801
|
+
}
|
|
802
|
+
|
|
793
803
|
@media (prefers-reduced-motion: reduce) {
|
|
794
804
|
.lb-cta-spinner svg {
|
|
795
805
|
animation-duration: 2.5s;
|
|
796
806
|
}
|
|
807
|
+
.lb-bundle-cta[data-added="true"] .lb-cta-label {
|
|
808
|
+
animation: none;
|
|
809
|
+
}
|
|
797
810
|
}
|
|
798
811
|
|
|
799
|
-
/* Error message
|
|
812
|
+
/* Error / warning message \u2014 amber, never red. Stock and warning states share
|
|
813
|
+
the merchant-overridable low-stock token; the leading icon keeps meaning
|
|
814
|
+
from being carried by color alone. */
|
|
800
815
|
.lb-bundle-error {
|
|
801
816
|
font-size: 16px;
|
|
802
|
-
color:
|
|
817
|
+
color: var(--lb-low-stock-text);
|
|
803
818
|
margin-top: 8px;
|
|
804
819
|
display: none;
|
|
805
820
|
}
|
|
806
821
|
|
|
807
822
|
.lb-bundle-error[data-visible="true"] {
|
|
808
|
-
display:
|
|
823
|
+
display: flex;
|
|
824
|
+
align-items: center;
|
|
825
|
+
gap: 6px;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.lb-bundle-error[data-visible="true"]::before {
|
|
829
|
+
content: "";
|
|
830
|
+
flex-shrink: 0;
|
|
831
|
+
width: 18px;
|
|
832
|
+
height: 18px;
|
|
833
|
+
background-color: currentColor;
|
|
834
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
835
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
809
836
|
}
|
|
810
837
|
|
|
811
838
|
/* Visually hidden \u2014 accessible to screen readers only */
|
|
@@ -838,7 +865,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
838
865
|
.lb-bundle-oos-label {
|
|
839
866
|
font-size: 12px;
|
|
840
867
|
font-weight: 500;
|
|
841
|
-
color:
|
|
868
|
+
color: var(--lb-low-stock-text);
|
|
842
869
|
white-space: nowrap;
|
|
843
870
|
margin-left: auto;
|
|
844
871
|
}
|
|
@@ -857,7 +884,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
857
884
|
line-height: 1.4;
|
|
858
885
|
color: var(--lb-low-stock-text);
|
|
859
886
|
background-color: var(--lb-low-stock-bg);
|
|
860
|
-
border-radius:
|
|
887
|
+
border-radius: var(--lb-radius-sm);
|
|
861
888
|
white-space: nowrap;
|
|
862
889
|
}
|
|
863
890
|
|
|
@@ -865,60 +892,126 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
865
892
|
.lb-ab-pending {
|
|
866
893
|
visibility: hidden;
|
|
867
894
|
}
|
|
868
|
-
|
|
895
|
+
|
|
896
|
+
/* \u2500\u2500 Geometry reservation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
897
|
+
Liquid renders each row's structure and its product title; everything else
|
|
898
|
+
is filled by JS on hydration. These rules give the empty boxes the exact
|
|
899
|
+
height their filled counterparts will occupy, so a row never changes size
|
|
900
|
+
between first paint and hydration \u2014 cumulative layout shift stays at zero.
|
|
901
|
+
|
|
902
|
+
\`:empty\` stops matching the moment JS puts content in, handing the height
|
|
903
|
+
back to the real content, which measures the same.
|
|
904
|
+
|
|
905
|
+
The title is the one box NOT reserved this way: text wrapping depends on the
|
|
906
|
+
merchant's font, so it is server-rendered and its height is simply real. */
|
|
907
|
+
|
|
908
|
+
.lb-bundle-product-price:empty {
|
|
909
|
+
display: inline-block;
|
|
910
|
+
min-height: 20px;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.lb-bundle-variant-badge:empty {
|
|
914
|
+
display: block;
|
|
915
|
+
min-height: 20px;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.lb-bundle-product-unit-price:empty {
|
|
919
|
+
display: block;
|
|
920
|
+
min-height: 16px;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/* Label (16) + gap (4) + trigger (8 + 16 + 8 padding/line-height) per group,
|
|
924
|
+
plus the 8px gap between groups. --lb-row-option-count is set per row by
|
|
925
|
+
Liquid, which knows how many options the product has. */
|
|
926
|
+
.lb-bundle-variant-option-groups:empty {
|
|
927
|
+
min-height: calc(
|
|
928
|
+
var(--lb-row-option-count, 1) * (52px + 2 * var(--lb-border-width)) +
|
|
929
|
+
(var(--lb-row-option-count, 1) - 1) * 8px
|
|
930
|
+
);
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/* The thumbnail is a fixed 48px wide with an aspect-ratio, so its box is sized
|
|
934
|
+
before the image loads. The "original" ratio is the exception \u2014 it sizes to
|
|
935
|
+
the image's intrinsic dimensions, which nothing knows up front. Liquid emits
|
|
936
|
+
the real ratio per row so even that case reserves correctly. */
|
|
937
|
+
.lb-bundle-thumbnail[style*="--lb-row-thumb-ratio"] {
|
|
938
|
+
aspect-ratio: var(--lb-row-thumb-ratio);
|
|
939
|
+
}
|
|
940
|
+
/* This selector outranks the \`.lb-bundle-thumbnail\` rule above, so Liquid must
|
|
941
|
+
emit the inline var for the "original" ratio and nothing else. Emitting it
|
|
942
|
+
unconditionally silently replaced every merchant ratio with the image's own,
|
|
943
|
+
which looks like the setting being ignored. */
|
|
944
|
+
`,sr=`/* Lime Bundles \u2014 Fixed bundle styles */
|
|
869
945
|
|
|
870
946
|
.lb-fixed__products {
|
|
871
947
|
display: flex;
|
|
872
948
|
flex-direction: column;
|
|
873
|
-
gap:
|
|
949
|
+
gap: 12px;
|
|
874
950
|
margin: 0;
|
|
875
951
|
max-height: var(--lb-list-max-height);
|
|
876
952
|
overflow-y: auto;
|
|
877
|
-
/*
|
|
878
|
-
scrollbar-width: thin;
|
|
879
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text) 15%, transparent)
|
|
880
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
.lb-fixed__products::-webkit-scrollbar { width: 4px; }
|
|
884
|
-
.lb-fixed__products::-webkit-scrollbar-track {
|
|
885
|
-
background: color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
886
|
-
border-radius: 2px;
|
|
887
|
-
}
|
|
888
|
-
.lb-fixed__products::-webkit-scrollbar-thumb {
|
|
889
|
-
background: color-mix(in srgb, var(--lb-text) 15%, transparent);
|
|
890
|
-
border-radius: 2px;
|
|
953
|
+
/* Scrollbar hidden + edge fade \u2014 see .lb-edge-fade in bundle-base.css. */
|
|
891
954
|
}
|
|
892
955
|
|
|
893
|
-
/* Fixed bundles: product
|
|
956
|
+
/* Fixed bundles: product cards. Each product is a bordered card \u2014 thumbnail,
|
|
957
|
+
info, and a right-slot quantity chip \u2014 mirroring the mix & match chosen-
|
|
958
|
+
product card so the two bundle types read the same. The info column flows
|
|
959
|
+
name \u2192 variant \u2192 price \u2192 unit \u2192 pickers on the inherited type. */
|
|
894
960
|
.lb-fixed .lb-bundle-product-row {
|
|
895
|
-
|
|
896
|
-
align-items:
|
|
961
|
+
display: flex;
|
|
962
|
+
align-items: flex-start;
|
|
963
|
+
gap: 12px;
|
|
964
|
+
padding: 8px;
|
|
965
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
966
|
+
border-radius: var(--lb-radius);
|
|
967
|
+
box-sizing: border-box;
|
|
897
968
|
}
|
|
898
969
|
|
|
899
|
-
/*
|
|
900
|
-
(set on .lb-bundle-widget via Liquid / applyWidgetConfigVars).
|
|
970
|
+
/* Larger thumbnails. Height comes from --lb-thumbnail-aspect-ratio
|
|
971
|
+
(set on .lb-bundle-widget via Liquid / applyWidgetConfigVars). Thumbnails
|
|
972
|
+
carry only the derived corner radius \u2014 no border. */
|
|
901
973
|
.lb-fixed .lb-bundle-thumbnail {
|
|
902
974
|
width: 60px;
|
|
903
975
|
min-width: 60px;
|
|
904
|
-
border-radius: var(--lb-
|
|
905
|
-
border: var(--lb-image-border-width) solid var(--lb-image-border-color);
|
|
976
|
+
border-radius: var(--lb-radius-sm);
|
|
906
977
|
box-sizing: border-box;
|
|
907
|
-
overflow: visible;
|
|
908
978
|
}
|
|
909
979
|
|
|
910
980
|
.lb-fixed .lb-bundle-thumbnail img {
|
|
911
|
-
border-radius:
|
|
981
|
+
border-radius: var(--lb-radius-sm);
|
|
912
982
|
border: none;
|
|
913
983
|
}
|
|
914
984
|
|
|
985
|
+
/* Quantity chip \u2014 the card's right slot. A quiet, non-interactive count (\xD7N),
|
|
986
|
+
deliberately border-less so it never reads as the mix & match remove button. */
|
|
987
|
+
.lb-bundle-qty-chip {
|
|
988
|
+
flex-shrink: 0;
|
|
989
|
+
min-width: 34px;
|
|
990
|
+
height: 28px;
|
|
991
|
+
padding: 0 8px;
|
|
992
|
+
/* Fallback is the "on" branch; Liquid sets 'none' when the merchant disables
|
|
993
|
+
productList.showQuantity. Separate from --lb-product-qty-inline-display
|
|
994
|
+
because this chip is a flex box and the other counts are inline text. */
|
|
995
|
+
display: var(--lb-product-qty-chip-display, inline-flex);
|
|
996
|
+
align-items: center;
|
|
997
|
+
justify-content: center;
|
|
998
|
+
border-radius: var(--lb-radius-sm);
|
|
999
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
1000
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
1001
|
+
font-size: 13px;
|
|
1002
|
+
font-weight: 500;
|
|
1003
|
+
line-height: 1;
|
|
1004
|
+
font-variant-numeric: tabular-nums;
|
|
1005
|
+
white-space: nowrap;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
915
1008
|
/* Variant picker select \u2014 styled to match the variant badge aesthetic.
|
|
916
1009
|
Sits inside .lb-bundle-variant-option-group so vertical spacing is owned
|
|
917
1010
|
by the group/groups flex gap, not the select itself. */
|
|
918
1011
|
.lb-bundle-variant-select {
|
|
919
1012
|
display: inline-block;
|
|
920
|
-
border: var(--lb-
|
|
921
|
-
border-radius: var(--lb-
|
|
1013
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
1014
|
+
border-radius: var(--lb-radius-sm);
|
|
922
1015
|
padding: 8px 32px 8px 12px;
|
|
923
1016
|
font-size: 12px;
|
|
924
1017
|
line-height: 16px;
|
|
@@ -941,39 +1034,71 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
941
1034
|
outline-offset: 2px;
|
|
942
1035
|
box-shadow: none;
|
|
943
1036
|
}
|
|
944
|
-
`,
|
|
1037
|
+
`,dr=`/* Lime Bundles \u2014 Mix & Match styles */
|
|
945
1038
|
|
|
946
|
-
/* ===
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
variant dropdown panel. */
|
|
1039
|
+
/* === Selected product list ================================================
|
|
1040
|
+
The chosen products render as bordered cards. Capped height so long
|
|
1041
|
+
bundles don't push the CTA off the page; internal scroll uses the same
|
|
1042
|
+
custom 4px scrollbar as the variant dropdown panel. */
|
|
950
1043
|
.lb-mix-match__slots {
|
|
1044
|
+
display: flex;
|
|
1045
|
+
flex-direction: column;
|
|
1046
|
+
gap: 12px;
|
|
951
1047
|
max-height: var(--lb-list-max-height);
|
|
952
1048
|
overflow-y: auto;
|
|
953
|
-
|
|
954
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text) 15%, transparent)
|
|
955
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
1049
|
+
/* Scrollbar hidden + edge fade \u2014 see .lb-edge-fade in bundle-base.css. */
|
|
956
1050
|
}
|
|
957
1051
|
|
|
958
|
-
.lb-mix-match__slots
|
|
959
|
-
|
|
960
|
-
background: color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
961
|
-
border-radius: 2px;
|
|
962
|
-
}
|
|
963
|
-
.lb-mix-match__slots::-webkit-scrollbar-thumb {
|
|
964
|
-
background: color-mix(in srgb, var(--lb-text) 15%, transparent);
|
|
965
|
-
border-radius: 2px;
|
|
1052
|
+
.lb-mix-match__slots:empty {
|
|
1053
|
+
display: none;
|
|
966
1054
|
}
|
|
967
1055
|
|
|
968
|
-
/* === Progress Bar
|
|
1056
|
+
/* === Progress Bar (segmented) ============================================
|
|
1057
|
+
One rounded segment per required pick; the first N (count) fill with the
|
|
1058
|
+
primary colour as the shopper adds products. */
|
|
969
1059
|
.lb-mix-match__progress {
|
|
970
1060
|
margin-bottom: 16px;
|
|
971
1061
|
}
|
|
972
1062
|
|
|
1063
|
+
.lb-mix-match__progress-segments {
|
|
1064
|
+
display: flex;
|
|
1065
|
+
gap: 6px;
|
|
1066
|
+
width: 100%;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.lb-mix-match__progress-segment {
|
|
1070
|
+
flex: 1;
|
|
1071
|
+
height: 6px;
|
|
1072
|
+
/* Follows the global radius (like the widget's other small elements); the
|
|
1073
|
+
modal override below switches it to the picker radius. Capped by the 6px
|
|
1074
|
+
height, so it reads as a pill until the merchant picks a tighter radius. */
|
|
1075
|
+
border-radius: var(--lb-radius-sm);
|
|
1076
|
+
background: color-mix(in srgb, var(--lb-text) 12%, transparent);
|
|
1077
|
+
/* The fill is an inner layer that grows/retracts horizontally (0.3s per
|
|
1078
|
+
DESIGN.md's motion vocabulary) rather than a colour swap. */
|
|
1079
|
+
position: relative;
|
|
1080
|
+
overflow: hidden;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.lb-mix-match__progress-segment::after {
|
|
1084
|
+
content: '';
|
|
1085
|
+
position: absolute;
|
|
1086
|
+
inset: 0;
|
|
1087
|
+
background: var(--lb-text);
|
|
1088
|
+
border-radius: inherit;
|
|
1089
|
+
transform: scaleX(0);
|
|
1090
|
+
transform-origin: left;
|
|
1091
|
+
transition: transform 0.3s ease;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.lb-mix-match__progress-segment--filled::after {
|
|
1095
|
+
transform: scaleX(1);
|
|
1096
|
+
}
|
|
1097
|
+
|
|
973
1098
|
.lb-mix-match__progress-labels {
|
|
974
1099
|
display: flex;
|
|
975
1100
|
justify-content: space-between;
|
|
976
|
-
margin-
|
|
1101
|
+
margin-top: 8px;
|
|
977
1102
|
}
|
|
978
1103
|
|
|
979
1104
|
.lb-mix-match__progress-count {
|
|
@@ -990,77 +1115,55 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
990
1115
|
color: var(--lb-text);
|
|
991
1116
|
}
|
|
992
1117
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
overflow: hidden;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
.lb-mix-match__progress-fill {
|
|
1002
|
-
height: 100%;
|
|
1003
|
-
background: var(--lb-text);
|
|
1004
|
-
border-radius: 4px;
|
|
1005
|
-
transition: width 0.3s ease;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/* === Slots === */
|
|
1009
|
-
.lb-mix-match__slot {
|
|
1010
|
-
cursor: pointer;
|
|
1118
|
+
/* In the modal the segmented bar lives inside the header, below the subtitle
|
|
1119
|
+
and above the header's bottom border. */
|
|
1120
|
+
.lb-mix-match__modal-progress {
|
|
1121
|
+
margin: 0;
|
|
1122
|
+
padding: 0;
|
|
1011
1123
|
}
|
|
1012
1124
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1125
|
+
/* The modal's progress segments follow the picker radius, not the global
|
|
1126
|
+
one \u2014 and the picker PALETTE: inside the modal the track and fill read
|
|
1127
|
+
--lb-picker-text, not the widget's --lb-text. */
|
|
1128
|
+
.lb-mix-match__modal-progress .lb-mix-match__progress-segment {
|
|
1129
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1130
|
+
background: color-mix(in srgb, var(--lb-picker-text) 12%, transparent);
|
|
1015
1131
|
}
|
|
1016
1132
|
|
|
1017
|
-
.lb-mix-
|
|
1018
|
-
|
|
1019
|
-
outline-offset: -2px;
|
|
1020
|
-
box-shadow: none;
|
|
1021
|
-
border-radius: 8px;
|
|
1133
|
+
.lb-mix-match__modal-progress .lb-mix-match__progress-segment::after {
|
|
1134
|
+
background: var(--lb-picker-text);
|
|
1022
1135
|
}
|
|
1023
1136
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
height: 60px;
|
|
1027
|
-
min-width: 60px;
|
|
1028
|
-
/* 2px border is intentionally independent of --lb-image-border-width \u2014
|
|
1029
|
-
empty slots always need a visible dashed outline as an affordance,
|
|
1030
|
-
regardless of how the merchant has styled populated thumbnails. */
|
|
1031
|
-
border: 2px dashed color-mix(in srgb, var(--lb-text) 35%, transparent);
|
|
1032
|
-
border-radius: var(--lb-image-border-radius);
|
|
1033
|
-
box-sizing: border-box;
|
|
1137
|
+
/* === Selected product cards === */
|
|
1138
|
+
.lb-mix-match__slot--filled {
|
|
1034
1139
|
display: flex;
|
|
1035
|
-
align-items:
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1140
|
+
align-items: flex-start;
|
|
1141
|
+
gap: 12px;
|
|
1142
|
+
padding: 8px;
|
|
1143
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
1144
|
+
border-radius: var(--lb-radius);
|
|
1145
|
+
box-sizing: border-box;
|
|
1146
|
+
/* The whole card is an edit target \u2014 clicking it reopens the picker. */
|
|
1147
|
+
cursor: pointer;
|
|
1148
|
+
transition: border-color 0.25s ease;
|
|
1044
1149
|
}
|
|
1045
1150
|
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
cursor: default;
|
|
1151
|
+
.lb-mix-match__slot--filled:hover {
|
|
1152
|
+
border-color: color-mix(in srgb, var(--lb-text) 45%, transparent);
|
|
1049
1153
|
}
|
|
1050
1154
|
|
|
1051
1155
|
/* Mix-match thumbnails. Height comes from --lb-thumbnail-aspect-ratio
|
|
1052
1156
|
(set on .lb-bundle-widget via Liquid / applyWidgetConfigVars). */
|
|
1053
1157
|
.lb-mix-match .lb-bundle-thumbnail {
|
|
1158
|
+
position: relative;
|
|
1054
1159
|
width: 60px;
|
|
1055
1160
|
min-width: 60px;
|
|
1056
|
-
border-radius: var(--lb-
|
|
1057
|
-
border: var(--lb-image-border-width) solid var(--lb-image-border-color);
|
|
1161
|
+
border-radius: var(--lb-radius-sm);
|
|
1058
1162
|
box-sizing: border-box;
|
|
1059
|
-
overflow: visible;
|
|
1060
1163
|
}
|
|
1061
1164
|
|
|
1062
1165
|
.lb-mix-match .lb-bundle-thumbnail img {
|
|
1063
|
-
border-radius:
|
|
1166
|
+
border-radius: var(--lb-radius-sm);
|
|
1064
1167
|
border: none;
|
|
1065
1168
|
}
|
|
1066
1169
|
|
|
@@ -1071,20 +1174,25 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1071
1174
|
flex-direction: column;
|
|
1072
1175
|
}
|
|
1073
1176
|
|
|
1177
|
+
/* The title is an edit BUTTON (reopens the picker), not a product link \u2014
|
|
1178
|
+
reset the UA button chrome and inherit the theme font. */
|
|
1074
1179
|
.lb-mix-match__slot--filled .lb-mix-match__filled-title {
|
|
1075
1180
|
font-size: 16px;
|
|
1076
|
-
font-weight:
|
|
1181
|
+
font-weight: 600;
|
|
1077
1182
|
line-height: 20px;
|
|
1078
1183
|
color: var(--lb-text);
|
|
1079
1184
|
text-decoration: none;
|
|
1080
1185
|
overflow-wrap: break-word;
|
|
1186
|
+
background: none;
|
|
1187
|
+
border: none;
|
|
1188
|
+
margin: 0;
|
|
1189
|
+
padding: 0;
|
|
1190
|
+
font-family: inherit;
|
|
1191
|
+
text-align: left;
|
|
1192
|
+
cursor: pointer;
|
|
1081
1193
|
}
|
|
1082
1194
|
|
|
1083
|
-
.lb-mix-match__slot--filled
|
|
1084
|
-
text-decoration: underline;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
.lb-mix-match__slot--filled a.lb-mix-match__filled-title:focus-visible {
|
|
1195
|
+
.lb-mix-match__slot--filled .lb-mix-match__filled-title:focus-visible {
|
|
1088
1196
|
outline: 2px solid var(--lb-primary-color);
|
|
1089
1197
|
outline-offset: 2px;
|
|
1090
1198
|
box-shadow: none;
|
|
@@ -1095,42 +1203,57 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1095
1203
|
.lb-bundle-variant-badge above to keep the variant text consistent
|
|
1096
1204
|
across mix-match and fixed bundle widgets. */
|
|
1097
1205
|
|
|
1098
|
-
.lb-mix-match__filled-price {
|
|
1099
|
-
/*
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1206
|
+
.lb-mix-match__slot--filled .lb-mix-match__filled-price {
|
|
1207
|
+
/* Canonical price row (WIDGET-DESIGN.md): flex container, 6px gap, no
|
|
1208
|
+
toggles here \u2014 show/hide vars live on the inner price elements. */
|
|
1209
|
+
display: flex;
|
|
1210
|
+
align-items: baseline;
|
|
1211
|
+
gap: 6px;
|
|
1212
|
+
flex-wrap: wrap;
|
|
1103
1213
|
margin-top: 4px;
|
|
1104
|
-
color: var(--lb-text);
|
|
1105
|
-
font-weight: 500;
|
|
1106
1214
|
}
|
|
1107
1215
|
|
|
1108
1216
|
.lb-mix-match__filled-compare {
|
|
1109
1217
|
/* --lb-product-compare-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
1110
1218
|
display: var(--lb-product-compare-display, inline);
|
|
1111
|
-
font-size:
|
|
1219
|
+
font-size: 14px;
|
|
1112
1220
|
font-weight: 400;
|
|
1113
1221
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
1114
1222
|
text-decoration: line-through;
|
|
1115
|
-
margin-right: 4px;
|
|
1116
1223
|
}
|
|
1117
1224
|
|
|
1225
|
+
/* Boxed \xD7 remove control on the right of each card. */
|
|
1226
|
+
/* Remove control \u2014 the interactive member of the right-slot chip family
|
|
1227
|
+
(WIDGET-DESIGN.md): same 28px / --lb-radius-sm / neutral-fill silhouette
|
|
1228
|
+
as the quantity and savings chips. The visual box is 28px; the ::before
|
|
1229
|
+
pseudo-element extends the touch target to 44px without changing layout. */
|
|
1118
1230
|
.lb-mix-match__slot-remove {
|
|
1119
|
-
|
|
1120
|
-
|
|
1231
|
+
flex-shrink: 0;
|
|
1232
|
+
position: relative;
|
|
1233
|
+
width: 28px;
|
|
1234
|
+
height: 28px;
|
|
1235
|
+
min-width: 28px;
|
|
1121
1236
|
display: flex;
|
|
1122
1237
|
align-items: center;
|
|
1123
1238
|
justify-content: center;
|
|
1124
|
-
background:
|
|
1239
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
1125
1240
|
border: none;
|
|
1241
|
+
border-radius: var(--lb-radius-sm);
|
|
1126
1242
|
cursor: pointer;
|
|
1127
|
-
color: var(--lb-text);
|
|
1243
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
1128
1244
|
padding: 0;
|
|
1129
1245
|
margin-left: auto;
|
|
1130
|
-
|
|
1246
|
+
transition: background 0.25s ease, color 0.25s ease;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
.lb-mix-match__slot-remove::before {
|
|
1250
|
+
content: '';
|
|
1251
|
+
position: absolute;
|
|
1252
|
+
inset: -8px;
|
|
1131
1253
|
}
|
|
1132
1254
|
|
|
1133
1255
|
.lb-mix-match__slot-remove:hover {
|
|
1256
|
+
background: color-mix(in srgb, var(--lb-text) 12%, transparent);
|
|
1134
1257
|
color: var(--lb-text);
|
|
1135
1258
|
}
|
|
1136
1259
|
|
|
@@ -1140,6 +1263,82 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1140
1263
|
box-shadow: none;
|
|
1141
1264
|
}
|
|
1142
1265
|
|
|
1266
|
+
/* "Required" chip \u2014 shown in the right slot in place of the \xD7 when a
|
|
1267
|
+
required product sits at its minimum (removing it would break the
|
|
1268
|
+
bundle). Right-slot chip family silhouette; pure state, not a control. */
|
|
1269
|
+
.lb-mix-match__slot-required {
|
|
1270
|
+
flex-shrink: 0;
|
|
1271
|
+
height: 28px;
|
|
1272
|
+
display: inline-flex;
|
|
1273
|
+
align-items: center;
|
|
1274
|
+
padding: 0 8px;
|
|
1275
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
1276
|
+
border-radius: var(--lb-radius-sm);
|
|
1277
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
1278
|
+
font-size: 13px;
|
|
1279
|
+
font-weight: 500;
|
|
1280
|
+
line-height: 1;
|
|
1281
|
+
white-space: nowrap;
|
|
1282
|
+
margin-left: auto;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/* === "Add a product" \u2014 a dashed empty slot === */
|
|
1286
|
+
/* Reads as the next card to fill, mirroring the filled cards' geometry (the +
|
|
1287
|
+
sits in the thumbnail position). Dashed + theme-inherited text, so lime stays
|
|
1288
|
+
reserved for the CTA rather than tinting a non-action element. */
|
|
1289
|
+
.lb-mix-match__add-product {
|
|
1290
|
+
display: flex;
|
|
1291
|
+
align-items: center;
|
|
1292
|
+
gap: 12px;
|
|
1293
|
+
width: 100%;
|
|
1294
|
+
margin-top: 12px;
|
|
1295
|
+
padding: 8px;
|
|
1296
|
+
background: none;
|
|
1297
|
+
border: 1px dashed color-mix(in srgb, var(--lb-text) 28%, transparent);
|
|
1298
|
+
border-radius: var(--lb-radius);
|
|
1299
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
1300
|
+
font-family: inherit;
|
|
1301
|
+
font-size: 15px;
|
|
1302
|
+
font-weight: 500;
|
|
1303
|
+
line-height: 1.2;
|
|
1304
|
+
text-align: left;
|
|
1305
|
+
cursor: pointer;
|
|
1306
|
+
box-sizing: border-box;
|
|
1307
|
+
transition: border-color 0.25s ease, color 0.25s ease;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
.lb-mix-match__add-product:hover {
|
|
1311
|
+
border-color: color-mix(in srgb, var(--lb-text) 45%, transparent);
|
|
1312
|
+
color: var(--lb-text);
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.lb-mix-match__add-product:focus-visible {
|
|
1316
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1317
|
+
outline-offset: 2px;
|
|
1318
|
+
box-shadow: none;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
.lb-mix-match__add-product-icon {
|
|
1322
|
+
display: flex;
|
|
1323
|
+
align-items: center;
|
|
1324
|
+
justify-content: center;
|
|
1325
|
+
width: 60px;
|
|
1326
|
+
min-width: 60px;
|
|
1327
|
+
height: 40px;
|
|
1328
|
+
flex-shrink: 0;
|
|
1329
|
+
color: inherit;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
/* Derived "small" radius for the picker's inner controls (search, thumbnails,
|
|
1333
|
+
variant select, qty stepper, Add/Done buttons), one step tighter than the
|
|
1334
|
+
modal's --lb-picker-radius \u2014 the picker-scoped mirror of --lb-radius-sm in the
|
|
1335
|
+
main widget. Defined on the overlay so the modal AND the variant listbox
|
|
1336
|
+
(which portals up to [data-modal-overlay]) both inherit it. The modal shell
|
|
1337
|
+
and product tiles keep the full --lb-picker-radius. */
|
|
1338
|
+
[data-modal-overlay] {
|
|
1339
|
+
--lb-picker-radius-sm: max(0px, calc(var(--lb-picker-radius) - 4px));
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1143
1342
|
/* === Modal Overlay === */
|
|
1144
1343
|
.lb-mix-match__modal-overlay {
|
|
1145
1344
|
position: fixed;
|
|
@@ -1186,12 +1385,24 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1186
1385
|
/* === Modal Header === */
|
|
1187
1386
|
.lb-mix-match__modal-header {
|
|
1188
1387
|
display: flex;
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
padding: 20px
|
|
1388
|
+
flex-direction: column;
|
|
1389
|
+
gap: 16px;
|
|
1390
|
+
padding: 20px;
|
|
1391
|
+
border-bottom: 1px solid color-mix(in srgb, var(--lb-picker-text) 15%, transparent);
|
|
1192
1392
|
flex-shrink: 0;
|
|
1193
1393
|
}
|
|
1194
1394
|
|
|
1395
|
+
.lb-mix-match__modal-header-top {
|
|
1396
|
+
display: flex;
|
|
1397
|
+
align-items: flex-start;
|
|
1398
|
+
justify-content: space-between;
|
|
1399
|
+
gap: 12px;
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
.lb-mix-match__modal-heading {
|
|
1403
|
+
min-width: 0;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1195
1406
|
.lb-mix-match__modal-title {
|
|
1196
1407
|
font-size: 20px;
|
|
1197
1408
|
font-weight: 600;
|
|
@@ -1200,6 +1411,18 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1200
1411
|
color: inherit;
|
|
1201
1412
|
}
|
|
1202
1413
|
|
|
1414
|
+
/* Dynamic "Choose N more to unlock X% off" line under the title. */
|
|
1415
|
+
.lb-mix-match__modal-subtitle {
|
|
1416
|
+
margin: 4px 0 0;
|
|
1417
|
+
font-size: 13px;
|
|
1418
|
+
line-height: 18px;
|
|
1419
|
+
color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
.lb-mix-match__modal-subtitle:empty {
|
|
1423
|
+
display: none;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1203
1426
|
.lb-mix-match__modal-close {
|
|
1204
1427
|
min-width: 44px;
|
|
1205
1428
|
min-height: 44px;
|
|
@@ -1212,7 +1435,12 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1212
1435
|
color: var(--lb-picker-text);
|
|
1213
1436
|
border-radius: 8px;
|
|
1214
1437
|
padding: 0;
|
|
1215
|
-
margin: -12px -12px
|
|
1438
|
+
margin: -12px -12px 0 0;
|
|
1439
|
+
transition: background 0.25s ease;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.lb-mix-match__modal-close:hover {
|
|
1443
|
+
background: color-mix(in srgb, var(--lb-picker-text) 5%, transparent);
|
|
1216
1444
|
}
|
|
1217
1445
|
|
|
1218
1446
|
.lb-mix-match__modal-close:focus-visible {
|
|
@@ -1221,22 +1449,81 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1221
1449
|
box-shadow: none;
|
|
1222
1450
|
}
|
|
1223
1451
|
|
|
1452
|
+
/* === Modal Filter Pills === */
|
|
1453
|
+
.lb-mix-match__filters {
|
|
1454
|
+
display: flex;
|
|
1455
|
+
flex-wrap: wrap;
|
|
1456
|
+
gap: 8px;
|
|
1457
|
+
/* Bottom padding lives on the filters (a fixed section) rather than the
|
|
1458
|
+
scrolling list, so the gap below the pills stays put as the list scrolls. */
|
|
1459
|
+
padding: 16px 20px 16px;
|
|
1460
|
+
flex-shrink: 0;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.lb-mix-match__filter {
|
|
1464
|
+
padding: 6px 14px;
|
|
1465
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1466
|
+
border-radius: 999px;
|
|
1467
|
+
background: transparent;
|
|
1468
|
+
color: var(--lb-picker-text);
|
|
1469
|
+
font-family: inherit;
|
|
1470
|
+
font-size: 13px;
|
|
1471
|
+
font-weight: 500;
|
|
1472
|
+
line-height: 1;
|
|
1473
|
+
cursor: pointer;
|
|
1474
|
+
white-space: nowrap;
|
|
1475
|
+
transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
.lb-mix-match__filter:focus-visible {
|
|
1479
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1480
|
+
outline-offset: 2px;
|
|
1481
|
+
box-shadow: none;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
/* Picker vars, not widget vars \u2014 the modal is its own colour context;
|
|
1485
|
+
mixing the two palettes can render the active label invisible. */
|
|
1486
|
+
.lb-mix-match__filter--active {
|
|
1487
|
+
background: var(--lb-picker-text);
|
|
1488
|
+
border-color: var(--lb-picker-text);
|
|
1489
|
+
color: var(--lb-picker-bg);
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1224
1492
|
/* === Modal Search === */
|
|
1225
1493
|
.lb-mix-match__modal-search {
|
|
1226
|
-
padding:
|
|
1494
|
+
padding: 16px 20px 0;
|
|
1227
1495
|
position: relative;
|
|
1228
1496
|
flex-shrink: 0;
|
|
1229
1497
|
}
|
|
1230
1498
|
|
|
1499
|
+
/* Search icon pinned inside the left edge of the input. Rendered as a masked
|
|
1500
|
+
pseudo-element on the search row (an <input> can't host ::before) so the
|
|
1501
|
+
icon colour tracks the merchant's picker text at 60% \u2014 consistent with the
|
|
1502
|
+
variant-select chevron and the rest of the picker. */
|
|
1503
|
+
.lb-mix-match__modal-search::before {
|
|
1504
|
+
content: "";
|
|
1505
|
+
position: absolute;
|
|
1506
|
+
left: 36px;
|
|
1507
|
+
top: 16px;
|
|
1508
|
+
bottom: 0;
|
|
1509
|
+
width: 18px;
|
|
1510
|
+
background-color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1511
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0'/%3E%3Cpath d='M21 21l-6 -6'/%3E%3C/svg%3E") center / 18px no-repeat;
|
|
1512
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0'/%3E%3Cpath d='M21 21l-6 -6'/%3E%3C/svg%3E") center / 18px no-repeat;
|
|
1513
|
+
pointer-events: none;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1231
1516
|
.lb-mix-match__modal-search-input {
|
|
1232
1517
|
width: 100%;
|
|
1233
|
-
padding: 12px 40px 12px
|
|
1234
|
-
border: var(--lb-picker-
|
|
1235
|
-
border-radius: var(--lb-picker-
|
|
1518
|
+
padding: 12px 40px 12px 44px;
|
|
1519
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1520
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1236
1521
|
font-size: 16px;
|
|
1237
1522
|
line-height: 20px;
|
|
1238
1523
|
color: var(--lb-picker-text);
|
|
1239
|
-
|
|
1524
|
+
/* padding-left (above) clears the search icon, which is drawn by
|
|
1525
|
+
.lb-mix-match__modal-search::before so it can take a themed colour. */
|
|
1526
|
+
background-color: var(--lb-picker-bg);
|
|
1240
1527
|
box-sizing: border-box;
|
|
1241
1528
|
-webkit-appearance: none;
|
|
1242
1529
|
appearance: none;
|
|
@@ -1255,10 +1542,10 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1255
1542
|
.lb-mix-match__modal-search-clear {
|
|
1256
1543
|
position: absolute;
|
|
1257
1544
|
right: 32px;
|
|
1258
|
-
/* Anchor to the input area only \u2014
|
|
1259
|
-
|
|
1260
|
-
top:
|
|
1261
|
-
bottom:
|
|
1545
|
+
/* Anchor to the input area only \u2014 the search row's top padding (16px) plus
|
|
1546
|
+
the input height keeps the button centred on it. */
|
|
1547
|
+
top: 16px;
|
|
1548
|
+
bottom: 0;
|
|
1262
1549
|
min-width: 32px;
|
|
1263
1550
|
min-height: 32px;
|
|
1264
1551
|
display: flex;
|
|
@@ -1267,56 +1554,74 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1267
1554
|
background: none;
|
|
1268
1555
|
border: none;
|
|
1269
1556
|
cursor: pointer;
|
|
1270
|
-
color: var(--lb-picker-text);
|
|
1557
|
+
color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1271
1558
|
padding: 0;
|
|
1272
1559
|
}
|
|
1273
1560
|
|
|
1561
|
+
/* When the filter row isn't shown (filters off, or fewer than two product
|
|
1562
|
+
types), the search row owns the gap above the product list. The icon and
|
|
1563
|
+
clear button re-anchor to bottom: 16px so they stay centred on the input. */
|
|
1564
|
+
.lb-mix-match__modal--filters-hidden .lb-mix-match__modal-search {
|
|
1565
|
+
padding-bottom: 16px;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
.lb-mix-match__modal--filters-hidden .lb-mix-match__modal-search::before,
|
|
1569
|
+
.lb-mix-match__modal--filters-hidden .lb-mix-match__modal-search-clear {
|
|
1570
|
+
bottom: 16px;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1274
1573
|
/* === Modal Product List === */
|
|
1275
1574
|
.lb-mix-match__modal-list {
|
|
1276
1575
|
overflow-y: auto;
|
|
1277
1576
|
flex: 1;
|
|
1278
|
-
padding
|
|
1577
|
+
/* Always keep a small top padding so the first row's count bubbles
|
|
1578
|
+
(which sit at top: -8px) aren't clipped by overflow. The larger gap
|
|
1579
|
+
above the list comes from the filters' bottom padding, or \u2014 when no
|
|
1580
|
+
filters show \u2014 the search's bottom padding (see --filters-hidden). */
|
|
1581
|
+
padding: 8px 20px 20px;
|
|
1279
1582
|
-webkit-overflow-scrolling: touch;
|
|
1583
|
+
/* Two-column product grid. Each product is a vertical card (image on
|
|
1584
|
+
top, info below) built by JS. Stays 2-up on mobile too (the modal
|
|
1585
|
+
is a bottom sheet there). */
|
|
1586
|
+
display: grid;
|
|
1587
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1588
|
+
column-gap: 24px;
|
|
1589
|
+
row-gap: 28px;
|
|
1590
|
+
align-content: start;
|
|
1280
1591
|
}
|
|
1281
1592
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
column-gap: 20px;
|
|
1287
|
-
padding-top: 20px;
|
|
1288
|
-
padding-bottom: 16px;
|
|
1289
|
-
border-bottom: 1px solid color-mix(in srgb, var(--lb-picker-text) 7%, transparent);
|
|
1593
|
+
/* When neither search nor filters render, the list follows the header
|
|
1594
|
+
directly and needs the full top gap restored. */
|
|
1595
|
+
.lb-mix-match__modal-header + .lb-mix-match__modal-list {
|
|
1596
|
+
padding-top: 16px;
|
|
1290
1597
|
}
|
|
1291
1598
|
|
|
1292
|
-
.lb-mix-match__modal-product
|
|
1293
|
-
|
|
1599
|
+
.lb-mix-match__modal-product {
|
|
1600
|
+
display: flex;
|
|
1601
|
+
flex-direction: column;
|
|
1602
|
+
padding: 8px;
|
|
1603
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1604
|
+
border-radius: var(--lb-picker-radius);
|
|
1605
|
+
box-sizing: border-box;
|
|
1606
|
+
transition: border-color 0.25s ease, background 0.25s ease;
|
|
1294
1607
|
}
|
|
1295
1608
|
|
|
1296
1609
|
.lb-mix-match__modal-product-thumb {
|
|
1610
|
+
/* Fills the grid cell \u2014 the image sets the visual size now, not a fixed
|
|
1611
|
+
60px thumb. Aspect-ratio + object-fit (below) crop to the merchant's
|
|
1612
|
+
pickerThumbnailRatio; "original" shows the full uncropped image. */
|
|
1613
|
+
width: 100%;
|
|
1614
|
+
/* Positioning context for the "Added" badge. */
|
|
1297
1615
|
position: relative;
|
|
1298
|
-
width: 60px;
|
|
1299
|
-
min-width: 60px;
|
|
1300
1616
|
/* Modal picker thumbs follow the merchant's pickerThumbnailRatio \u2014
|
|
1301
1617
|
independent from the main widget's thumbnailRatio so a merchant can
|
|
1302
1618
|
e.g. show tall picker thumbs with square main thumbs. */
|
|
1303
1619
|
aspect-ratio: var(--lb-picker-thumbnail-aspect-ratio, 1 / 1);
|
|
1304
|
-
border-radius: var(--lb-picker-
|
|
1305
|
-
border: var(--lb-picker-product-border-width) solid var(--lb-picker-product-border-color);
|
|
1620
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1306
1621
|
box-sizing: border-box;
|
|
1307
|
-
overflow:
|
|
1622
|
+
overflow: hidden;
|
|
1308
1623
|
background: var(--lb-thumbnail-bg);
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
/* Qty badge inside the picker modal inherits picker-product border (width + color) plus
|
|
1312
|
-
inverted picker bg/text for clear contrast against the modal \u2014 always stays round
|
|
1313
|
-
(the badge shape is independent of the thumbnail shape). */
|
|
1314
|
-
.lb-mix-match__modal-product-thumb .lb-bundle-qty-badge.lb-bundle-qty-badge {
|
|
1315
|
-
/* --lb-picker-qty-badge-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
1316
|
-
display: var(--lb-picker-qty-badge-display, flex);
|
|
1317
|
-
background: var(--lb-picker-qty-badge-bg);
|
|
1318
|
-
color: var(--lb-picker-qty-badge-color);
|
|
1319
|
-
border: var(--lb-picker-product-border-width) solid var(--lb-picker-product-border-color);
|
|
1624
|
+
margin-bottom: 10px;
|
|
1320
1625
|
}
|
|
1321
1626
|
|
|
1322
1627
|
.lb-mix-match__modal-product-thumb img {
|
|
@@ -1325,7 +1630,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1325
1630
|
to auto/contain so the image renders uncropped at intrinsic ratio. */
|
|
1326
1631
|
height: var(--lb-picker-thumbnail-img-height, 100%);
|
|
1327
1632
|
object-fit: var(--lb-picker-thumbnail-img-fit, cover);
|
|
1328
|
-
border-radius:
|
|
1633
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1329
1634
|
}
|
|
1330
1635
|
|
|
1331
1636
|
.lb-mix-match__modal-product-info {
|
|
@@ -1335,21 +1640,58 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1335
1640
|
|
|
1336
1641
|
.lb-mix-match__modal-product-title {
|
|
1337
1642
|
font-size: 16px;
|
|
1338
|
-
font-weight:
|
|
1643
|
+
font-weight: 600;
|
|
1339
1644
|
line-height: 20px;
|
|
1340
1645
|
color: inherit;
|
|
1341
1646
|
margin: 0;
|
|
1342
1647
|
}
|
|
1343
1648
|
|
|
1649
|
+
/* Modal titles link to the product page (new tab) \u2014 quiet by default,
|
|
1650
|
+
underline on hover so the row's Add affordance stays dominant. */
|
|
1651
|
+
.lb-mix-match__modal-product-title a {
|
|
1652
|
+
color: inherit;
|
|
1653
|
+
/* Underline fades in \u2014 text-decoration itself can't transition, but its
|
|
1654
|
+
color can. */
|
|
1655
|
+
text-decoration: underline;
|
|
1656
|
+
text-decoration-color: transparent;
|
|
1657
|
+
transition: text-decoration-color 0.25s ease;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
.lb-mix-match__modal-product-title a:hover {
|
|
1661
|
+
text-decoration-color: currentColor;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
.lb-mix-match__modal-product-title a:focus-visible {
|
|
1665
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1666
|
+
outline-offset: 2px;
|
|
1667
|
+
border-radius: 2px;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1344
1670
|
.lb-mix-match__modal-product-price {
|
|
1345
|
-
|
|
1671
|
+
display: flex;
|
|
1672
|
+
align-items: baseline;
|
|
1673
|
+
gap: 6px;
|
|
1674
|
+
font-size: 14px;
|
|
1346
1675
|
line-height: 20px;
|
|
1347
1676
|
color: inherit;
|
|
1348
1677
|
margin: 2px 0 0;
|
|
1349
1678
|
}
|
|
1350
1679
|
|
|
1680
|
+
.lb-mix-match__modal-product-compare {
|
|
1681
|
+
/* --lb-product-compare-display fallback is the "on" branch; Liquid sets 'none' when merchant disables. */
|
|
1682
|
+
display: var(--lb-product-compare-display, inline);
|
|
1683
|
+
font-size: 13px;
|
|
1684
|
+
font-weight: 400;
|
|
1685
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
1686
|
+
text-decoration: line-through;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
.lb-mix-match__modal-product-compare[hidden] {
|
|
1690
|
+
display: none;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1351
1693
|
.lb-mix-match__modal-product-unit-price {
|
|
1352
|
-
font-size:
|
|
1694
|
+
font-size: 12px;
|
|
1353
1695
|
line-height: 16px;
|
|
1354
1696
|
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
1355
1697
|
margin: 2px 0 0;
|
|
@@ -1362,8 +1704,8 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1362
1704
|
.lb-mix-match__variant-select {
|
|
1363
1705
|
font-size: 12px;
|
|
1364
1706
|
padding: 4px 24px 4px 8px;
|
|
1365
|
-
border: var(--lb-picker-
|
|
1366
|
-
border-radius: var(--lb-picker-
|
|
1707
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1708
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1367
1709
|
background-color: var(--lb-picker-bg);
|
|
1368
1710
|
background-image: var(--lb-picker-variant-chevron);
|
|
1369
1711
|
background-repeat: no-repeat;
|
|
@@ -1371,10 +1713,12 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1371
1713
|
background-size: 12px;
|
|
1372
1714
|
color: var(--lb-picker-text);
|
|
1373
1715
|
font-family: inherit;
|
|
1374
|
-
|
|
1716
|
+
box-sizing: border-box;
|
|
1717
|
+
min-height: 40px;
|
|
1718
|
+
max-height: 40px;
|
|
1375
1719
|
cursor: pointer;
|
|
1376
|
-
width:
|
|
1377
|
-
max-width:
|
|
1720
|
+
width: 100%;
|
|
1721
|
+
max-width: 100%;
|
|
1378
1722
|
appearance: none;
|
|
1379
1723
|
-webkit-appearance: none;
|
|
1380
1724
|
}
|
|
@@ -1386,13 +1730,11 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1386
1730
|
}
|
|
1387
1731
|
|
|
1388
1732
|
/* Per-pick quantity stepper inside the picker modal product row.
|
|
1389
|
-
Three flex cells (\u2212 / number / +) sharing a single outer border
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
Mirrors extensions/bundle-theme/assets/bundle-mix-match.css so
|
|
1395
|
-
the headless web component matches the Liquid theme widget. */
|
|
1733
|
+
Three flex cells (\u2212 / number / +) sharing a single outer border that
|
|
1734
|
+
inherits the modal "Borders" (--lb-picker-border-* / --lb-picker-radius),
|
|
1735
|
+
like every other control in the modal. The cell dividers come from a 1px
|
|
1736
|
+
border on the centre value rather than per-button borders, so the rounded
|
|
1737
|
+
outer corners stay clean. */
|
|
1396
1738
|
/* Quantity label + stepper sit together in a .lb-bundle-variant-option-group
|
|
1397
1739
|
wrapper so the label-to-stepper gap inherits the same 2px the variant
|
|
1398
1740
|
pickers use. The wrapper carries the margin-top that spaces the qty
|
|
@@ -1409,13 +1751,20 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1409
1751
|
|
|
1410
1752
|
.lb-mix-match__qty-stepper {
|
|
1411
1753
|
display: inline-flex;
|
|
1412
|
-
align-items:
|
|
1754
|
+
align-items: center;
|
|
1755
|
+
justify-content: space-between;
|
|
1756
|
+
width: 100%;
|
|
1413
1757
|
flex-shrink: 0;
|
|
1414
|
-
border: var(--lb-picker-
|
|
1415
|
-
border-radius: var(--lb-picker-
|
|
1758
|
+
border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
|
|
1759
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1416
1760
|
background-color: var(--lb-picker-bg);
|
|
1417
1761
|
overflow: hidden;
|
|
1418
1762
|
box-sizing: border-box;
|
|
1763
|
+
/* Pin the height so the stepper and Add button stay equal-height even when
|
|
1764
|
+
they wrap onto separate rows on narrow (mobile) cards \u2014 without this the
|
|
1765
|
+
stepper loses its cross-axis stretch reference and shrinks. */
|
|
1766
|
+
min-height: 32px;
|
|
1767
|
+
max-height: 32px;
|
|
1419
1768
|
}
|
|
1420
1769
|
|
|
1421
1770
|
.lb-mix-match__qty-stepper-button {
|
|
@@ -1424,8 +1773,10 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1424
1773
|
background: transparent;
|
|
1425
1774
|
border: none;
|
|
1426
1775
|
margin: 0;
|
|
1427
|
-
padding: 0;
|
|
1428
|
-
width:
|
|
1776
|
+
padding: 0 4px;
|
|
1777
|
+
width: 24px;
|
|
1778
|
+
height: 24px;
|
|
1779
|
+
box-sizing: border-box;
|
|
1429
1780
|
font-family: inherit;
|
|
1430
1781
|
font-size: 16px;
|
|
1431
1782
|
font-weight: 500;
|
|
@@ -1452,8 +1803,8 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1452
1803
|
display: inline-flex;
|
|
1453
1804
|
align-items: center;
|
|
1454
1805
|
justify-content: center;
|
|
1455
|
-
|
|
1456
|
-
|
|
1806
|
+
width: 24px;
|
|
1807
|
+
height: 24px;
|
|
1457
1808
|
font-family: inherit;
|
|
1458
1809
|
font-size: 13px;
|
|
1459
1810
|
font-weight: 500;
|
|
@@ -1471,22 +1822,27 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1471
1822
|
display: flex;
|
|
1472
1823
|
flex-wrap: wrap;
|
|
1473
1824
|
align-items: stretch;
|
|
1474
|
-
row-gap:
|
|
1825
|
+
row-gap: 8px;
|
|
1475
1826
|
column-gap: 8px;
|
|
1476
1827
|
margin-top: 12px;
|
|
1477
1828
|
}
|
|
1478
1829
|
|
|
1479
1830
|
.lb-mix-match__modal-add {
|
|
1480
1831
|
flex: 1;
|
|
1481
|
-
padding:
|
|
1832
|
+
padding: 8px 16px;
|
|
1482
1833
|
background: var(--lb-picker-add-bg);
|
|
1483
1834
|
color: var(--lb-picker-add-label);
|
|
1484
1835
|
border: var(--lb-picker-add-border-width) solid var(--lb-picker-add-border-color);
|
|
1485
|
-
border-radius: var(--lb-picker-
|
|
1836
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1486
1837
|
box-sizing: border-box;
|
|
1487
1838
|
font-size: 12px;
|
|
1488
1839
|
font-weight: 600;
|
|
1489
1840
|
cursor: pointer;
|
|
1841
|
+
/* Matches the qty stepper's pinned height so the two stay equal-height
|
|
1842
|
+
whether they sit on one row or wrap onto two on narrow (mobile) cards. */
|
|
1843
|
+
min-height: 32px;
|
|
1844
|
+
max-height: 32px;
|
|
1845
|
+
transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
|
|
1490
1846
|
}
|
|
1491
1847
|
|
|
1492
1848
|
.lb-mix-match__modal-add:hover {
|
|
@@ -1505,16 +1861,53 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1505
1861
|
cursor: not-allowed;
|
|
1506
1862
|
}
|
|
1507
1863
|
|
|
1508
|
-
/*
|
|
1509
|
-
.
|
|
1510
|
-
|
|
1864
|
+
/* In-bundle "Remove" \u2014 the Add button's colours INVERTED (label and
|
|
1865
|
+
background swap), no icons. The base :hover (opacity 0.9) applies as-is;
|
|
1866
|
+
state feedback lives on the thumbnail's "Added" badge, not the button. */
|
|
1867
|
+
.lb-mix-match__modal-add--added {
|
|
1868
|
+
background: var(--lb-picker-add-label);
|
|
1869
|
+
color: var(--lb-picker-add-bg);
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
/* Required-locked row \u2014 the Remove slot holds an inert quiet "Required"
|
|
1873
|
+
label (button disabled); the thumbnail's Added badge still carries the
|
|
1874
|
+
in-bundle state. Removal returns once another slot covers the product's
|
|
1875
|
+
minimum (variant swap flow). */
|
|
1876
|
+
.lb-mix-match__modal-add--added.lb-mix-match__modal-add--required {
|
|
1877
|
+
background: transparent;
|
|
1878
|
+
border-color: transparent;
|
|
1879
|
+
color: color-mix(in srgb, var(--lb-picker-text) 60%, transparent);
|
|
1880
|
+
cursor: default;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.lb-mix-match__modal-add--added.lb-mix-match__modal-add--required:hover {
|
|
1884
|
+
opacity: 1;
|
|
1511
1885
|
}
|
|
1512
1886
|
|
|
1513
|
-
/*
|
|
1514
|
-
|
|
1515
|
-
counts distinct products, not slot occupancy). The thumb keeps
|
|
1516
|
-
its qty badge so the shopper sees what's already in the bundle. */
|
|
1887
|
+
/* In-bundle card \u2014 border only, a touch darker than the resting border;
|
|
1888
|
+
the thumbnail badge carries the "Added" state (no background tint). */
|
|
1517
1889
|
.lb-mix-match__modal-product--in-bundle {
|
|
1890
|
+
border-color: color-mix(in srgb, var(--lb-picker-text) 30%, transparent);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
/* "Added" badge \u2014 top-right of the thumbnail, in the Add button's colours;
|
|
1894
|
+
pure state (pointer-events: none), the row's Remove button acts. */
|
|
1895
|
+
.lb-mix-match__modal-added-badge {
|
|
1896
|
+
position: absolute;
|
|
1897
|
+
top: 6px;
|
|
1898
|
+
right: 6px;
|
|
1899
|
+
background: var(--lb-picker-add-bg);
|
|
1900
|
+
color: var(--lb-picker-add-label);
|
|
1901
|
+
font-size: 11px;
|
|
1902
|
+
font-weight: 600;
|
|
1903
|
+
line-height: 1;
|
|
1904
|
+
padding: 8px 16px;
|
|
1905
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1906
|
+
pointer-events: none;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
/* Sold out product row */
|
|
1910
|
+
.lb-mix-match__modal-product--sold-out {
|
|
1518
1911
|
opacity: 0.5;
|
|
1519
1912
|
}
|
|
1520
1913
|
|
|
@@ -1525,6 +1918,19 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1525
1918
|
white-space: nowrap;
|
|
1526
1919
|
}
|
|
1527
1920
|
|
|
1921
|
+
/* "Needs N spots" hint \u2014 exact-size enforcement: the product's minimum
|
|
1922
|
+
pick exceeds the bundle's remaining open spots, so its Add and stepper
|
|
1923
|
+
are disabled. Same quiet label treatment as the sold-out state. */
|
|
1924
|
+
.lb-mix-match__modal-needs-spots {
|
|
1925
|
+
display: block;
|
|
1926
|
+
margin-top: 8px;
|
|
1927
|
+
font-size: 12px;
|
|
1928
|
+
color: inherit;
|
|
1929
|
+
font-weight: 500;
|
|
1930
|
+
white-space: nowrap;
|
|
1931
|
+
opacity: 0.7;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1528
1934
|
/* === Modal Empty State === */
|
|
1529
1935
|
.lb-mix-match__modal-empty {
|
|
1530
1936
|
padding: 32px 20px;
|
|
@@ -1537,11 +1943,60 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1537
1943
|
color: var(--lb-picker-text);
|
|
1538
1944
|
}
|
|
1539
1945
|
|
|
1946
|
+
/* === Modal Footer === */
|
|
1947
|
+
.lb-mix-match__modal-footer {
|
|
1948
|
+
display: flex;
|
|
1949
|
+
align-items: center;
|
|
1950
|
+
justify-content: space-between;
|
|
1951
|
+
gap: 12px;
|
|
1952
|
+
padding: 16px 20px;
|
|
1953
|
+
border-top: 1px solid color-mix(in srgb, var(--lb-picker-text) 15%, transparent);
|
|
1954
|
+
flex-shrink: 0;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
.lb-mix-match__modal-footer-count {
|
|
1958
|
+
font-size: 13px;
|
|
1959
|
+
font-weight: 500;
|
|
1960
|
+
color: color-mix(in srgb, var(--lb-picker-text) 70%, transparent);
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
/* "Done" reuses the picker Add-button styling so it matches the Add buttons. */
|
|
1964
|
+
.lb-mix-match__modal-done {
|
|
1965
|
+
padding: 10px 24px;
|
|
1966
|
+
transition: opacity 0.25s ease;
|
|
1967
|
+
background: var(--lb-picker-add-bg);
|
|
1968
|
+
color: var(--lb-picker-add-label);
|
|
1969
|
+
border: var(--lb-picker-add-border-width) solid var(--lb-picker-add-border-color);
|
|
1970
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1971
|
+
box-sizing: border-box;
|
|
1972
|
+
font-family: inherit;
|
|
1973
|
+
font-size: 14px;
|
|
1974
|
+
font-weight: 600;
|
|
1975
|
+
cursor: pointer;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
.lb-mix-match__modal-done:hover {
|
|
1979
|
+
opacity: 0.9;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
.lb-mix-match__modal-done:focus-visible {
|
|
1983
|
+
outline: 2px solid var(--lb-primary-color);
|
|
1984
|
+
outline-offset: 2px;
|
|
1985
|
+
box-shadow: none;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1540
1988
|
/* Hidden utility for search filtering */
|
|
1541
1989
|
.lb-hidden {
|
|
1542
1990
|
display: none !important;
|
|
1543
1991
|
}
|
|
1544
1992
|
|
|
1993
|
+
/* === Desktop: stepper group + Add button share the action row equally === */
|
|
1994
|
+
@media (min-width: 768px) {
|
|
1995
|
+
.lb-mix-match__qty-stepper-group {
|
|
1996
|
+
flex: 1;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
|
|
1545
2000
|
/* === Mobile Full-Screen Modal === */
|
|
1546
2001
|
@media (max-width: 767px) {
|
|
1547
2002
|
.lb-mix-match__modal-overlay {
|
|
@@ -1559,9 +2014,44 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1559
2014
|
transform: translateY(0);
|
|
1560
2015
|
}
|
|
1561
2016
|
|
|
2017
|
+
/* Touch targets: bump the picker controls to ~44px on touch devices.
|
|
2018
|
+
The stepper and Add button stay equal-height (both pinned to 44px). */
|
|
1562
2019
|
.lb-mix-match__variant-select {
|
|
1563
|
-
width:
|
|
1564
|
-
max-width:
|
|
2020
|
+
width: 100%;
|
|
2021
|
+
max-width: 100%;
|
|
2022
|
+
min-height: 44px;
|
|
2023
|
+
max-height: none;
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
.lb-mix-match__qty-stepper {
|
|
2027
|
+
min-height: 44px;
|
|
2028
|
+
max-height: 44px;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
.lb-mix-match__qty-stepper-button {
|
|
2032
|
+
width: 44px;
|
|
2033
|
+
height: 44px;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
.lb-mix-match__modal-add {
|
|
2037
|
+
min-height: 44px;
|
|
2038
|
+
max-height: 44px;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
/* Full-width qty stepper on mobile \u2014 once it wraps below the Add button,
|
|
2042
|
+
stretch it to the row and space the \u2212/value/+ across it so it mirrors
|
|
2043
|
+
the full-width button instead of staying a compact control. */
|
|
2044
|
+
.lb-mix-match__qty-stepper-group {
|
|
2045
|
+
width: 100%;
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
/* Small phones: a 2-up card grid leaves each picker card cramped (image +
|
|
2050
|
+
variant selects + stepper + Add at ~148px wide). Drop to a single column
|
|
2051
|
+
below 430px; larger phones and up keep the 2-up grid. */
|
|
2052
|
+
@media (max-width: 430px) {
|
|
2053
|
+
.lb-mix-match__modal-list {
|
|
2054
|
+
grid-template-columns: 1fr;
|
|
1565
2055
|
}
|
|
1566
2056
|
}
|
|
1567
2057
|
|
|
@@ -1569,85 +2059,86 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1569
2059
|
@media (prefers-reduced-motion: reduce) {
|
|
1570
2060
|
.lb-mix-match__modal-overlay,
|
|
1571
2061
|
.lb-mix-match__modal,
|
|
1572
|
-
.lb-mix-match__progress-
|
|
2062
|
+
.lb-mix-match__progress-segment,
|
|
2063
|
+
.lb-mix-match__progress-segment::after {
|
|
1573
2064
|
transition: none;
|
|
1574
2065
|
}
|
|
1575
2066
|
}
|
|
1576
|
-
`,
|
|
2067
|
+
`,cr=`/* Lime Bundles \u2014 Volume / Quantity Breaks styles */
|
|
1577
2068
|
|
|
1578
2069
|
.lb-volume__tiers {
|
|
1579
2070
|
display: flex;
|
|
1580
2071
|
flex-direction: column;
|
|
1581
|
-
gap:
|
|
2072
|
+
gap: 16px;
|
|
1582
2073
|
max-height: var(--lb-list-max-height);
|
|
1583
2074
|
overflow-y: auto;
|
|
1584
|
-
/*
|
|
1585
|
-
scrollbar-width: thin;
|
|
1586
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text) 15%, transparent)
|
|
1587
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
2075
|
+
/* Scrollbar hidden + edge fade \u2014 see .lb-edge-fade in bundle-base.css. */
|
|
1588
2076
|
}
|
|
1589
2077
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
.lb-volume__tiers::-webkit-scrollbar-thumb {
|
|
1596
|
-
background: color-mix(in srgb, var(--lb-text) 15%, transparent);
|
|
1597
|
-
border-radius: 2px;
|
|
2078
|
+
/* Reserve room for the floating "Most popular" badge ONLY when the first tier
|
|
2079
|
+
is the popular one \u2014 that's the single case where the badge has no card above
|
|
2080
|
+
it to float into and would otherwise clip at the scroll container's top. */
|
|
2081
|
+
.lb-volume__tiers:has(> .lb-volume__tier:first-child .lb-volume__tier-badge) {
|
|
2082
|
+
padding-top: 12px;
|
|
1598
2083
|
}
|
|
1599
2084
|
|
|
2085
|
+
/* Tier card \u2014 mirrors the fixed / mix & match bundle card so volume reads as
|
|
2086
|
+
the same app: a bordered card with matching geometry, a price row, and a
|
|
2087
|
+
right-slot chip. The radio sits where those cards put the thumbnail, since a
|
|
2088
|
+
volume tier is the same product at a different quantity (no thumbnail). */
|
|
1600
2089
|
.lb-volume__tier {
|
|
2090
|
+
position: relative;
|
|
1601
2091
|
display: flex;
|
|
1602
2092
|
align-items: center;
|
|
1603
2093
|
gap: 12px;
|
|
1604
|
-
border: var(--lb-
|
|
1605
|
-
border-radius: var(--lb-
|
|
1606
|
-
padding: 12px
|
|
2094
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2095
|
+
border-radius: var(--lb-radius);
|
|
2096
|
+
padding: 12px;
|
|
2097
|
+
/* border-box so the selected tier's thicker (2px) border grows inward and
|
|
2098
|
+
doesn't shift the card by 1px when selected. */
|
|
2099
|
+
box-sizing: border-box;
|
|
1607
2100
|
cursor: pointer;
|
|
1608
|
-
|
|
1609
|
-
transition: border-color 0.15s ease;
|
|
2101
|
+
transition: border-color 0.25s ease, background 0.25s ease;
|
|
1610
2102
|
}
|
|
1611
2103
|
|
|
1612
2104
|
.lb-volume__tier:hover {
|
|
1613
|
-
border-color: var(--lb-
|
|
2105
|
+
border-color: color-mix(in srgb, var(--lb-text) 28%, transparent);
|
|
1614
2106
|
}
|
|
1615
2107
|
|
|
1616
|
-
/* Suppress the UA default focus outline + Dawn's focus shadow so a
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
outline below. Keyboard focus is still indicated by the
|
|
1620
|
-
:focus-visible rule. */
|
|
2108
|
+
/* Suppress the UA default focus outline + Dawn's focus shadow so a freshly
|
|
2109
|
+
clicked tier doesn't briefly show the focus ring on top of the selected
|
|
2110
|
+
state. Keyboard focus is still indicated by the :focus-visible rule. */
|
|
1621
2111
|
.lb-volume__tier:focus {
|
|
1622
2112
|
outline: none;
|
|
1623
2113
|
box-shadow: none;
|
|
1624
2114
|
}
|
|
1625
2115
|
|
|
1626
|
-
/* Keyboard focus indicator \u2014 explicitly excludes the selected tier so
|
|
1627
|
-
the selected-state outline rule below has full ownership of the
|
|
1628
|
-
outline property when both states apply at once. */
|
|
1629
2116
|
.lb-volume__tier:focus-visible:not([aria-checked="true"]) {
|
|
1630
2117
|
outline: 2px solid var(--lb-primary-color);
|
|
1631
2118
|
outline-offset: -2px;
|
|
1632
2119
|
box-shadow: none;
|
|
1633
2120
|
}
|
|
1634
2121
|
|
|
2122
|
+
/* Selected tier \u2014 the same quiet neutral highlight as the mix & match
|
|
2123
|
+
in-bundle / Added card (soft tint + stronger border), plus the filled
|
|
2124
|
+
radio, so "selected" looks the same everywhere in the app. */
|
|
1635
2125
|
.lb-volume__tier[aria-checked="true"] {
|
|
1636
|
-
border-color: var(--lb-
|
|
1637
|
-
|
|
1638
|
-
outline-offset: calc(-1 * var(--lb-tier-selected-border-width));
|
|
2126
|
+
border-color: var(--lb-text);
|
|
2127
|
+
border-width: 2px;
|
|
1639
2128
|
}
|
|
1640
2129
|
|
|
1641
2130
|
.lb-volume__radio {
|
|
1642
2131
|
width: 20px;
|
|
1643
2132
|
height: 20px;
|
|
1644
2133
|
min-width: 20px;
|
|
1645
|
-
|
|
2134
|
+
flex: none;
|
|
2135
|
+
box-sizing: border-box;
|
|
2136
|
+
border: 2px solid color-mix(in srgb, var(--lb-text) 45%, transparent);
|
|
1646
2137
|
border-radius: 50%;
|
|
1647
2138
|
display: flex;
|
|
1648
2139
|
align-items: center;
|
|
1649
2140
|
justify-content: center;
|
|
1650
|
-
transition: border-color 0.
|
|
2141
|
+
transition: border-color 0.25s ease;
|
|
1651
2142
|
}
|
|
1652
2143
|
|
|
1653
2144
|
.lb-volume__tier[aria-checked="true"] .lb-volume__radio {
|
|
@@ -1655,70 +2146,295 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1655
2146
|
}
|
|
1656
2147
|
|
|
1657
2148
|
.lb-volume__radio-dot {
|
|
1658
|
-
width:
|
|
1659
|
-
height:
|
|
2149
|
+
width: 10px;
|
|
2150
|
+
height: 10px;
|
|
1660
2151
|
border-radius: 50%;
|
|
1661
2152
|
background: transparent;
|
|
1662
|
-
transition: background 0.
|
|
2153
|
+
transition: background 0.25s ease;
|
|
1663
2154
|
}
|
|
1664
2155
|
|
|
1665
2156
|
.lb-volume__tier[aria-checked="true"] .lb-volume__radio-dot {
|
|
1666
2157
|
background: var(--lb-text);
|
|
1667
2158
|
}
|
|
1668
2159
|
|
|
1669
|
-
/*
|
|
1670
|
-
.lb-volume__tier-
|
|
2160
|
+
/* Info column: the quantity over the price row. */
|
|
2161
|
+
.lb-volume__tier-info {
|
|
1671
2162
|
flex: 1;
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
2163
|
+
min-width: 0;
|
|
2164
|
+
display: flex;
|
|
2165
|
+
flex-direction: column;
|
|
1675
2166
|
}
|
|
1676
2167
|
|
|
1677
2168
|
.lb-volume__tier-label {
|
|
1678
2169
|
font-size: 16px;
|
|
1679
|
-
font-weight:
|
|
2170
|
+
font-weight: 600;
|
|
2171
|
+
line-height: 20px;
|
|
1680
2172
|
color: var(--lb-text);
|
|
1681
2173
|
}
|
|
1682
2174
|
|
|
2175
|
+
/* Right column \u2014 stacks the "Most popular" badge (when present) over the
|
|
2176
|
+
savings chip, so the markers group on the right and the quantity row stays
|
|
2177
|
+
clean. */
|
|
2178
|
+
.lb-volume__tier-right {
|
|
2179
|
+
flex: none;
|
|
2180
|
+
display: flex;
|
|
2181
|
+
flex-direction: column;
|
|
2182
|
+
align-items: flex-end;
|
|
2183
|
+
gap: 6px;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
/* "Most popular" pill \u2014 a floating crown straddling the card's top-right edge.
|
|
2187
|
+
The 16px gap on .lb-volume__tiers leaves room for it above each card. */
|
|
1683
2188
|
.lb-volume__tier-badge {
|
|
1684
|
-
|
|
2189
|
+
position: absolute;
|
|
2190
|
+
top: -12px;
|
|
2191
|
+
right: 12px;
|
|
2192
|
+
z-index: 1;
|
|
1685
2193
|
font-size: 12px;
|
|
1686
|
-
|
|
2194
|
+
font-weight: 500;
|
|
2195
|
+
line-height: 1;
|
|
1687
2196
|
color: var(--lb-popular-badge-text);
|
|
1688
2197
|
background: var(--lb-popular-badge-bg);
|
|
1689
2198
|
border: var(--lb-popular-badge-border-width) solid var(--lb-popular-badge-border-color);
|
|
1690
|
-
border-radius: var(--lb-
|
|
1691
|
-
padding: 4px
|
|
2199
|
+
border-radius: var(--lb-radius-sm);
|
|
2200
|
+
padding: 4px 9px;
|
|
1692
2201
|
}
|
|
1693
2202
|
|
|
2203
|
+
/* Price row \u2014 the same struck \u2192 per-unit \u2192 "each" treatment the product cards
|
|
2204
|
+
use (compare-at muted and struck, per-unit price, tabular figures). */
|
|
1694
2205
|
.lb-volume__tier-price {
|
|
1695
|
-
|
|
2206
|
+
display: flex;
|
|
2207
|
+
align-items: baseline;
|
|
2208
|
+
gap: 6px;
|
|
2209
|
+
flex-wrap: wrap;
|
|
2210
|
+
margin-top: 4px;
|
|
1696
2211
|
font-size: 14px;
|
|
1697
|
-
font-weight: 500;
|
|
1698
2212
|
color: var(--lb-text);
|
|
2213
|
+
font-variant-numeric: tabular-nums;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.lb-volume__tier-compare {
|
|
2217
|
+
color: color-mix(in srgb, var(--lb-text) 55%, transparent);
|
|
2218
|
+
text-decoration: line-through;
|
|
1699
2219
|
}
|
|
1700
2220
|
|
|
1701
2221
|
.lb-volume__tier-unit {
|
|
1702
2222
|
font-size: 12px;
|
|
2223
|
+
color: color-mix(in srgb, var(--lb-text) 60%, transparent);
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
/* Savings chip \u2014 the same soft neutral chip as the fixed card's quantity chip,
|
|
2227
|
+
here carrying the per-tier discount so "buy more, save more" is scannable. */
|
|
2228
|
+
.lb-volume__tier-savings {
|
|
2229
|
+
flex-shrink: 0;
|
|
2230
|
+
display: inline-flex;
|
|
2231
|
+
align-items: center;
|
|
2232
|
+
height: 28px;
|
|
2233
|
+
padding: 0 8px;
|
|
2234
|
+
border-radius: var(--lb-radius-sm);
|
|
2235
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
2236
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
2237
|
+
font-size: 13px;
|
|
2238
|
+
font-weight: 500;
|
|
2239
|
+
line-height: 1;
|
|
2240
|
+
white-space: nowrap;
|
|
2241
|
+
font-variant-numeric: tabular-nums;
|
|
2242
|
+
}
|
|
2243
|
+
`,ur=`/* Lime Bundles \u2014 BOGO (Buy X Get Y) bundle styles */
|
|
2244
|
+
|
|
2245
|
+
.lb-bogo__products {
|
|
2246
|
+
display: flex;
|
|
2247
|
+
flex-direction: column;
|
|
2248
|
+
gap: 12px;
|
|
2249
|
+
margin: 0;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
/* Buy/get product cards \u2014 same bordered-card construction as fixed rows so
|
|
2253
|
+
the two bundle types read the same on a storefront. */
|
|
2254
|
+
.lb-bogo .lb-bundle-product-row {
|
|
2255
|
+
display: flex;
|
|
2256
|
+
align-items: flex-start;
|
|
2257
|
+
gap: 12px;
|
|
2258
|
+
padding: 8px;
|
|
2259
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2260
|
+
border-radius: var(--lb-radius);
|
|
2261
|
+
box-sizing: border-box;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
.lb-bogo .lb-bundle-thumbnail {
|
|
2265
|
+
width: 60px;
|
|
2266
|
+
min-width: 60px;
|
|
2267
|
+
border-radius: var(--lb-radius-sm);
|
|
2268
|
+
box-sizing: border-box;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.lb-bogo .lb-bundle-thumbnail img {
|
|
2272
|
+
border-radius: var(--lb-radius-sm);
|
|
2273
|
+
border: none;
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
/* The "+" divider between the buy and get cards \u2014 a small accent medallion
|
|
2277
|
+
so the offer's hinge ("this plus that") stands out. Circular by design:
|
|
2278
|
+
it is a connector dot, not a card control, so it sits outside the
|
|
2279
|
+
--lb-radius system (blessed in WIDGET-DESIGN.md). */
|
|
2280
|
+
.lb-bogo__plus {
|
|
2281
|
+
align-self: center;
|
|
2282
|
+
display: inline-flex;
|
|
2283
|
+
align-items: center;
|
|
2284
|
+
justify-content: center;
|
|
2285
|
+
width: 24px;
|
|
2286
|
+
height: 24px;
|
|
2287
|
+
border-radius: 50%;
|
|
2288
|
+
background: var(--lb-primary-color);
|
|
2289
|
+
color: var(--lb-btn-text);
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
/* Reward badge on the get card: "Free" or "P% off". Neutral chip colors
|
|
2293
|
+
(right-slot chip family) \u2014 the accent stays reserved for the CTA and the
|
|
2294
|
+
plus medallion; 600 weight carries the reward emphasis. */
|
|
2295
|
+
.lb-bogo__badge {
|
|
2296
|
+
display: inline-flex;
|
|
2297
|
+
align-items: center;
|
|
2298
|
+
align-self: flex-start;
|
|
2299
|
+
flex-shrink: 0;
|
|
2300
|
+
height: 28px;
|
|
2301
|
+
padding: 0 8px;
|
|
2302
|
+
border-radius: var(--lb-radius-sm);
|
|
2303
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
2304
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
2305
|
+
font-size: 13px;
|
|
2306
|
+
font-weight: 600;
|
|
2307
|
+
line-height: 1;
|
|
2308
|
+
white-space: nowrap;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
/* Struck-through original price on the get card when the reward applies. */
|
|
2312
|
+
.lb-bogo .lb-bundle-product-compare-price {
|
|
2313
|
+
text-decoration: line-through;
|
|
2314
|
+
opacity: 0.6;
|
|
2315
|
+
}
|
|
2316
|
+
`,pr=`/**
|
|
2317
|
+
* Lime Bundles \u2014 Multi-step bundle widget styles (wizard chrome ONLY).
|
|
2318
|
+
*
|
|
2319
|
+
* The multi-step widget reuses the mix & match classes wholesale \u2014
|
|
2320
|
+
* bundle-widget.liquid emits bundle-mix-match.css whenever has_multi_step
|
|
2321
|
+
* is set. This file carries only what the wizard adds on top: step groups
|
|
2322
|
+
* in the widget body, the group heading + count chip, and the modal's
|
|
2323
|
+
* three-slot Back / count / Next-Done footer.
|
|
2324
|
+
*
|
|
2325
|
+
* Canon: WIDGET-DESIGN.md (spacing scale, radius system, chip family).
|
|
2326
|
+
*/
|
|
2327
|
+
|
|
2328
|
+
/* \u2500\u2500 Step groups (widget body) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2329
|
+
|
|
2330
|
+
.lb-multi-step__groups {
|
|
2331
|
+
display: flex;
|
|
2332
|
+
flex-direction: column;
|
|
2333
|
+
gap: 16px;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
.lb-multi-step__group {
|
|
2337
|
+
display: flex;
|
|
2338
|
+
flex-direction: column;
|
|
2339
|
+
gap: 8px;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
/* Heading is a quiet, non-interactive row: step name left, live count
|
|
2343
|
+
chip right. The step's dashed trigger below is the click target. */
|
|
2344
|
+
.lb-multi-step__group-heading {
|
|
2345
|
+
display: flex;
|
|
2346
|
+
align-items: center;
|
|
2347
|
+
justify-content: space-between;
|
|
2348
|
+
gap: 12px;
|
|
1703
2349
|
color: var(--lb-text);
|
|
1704
2350
|
}
|
|
1705
2351
|
|
|
1706
|
-
|
|
1707
|
-
.lb-volume__tier-compare {
|
|
2352
|
+
.lb-multi-step__group-name {
|
|
1708
2353
|
font-size: 14px;
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
2354
|
+
font-weight: 600;
|
|
2355
|
+
line-height: 1.4;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
/* Count chip \u2014 right-slot chip family (28px, 0 8px, radius-sm, 13/500,
|
|
2359
|
+
neutral 7%/75% fill). Weight-only emphasis when the step is met. */
|
|
2360
|
+
.lb-multi-step__group-count {
|
|
2361
|
+
display: inline-flex;
|
|
2362
|
+
align-items: center;
|
|
2363
|
+
height: 28px;
|
|
2364
|
+
padding: 0 8px;
|
|
2365
|
+
border-radius: var(--lb-radius-sm);
|
|
2366
|
+
background: color-mix(in srgb, var(--lb-text) 7%, transparent);
|
|
2367
|
+
color: color-mix(in srgb, var(--lb-text) 75%, transparent);
|
|
2368
|
+
font-size: 13px;
|
|
2369
|
+
font-weight: 500;
|
|
2370
|
+
white-space: nowrap;
|
|
1713
2371
|
}
|
|
1714
2372
|
|
|
2373
|
+
.lb-multi-step__group-count--met {
|
|
2374
|
+
font-weight: 600;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
/* Empty step group: the slots container collapses so the heading rows
|
|
2378
|
+
read as a compact checklist until picks land. */
|
|
2379
|
+
.lb-multi-step__group-slots:empty {
|
|
2380
|
+
display: none;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
/* \u2500\u2500 Wizard modal footer: [Back] [count] [Next|Done] \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
2384
|
+
Three-column grid so the count stays dead-centre whether or not the
|
|
2385
|
+
Back button is showing (Next and Done share the right cell \u2014 only one
|
|
2386
|
+
is visible at a time). */
|
|
2387
|
+
.lb-multi-step__modal-footer {
|
|
2388
|
+
display: grid;
|
|
2389
|
+
grid-template-columns: 1fr auto 1fr;
|
|
2390
|
+
align-items: center;
|
|
2391
|
+
gap: 12px;
|
|
2392
|
+
}
|
|
1715
2393
|
|
|
1716
|
-
|
|
2394
|
+
.lb-multi-step__modal-footer > .lb-multi-step__modal-back {
|
|
2395
|
+
grid-area: 1 / 1;
|
|
2396
|
+
justify-self: start;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.lb-multi-step__modal-footer > .lb-mix-match__modal-footer-count {
|
|
2400
|
+
grid-area: 1 / 2;
|
|
2401
|
+
text-align: center;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
.lb-multi-step__modal-footer > .lb-mix-match__modal-done {
|
|
2405
|
+
grid-area: 1 / 3;
|
|
2406
|
+
justify-self: end;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
/* Back \u2014 secondary treatment beside the primary Next/Done (which reuse
|
|
2410
|
+
.lb-mix-match__modal-done). */
|
|
2411
|
+
.lb-multi-step__modal-back {
|
|
2412
|
+
padding: 10px 16px;
|
|
2413
|
+
background: none;
|
|
2414
|
+
border: var(--lb-border-width) solid var(--lb-border-color);
|
|
2415
|
+
border-radius: var(--lb-radius-sm);
|
|
2416
|
+
color: var(--lb-text);
|
|
2417
|
+
font-family: inherit;
|
|
2418
|
+
font-size: 14px;
|
|
2419
|
+
font-weight: 600;
|
|
2420
|
+
cursor: pointer;
|
|
2421
|
+
transition: background-color 0.25s ease;
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
.lb-multi-step__modal-back:hover {
|
|
2425
|
+
background: color-mix(in srgb, var(--lb-text) 5%, transparent);
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
.lb-multi-step__modal-back:focus-visible {
|
|
2429
|
+
outline: 2px solid var(--lb-primary-color);
|
|
2430
|
+
outline-offset: 2px;
|
|
2431
|
+
}
|
|
2432
|
+
`,mr=`/**
|
|
1717
2433
|
* Lime Bundles \u2014 Custom variant-picker dropdown styling.
|
|
1718
2434
|
*
|
|
1719
2435
|
* Reuses existing CSS variables: no new merchant-configurable surface.
|
|
1720
|
-
* --lb-
|
|
1721
|
-
* --lb-bg, --lb-text, --lb-primary-color
|
|
2436
|
+
* --lb-border-width, --lb-border (global border), --lb-radius-sm (derived),
|
|
2437
|
+
* --lb-variant-chevron, --lb-bg, --lb-text, --lb-primary-color
|
|
1722
2438
|
*
|
|
1723
2439
|
* Mix-match modal context overrides via .lb-mix-match__modal scope to use
|
|
1724
2440
|
* --lb-picker-variant-* and --lb-picker-bg.
|
|
@@ -1736,7 +2452,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1736
2452
|
padding: 0 !important;
|
|
1737
2453
|
margin: -1px !important;
|
|
1738
2454
|
overflow: hidden !important;
|
|
1739
|
-
clip:
|
|
2455
|
+
clip-path: inset(50%) !important;
|
|
1740
2456
|
white-space: nowrap !important;
|
|
1741
2457
|
border: 0 !important;
|
|
1742
2458
|
pointer-events: none !important;
|
|
@@ -1758,8 +2474,8 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1758
2474
|
justify-content: space-between;
|
|
1759
2475
|
gap: 8px;
|
|
1760
2476
|
width: 100%;
|
|
1761
|
-
border: var(--lb-
|
|
1762
|
-
border-radius: var(--lb-
|
|
2477
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2478
|
+
border-radius: var(--lb-radius-sm);
|
|
1763
2479
|
padding: 8px 12px;
|
|
1764
2480
|
font-size: 12px;
|
|
1765
2481
|
line-height: 16px;
|
|
@@ -1770,7 +2486,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1770
2486
|
appearance: none;
|
|
1771
2487
|
-webkit-appearance: none;
|
|
1772
2488
|
text-align: start;
|
|
1773
|
-
transition: border-color
|
|
2489
|
+
transition: border-color 0.25s ease;
|
|
1774
2490
|
}
|
|
1775
2491
|
|
|
1776
2492
|
.lb-dropdown-trigger:focus-visible {
|
|
@@ -1796,7 +2512,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1796
2512
|
width: 12px;
|
|
1797
2513
|
height: 12px;
|
|
1798
2514
|
background: var(--lb-variant-chevron) center / contain no-repeat;
|
|
1799
|
-
transition: transform
|
|
2515
|
+
transition: transform 0.25s ease;
|
|
1800
2516
|
}
|
|
1801
2517
|
|
|
1802
2518
|
.lb-dropdown-trigger[aria-expanded="true"] .lb-dropdown-chevron {
|
|
@@ -1821,15 +2537,16 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1821
2537
|
list-style: none;
|
|
1822
2538
|
background: var(--lb-bg);
|
|
1823
2539
|
color: var(--lb-text);
|
|
1824
|
-
border: var(--lb-
|
|
1825
|
-
border-radius: var(--lb-
|
|
2540
|
+
border: var(--lb-border-width) solid var(--lb-border);
|
|
2541
|
+
border-radius: var(--lb-radius-sm);
|
|
1826
2542
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
1827
2543
|
overflow-y: auto;
|
|
1828
2544
|
overflow-x: hidden;
|
|
1829
|
-
/*
|
|
2545
|
+
/* Quiet overlay scrollbar \u2014 transparent track, soft rounded thumb. The
|
|
2546
|
+
popover has a shadow + border, so it keeps a thumb rather than the inset
|
|
2547
|
+
lists' edge fade (a mask would clip the shadow). */
|
|
1830
2548
|
scrollbar-width: thin;
|
|
1831
|
-
scrollbar-color: color-mix(in srgb, var(--lb-text)
|
|
1832
|
-
color-mix(in srgb, var(--lb-text) 2%, transparent);
|
|
2549
|
+
scrollbar-color: color-mix(in srgb, var(--lb-text) 18%, transparent) transparent;
|
|
1833
2550
|
animation: lb-dropdown-in-down 120ms ease-out;
|
|
1834
2551
|
transform-origin: top center;
|
|
1835
2552
|
}
|
|
@@ -1856,17 +2573,20 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1856
2573
|
width: auto;
|
|
1857
2574
|
}
|
|
1858
2575
|
|
|
1859
|
-
/*
|
|
2576
|
+
/* Quiet overlay scrollbar \u2014 Webkit/Blink: transparent track, soft rounded
|
|
2577
|
+
thumb that darkens on hover. */
|
|
1860
2578
|
.lb-dropdown-listbox::-webkit-scrollbar {
|
|
1861
|
-
width:
|
|
2579
|
+
width: 6px;
|
|
1862
2580
|
}
|
|
1863
2581
|
.lb-dropdown-listbox::-webkit-scrollbar-track {
|
|
1864
|
-
background:
|
|
1865
|
-
border-radius: 2px;
|
|
2582
|
+
background: transparent;
|
|
1866
2583
|
}
|
|
1867
2584
|
.lb-dropdown-listbox::-webkit-scrollbar-thumb {
|
|
1868
|
-
background: color-mix(in srgb, var(--lb-text)
|
|
1869
|
-
border-radius:
|
|
2585
|
+
background: color-mix(in srgb, var(--lb-text) 16%, transparent);
|
|
2586
|
+
border-radius: 999px;
|
|
2587
|
+
}
|
|
2588
|
+
.lb-dropdown-listbox::-webkit-scrollbar-thumb:hover {
|
|
2589
|
+
background: color-mix(in srgb, var(--lb-text) 30%, transparent);
|
|
1870
2590
|
}
|
|
1871
2591
|
|
|
1872
2592
|
/* Options */
|
|
@@ -1935,11 +2655,17 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1935
2655
|
because WidgetConfig.parse() fully hydrates the merchant config.
|
|
1936
2656
|
See docs/solutions/ui-bugs/widget-css-single-source-defaults.md. */
|
|
1937
2657
|
.lb-mix-match__modal .lb-dropdown-trigger {
|
|
1938
|
-
border-color: var(--lb-picker-
|
|
1939
|
-
border-width: var(--lb-picker-
|
|
1940
|
-
border-radius: var(--lb-picker-
|
|
2658
|
+
border-color: var(--lb-picker-border-color);
|
|
2659
|
+
border-width: var(--lb-picker-border-width);
|
|
2660
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1941
2661
|
background: var(--lb-picker-bg);
|
|
1942
2662
|
color: var(--lb-picker-text);
|
|
2663
|
+
/* Match the picker qty stepper + Add button height (border-box so 32px is
|
|
2664
|
+
the full height including padding + border). */
|
|
2665
|
+
box-sizing: border-box;
|
|
2666
|
+
padding: 4px 8px;
|
|
2667
|
+
min-height: 32px;
|
|
2668
|
+
max-height: 32px;
|
|
1943
2669
|
}
|
|
1944
2670
|
|
|
1945
2671
|
.lb-mix-match__modal .lb-dropdown-chevron {
|
|
@@ -1950,9 +2676,9 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1950
2676
|
its [data-modal-overlay] parent, so picker-scoped rules anchor on the
|
|
1951
2677
|
overlay attribute, not the modal class. */
|
|
1952
2678
|
[data-modal-overlay] > .lb-dropdown-listbox {
|
|
1953
|
-
border-color: var(--lb-picker-
|
|
1954
|
-
border-width: var(--lb-picker-
|
|
1955
|
-
border-radius: var(--lb-picker-
|
|
2679
|
+
border-color: var(--lb-picker-border-color);
|
|
2680
|
+
border-width: var(--lb-picker-border-width);
|
|
2681
|
+
border-radius: var(--lb-picker-radius-sm);
|
|
1956
2682
|
background: var(--lb-picker-bg);
|
|
1957
2683
|
color: var(--lb-picker-text);
|
|
1958
2684
|
scrollbar-color: color-mix(in srgb, var(--lb-picker-text) 15%, transparent)
|
|
@@ -1966,7 +2692,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
1966
2692
|
[data-modal-overlay] > .lb-dropdown-listbox::-webkit-scrollbar-thumb {
|
|
1967
2693
|
background: color-mix(in srgb, var(--lb-picker-text) 15%, transparent);
|
|
1968
2694
|
}
|
|
1969
|
-
`,
|
|
2695
|
+
`,br=`/* Lime Bundles \u2014 web-component loading skeleton (not mirrored to theme assets) */
|
|
1970
2696
|
|
|
1971
2697
|
.lb-bundle-widget--loading {
|
|
1972
2698
|
display: block;
|
|
@@ -2049,7 +2775,7 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
2049
2775
|
.lb-bundle-widget--loading .lb-skeleton--cta {
|
|
2050
2776
|
height: 44px;
|
|
2051
2777
|
width: 140px;
|
|
2052
|
-
border-radius: var(--lb-
|
|
2778
|
+
border-radius: var(--lb-radius, 8px);
|
|
2053
2779
|
}
|
|
2054
2780
|
|
|
2055
2781
|
@keyframes lb-skeleton-pulse {
|
|
@@ -2062,10 +2788,10 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
2062
2788
|
animation: none;
|
|
2063
2789
|
}
|
|
2064
2790
|
}
|
|
2065
|
-
`;var
|
|
2066
|
-
`),this.shadow.appendChild(t),this.shopCustomCss){let
|
|
2067
|
-
<style>${
|
|
2068
|
-
<style>${
|
|
2791
|
+
`;var Do=e=>`lb_cart_id:${e}`;function Fo(e){if(e)return e.trim()||null;if(typeof document<"u"){let t=document.querySelector('meta[name="shopify:product-handle"]');if(t?.content)return t.content.trim()||null}if(typeof window<"u"){let t=window.location.pathname.match(/\/products\/([^/?#]+)/);if(t?.[1])return decodeURIComponent(t[1])}return null}var Re=class extends HTMLElement{static observedAttributes=["shop-domain","storefront-token","bundle-gid","product-handle","app-url","analytics","locale","country","language","market-id"];buyer=void 0;shadow;bundles=[];abortController=null;impressionCleanups=[];renderCleanups=[];shopCustomCss=null;outOfStockBehavior=ft;constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.fetchBundle()}disconnectedCallback(){this.abortController?.abort(),this.teardownImpressions(),this.teardownRenderers()}teardownImpressions(){for(let t of this.impressionCleanups)t();this.impressionCleanups=[]}teardownRenderers(){for(let t of this.renderCleanups)t();this.renderCleanups=[]}attributeChangedCallback(t,n,r){n===r||!this.isConnected||(t==="bundle-gid"||t==="product-handle"||t==="shop-domain"||t==="storefront-token")&&this.shopDomain&&this.storefrontToken&&this.fetchBundle()}get shopDomain(){return this.getAttribute("shop-domain")??""}get storefrontToken(){return this.getAttribute("storefront-token")??""}get bundleGid(){return this.getAttribute("bundle-gid")??""}get productHandleAttr(){return this.getAttribute("product-handle")??""}get appUrl(){return this.getAttribute("app-url")??""}get analyticsEnabled(){return this.getAttribute("analytics")!=="false"}get country(){return this.getAttribute("country")??void 0}get language(){return this.getAttribute("language")??void 0}get marketId(){return this.getAttribute("market-id")??void 0}wrapQueryForContext(t){return jt({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer})?$t(t):t}isMarketHidden(t){return!tn(t,this.marketId)}async fetchBundle(){if(!this.shopDomain||!this.storefrontToken){this.renderError("Missing required attributes: shop-domain, storefront-token");return}this.abortController?.abort();let t=new AbortController;this.abortController=t,this.renderLoading();let n=ht({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer});try{let r,o=!1;if(this.bundleGid)o=!0,r=this.fetchSingleBundle(n,t.signal);else{let d=Fo(this.productHandleAttr);if(!d){this.teardownImpressions(),this.renderError("No bundle-gid or product-handle provided, and the current URL doesn't match /products/<handle>.");return}r=this.fetchProductBundles(n,t.signal,d)}let i=n.query(Kt,void 0,{signal:t.signal}).catch(()=>null);if(await r,t.signal.aborted)return;if(o&&this.bundles.length===0){this.teardownImpressions(),this.renderError("Bundle not found");return}let a=await i,l=a?.shop?.customCss?.value;if(l){sn(this.shopDomain,l);let d=vt(l);d.ok&&(this.shopCustomCss=d.css)}this.outOfStockBehavior=Zt(a?.shop?.outOfStockBehavior?.value),this.renderBundles()}catch(r){if(t.signal.aborted)return;this.bundles=[],this.teardownImpressions(),this.renderError(r instanceof Error?r.message:"Failed to load bundle")}}async fetchSingleBundle(t,n){let r=await t.query(this.wrapQueryForContext(Gt),{id:this.bundleGid},{signal:n});if(!r.metaobject){this.bundles=[];return}let o=gt(r.metaobject.id,r.metaobject.fields);this.bundles=o&&!this.isMarketHidden(o)?[o]:[]}async fetchProductBundles(t,n,r){let o=await t.query(this.wrapQueryForContext(Yt),{handle:r},{signal:n});if(!o.product){this.bundles=[];return}let i=o.product.metafield?.references?.nodes??[],a=[];for(let l of i){let d=gt(l.id,l.fields);d&&!this.isMarketHidden(d)&&a.push(d)}this.bundles=un(a,cn())}handleAddToCart=async(t,n)=>{let r=new CustomEvent("lime-bundle:add-to-cart",{detail:{lines:n},bubbles:!0,composed:!0,cancelable:!0}),o=this.dispatchEvent(r);this.reportAddToCartEvent(t,n),o&&await this.defaultAddToCart(n)};async defaultAddToCart(t){if(typeof window>"u")return;let n=ht({shopDomain:this.shopDomain,accessToken:this.storefrontToken}),r=window.localStorage,o=Do(this.shopDomain),i=r?.getItem(o)??null;try{let a=null;if(i){let d=(await n.query(Xt,{cartId:i,lines:t})).cartLinesAdd;d?.userErrors?.length?r?.removeItem(o):d?.cart&&(a=d.cart.checkoutUrl)}if(!a){let d=(await n.query(Jt,{input:{lines:t}})).cartCreate;d?.cart&&(r?.setItem(o,d.cart.id),a=d.cart.checkoutUrl)}a?window.location.assign(a):this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:"Cart creation failed",code:"CART_ERROR"},bubbles:!0,composed:!0}))}catch(a){this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:a instanceof Error?a.message:"Cart mutation failed",code:"CART_ERROR"},bubbles:!0,composed:!0}))}}reportAddToCartEvent(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=n.reduce((i,a)=>i+a.quantity,0),o=n.reduce((i,a)=>{let d=t.products.find(c=>c.variants.nodes.some(u=>u.id===a.merchandiseId))?.variants.nodes.find(c=>c.id===a.merchandiseId),s=d?parseFloat(d.price.amount):0;return i+s*a.quantity},0);on({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType,productId:t.products[0]?.id??"",quantity:r,totalPrice:Math.round(o*100)/100})}renderBundles(){this.teardownImpressions(),this.teardownRenderers(),this.shadow.innerHTML="";let t=document.createElement("style");if(t.textContent=[Pt,sr,dr,pr,cr,ur,mr].join(`
|
|
2792
|
+
`),this.shadow.appendChild(t),this.shopCustomCss){let r=document.createElement("style");r.setAttribute("data-lime-bundles","shop-custom-css"),r.textContent=this.shopCustomCss,this.shadow.appendChild(r)}for(let r of this.bundles){let o=document.createElement("div");o.className="lb-bundle-widget",o.setAttribute("role","region"),o.setAttribute("aria-label",r.title),o.setAttribute("data-bundle-type",r.bundleType),o.setAttribute("data-bundle-gid",r.id),en(o,r.widgetConfig),this.renderCleanups.push(ut(o));let i=l=>this.handleAddToCart(r,l),a=l=>this.renderCleanups.push(l);switch(r.bundleType){case"fixed":En(o,r,this.outOfStockBehavior,i,a);break;case"mix_match":Wn(o,r,this.outOfStockBehavior,i,a);break;case"volume":$n(o,r,this.outOfStockBehavior,i);break;case"bogo":Kn(o,r,this.outOfStockBehavior,i,a);break;case"multi_step":or(o,r,this.outOfStockBehavior,i,a);break}this.shadow.appendChild(o),this.setupImpressionFor(r,o)}let n=this.bundles[0];this.dispatchEvent(new CustomEvent("lime-bundle:loaded",{detail:{bundleCount:this.bundles.length,bundleTypes:this.bundles.map(r=>r.bundleType),bundleType:n?.bundleType,title:n?.title},bubbles:!0,composed:!0}))}setupImpressionFor(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=an(n,()=>{rn({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType})});this.impressionCleanups.push(r)}renderLoading(){this.shadow.innerHTML=`
|
|
2793
|
+
<style>${Pt}</style>
|
|
2794
|
+
<style>${br}</style>
|
|
2069
2795
|
<div class="lb-bundle-widget lb-bundle-widget--loading" aria-busy="true" aria-label="Loading bundle">
|
|
2070
2796
|
<div class="lb-skeleton lb-skeleton--title"></div>
|
|
2071
2797
|
<div class="lb-skeleton--products">
|
|
@@ -2099,5 +2825,5 @@ a.lb-bundle-product-name:focus-visible {
|
|
|
2099
2825
|
<div class="lb-skeleton lb-skeleton--cta"></div>
|
|
2100
2826
|
</div>
|
|
2101
2827
|
</div>
|
|
2102
|
-
`}renderError(t){this.shadow.innerHTML="",this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:t,code:"LOAD_ERROR"},bubbles:!0,composed:!0}))}};typeof customElements<"u"&&!customElements.get("lime-bundle")&&customElements.define("lime-bundle",
|
|
2828
|
+
`}renderError(t){this.shadow.innerHTML="",this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:t,code:"LOAD_ERROR"},bubbles:!0,composed:!0}))}};typeof customElements<"u"&&!customElements.get("lime-bundle")&&customElements.define("lime-bundle",Re);return yr(Vo);})();
|
|
2103
2829
|
//# sourceMappingURL=lime-bundle.global.js.map
|