@nuskin/product-components 3.18.0 → 4.0.0-cx15-11969.2
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/.releaserc +1 -1
- package/components/NsProductCarousel.vue +0 -38
- package/docs/CHANGELOG.md +1 -1
- package/gl-sbom-npm-yarn.cdx.json +169 -168
- package/index.js +1 -5
- package/package.json +1 -3
- package/assets/imageplaceholder.svg +0 -39
- package/components/NsProductRecsCarousel.vue +0 -155
- package/components/NuHomeCloneProductCarousel/Carousel.vue +0 -209
- package/components/NuHomeCloneProductCarousel/CarouselChevron.vue +0 -93
- package/components/NuHomeCloneProductCarousel/Loader.vue +0 -72
- package/components/NuHomeCloneProductCarousel/NuHomeCloneProductCarousel.vue +0 -1100
- package/components/NuHomeCloneProductCarousel/Price.vue +0 -147
- package/mixins/globalHelper.js +0 -66
- package/models/product.js +0 -140
- package/services/NsProductContentService.js +0 -147
- package/services/NsProductRecommendationClient.js +0 -66
|
@@ -1,1100 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="popular-section">
|
|
3
|
-
<div class="popular-section-inner">
|
|
4
|
-
<div class="tab-content popular-product-tab">
|
|
5
|
-
<div class="tab-pane popular-tab1">
|
|
6
|
-
<!-- {{ tab }} -->
|
|
7
|
-
<div class="crsl-container">
|
|
8
|
-
<div class="slider">
|
|
9
|
-
<Loader v-if="loading" />
|
|
10
|
-
<div v-if="!loading" class="carousel__container">
|
|
11
|
-
<Carousel
|
|
12
|
-
v-if="products.length > 0"
|
|
13
|
-
:options="options"
|
|
14
|
-
class="popular-slider-wrap"
|
|
15
|
-
@click="handleClick"
|
|
16
|
-
>
|
|
17
|
-
<div class="nav-wrapper d-none d-sm-flex mb-4 pl-2">
|
|
18
|
-
<div class="carousel-title-text">
|
|
19
|
-
{{ title }}
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
<div
|
|
23
|
-
class="nav-wrapper d-none d-md-flex justify-content-between align-items-center mb-4"
|
|
24
|
-
>
|
|
25
|
-
<div class="carousel-title-text">
|
|
26
|
-
{{ title }}
|
|
27
|
-
</div>
|
|
28
|
-
<CarouselChevron />
|
|
29
|
-
</div>
|
|
30
|
-
<div data-carousel="wrapper">
|
|
31
|
-
<div
|
|
32
|
-
v-for="(product, productIndex) in products"
|
|
33
|
-
:key="productIndex"
|
|
34
|
-
class="single-popular-product"
|
|
35
|
-
data-carousel="item"
|
|
36
|
-
>
|
|
37
|
-
<div
|
|
38
|
-
class="image"
|
|
39
|
-
@click="
|
|
40
|
-
openLink(product.slug, product.firstVariant.sku)
|
|
41
|
-
"
|
|
42
|
-
>
|
|
43
|
-
<img
|
|
44
|
-
:title="product.fullTitle"
|
|
45
|
-
:src="optimizeImage(product.carouselImage.url, 280)"
|
|
46
|
-
:alt="product.fullTitle"
|
|
47
|
-
loading="lazy"
|
|
48
|
-
/>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="crsl-content">
|
|
51
|
-
<a
|
|
52
|
-
class="text-decoration-none"
|
|
53
|
-
href
|
|
54
|
-
tabindex="-1"
|
|
55
|
-
data-disabletab
|
|
56
|
-
@click="
|
|
57
|
-
openLink(product.slug, product.firstVariant.sku)
|
|
58
|
-
"
|
|
59
|
-
>
|
|
60
|
-
<h6 class="subhead-s">
|
|
61
|
-
{{ product.primaryBrand }}
|
|
62
|
-
</h6>
|
|
63
|
-
<h2 class="paragraph-l product-title">
|
|
64
|
-
{{ product.fullTitle }}
|
|
65
|
-
</h2>
|
|
66
|
-
</a>
|
|
67
|
-
<h3 class="heading-3 price-heading">
|
|
68
|
-
<Price
|
|
69
|
-
:product="product"
|
|
70
|
-
:user="user"
|
|
71
|
-
:sales-events="salesEvents"
|
|
72
|
-
/>
|
|
73
|
-
</h3>
|
|
74
|
-
</div>
|
|
75
|
-
<a
|
|
76
|
-
class="button pop-add-btn effect-black"
|
|
77
|
-
:data-sku="product.firstVariant.sku"
|
|
78
|
-
data-carousel="cta"
|
|
79
|
-
>
|
|
80
|
-
<span class="icon">
|
|
81
|
-
<NsIcon
|
|
82
|
-
icon-name="icon-addtocart"
|
|
83
|
-
color="#F5F5F5"
|
|
84
|
-
size="icon-md"
|
|
85
|
-
/>
|
|
86
|
-
</span>
|
|
87
|
-
<span class="text cta">{{ addToCartText }}</span>
|
|
88
|
-
</a>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
<div data-carousel="dots"></div>
|
|
92
|
-
</Carousel>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</section>
|
|
100
|
-
</template>
|
|
101
|
-
|
|
102
|
-
<script>
|
|
103
|
-
/*
|
|
104
|
-
This is a visual clone of the Popular Products Carousel found in the Nu Home project and used (at time of writing) on the AEM-hosted homepage.
|
|
105
|
-
The popular-products business logic has been stripped out, in favor of a prop for injecting product SKU IDs or UIDs.
|
|
106
|
-
The debug logic from the original has also been stripped out.
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
|
-
import { NsIcon } from "@nuskin/ns-icon";
|
|
110
|
-
import { AccountManager } from "@nuskin/ns-account";
|
|
111
|
-
import { CartService, SalesEventService } from "@nuskin/ns-shop";
|
|
112
|
-
import { events } from "@nuskin/ns-util";
|
|
113
|
-
import Carousel from "./Carousel.vue";
|
|
114
|
-
import CarouselChevron from "./CarouselChevron.vue";
|
|
115
|
-
import Loader from "./Loader.vue";
|
|
116
|
-
import globalHelper from "../../mixins/globalHelper";
|
|
117
|
-
import Product from "../../models/product";
|
|
118
|
-
import Price from "./Price.vue";
|
|
119
|
-
import get from "lodash/get";
|
|
120
|
-
import {
|
|
121
|
-
findProductsById,
|
|
122
|
-
getProductTranslations
|
|
123
|
-
} from "../../services/NsProductContentService";
|
|
124
|
-
|
|
125
|
-
const OPTIONS = {
|
|
126
|
-
pagination: {
|
|
127
|
-
el: ".swiper-pagination",
|
|
128
|
-
type: "bullets",
|
|
129
|
-
clickable: true
|
|
130
|
-
},
|
|
131
|
-
watchSlidesProgress: true,
|
|
132
|
-
loop: true,
|
|
133
|
-
centeredSlides: true,
|
|
134
|
-
navigation: {
|
|
135
|
-
nextEl: ".swiper-button-next",
|
|
136
|
-
prevEl: ".swiper-button-prev"
|
|
137
|
-
},
|
|
138
|
-
slidesPerView: 1.5,
|
|
139
|
-
spaceBetween: 20,
|
|
140
|
-
breakpoints: {
|
|
141
|
-
500: {
|
|
142
|
-
slidesPerView: 2
|
|
143
|
-
},
|
|
144
|
-
600: {
|
|
145
|
-
spaceBetween: 30,
|
|
146
|
-
slidesPerView: 2.3,
|
|
147
|
-
centeredSlides: false
|
|
148
|
-
},
|
|
149
|
-
768: {
|
|
150
|
-
slidesPerView: 1
|
|
151
|
-
},
|
|
152
|
-
850: {
|
|
153
|
-
slidesPerView: 1.3,
|
|
154
|
-
centeredSlides: false
|
|
155
|
-
},
|
|
156
|
-
1024: {
|
|
157
|
-
slidesPerView: 2,
|
|
158
|
-
spaceBetween: 30,
|
|
159
|
-
centeredSlides: false
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Compares two lists of strings and determines if their contents are the same.
|
|
166
|
-
* @param {string[]} listA
|
|
167
|
-
* @param {string[]} listB
|
|
168
|
-
* @return {boolean}
|
|
169
|
-
*/
|
|
170
|
-
function compareStringLists(listA, listB) {
|
|
171
|
-
if (listA.length !== listB.length) return false;
|
|
172
|
-
|
|
173
|
-
const freqCountsA = {};
|
|
174
|
-
const freqCountsB = {};
|
|
175
|
-
|
|
176
|
-
for (const v of listA) freqCountsA[v] = (freqCountsA[v] || 0) + 1;
|
|
177
|
-
for (const v of listB) freqCountsB[v] = (freqCountsB[v] || 0) + 1;
|
|
178
|
-
|
|
179
|
-
for (const key in freqCountsA) {
|
|
180
|
-
if (!(key in freqCountsB)) return false;
|
|
181
|
-
|
|
182
|
-
if (freqCountsA[key] !== freqCountsB[key]) return false;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return true;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export default {
|
|
189
|
-
name: "NuHomeCloneProductCarousel",
|
|
190
|
-
components: {
|
|
191
|
-
Carousel,
|
|
192
|
-
CarouselChevron,
|
|
193
|
-
Loader,
|
|
194
|
-
NsIcon,
|
|
195
|
-
Price
|
|
196
|
-
},
|
|
197
|
-
mixins: [globalHelper],
|
|
198
|
-
props: {
|
|
199
|
-
/**
|
|
200
|
-
* Carousel title
|
|
201
|
-
*/
|
|
202
|
-
title: {
|
|
203
|
-
type: String,
|
|
204
|
-
default: ""
|
|
205
|
-
},
|
|
206
|
-
/**
|
|
207
|
-
* List of product SKU IDs (e.g. "01234567") or UIDs (e.g. "blt0123456789abcdef")
|
|
208
|
-
*/
|
|
209
|
-
productIds: {
|
|
210
|
-
type: Array,
|
|
211
|
-
required: true
|
|
212
|
-
},
|
|
213
|
-
country: {
|
|
214
|
-
type: String,
|
|
215
|
-
required: true
|
|
216
|
-
},
|
|
217
|
-
language: {
|
|
218
|
-
type: String,
|
|
219
|
-
required: true
|
|
220
|
-
},
|
|
221
|
-
forceLoading: {
|
|
222
|
-
type: Boolean,
|
|
223
|
-
default: false
|
|
224
|
-
},
|
|
225
|
-
referrer: {
|
|
226
|
-
type: String,
|
|
227
|
-
default: ""
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
data() {
|
|
231
|
-
return {
|
|
232
|
-
options: OPTIONS,
|
|
233
|
-
internalLoading: false,
|
|
234
|
-
carouselKey: 1,
|
|
235
|
-
rotate: false,
|
|
236
|
-
productTabs: {},
|
|
237
|
-
translations: [],
|
|
238
|
-
products: [],
|
|
239
|
-
productSlugs: [],
|
|
240
|
-
currentTabIndex: 0,
|
|
241
|
-
currentTab: {},
|
|
242
|
-
windowWidth: window.innerWidth,
|
|
243
|
-
salesEvents: [],
|
|
244
|
-
user: null
|
|
245
|
-
};
|
|
246
|
-
},
|
|
247
|
-
computed: {
|
|
248
|
-
addToCartText() {
|
|
249
|
-
if (this.translations) {
|
|
250
|
-
return this.translations.addToCartButton
|
|
251
|
-
? this.translations.addToCartButton
|
|
252
|
-
: "Add to Cart";
|
|
253
|
-
}
|
|
254
|
-
return "Add to Cart";
|
|
255
|
-
},
|
|
256
|
-
desktopAndUp() {
|
|
257
|
-
return (
|
|
258
|
-
this.$mq === "tablet" ||
|
|
259
|
-
this.$mq === "desktop" ||
|
|
260
|
-
this.$mq === "desktopHD"
|
|
261
|
-
);
|
|
262
|
-
},
|
|
263
|
-
loading() {
|
|
264
|
-
return this.internalLoading || this.forceLoading;
|
|
265
|
-
},
|
|
266
|
-
phabletAndDown() {
|
|
267
|
-
return this.$mq === "mobile" || this.$mq === "phablet";
|
|
268
|
-
},
|
|
269
|
-
headingClass() {
|
|
270
|
-
return this.windowWidth > 1023 ? "heading-2" : "heading-1";
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
watch: {
|
|
274
|
-
/**
|
|
275
|
-
* @param {string[] | null | undefined} ids
|
|
276
|
-
* @param {string[] | null | undefined} oldIds
|
|
277
|
-
*/
|
|
278
|
-
productIds(ids, oldIds) {
|
|
279
|
-
// Case 0: new list is empty; clear out product data
|
|
280
|
-
if (!ids || !ids.length) {
|
|
281
|
-
this.products = [];
|
|
282
|
-
|
|
283
|
-
// Force a rerender of the Swiper carousel
|
|
284
|
-
requestAnimationFrame(() => {
|
|
285
|
-
this.internalLoading = true;
|
|
286
|
-
requestAnimationFrame(() => (this.internalLoading = false));
|
|
287
|
-
});
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// Case 1: old list is empty; retrieve fresh product data for new list
|
|
292
|
-
if (!oldIds || !oldIds.length) {
|
|
293
|
-
this.getSliderProducts(ids);
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// Case 2: new and old list are the same; do nothing
|
|
298
|
-
if (compareStringLists(ids, oldIds)) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// Case 3: new list is subset of old list
|
|
303
|
-
if (ids.every(id => oldIds.includes(id))) {
|
|
304
|
-
// Product data is therefore also a subset of the previous data
|
|
305
|
-
this.products = this.products.filter(p => ids.includes(p._id));
|
|
306
|
-
|
|
307
|
-
// Force a rerender of the Swiper carousel
|
|
308
|
-
requestAnimationFrame(() => {
|
|
309
|
-
this.internalLoading = true;
|
|
310
|
-
requestAnimationFrame(() => (this.internalLoading = false));
|
|
311
|
-
});
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
// Default case: retrieve fresh product data
|
|
316
|
-
this.getSliderProducts(ids);
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
mounted() {
|
|
320
|
-
this.initProductTranslations();
|
|
321
|
-
this.initCtaClickHandler();
|
|
322
|
-
|
|
323
|
-
window.addEventListener("resize", () => {
|
|
324
|
-
this.windowWidth = window.innerWidth;
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
this.user = {
|
|
328
|
-
isDistributor: AccountManager.isDistributor(),
|
|
329
|
-
isPreferredCustomer: AccountManager.isPreferredCustomer()
|
|
330
|
-
};
|
|
331
|
-
},
|
|
332
|
-
updated() {
|
|
333
|
-
this.initCtaClickHandler();
|
|
334
|
-
},
|
|
335
|
-
async created() {
|
|
336
|
-
this.rotate = window.location;
|
|
337
|
-
|
|
338
|
-
SalesEventService.init(true);
|
|
339
|
-
events.getValue(
|
|
340
|
-
events.salesevent.ACTIVE_EVENTS,
|
|
341
|
-
se => this.handleGotSalesEvents(se),
|
|
342
|
-
true
|
|
343
|
-
);
|
|
344
|
-
},
|
|
345
|
-
methods: {
|
|
346
|
-
handleGotSalesEvents(salesEvents) {
|
|
347
|
-
this.salesEvents = salesEvents;
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
handleGotUser(user) {
|
|
351
|
-
this.user = user;
|
|
352
|
-
},
|
|
353
|
-
|
|
354
|
-
initCtaClickHandler() {
|
|
355
|
-
const $ctaElements = this.$el.querySelectorAll('[data-carousel="cta"]');
|
|
356
|
-
|
|
357
|
-
$ctaElements.forEach(cta => {
|
|
358
|
-
cta.addEventListener("keypress", this.handleKeyPress);
|
|
359
|
-
});
|
|
360
|
-
},
|
|
361
|
-
|
|
362
|
-
handleKeyPress(e) {
|
|
363
|
-
if (e.key == "Enter") {
|
|
364
|
-
this.handleClick({ nativeEvent: e });
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
|
|
368
|
-
handleClick(event) {
|
|
369
|
-
// event refers to custom event that contains the swiper instance and the nativeEvent of the clicked slide (not button).
|
|
370
|
-
const { nativeEvent } = event;
|
|
371
|
-
const target = nativeEvent.target;
|
|
372
|
-
let sku = get(target, "dataset.sku");
|
|
373
|
-
if (!sku) {
|
|
374
|
-
// we assume the button will only have spans inside
|
|
375
|
-
sku = get(target, "parentElement.dataset.sku");
|
|
376
|
-
}
|
|
377
|
-
// null check, if null, means the clicked element was not part of the atc button
|
|
378
|
-
return sku ? this.addToCart(sku) : undefined;
|
|
379
|
-
},
|
|
380
|
-
|
|
381
|
-
openLink(slug, sku) {
|
|
382
|
-
this.$emit("click-pdp", { slug, sku });
|
|
383
|
-
setTimeout(() => {
|
|
384
|
-
// Go to PDP after sufficient delay to log the user event
|
|
385
|
-
window.location.href = this.buildProductLink(slug, sku);
|
|
386
|
-
}, 1);
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
async addToCart(sku) {
|
|
390
|
-
const options = {
|
|
391
|
-
sku: sku && sku.toString(),
|
|
392
|
-
qty: 1,
|
|
393
|
-
userId: "",
|
|
394
|
-
cntryCd: "",
|
|
395
|
-
isAdr: false,
|
|
396
|
-
referrer: this.referrer,
|
|
397
|
-
domain: window.location.hostname
|
|
398
|
-
};
|
|
399
|
-
try {
|
|
400
|
-
this.$emit("click-atc", options);
|
|
401
|
-
await CartService.addSkuToCart(options);
|
|
402
|
-
} catch (error) {
|
|
403
|
-
console.error("Failed to add to cart.", error);
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
async getSliderProducts(sliderProductIds) {
|
|
408
|
-
this.internalLoading = true;
|
|
409
|
-
|
|
410
|
-
try {
|
|
411
|
-
const products = await findProductsById(
|
|
412
|
-
sliderProductIds,
|
|
413
|
-
this.country,
|
|
414
|
-
this.language
|
|
415
|
-
);
|
|
416
|
-
|
|
417
|
-
this.products = sliderProductIds
|
|
418
|
-
.map(id => {
|
|
419
|
-
return [
|
|
420
|
-
id,
|
|
421
|
-
products.find(p => {
|
|
422
|
-
return p.id === id || p.variants.find(v => v.sku === id);
|
|
423
|
-
})
|
|
424
|
-
];
|
|
425
|
-
})
|
|
426
|
-
.filter(arr => !!arr[1])
|
|
427
|
-
.map(([id, data]) => new Product(id, data))
|
|
428
|
-
.filter(product => {
|
|
429
|
-
return (
|
|
430
|
-
product.hasVariants() &&
|
|
431
|
-
!product.isExclusive() &&
|
|
432
|
-
!product.isNotReleasedForSale() &&
|
|
433
|
-
!product.isOutOfStock()
|
|
434
|
-
);
|
|
435
|
-
});
|
|
436
|
-
} catch (e) {
|
|
437
|
-
console.error(e);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
this.internalLoading = false;
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
optimizeImage(imgUrl, width, forceWidth = false) {
|
|
444
|
-
const url = new URL(imgUrl);
|
|
445
|
-
const maxWidth = window.innerWidth;
|
|
446
|
-
|
|
447
|
-
if (width) {
|
|
448
|
-
const resolvedWidth = forceWidth ? width : Math.min(maxWidth, width);
|
|
449
|
-
url.searchParams.append("width", resolvedWidth.toString());
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
return url.toString();
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
initProductTranslations() {
|
|
456
|
-
getProductTranslations(["addToCartButton"], this.country, this.language)
|
|
457
|
-
.then(translations => {
|
|
458
|
-
this.translations = translations;
|
|
459
|
-
})
|
|
460
|
-
.catch(console.error);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
</script>
|
|
465
|
-
|
|
466
|
-
<style lang="scss">
|
|
467
|
-
:root {
|
|
468
|
-
--theme__color1: #f56767;
|
|
469
|
-
--text__color: #0a0a0a;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.popular-section {
|
|
473
|
-
position: relative;
|
|
474
|
-
padding-top: 32px;
|
|
475
|
-
|
|
476
|
-
.arrow-right {
|
|
477
|
-
position: relative;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.crsl-container.nav {
|
|
481
|
-
display: flex;
|
|
482
|
-
align-items: center;
|
|
483
|
-
justify-content: end;
|
|
484
|
-
gap: 30px;
|
|
485
|
-
max-width: 100%;
|
|
486
|
-
padding: 0 49px 30px 47px;
|
|
487
|
-
position: relative;
|
|
488
|
-
min-height: 70px;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
.button-wrap {
|
|
492
|
-
display: flex;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
.price-heading {
|
|
496
|
-
margin-top: 0.75rem;
|
|
497
|
-
margin-bottom: 21px;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.popular-nav {
|
|
502
|
-
display: flex;
|
|
503
|
-
justify-content: center;
|
|
504
|
-
|
|
505
|
-
ul {
|
|
506
|
-
max-width: 750px;
|
|
507
|
-
width: 100%;
|
|
508
|
-
display: flex;
|
|
509
|
-
justify-content: space-between;
|
|
510
|
-
|
|
511
|
-
li {
|
|
512
|
-
display: flex;
|
|
513
|
-
align-items: end;
|
|
514
|
-
justify-content: center;
|
|
515
|
-
width: 50%;
|
|
516
|
-
|
|
517
|
-
a {
|
|
518
|
-
display: block;
|
|
519
|
-
padding: 0 0 14px;
|
|
520
|
-
border-bottom: 3px solid transparent;
|
|
521
|
-
width: 100%;
|
|
522
|
-
text-align: center;
|
|
523
|
-
text-decoration: none;
|
|
524
|
-
color: var(--primary-black);
|
|
525
|
-
|
|
526
|
-
&.active {
|
|
527
|
-
border-color: var(--primary-black);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
.popular-tab1 {
|
|
535
|
-
position: relative;
|
|
536
|
-
|
|
537
|
-
.shape1 {
|
|
538
|
-
position: absolute;
|
|
539
|
-
bottom: 5px;
|
|
540
|
-
right: 0;
|
|
541
|
-
// @media screen and (max-width: 991px) {
|
|
542
|
-
// display: none;
|
|
543
|
-
// }
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
.crsl-container {
|
|
547
|
-
padding: 0;
|
|
548
|
-
position: relative;
|
|
549
|
-
|
|
550
|
-
.shape2 {
|
|
551
|
-
position: absolute;
|
|
552
|
-
top: 50px;
|
|
553
|
-
left: -66px;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
.popular-product-tab {
|
|
559
|
-
// height: 1099px;
|
|
560
|
-
// @media screen and (min-width: 1024px) {
|
|
561
|
-
// height: 634px;
|
|
562
|
-
// }
|
|
563
|
-
.hooper-cust-nav-wrapper {
|
|
564
|
-
position: absolute;
|
|
565
|
-
|
|
566
|
-
right: 0px;
|
|
567
|
-
display: flex;
|
|
568
|
-
flex-flow: row nowrap;
|
|
569
|
-
gap: 20px;
|
|
570
|
-
|
|
571
|
-
button {
|
|
572
|
-
background: none;
|
|
573
|
-
height: 45px;
|
|
574
|
-
width: 45px;
|
|
575
|
-
display: flex;
|
|
576
|
-
align-items: center;
|
|
577
|
-
justify-content: center;
|
|
578
|
-
border: 2px solid var(--text__color) !important;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.tab-pane {
|
|
583
|
-
.crsl-container {
|
|
584
|
-
display: flex;
|
|
585
|
-
position: relative;
|
|
586
|
-
padding: 0;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.view-all-button {
|
|
590
|
-
top: 13px;
|
|
591
|
-
display: block;
|
|
592
|
-
align-items: center;
|
|
593
|
-
padding-bottom: 3px;
|
|
594
|
-
|
|
595
|
-
&::after {
|
|
596
|
-
content: "";
|
|
597
|
-
display: block;
|
|
598
|
-
height: 1px;
|
|
599
|
-
width: 100%;
|
|
600
|
-
background: var(--text__color);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
.popular-text-wrap {
|
|
607
|
-
width: 39%;
|
|
608
|
-
|
|
609
|
-
.underline-text > span {
|
|
610
|
-
margin-right: 10px;
|
|
611
|
-
height: 100%;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
.popular-text {
|
|
616
|
-
padding: 60px 40px;
|
|
617
|
-
width: 100%;
|
|
618
|
-
height: 528px;
|
|
619
|
-
background-size: cover !important;
|
|
620
|
-
background-position: center !important;
|
|
621
|
-
display: flex;
|
|
622
|
-
flex-direction: column;
|
|
623
|
-
align-items: flex-start;
|
|
624
|
-
justify-content: flex-end;
|
|
625
|
-
flex-shrink: 0;
|
|
626
|
-
filter: drop-shadow(0px 4px 30px rgba(0, 0, 0, 0.2));
|
|
627
|
-
margin-bottom: -46px;
|
|
628
|
-
background-color: #fafafa;
|
|
629
|
-
position: relative;
|
|
630
|
-
|
|
631
|
-
h3 {
|
|
632
|
-
max-width: 230px;
|
|
633
|
-
margin-bottom: 0;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
a {
|
|
637
|
-
margin-top: 23px;
|
|
638
|
-
max-width: 185px;
|
|
639
|
-
|
|
640
|
-
@media (min-width: 1025px) {
|
|
641
|
-
max-width: 200px;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
display: flex;
|
|
645
|
-
align-items: center;
|
|
646
|
-
|
|
647
|
-
&.effect-black:active {
|
|
648
|
-
.arrow-right {
|
|
649
|
-
&:after {
|
|
650
|
-
content: "";
|
|
651
|
-
position: absolute;
|
|
652
|
-
left: 1px;
|
|
653
|
-
bottom: 1px;
|
|
654
|
-
height: 22px;
|
|
655
|
-
width: 22px;
|
|
656
|
-
border-radius: 100%;
|
|
657
|
-
z-index: -1;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
.white-text {
|
|
665
|
-
// TODO: we shouldn't be setting colors on sized/typographies
|
|
666
|
-
.heading-1,
|
|
667
|
-
.heading-2,
|
|
668
|
-
a.paragraph-m {
|
|
669
|
-
color: inherit !important;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
.arrow-right {
|
|
673
|
-
svg {
|
|
674
|
-
path {
|
|
675
|
-
fill: #ffffff;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
.popular-product-wrap {
|
|
682
|
-
padding-left: 30px;
|
|
683
|
-
width: 61%;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
.single-popular-product {
|
|
687
|
-
display: flex;
|
|
688
|
-
position: relative;
|
|
689
|
-
height: auto;
|
|
690
|
-
width: 100%;
|
|
691
|
-
background: transparent;
|
|
692
|
-
cursor: pointer;
|
|
693
|
-
|
|
694
|
-
@media screen and (min-width: 1024px) {
|
|
695
|
-
width: 100%;
|
|
696
|
-
flex-direction: column;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
.image {
|
|
700
|
-
width: 100%;
|
|
701
|
-
background: transparent;
|
|
702
|
-
|
|
703
|
-
img {
|
|
704
|
-
background: #ffffff;
|
|
705
|
-
min-height: 250px;
|
|
706
|
-
max-height: 250px;
|
|
707
|
-
object-fit: scale-down;
|
|
708
|
-
width: 100%;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
.button {
|
|
713
|
-
position: absolute;
|
|
714
|
-
|
|
715
|
-
&.pop-add-btn {
|
|
716
|
-
font-size: 16px;
|
|
717
|
-
width: 100%;
|
|
718
|
-
height: 45px;
|
|
719
|
-
gap: 12px;
|
|
720
|
-
padding: 0 20px;
|
|
721
|
-
bottom: 8px;
|
|
722
|
-
display: inline-flex;
|
|
723
|
-
align-items: center;
|
|
724
|
-
justify-content: center;
|
|
725
|
-
position: relative;
|
|
726
|
-
top: 0;
|
|
727
|
-
background: #252525;
|
|
728
|
-
color: var(--text__color);
|
|
729
|
-
align-self: flex-start;
|
|
730
|
-
|
|
731
|
-
&.effect-red:active {
|
|
732
|
-
background: var(--primary-red);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.text {
|
|
737
|
-
color: #f5f5f5;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
.crsl-content {
|
|
742
|
-
display: flex;
|
|
743
|
-
top: 255px;
|
|
744
|
-
flex-direction: column;
|
|
745
|
-
|
|
746
|
-
h6 {
|
|
747
|
-
margin-top: 20px;
|
|
748
|
-
margin-bottom: 4px;
|
|
749
|
-
text-transform: uppercase;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
h2 {
|
|
753
|
-
font-family: inter;
|
|
754
|
-
margin: 0;
|
|
755
|
-
display: -webkit-box;
|
|
756
|
-
-webkit-line-clamp: 3;
|
|
757
|
-
/* autoprefixer: off */
|
|
758
|
-
-webkit-box-orient: vertical;
|
|
759
|
-
/* autoprefixer: on */
|
|
760
|
-
overflow: hidden;
|
|
761
|
-
text-overflow: ellipsis;
|
|
762
|
-
// height: 70px;
|
|
763
|
-
font-size: 20px;
|
|
764
|
-
font-weight: 300;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
h3 {
|
|
768
|
-
top: 0;
|
|
769
|
-
position: relative;
|
|
770
|
-
width: 297px;
|
|
771
|
-
height: 24px;
|
|
772
|
-
left: 0px;
|
|
773
|
-
|
|
774
|
-
/* heading-3 */
|
|
775
|
-
|
|
776
|
-
font-style: normal;
|
|
777
|
-
|
|
778
|
-
/* Archive/Archived Color */
|
|
779
|
-
|
|
780
|
-
color: #252525;
|
|
781
|
-
|
|
782
|
-
/* Inside auto layout */
|
|
783
|
-
|
|
784
|
-
flex: none;
|
|
785
|
-
order: 1;
|
|
786
|
-
flex-grow: 0;
|
|
787
|
-
font-size: 16px;
|
|
788
|
-
font-weight: 600;
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
.sku {
|
|
793
|
-
position: absolute;
|
|
794
|
-
width: 105px;
|
|
795
|
-
height: 16px;
|
|
796
|
-
left: 0px;
|
|
797
|
-
top: 112px;
|
|
798
|
-
|
|
799
|
-
/* heading-s */
|
|
800
|
-
|
|
801
|
-
font-style: normal;
|
|
802
|
-
font-weight: 500;
|
|
803
|
-
font-size: 12px;
|
|
804
|
-
line-height: 18px;
|
|
805
|
-
/* or 150% */
|
|
806
|
-
|
|
807
|
-
/* Neutral/N70 */
|
|
808
|
-
|
|
809
|
-
color: #5f5f5f;
|
|
810
|
-
|
|
811
|
-
/* Inside auto layout */
|
|
812
|
-
|
|
813
|
-
flex: none;
|
|
814
|
-
order: 1;
|
|
815
|
-
flex-grow: 0;
|
|
816
|
-
margin: 5px 0px;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
.product-badge {
|
|
821
|
-
background: #94d6e9;
|
|
822
|
-
font-size: 12px;
|
|
823
|
-
padding: 5px 10px;
|
|
824
|
-
top: 25px;
|
|
825
|
-
left: 0;
|
|
826
|
-
display: block;
|
|
827
|
-
position: absolute;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
.popular-slider-wrap {
|
|
831
|
-
.slider-outer {
|
|
832
|
-
padding: var(--shadow-area);
|
|
833
|
-
overflow: hidden;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
position: relative;
|
|
837
|
-
width: 100%;
|
|
838
|
-
justify-content: center;
|
|
839
|
-
|
|
840
|
-
@media screen and (min-width: 1024px) {
|
|
841
|
-
width: 621px;
|
|
842
|
-
flex-shrink: 0;
|
|
843
|
-
position: relative;
|
|
844
|
-
left: 0;
|
|
845
|
-
|
|
846
|
-
z-index: 3;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
.chevron {
|
|
851
|
-
width: 100%;
|
|
852
|
-
flex-shrink: 0;
|
|
853
|
-
position: relative;
|
|
854
|
-
height: 50px;
|
|
855
|
-
left: 0;
|
|
856
|
-
z-index: 3;
|
|
857
|
-
display: none;
|
|
858
|
-
|
|
859
|
-
@media screen and (min-width: 768px) {
|
|
860
|
-
display: block;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
.slider {
|
|
865
|
-
width: 100%;
|
|
866
|
-
flex-shrink: 0;
|
|
867
|
-
position: relative;
|
|
868
|
-
z-index: 3;
|
|
869
|
-
|
|
870
|
-
.preloader {
|
|
871
|
-
position: absolute;
|
|
872
|
-
top: 0;
|
|
873
|
-
left: 0;
|
|
874
|
-
width: 100%;
|
|
875
|
-
height: 100%;
|
|
876
|
-
z-index: 10;
|
|
877
|
-
|
|
878
|
-
.loader {
|
|
879
|
-
left: 50%;
|
|
880
|
-
top: 50%;
|
|
881
|
-
margin: -4.7rem 0 0 -4.7rem;
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
.button-white {
|
|
887
|
-
position: relative;
|
|
888
|
-
text-align: center;
|
|
889
|
-
|
|
890
|
-
&.pop-viewall-btn {
|
|
891
|
-
width: 100%;
|
|
892
|
-
height: 44px;
|
|
893
|
-
text-align: center;
|
|
894
|
-
padding: 0 20px;
|
|
895
|
-
display: none;
|
|
896
|
-
font-weight: bold;
|
|
897
|
-
|
|
898
|
-
@media screen and (max-width: 767px) {
|
|
899
|
-
display: inline-flex;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
align-items: center;
|
|
903
|
-
justify-content: center;
|
|
904
|
-
border: 1px solid var(--text__color);
|
|
905
|
-
margin: 8%;
|
|
906
|
-
color: var(--text__color);
|
|
907
|
-
align-self: flex-start;
|
|
908
|
-
text-transform: uppercase;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
.tab-pane {
|
|
913
|
-
@media (max-width: 576px) {
|
|
914
|
-
height: 100%;
|
|
915
|
-
|
|
916
|
-
.crsl-container {
|
|
917
|
-
height: 100%;
|
|
918
|
-
flex-direction: column;
|
|
919
|
-
flex-wrap: nowrap !important;
|
|
920
|
-
|
|
921
|
-
.slider {
|
|
922
|
-
flex: 1;
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
.justify-content-between {
|
|
929
|
-
justify-content: space-between;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
.align-items-center {
|
|
933
|
-
align-items: center;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
.subhead-s {
|
|
937
|
-
font-size: 14px;
|
|
938
|
-
line-height: 1.29;
|
|
939
|
-
font-weight: 700;
|
|
940
|
-
text-transform: uppercase;
|
|
941
|
-
color: #252525;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
.paragraph-l {
|
|
945
|
-
font-size: 18px;
|
|
946
|
-
line-height: 1.33;
|
|
947
|
-
font-weight: 400;
|
|
948
|
-
color: #252525;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
.carousel-title-text {
|
|
952
|
-
font-weight: 400;
|
|
953
|
-
font-size: 28px;
|
|
954
|
-
line-height: 34px;
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
.text-decoration-none:link,
|
|
958
|
-
.text-decoration-none:visited,
|
|
959
|
-
.text-decoration-none:hover,
|
|
960
|
-
.text-decoration-none:active {
|
|
961
|
-
text-decoration: none;
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
// mobile
|
|
965
|
-
@media screen and (max-width: 767px) {
|
|
966
|
-
.popular-section {
|
|
967
|
-
margin-bottom: 25px;
|
|
968
|
-
|
|
969
|
-
.popular-product-tab {
|
|
970
|
-
.crsl-container.nav {
|
|
971
|
-
display: none;
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
.popular-text-wrap {
|
|
976
|
-
width: 100%;
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
// mobile font and spacing guidelines
|
|
981
|
-
.popular-section.aos-init .popular-section-inner {
|
|
982
|
-
margin-top: 55px;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
.tab-content .tab-pane .crsl-container .popular-text {
|
|
986
|
-
padding: 50px 40px 59px 40px;
|
|
987
|
-
margin-bottom: 35px;
|
|
988
|
-
display: flex;
|
|
989
|
-
justify-content: center;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
.single-popular-product .crsl-content h6 {
|
|
993
|
-
margin-top: 20px;
|
|
994
|
-
margin-bottom: 12px;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
.button-white.pop-viewall-btn {
|
|
998
|
-
margin: 25px 30px 40px 30px;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
// .popular-product-tab {
|
|
1002
|
-
// height: 995px;
|
|
1003
|
-
// }
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
@media (min-width: 768px) {
|
|
1007
|
-
.d-md-flex {
|
|
1008
|
-
display: flex !important;
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
//small pc
|
|
1013
|
-
@media screen and (min-width: 1024px) and (max-width: 1136px) {
|
|
1014
|
-
.popular-section {
|
|
1015
|
-
.popular-text-wrap {
|
|
1016
|
-
width: 32%;
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
</style>
|
|
1021
|
-
|
|
1022
|
-
<style lang="scss" scoped>
|
|
1023
|
-
.anchor-div {
|
|
1024
|
-
cursor: pointer;
|
|
1025
|
-
text-decoration: underline;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
// mobile
|
|
1029
|
-
@media screen and (max-width: 767px) {
|
|
1030
|
-
// from responsive.css
|
|
1031
|
-
.popular-product-tab .tab-pane .crsl-container {
|
|
1032
|
-
flex-wrap: wrap;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
.popular-text {
|
|
1036
|
-
box-sizing: border-box;
|
|
1037
|
-
padding: 50px 40px;
|
|
1038
|
-
width: 100%;
|
|
1039
|
-
height: 296px;
|
|
1040
|
-
margin-bottom: 20px;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
.popular-product-wrap {
|
|
1044
|
-
padding-left: 0;
|
|
1045
|
-
width: 100%;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
.single-popular-product {
|
|
1049
|
-
flex-direction: column;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
.d-sm-flex {
|
|
1053
|
-
display: flex !important;
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
// tablet only
|
|
1058
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
1059
|
-
.crsl-container {
|
|
1060
|
-
justify-content: space-evenly;
|
|
1061
|
-
margin: 0;
|
|
1062
|
-
max-width: 1023px;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
.single-popular-product {
|
|
1066
|
-
flex-direction: column;
|
|
1067
|
-
margin-top: 4px;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
.slider {
|
|
1071
|
-
width: 50%;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
.chevron {
|
|
1075
|
-
margin-bottom: 20px;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
.popular-product-tab {
|
|
1079
|
-
max-height: 650px;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
.popular-product-tab {
|
|
1083
|
-
.tab-pane {
|
|
1084
|
-
.crsl-container {
|
|
1085
|
-
padding: 0 46px;
|
|
1086
|
-
max-width: 100%;
|
|
1087
|
-
gap: 30px;
|
|
1088
|
-
|
|
1089
|
-
.popular-text-wrap {
|
|
1090
|
-
width: 50.3%;
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
.product-title {
|
|
1098
|
-
height: 54px;
|
|
1099
|
-
}
|
|
1100
|
-
</style>
|