diff --git a/.gitignore b/.gitignore index a638c16..51808d7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ ehthumbs.db Thumbs.db node_modules/ +src/.generated-tailwind.css +src/.tailwind.min.css # Shopify CLI files .shopify/ diff --git a/assets/archivo-bold.woff2 b/assets/archivo-bold.woff2 new file mode 100644 index 0000000..1986e3c Binary files /dev/null and b/assets/archivo-bold.woff2 differ diff --git a/assets/archivo-light.woff2 b/assets/archivo-light.woff2 new file mode 100644 index 0000000..a4254b4 Binary files /dev/null and b/assets/archivo-light.woff2 differ diff --git a/assets/archivo-medium.woff2 b/assets/archivo-medium.woff2 new file mode 100644 index 0000000..77a014c Binary files /dev/null and b/assets/archivo-medium.woff2 differ diff --git a/assets/archivo-regular.woff2 b/assets/archivo-regular.woff2 new file mode 100644 index 0000000..4014518 Binary files /dev/null and b/assets/archivo-regular.woff2 differ diff --git a/assets/banner-antiedad.avif b/assets/banner-antiedad.avif new file mode 100644 index 0000000..3f087d7 Binary files /dev/null and b/assets/banner-antiedad.avif differ diff --git a/assets/banner-control-grasa.avif b/assets/banner-control-grasa.avif new file mode 100644 index 0000000..9be8595 Binary files /dev/null and b/assets/banner-control-grasa.avif differ diff --git a/assets/banner-hidratantes.avif b/assets/banner-hidratantes.avif new file mode 100644 index 0000000..b3ffb7f Binary files /dev/null and b/assets/banner-hidratantes.avif differ diff --git a/assets/banner-kits.avif b/assets/banner-kits.avif new file mode 100644 index 0000000..dc5fb72 Binary files /dev/null and b/assets/banner-kits.avif differ diff --git a/assets/banner-limpiadores.avif b/assets/banner-limpiadores.avif new file mode 100644 index 0000000..79d5920 Binary files /dev/null and b/assets/banner-limpiadores.avif differ diff --git a/assets/banner-manchas.avif b/assets/banner-manchas.avif new file mode 100644 index 0000000..9ffb52a Binary files /dev/null and b/assets/banner-manchas.avif differ diff --git a/assets/banner-mascarillas.avif b/assets/banner-mascarillas.avif new file mode 100644 index 0000000..5bbd0b4 Binary files /dev/null and b/assets/banner-mascarillas.avif differ diff --git a/assets/banner-piel-grasa.avif b/assets/banner-piel-grasa.avif new file mode 100644 index 0000000..918cabc Binary files /dev/null and b/assets/banner-piel-grasa.avif differ diff --git a/assets/banner-piel-mixta-grasa.avif b/assets/banner-piel-mixta-grasa.avif new file mode 100644 index 0000000..f8baf71 Binary files /dev/null and b/assets/banner-piel-mixta-grasa.avif differ diff --git a/assets/banner-piel-seca.avif b/assets/banner-piel-seca.avif new file mode 100644 index 0000000..1d363c3 Binary files /dev/null and b/assets/banner-piel-seca.avif differ diff --git a/assets/banner-preocupacion-acne.avif b/assets/banner-preocupacion-acne.avif new file mode 100644 index 0000000..fd55468 Binary files /dev/null and b/assets/banner-preocupacion-acne.avif differ diff --git a/assets/banner-preocupacion-hidratacion.avif b/assets/banner-preocupacion-hidratacion.avif new file mode 100644 index 0000000..f49d4a0 Binary files /dev/null and b/assets/banner-preocupacion-hidratacion.avif differ diff --git a/assets/banner-proteccion-solar.avif b/assets/banner-proteccion-solar.avif new file mode 100644 index 0000000..da3c5d6 Binary files /dev/null and b/assets/banner-proteccion-solar.avif differ diff --git a/assets/banner-protectores.avif b/assets/banner-protectores.avif new file mode 100644 index 0000000..894fbd9 Binary files /dev/null and b/assets/banner-protectores.avif differ diff --git a/assets/banner-serums.avif b/assets/banner-serums.avif new file mode 100644 index 0000000..44eac15 Binary files /dev/null and b/assets/banner-serums.avif differ diff --git a/assets/banner-todos-productos.avif b/assets/banner-todos-productos.avif new file mode 100644 index 0000000..f5b76b3 Binary files /dev/null and b/assets/banner-todos-productos.avif differ diff --git a/assets/critical.css b/assets/critical.css index 4d7bb40..fdb258a 100644 --- a/assets/critical.css +++ b/assets/critical.css @@ -121,3 +121,81 @@ body { opacity: 0; } } + +/* Hero paints before the bundled stylesheet arrives. */ +.hero { + position: relative; + width: 100%; + min-height: 650px; + overflow: hidden; + color: #fff; + background: #c8c2bc; +} + +.hero__media { + position: absolute; + inset: 0; +} + +.hero__poster, +.hero__still, +.hero__poster-image { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + max-width: none; + object-fit: cover; + object-position: center center; +} + +.hero__content { + position: relative; + z-index: 2; + display: flex; + min-height: 650px; + padding: 104px 160px 80px 100px; +} + +.hero__title { + margin: 0; + color: #fff; + font-family: Archivo, sans-serif; + font-size: 70px; + font-weight: 500; + line-height: 69px; + text-transform: uppercase; +} + +.hero__title-line { + display: block; +} + +.hero__title-line--light { + font-weight: 300; +} + +.hero__title-line--medium { + font-weight: 500; +} + +@media (max-width: 1023px) { + .hero, + .hero__content { + min-height: 550px; + } + + .hero__poster-image { + object-position: center 22%; + } + + .hero__content { + align-items: flex-end; + padding: 24px 20px 15px; + } + + .hero__title { + font-size: 35px; + line-height: 40px; + } +} diff --git a/assets/menu-categoria-bloqueadores.webp b/assets/menu-categoria-bloqueadores.webp new file mode 100644 index 0000000..f6d3a39 Binary files /dev/null and b/assets/menu-categoria-bloqueadores.webp differ diff --git a/assets/menu-categoria-hidratantes.webp b/assets/menu-categoria-hidratantes.webp new file mode 100644 index 0000000..4ba3432 Binary files /dev/null and b/assets/menu-categoria-hidratantes.webp differ diff --git a/assets/menu-categoria-limpiadores.webp b/assets/menu-categoria-limpiadores.webp new file mode 100644 index 0000000..6b46d56 Binary files /dev/null and b/assets/menu-categoria-limpiadores.webp differ diff --git a/assets/menu-categoria-mascarillas.webp b/assets/menu-categoria-mascarillas.webp new file mode 100644 index 0000000..abc3c96 Binary files /dev/null and b/assets/menu-categoria-mascarillas.webp differ diff --git a/assets/menu-categoria-serums.webp b/assets/menu-categoria-serums.webp new file mode 100644 index 0000000..8dd3baa Binary files /dev/null and b/assets/menu-categoria-serums.webp differ diff --git a/assets/menu-categoria-todos.webp b/assets/menu-categoria-todos.webp new file mode 100644 index 0000000..1e2353b Binary files /dev/null and b/assets/menu-categoria-todos.webp differ diff --git a/assets/menu-piel-grasa.webp b/assets/menu-piel-grasa.webp new file mode 100644 index 0000000..0349be5 Binary files /dev/null and b/assets/menu-piel-grasa.webp differ diff --git a/assets/menu-piel-mixta.webp b/assets/menu-piel-mixta.webp new file mode 100644 index 0000000..b00e83f Binary files /dev/null and b/assets/menu-piel-mixta.webp differ diff --git a/assets/menu-piel-seca.webp b/assets/menu-piel-seca.webp new file mode 100644 index 0000000..44507ec Binary files /dev/null and b/assets/menu-piel-seca.webp differ diff --git a/assets/menu-preocupacion-acne.webp b/assets/menu-preocupacion-acne.webp new file mode 100644 index 0000000..e57b98a Binary files /dev/null and b/assets/menu-preocupacion-acne.webp differ diff --git a/assets/menu-preocupacion-antiedad.webp b/assets/menu-preocupacion-antiedad.webp new file mode 100644 index 0000000..fed664f Binary files /dev/null and b/assets/menu-preocupacion-antiedad.webp differ diff --git a/assets/menu-preocupacion-grasa.webp b/assets/menu-preocupacion-grasa.webp new file mode 100644 index 0000000..de8b17b Binary files /dev/null and b/assets/menu-preocupacion-grasa.webp differ diff --git a/assets/menu-preocupacion-hidratacion.webp b/assets/menu-preocupacion-hidratacion.webp new file mode 100644 index 0000000..a1aa6a4 Binary files /dev/null and b/assets/menu-preocupacion-hidratacion.webp differ diff --git a/assets/menu-preocupacion-manchas.webp b/assets/menu-preocupacion-manchas.webp new file mode 100644 index 0000000..dd50d19 Binary files /dev/null and b/assets/menu-preocupacion-manchas.webp differ diff --git a/assets/menu-preocupacion-solar.webp b/assets/menu-preocupacion-solar.webp new file mode 100644 index 0000000..3d3b0bf Binary files /dev/null and b/assets/menu-preocupacion-solar.webp differ diff --git a/assets/menu-rutina-hidrata.webp b/assets/menu-rutina-hidrata.webp new file mode 100644 index 0000000..61b8782 Binary files /dev/null and b/assets/menu-rutina-hidrata.webp differ diff --git a/assets/menu-rutina-kits.webp b/assets/menu-rutina-kits.webp new file mode 100644 index 0000000..60b186f Binary files /dev/null and b/assets/menu-rutina-kits.webp differ diff --git a/assets/menu-rutina-limpia.webp b/assets/menu-rutina-limpia.webp new file mode 100644 index 0000000..f1832af Binary files /dev/null and b/assets/menu-rutina-limpia.webp differ diff --git a/assets/menu-rutina-protege.webp b/assets/menu-rutina-protege.webp new file mode 100644 index 0000000..220252e Binary files /dev/null and b/assets/menu-rutina-protege.webp differ diff --git a/assets/menu-rutina-trata.webp b/assets/menu-rutina-trata.webp new file mode 100644 index 0000000..501ccf4 Binary files /dev/null and b/assets/menu-rutina-trata.webp differ diff --git a/assets/tailwind.css b/assets/tailwind.css deleted file mode 100644 index 81843c1..0000000 --- a/assets/tailwind.css +++ /dev/null @@ -1 +0,0 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:1rem;padding-left:1rem}@media (min-width:1702px){.container{max-width:1702px}}.article-rte{font-size:14.4px;line-height:1.89;--tw-text-opacity:1;color:rgb(33 35 38/var(--tw-text-opacity,1))}.article-rte>:first-child{margin-top:0}.article-rte h2{margin-top:29px;margin-bottom:29px;font-size:35px;font-weight:300;line-height:1.27;letter-spacing:.6px;--tw-text-opacity:1;color:rgb(26 27 24/var(--tw-text-opacity,1))}@media (max-width:767px){.article-rte h2{font-size:26px}}.article-rte h3{margin-bottom:.75rem;margin-top:1.5rem;font-size:26px;font-weight:300;line-height:1.27;letter-spacing:.6px;--tw-text-opacity:1;color:rgb(26 27 24/var(--tw-text-opacity,1))}@media (max-width:767px){.article-rte h3{font-size:22px}}.article-rte p{margin-bottom:14.4px}.article-rte ol,.article-rte ul{margin-bottom:14.4px;padding-left:1.25rem}.article-rte ul{list-style:disc}.article-rte ol{list-style:decimal}.article-rte li{margin-bottom:4.5px}.article-rte a{--tw-text-opacity:1;color:rgb(26 27 24/var(--tw-text-opacity,1));text-decoration-line:underline;text-underline-offset:3px}.article-rte img{height:auto;max-width:100%;border-radius:18px}.article-rte blockquote,.article-rte img{margin-top:1.5rem;margin-bottom:1.5rem}.article-rte blockquote{border-left-width:2px;border-style:solid;--tw-border-opacity:1;border-color:rgb(157 214 199/var(--tw-border-opacity,1));padding-left:1rem}.article-rte strong{font-weight:500}.about-faq summary::-webkit-details-marker{display:none}.about-faq summary{list-style:none}.about-faq details[open] .about-faq__icon{transform:rotate(45deg)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.top-0{top:0}.top-1\/2{top:50%}.top-full{top:100%}.z-30{z-index:30}.z-40{z-index:40}.col-span-5{grid-column:span 5/span 5}.col-span-full{grid-column:1/-1}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-4{grid-column-start:4}.col-start-5{grid-column-start:5}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.m-0{margin:0}.m-1{margin:.25rem}.mx-\[4px\]{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.mb-0{margin-bottom:0}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-\[12\.6px\]{margin-bottom:12.6px}.mb-\[18px\]{margin-bottom:18px}.mb-\[27px\]{margin-bottom:27px}.mb-\[45px\]{margin-bottom:45px}.ml-1{margin-left:.25rem}.mr-5{margin-right:1.25rem}.mr-\[50px\]{margin-right:50px}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-9{margin-top:2.25rem}.mt-\[13\.5px\]{margin-top:13.5px}.mt-\[15px\]{margin-top:15px}.mt-\[45px\]{margin-top:45px}.mt-\[6px\]{margin-top:6px}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-\[3\/2\]{aspect-ratio:3/2}.aspect-square{aspect-ratio:1/1}.size-10{width:2.5rem;height:2.5rem}.size-3\.5{width:.875rem;height:.875rem}.size-5{width:1.25rem;height:1.25rem}.size-7{width:1.75rem;height:1.75rem}.size-\[10px\]{width:10px;height:10px}.size-\[30px\]{width:30px;height:30px}.size-\[31px\]{width:31px;height:31px}.size-\[45px\]{width:45px;height:45px}.size-\[58px\]{width:58px;height:58px}.h-4{height:1rem}.h-\[50px\]{height:50px}.h-\[55px\]{height:55px}.h-\[650px\]{height:650px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[140px\]{min-height:140px}.min-h-\[650px\]{min-height:650px}.min-h-screen{min-height:100vh}.w-\[223px\]{width:223px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-4{min-width:1rem}.min-w-\[260px\]{min-width:260px}.max-w-\[1070px\]{max-width:1070px}.max-w-\[1100px\]{max-width:1100px}.max-w-\[1170px\]{max-width:1170px}.max-w-\[1440px\]{max-width:1440px}.max-w-\[420px\]{max-width:420px}.max-w-\[460px\]{max-width:460px}.max-w-\[640px\]{max-width:640px}.max-w-\[699px\]{max-width:699px}.max-w-\[760px\]{max-width:760px}.max-w-\[900px\]{max-width:900px}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[auto_minmax\(0\2c 699px\)_1fr_auto_auto\]{grid-template-columns:auto minmax(0,699px) 1fr auto auto}.grid-cols-subgrid{grid-template-columns:subgrid}.grid-rows-subgrid{grid-template-rows:subgrid}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[15px\]{gap:15px}.gap-\[27px\]{gap:27px}.gap-\[50px\]{gap:50px}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-\[27px\]{-moz-column-gap:27px;column-gap:27px}.gap-y-10{row-gap:2.5rem}.gap-y-16{row-gap:4rem}.gap-y-2{row-gap:.5rem}.self-stretch{align-self:stretch}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis;white-space:nowrap}.text-balance{text-wrap:balance}.rounded-\[18px\]{border-radius:18px}.rounded-\[7px\]{border-radius:7px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-\[\#1a1b18\]{--tw-border-opacity:1;border-color:rgb(26 27 24/var(--tw-border-opacity,1))}.border-\[\#d2d5d9\]{--tw-border-opacity:1;border-color:rgb(210 213 217/var(--tw-border-opacity,1))}.border-\[\#ececec\]{--tw-border-opacity:1;border-color:rgb(236 236 236/var(--tw-border-opacity,1))}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity,1))}.border-brand-mint{--tw-border-opacity:1;border-color:rgb(157 214 199/var(--tw-border-opacity,1))}.bg-\[\#1a1b18\]{--tw-bg-opacity:1;background-color:rgb(26 27 24/var(--tw-bg-opacity,1))}.bg-\[\#f3f3f3\]{--tw-bg-opacity:1;background-color:rgb(243 243 243/var(--tw-bg-opacity,1))}.bg-\[\#f9f9fa\]{--tw-bg-opacity:1;background-color:rgb(249 249 250/var(--tw-bg-opacity,1))}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-brand-cloud{--tw-bg-opacity:1;background-color:rgb(248 248 248/var(--tw-bg-opacity,1))}.bg-brand-mint{--tw-bg-opacity:1;background-color:rgb(157 214 199/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/90{background-color:hsla(0,0%,100%,.9)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-\[5px\]{padding:5px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[100px\]{padding-left:100px;padding-right:100px}.px-\[11px\]{padding-left:11px;padding-right:11px}.px-\[18px\]{padding-left:18px;padding-right:18px}.px-\[22px\]{padding-left:22px;padding-right:22px}.px-\[27px\]{padding-left:27px;padding-right:27px}.px-\[3px\]{padding-left:3px;padding-right:3px}.px-\[45px\]{padding-left:45px;padding-right:45px}.px-\[6px\]{padding-left:6px;padding-right:6px}.px-\[90px\]{padding-left:90px;padding-right:90px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-\[26px\]{padding-top:26px;padding-bottom:26px}.py-\[45px\]{padding-top:45px;padding-bottom:45px}.py-\[6px\]{padding-top:6px;padding-bottom:6px}.py-\[8px\]{padding-top:8px;padding-bottom:8px}.py-\[9px\]{padding-top:9px;padding-bottom:9px}.pb-12{padding-bottom:3rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-9{padding-bottom:2.25rem}.pb-\[18px\]{padding-bottom:18px}.pb-\[72px\]{padding-bottom:72px}.pt-10{padding-top:2.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-\[13\.5px\]{padding-top:13.5px}.pt-\[15px\]{padding-top:15px}.pt-\[60px\]{padding-top:60px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:Archivo,sans-serif}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12\.6px\]{font-size:12.6px}.text-\[12px\]{font-size:12px}.text-\[14\.4px\]{font-size:14.4px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[28px\]{font-size:28px}.text-\[35px\]{font-size:35px}.text-\[50px\]{font-size:50px}.text-\[64px\]{font-size:64px}.text-\[9px\]{font-size:9px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.leading-\[1\.05\]{line-height:1.05}.leading-\[1\.08\]{line-height:1.08}.leading-\[1\.15\]{line-height:1.15}.leading-\[1\.1\]{line-height:1.1}.leading-\[1\.27\]{line-height:1.27}.leading-\[1\.45\]{line-height:1.45}.leading-\[1\.5\]{line-height:1.5}.leading-\[1\.89\]{line-height:1.89}.leading-\[21px\]{line-height:21px}.leading-\[26px\]{line-height:26px}.leading-none{line-height:1}.tracking-\[0\.08em\]{letter-spacing:.08em}.tracking-\[0\.6px\]{letter-spacing:.6px}.tracking-\[1\.17px\]{letter-spacing:1.17px}.text-\[\#0a0a0a\]{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.text-\[\#1a1b18\]{--tw-text-opacity:1;color:rgb(26 27 24/var(--tw-text-opacity,1))}.text-\[\#212326\]{--tw-text-opacity:1;color:rgb(33 35 38/var(--tw-text-opacity,1))}.text-\[\#212326\]\/75{color:rgba(33,35,38,.75)}.text-\[\#6b7280\]{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.underline-offset-\[5px\]{text-underline-offset:5px}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-\[0_12px_40px_rgba\(0\2c 0\2c 0\2c 0\.08\)\]{--tw-shadow:0 12px 40px rgba(0,0,0,.08);--tw-shadow-colored:0 12px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-500{transition-duration:.5s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:font-light::-moz-placeholder{font-weight:300}.placeholder\:font-light::placeholder{font-weight:300}.placeholder\:text-brand-placeholder::-moz-placeholder{--tw-text-opacity:1;color:rgb(191 189 190/var(--tw-text-opacity,1))}.placeholder\:text-brand-placeholder::placeholder{--tw-text-opacity:1;color:rgb(191 189 190/var(--tw-text-opacity,1))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bottom-0:after{content:var(--tw-content);bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:h-\[3px\]:after{content:var(--tw-content);height:3px}.after\:w-\[90px\]:after{content:var(--tw-content);width:90px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:bg-\[\#1a1b18\]:after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(26 27 24/var(--tw-bg-opacity,1))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.hover\:text-brand-ink:hover{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-\[\#1a1b18\]:focus{--tw-border-opacity:1;border-color:rgb(26 27 24/var(--tw-border-opacity,1))}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-4:focus-visible{outline-offset:4px}.focus-visible\:outline-black:focus-visible{outline-color:#000}.group:hover .group-hover\:scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (max-width:1439px){.xxl\:mr-8{margin-right:2rem}.xxl\:gap-6{gap:1.5rem}.xxl\:gap-8{gap:2rem}.xxl\:px-10{padding-left:2.5rem;padding-right:2.5rem}}@media (max-width:1119px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:text-\[14px\]{font-size:14px}}@media (max-width:1024px){.lg\:block{display:block}.lg\:hidden{display:none}.lg\:min-h-0{min-height:0}.lg\:max-w-none{max-width:none}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:flex-col{flex-direction:column}.lg\:items-start{align-items:flex-start}.lg\:justify-start{justify-content:flex-start}.lg\:gap-4{gap:1rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:text-\[48px\]{font-size:48px}}@media (max-width:767px){.md\:mt-8{margin-top:2rem}.md\:h-\[420px\]{height:420px}.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:items-start{align-items:flex-start}.md\:justify-start{justify-content:flex-start}.md\:gap-y-10{row-gap:2.5rem}.md\:gap-y-8{row-gap:2rem}.md\:px-5{padding-left:1.25rem;padding-right:1.25rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}.md\:py-12{padding-top:3rem;padding-bottom:3rem}.md\:py-8{padding-top:2rem;padding-bottom:2rem}.md\:pb-12{padding-bottom:3rem}.md\:pt-10{padding-top:2.5rem}.md\:text-left{text-align:left}.md\:text-\[18px\]{font-size:18px}.md\:text-\[26px\]{font-size:26px}.md\:text-\[28px\]{font-size:28px}.md\:text-\[32px\]{font-size:32px}.md\:text-\[34px\]{font-size:34px}.md\:text-\[36px\]{font-size:36px}.md\:leading-\[1\.2\]{line-height:1.2}} \ No newline at end of file diff --git a/blocks/group.liquid b/blocks/group.liquid index baea31c..ffc5354 100644 --- a/blocks/group.liquid +++ b/blocks/group.liquid @@ -22,27 +22,7 @@ {% content_for 'blocks' %} -{% stylesheet %} - .group { - display: flex; - flex-wrap: nowrap; - overflow: hidden; - width: 100%; - } - .group--horizontal { - flex-direction: row; - justify-content: space-between; - align-items: center; - padding: 0 var(--padding); - } - - .group--vertical { - flex-direction: column; - align-items: var(--alignment); - padding: var(--padding) 0; - } -{% endstylesheet %} {% schema %} { diff --git a/blocks/text.liquid b/blocks/text.liquid index b985c38..e411be8 100644 --- a/blocks/text.liquid +++ b/blocks/text.liquid @@ -13,18 +13,7 @@ {{ block.settings.text }} -{% stylesheet %} - .text { - text-align: var(--text-align); - } - .text--title { - font-size: 2rem; - font-weight: 700; - } - .text--subtitle { - font-size: 1.5rem; - } -{% endstylesheet %} + {% schema %} { diff --git a/layout/password.liquid b/layout/password.liquid index 23105ce..abf5711 100644 --- a/layout/password.liquid +++ b/layout/password.liquid @@ -4,8 +4,7 @@ {% # Inlined CSS Variables %} {% render 'css-variables' %} - {% # Load and preload the critical CSS %} - {{ 'critical.css' | asset_url | stylesheet_tag: preload: true }} + {% render 'tailwind-css' %} {% # Social, title, etc. %} {% render 'meta-tags' %} diff --git a/layout/theme.liquid b/layout/theme.liquid index 905189c..683240d 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -1,13 +1,12 @@ - + {% # Inlined CSS Variables %} {% render 'css-variables' %} - {% # Load and preload the critical CSS %} - + {% # Tailwind v3 bundle: reset, utilities, and component CSS, minified %} + {% render 'tailwind-css' %} {% render 'font-faces' %} - {{ 'tailwind.css' | asset_url | stylesheet_tag: preload: true }} {% # Social, title, etc. %} {% render 'meta-tags' %} diff --git a/locales/en.default.json b/locales/en.default.json index 514a2d3..1d25dce 100644 --- a/locales/en.default.json +++ b/locales/en.default.json @@ -1,3 +1,12 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin language editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ { "404": { "title": "404", @@ -91,10 +100,11 @@ "join_button": "Distribuidores" }, "cart": { - "checkout": "Checkout", - "title": "Cart", - "update": "Update", - "remove": "Remove" + "checkout": "Finalizar pedido", + "title": "Su carrito", + "update": "Actualizar", + "remove": "Eliminar", + "continue": "Seguir comprando" }, "cart_drawer": { "recommendations": "También te recomiendo", @@ -106,6 +116,7 @@ "unlocked": "Ya tienes envío gratis", "shipping_progress": "Progreso hacia el envío gratis", "add": "Agregar al carrito", + "add_short": "Agregar", "subtotal": "Subtotal", "taxes": "Impuestos incluidos. Descuentos y envío calculados en pantalla de pago.", "checkout": "Finalizar pedido", @@ -127,7 +138,7 @@ "title": "Collections" }, "product_page": { - "add": "Añadir a la bolsa de compra", + "add": "Añadir a carrito", "buy": "Comprar ahora", "favorite": "Favoritos", "options": "Opciones: {{ option }}", @@ -167,7 +178,10 @@ }, "collection_page": { "filters": "Filtros", + "close_filters": "Cerrar filtros", "sort": "Ordenar por: {{ sort }}", + "sort_title": "Ordenar por", + "close_sort": "Cerrar orden", "apply": "Aplicar", "clear": "Limpiar", "no_filters": "Esta colección no tiene filtros.", @@ -195,27 +209,39 @@ "enter": "Enter" }, "search": { - "title": "Search", - "placeholder": "Search articles, pages, or products", - "submit": "Search", - "no_results_html": "No results found for {{ terms }}", - "results_for_html": "{{ count }} results found for {{ terms }}" + "title": "Buscar", + "placeholder": "Busca tu producto seasons favorito", + "submit": "Buscar", + "no_results_html": "No hay resultados para {{ terms }}", + "results_for_html": "{{ count }} resultados para {{ terms }}" }, "header": { "menu_open": "Abrir menú", "menu_close": "Cerrar menú", "search_label": "Buscar", "search_placeholder": "Busca tu producto seasons favorito", + "search_empty": "No hay productos para “{{ terms }}”", + "search_view_all": "Ver todos los resultados", + "search_status": { + "one": "{{ count }} producto", + "other": "{{ count }} productos" + }, "account": "Cuenta", + "wishlist": "Favoritos", + "wishlist_count": "Favoritos, {{ count }} productos", + "wishlist_empty": "Aún no tienes favoritos.", + "wishlist_remove": "Quitar", + "wishlist_close": "Cerrar favoritos", "cart_count": "Carrito, {{ count }} productos", "promo": "Cambia tu piel ¡hoy!", "submenu": "Abrir {{ menu_title }}", "links": { "categories": "Categorías", - "routine": "Por rutina", - "skin_type": "Por tipo de piel", - "concern": "Por preocupación", + "routine": "Rutina", + "skin_type": "Tipo de piel", + "concern": "Preocupación", "sunscreen": "Protección Solar", + "favorites": "Los favoritos", "kits": "Kits y Rutinas", "moisturizers": "Hidratantes", "glow_army": "Glow Army", @@ -232,7 +258,7 @@ "treat": "2. Trata", "hydrate": "3. Hidrata", "protect": "4. Protege", - "kits": "Kits y rutinas completas", + "kits": "Kits y rutinas", "combination": "Mixta-grasa", "oily": "Grasa", "dry": "Seca", diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json index 8d4ef1b..ed56116 100644 --- a/locales/en.default.schema.json +++ b/locales/en.default.schema.json @@ -1,3 +1,12 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin language editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ { "general": { "404": "Not found", @@ -79,7 +88,8 @@ "pills_menu": "Highlighted links", "utility_menu": "Utility links", "promo_text": "Promo text", - "promo_link": "Promo link" + "promo_link": "Promo link", + "predictive": "Predictive search" }, "hero": { "name": "Hero", diff --git a/package.json b/package.json index e98599b..558a497 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "season", "private": true, "scripts": { - "dev:css": "tailwindcss -i ./src/tailwind.css -o ./assets/tailwind.css --watch", - "build:css": "tailwindcss -i ./src/tailwind.css -o ./assets/tailwind.css --minify" + "dev:css": "node scripts/build-css.js --watch", + "build:css": "node scripts/build-css.js" }, "devDependencies": { "tailwindcss": "^3.4.17" diff --git a/scripts/build-css.js b/scripts/build-css.js new file mode 100644 index 0000000..ee699b3 --- /dev/null +++ b/scripts/build-css.js @@ -0,0 +1,106 @@ +const fs = require('fs'); +const path = require('path'); +const { spawnSync } = require('child_process'); + +const root = path.join(__dirname, '..'); +const entry = path.join(root, 'src', '.generated-tailwind.css'); +const componentsFile = path.join(root, 'src', 'components.css'); +const tailwindSource = path.join(root, 'src', 'tailwind.css'); +const criticalFile = path.join(root, 'assets', 'critical.css'); +const output = path.join(root, 'src', '.tailwind.min.css'); +const snippetFile = path.join(root, 'snippets', 'tailwind-css.liquid'); +const publicCss = path.join(root, 'assets', 'tailwind.css'); +const cli = path.join(root, 'node_modules', 'tailwindcss', 'lib', 'cli.js'); + +const stylesheetPattern = /\{%-?\s*stylesheet\s*-?%\}[\t ]*\r?\n?([\s\S]*?)\{%-?\s*endstylesheet\s*-?%\}[\t ]*\r?\n?/g; + +function walk(dir, files) { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.name === 'node_modules' || entry.name === '.git') continue; + const full = path.join(dir, entry.name); + if (entry.isDirectory()) walk(full, files); + else if (entry.name.endsWith('.liquid')) files.push(full); + } + return files; +} + +function extractStylesheets() { + const files = walk(root, []); + const chunks = []; + + for (const file of files) { + const text = fs.readFileSync(file, 'utf8'); + if (!text.includes('stylesheet')) continue; + + const parts = []; + const next = text.replace(stylesheetPattern, (_, css) => { + parts.push(css.trim()); + return '\n'; + }); + + if (!parts.length) continue; + + const relative = path.relative(root, file).replace(/\\/g, '/'); + chunks.push(`/* ${relative} */\n${parts.join('\n\n')}`); + fs.writeFileSync(file, next.replace(/\n{3,}/g, '\n\n')); + } + + if (!chunks.length) return false; + + const banner = '/* Component CSS compiled with Tailwind CSS v3. Moved out of stylesheet tags. */\n\n'; + fs.writeFileSync(componentsFile, banner + chunks.join('\n\n') + '\n'); + return true; +} + +function assemble() { + const critical = fs.readFileSync(criticalFile, 'utf8').trim(); + const tailwind = fs.readFileSync(tailwindSource, 'utf8').trim(); + const components = fs.existsSync(componentsFile) ? fs.readFileSync(componentsFile, 'utf8').trim() : ''; + + fs.writeFileSync( + entry, + `${critical}\n\n${tailwind}\n\n${components}\n` + ); +} + +function writeSnippet() { + const css = fs.readFileSync(output, 'utf8').trim(); + if (css.includes('{{') || css.includes('{%') || css.includes('')) { + console.error('Minified CSS contains Liquid or a closing style tag, so it cannot be printed inline.'); + process.exit(1); + } + + const snippet = `{% doc %} + Prints the minified Tailwind CSS v3 bundle in the document head. + Generated by scripts/build-css.js. Do not edit by hand. +{% enddoc %} + +`; + fs.writeFileSync(snippetFile, snippet); + if (fs.existsSync(publicCss)) fs.unlinkSync(publicCss); +} + +function compile() { + if (!fs.existsSync(cli)) { + console.error('Missing tailwindcss. Run npm install in the theme folder.'); + process.exit(1); + } + + const watch = process.argv.includes('--watch'); + const args = [cli, '-i', entry, '-o', output, '--minify']; + if (watch) args.push('--watch'); + + if (watch) { + fs.watchFile(output, { interval: 400 }, () => { + if (fs.existsSync(output)) writeSnippet(); + }); + } + + const result = spawnSync(process.execPath, args, { cwd: root, stdio: 'inherit' }); + if (!watch && result.status === 0) writeSnippet(); + if (result.status !== 0) process.exit(result.status || 1); +} + +extractStylesheets(); +assemble(); +compile(); diff --git a/sections/bestsellers.liquid b/sections/bestsellers.liquid index 74cc960..14d0323 100644 --- a/sections/bestsellers.liquid +++ b/sections/bestsellers.liquid @@ -119,610 +119,6 @@ -{% stylesheet %} - .bestsellers { - padding: 50px 0; - color: #000; - background: #fff; - font-family: Archivo, sans-serif; - } - - .bestsellers__header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 16px; - margin-bottom: 20px; - padding: 0 100px; - } - - .bestsellers__heading { - margin: 0; - color: #000; - font-family: "Roc Grotesk", Archivo, sans-serif; - font-size: 30px; - font-weight: 500; - line-height: normal; - text-transform: uppercase; - } - - .bestsellers__tools { - display: flex; - flex-shrink: 0; - align-items: center; - gap: 10px; - } - - .bestsellers__more { - padding: 0 10px; - color: #000; - font-size: 16px; - font-weight: 500; - line-height: normal; - text-decoration: none; - } - - .bestsellers__arrows { - display: flex; - align-items: center; - gap: 20px; - } - - .bestsellers__arrow { - display: grid; - width: 30px; - height: 30px; - place-items: center; - padding: 0; - border: 0; - border-radius: 60px; - background: #9dd6c7; - cursor: pointer; - } - - .bestsellers__arrow:disabled { - cursor: default; - opacity: 0.35; - } - - .bestsellers__arrow-icon { - display: block; - width: 20px; - height: 20px; - } - - .bestsellers__arrow--prev .bestsellers__arrow-icon { - transform: rotate(-90deg); - } - - .bestsellers__arrow--next .bestsellers__arrow-icon { - transform: rotate(90deg); - } - - .bestsellers__body { - display: flex; - align-items: flex-start; - gap: 28px; - } - - .bestsellers__promo { - position: relative; - display: block; - flex: 0 0 486px; - width: 486px; - height: 550px; - overflow: hidden; - border-radius: 0 10px 10px 0; - color: inherit; - text-decoration: none; - } - - .bestsellers__promo-image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .bestsellers__slider { - display: flex; - min-width: 0; - flex: 1 1 auto; - flex-direction: column; - align-self: stretch; - } - - .bestsellers__progress { - position: relative; - height: 1px; - margin-top: auto; - background: #e6e6e6; - } - - .bestsellers__progress-bar { - position: absolute; - top: 0; - left: 0; - height: 2px; - background: #000; - } - - .bestsellers__viewport { - min-width: 0; - min-height: 493px; - flex: 1 1 auto; - overflow-x: auto; - scroll-snap-type: x mandatory; - scrollbar-width: none; - cursor: grab; - } - - .bestsellers[data-feed]:not([data-sorted="true"]) .bestsellers__card { - visibility: hidden; - } - - .bestsellers__viewport::-webkit-scrollbar { - display: none; - } - - .bestsellers__viewport.is-dragging { - cursor: grabbing; - scroll-snap-type: none; - } - - .bestsellers__track { - display: flex; - gap: 30px; - width: max-content; - padding-right: 100px; - } - - .bestsellers__card { - display: flex; - flex: 0 0 386px; - flex-direction: column; - gap: 20px; - width: 386px; - scroll-snap-align: start; - } - - .bestsellers__media { - position: relative; - width: 386px; - height: 386px; - overflow: hidden; - border-radius: 10px; - background: #fff; - } - - .bestsellers__media-link { - position: absolute; - inset: 0; - display: block; - } - - .bestsellers__image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .bestsellers__image--hover { - position: absolute; - inset: 0; - opacity: 0; - transition: opacity 0.35s ease; - } - - .bestsellers__media:hover .bestsellers__image--hover, - .bestsellers__media:focus-within .bestsellers__image--hover { - opacity: 1; - } - - @media (prefers-reduced-motion: reduce) { - .bestsellers__image--hover { - transition: none; - } - } - - .bestsellers__image--empty { - background: #f3f3f3; - } - - .bestsellers__badges { - position: absolute; - top: 10px; - left: 10px; - z-index: 1; - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 4px; - } - - .bestsellers__badge { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 3px 5px; - border-radius: 2px; - color: #000; - font-size: 10px; - font-weight: 300; - line-height: normal; - text-transform: uppercase; - } - - .bestsellers__badge--best { - background: #bfffb2; - } - - .bestsellers__badge--skin { - background: #f7c585; - } - - .bestsellers__wish { - position: absolute; - top: 20px; - right: 20px; - z-index: 1; - display: grid; - width: 25px; - height: 25px; - place-items: center; - padding: 0; - border: 0; - background: transparent; - cursor: pointer; - } - - .bestsellers__wish-icon { - display: block; - width: 25px; - height: 25px; - } - - .bestsellers__wish-icon svg { - display: block; - } - - .bestsellers__wish.is-active svg path { - fill: #000; - } - - .bestsellers__info { - display: flex; - flex-direction: column; - gap: 15px; - } - - .bestsellers__copy { - display: flex; - flex-direction: column; - gap: 5px; - } - - .bestsellers__title { - display: block; - overflow: hidden; - color: #000; - font-size: 18px; - font-weight: 700; - line-height: normal; - text-decoration: none; - text-overflow: ellipsis; - white-space: nowrap; - } - - .bestsellers__subtitle, - .bestsellers__reviews, - .bestsellers__empty { - margin: 0; - } - - .bestsellers__subtitle { - overflow: hidden; - color: #808181; - font-size: 14px; - font-weight: 300; - line-height: normal; - text-overflow: ellipsis; - white-space: nowrap; - } - - .bestsellers__rating { - display: flex; - align-items: center; - gap: 10px; - } - - .bestsellers__stars { - display: flex; - align-items: center; - gap: 1px; - } - - .bestsellers__star { - display: block; - width: 10px; - height: 10px; - } - - .bestsellers__star svg { - display: block; - } - - .bestsellers__star.is-off { - opacity: 0.25; - } - - .bestsellers__reviews { - color: #000; - font-size: 9px; - font-weight: 300; - line-height: normal; - white-space: nowrap; - } - - .bestsellers__prices { - display: flex; - align-items: center; - gap: 32px; - } - - .bestsellers__price, - .bestsellers__compare { - font-size: 16px; - line-height: normal; - } - - .bestsellers__price { - font-weight: 700; - } - - .bestsellers__compare { - color: #808181; - font-weight: 400; - text-decoration: line-through; - } - - .bestsellers__actions { - position: absolute; - right: 20px; - bottom: 10px; - left: 20px; - z-index: 2; - display: flex; - gap: 10px; - margin: 0; - opacity: 0; - pointer-events: none; - transition: opacity 0.25s ease; - } - - .bestsellers__media:hover .bestsellers__actions, - .bestsellers__media:focus-within .bestsellers__actions { - opacity: 1; - pointer-events: auto; - } - - .bestsellers__bag, - .bestsellers__buy { - display: flex; - align-items: center; - justify-content: center; - height: 50px; - padding: 15px; - border: 0; - border-radius: 60px; - box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); - cursor: pointer; - } - - .bestsellers__bag { - flex: 0 0 50px; - width: 50px; - background: #000; - } - - .bestsellers__bag img { - display: block; - width: 25px; - height: 25px; - } - - .bestsellers__buy { - flex: 1 1 auto; - background: #9dd6c7; - color: #000; - font-family: Archivo, sans-serif; - font-size: 16px; - font-weight: 300; - line-height: normal; - } - - .bestsellers__bag:disabled, - .bestsellers__buy:disabled { - cursor: default; - opacity: 0.55; - } - - .bestsellers__empty { - color: #000; - font-size: 14px; - font-weight: 400; - } - - .bestsellers__more:focus-visible, - .bestsellers__bag:focus-visible, - .bestsellers__buy:focus-visible, - .bestsellers__arrow:focus-visible, - .bestsellers__wish:focus-visible, - .bestsellers__title:focus-visible, - .bestsellers__media-link:focus-visible, - .bestsellers__promo:focus-visible { - outline: 2px solid #000; - outline-offset: 2px; - } - - @media (max-width: 1439px) { - .bestsellers__header { - padding-inline: 40px; - } - - .bestsellers__track { - padding-right: 40px; - } - } - - @media (max-width: 1024px) { - .bestsellers { - padding-top: 40px; - } - - .bestsellers__header { - margin-bottom: 10px; - padding-inline: 15px; - } - - .bestsellers__heading { - font-size: 20px; - } - - .bestsellers__more { - padding: 0; - font-size: 14px; - } - - .bestsellers__arrows { - display: none; - } - - .bestsellers__body { - flex-direction: column; - gap: 20px; - } - - .bestsellers__promo { - flex-basis: auto; - width: calc(100% - 30px); - height: 460px; - margin-inline: 15px; - border-radius: 10px; - } - - .bestsellers__progress { - margin-top: 24px; - } - - .bestsellers__viewport { - width: 100%; - min-height: 370px; - cursor: auto; - } - - .bestsellers__track { - gap: 20px; - padding-right: 15px; - padding-left: 15px; - } - - .bestsellers__card { - flex-basis: 245px; - gap: 10px; - width: 245px; - } - - .bestsellers__media { - width: 245px; - height: 244px; - } - - .bestsellers__badges { - top: 5px; - left: 5px; - } - - .bestsellers__badge { - font-size: 7px; - } - - .bestsellers__wish { - top: 10px; - right: 11px; - } - - .bestsellers__info { - gap: 10px; - } - - .bestsellers__title { - font-size: 14px; - } - - .bestsellers__subtitle { - font-size: 10px; - } - - .bestsellers__reviews { - position: absolute; - width: 1px; - height: 1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - } - - .bestsellers__rating { - position: relative; - } - - .bestsellers__price, - .bestsellers__compare { - font-size: 14px; - } - - .bestsellers__prices { - gap: 16px; - } - - .bestsellers__actions { - right: 8px; - bottom: 8px; - left: 8px; - gap: 6px; - opacity: 1; - pointer-events: auto; - } - - .bestsellers__bag, - .bestsellers__buy { - height: 36px; - padding: 0 8px; - } - - .bestsellers__bag { - flex-basis: 36px; - width: 36px; - } - - .bestsellers__bag img { - width: 18px; - height: 18px; - } - - .bestsellers__buy { - font-size: 12px; - } - } - - @media (prefers-reduced-motion: reduce) { - .bestsellers__viewport { - scroll-behavior: auto; - } - } -{% endstylesheet %} - {% javascript %} (() => { const wishlistKey = 'seasons-wishlist'; @@ -730,18 +126,23 @@ const readWishlist = () => { try { const stored = JSON.parse(window.localStorage.getItem(wishlistKey)); - return Array.isArray(stored) ? stored.map(String) : []; + if (!Array.isArray(stored)) return []; + return stored.map((item) => { + if (item && typeof item === 'object') return { id: String(item.id || ''), handle: String(item.handle || '') }; + return { id: String(item), handle: '' }; + }).filter((item) => item.id); } catch (error) { return []; } }; - const writeWishlist = (ids) => { - window.localStorage.setItem(wishlistKey, JSON.stringify(ids)); + const writeWishlist = (items) => { + window.localStorage.setItem(wishlistKey, JSON.stringify(items)); + document.dispatchEvent(new CustomEvent('seasons:wishlist')); }; const applyWishlist = (root) => { - const saved = readWishlist(); + const saved = readWishlist().map((item) => item.id); root.querySelectorAll('[data-wishlist]').forEach((button) => { const active = saved.includes(String(button.dataset.productId)); button.classList.toggle('is-active', active); @@ -954,12 +355,19 @@ if (!root) return; const id = String(wish.dataset.productId); + const handle = String(wish.dataset.productHandle || ''); const saved = readWishlist(); - const next = saved.includes(id) ? saved.filter((item) => item !== id) : saved.concat(id); + const next = saved.some((item) => item.id === id) + ? saved.filter((item) => item.id !== id) + : saved.concat({ id, handle }); writeWishlist(next); applyWishlist(root); }); + document.addEventListener('seasons:wishlist', () => { + document.querySelectorAll('[data-bestsellers]').forEach((root) => applyWishlist(root)); + }); + document.addEventListener('submit', async (event) => { const form = event.target; if (!(form instanceof HTMLFormElement) || !form.classList.contains('bestsellers__form')) return; diff --git a/sections/cart-drawer.liquid b/sections/cart-drawer.liquid index b48e246..d881efa 100644 --- a/sections/cart-drawer.liquid +++ b/sections/cart-drawer.liquid @@ -47,7 +47,7 @@ endunless assign shown = shown | plus: 1 - assign add_label = 'cart_drawer.add' | t + assign add_label = 'cart_drawer.add_short' | t echo '
- {% if shown > 0 %} - - {% endif %} - @@ -216,425 +214,6 @@
-{% stylesheet %} - .shopify-section.cart-drawer-section { - display: block; - width: 0; - height: 0; - overflow: visible; - position: static; - } - - .cart-drawer { - position: fixed; - inset: 0; - z-index: 80; - visibility: hidden; - pointer-events: none; - } - - .cart-drawer.is-open, - .cart-drawer.is-closing { - visibility: visible; - } - - .cart-drawer.is-open { - pointer-events: auto; - } - - .cart-drawer__backdrop { - position: absolute; - inset: 0; - border: 0; - padding: 0; - background: rgba(32, 36, 36, 0.46); - opacity: 0; - cursor: pointer; - transition: opacity 0.32s ease; - } - - .cart-drawer.is-open .cart-drawer__backdrop { - opacity: 1; - } - - .cart-drawer__panel { - position: absolute; - top: 0; - right: 0; - display: flex; - width: min(980px, 100%); - height: 100%; - background: #fff; - color: #000; - box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12); - transform: translate3d(100%, 0, 0); - transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1); - } - - .cart-drawer.is-open .cart-drawer__panel { - transform: translate3d(0, 0, 0); - } - - .cart-drawer__layout { - display: grid; - grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); - width: 100%; - min-height: 0; - } - - .cart-drawer__layout:not(:has(.cart-drawer__recs)) { - grid-template-columns: 1fr; - } - - .cart-drawer__recs, - .cart-drawer__items { - overscroll-behavior: contain; - } - - .cart-drawer__recs { - overflow: auto; - padding: 28px 24px 32px; - border-right: 1px solid #ededed; - } - - .cart-drawer__main { - display: flex; - flex-direction: column; - min-width: 0; - min-height: 0; - padding: 28px 28px 0; - } - - .cart-drawer__heading { - margin: 0; - font-size: 13px; - font-weight: 700; - letter-spacing: 0.08em; - line-height: 1.3; - text-transform: uppercase; - } - - .cart-drawer__head { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 16px; - } - - .cart-drawer__close, - .cart-drawer__remove, - .cart-drawer__add, - .cart-drawer__qty button { - border: 0; - background: transparent; - color: inherit; - cursor: pointer; - } - - .cart-drawer__close { - display: inline-flex; - flex: 0 0 auto; - align-items: center; - justify-content: center; - width: 32px; - height: 32px; - margin: -6px -6px 0 0; - padding: 0; - } - - .cart-drawer__shipping { - margin-top: 18px; - } - - .cart-drawer__shipping p { - margin: 0 0 10px; - font-size: 13px; - font-weight: 400; - line-height: 1.4; - } - - .cart-drawer__shipping span { - color: #1aa37a; - font-weight: 700; - } - - .cart-drawer__bar { - height: 4px; - overflow: hidden; - border-radius: 999px; - background: #ececec; - } - - .cart-drawer__bar-fill { - display: block; - width: var(--progress); - height: 100%; - border-radius: inherit; - background: #9dd6c7; - } - - .cart-drawer__items { - flex: 1; - overflow: auto; - margin-top: 8px; - } - - .cart-drawer__empty { - margin: 48px 0; - color: #666; - font-size: 14px; - font-weight: 400; - text-align: center; - } - - .cart-drawer__line, - .cart-drawer__rec { - display: grid; - align-items: center; - gap: 14px; - } - - .cart-drawer__line { - grid-template-columns: 72px minmax(0, 1fr) auto; - padding: 18px 0; - } - - .cart-drawer__rec { - grid-template-columns: 56px minmax(0, 1fr); - align-items: start; - padding: 18px 0; - border-bottom: 1px solid #f1f1f1; - } - - .cart-drawer__thumb { - display: block; - overflow: hidden; - width: 72px; - height: 72px; - background: #f7f7f7; - } - - .cart-drawer__thumb--rec { - width: 56px; - height: 64px; - } - - .cart-drawer__img { - display: block; - width: 100%; - height: 100%; - object-fit: contain; - } - - .cart-drawer__line-title, - .cart-drawer__rec-title { - display: block; - color: inherit; - font-size: 14px; - font-weight: 500; - line-height: 1.35; - text-decoration: none; - } - - .cart-drawer__rec-title { - font-size: 13px; - font-weight: 400; - } - - .cart-drawer__variant { - margin: 2px 0 0; - color: #777; - font-size: 12px; - font-weight: 400; - } - - .cart-drawer__price { - margin: 6px 0 0; - font-size: 14px; - font-weight: 600; - line-height: 1.2; - } - - .cart-drawer__add { - display: inline-flex; - align-items: center; - gap: 8px; - margin-top: 8px; - padding: 0; - font-size: 11px; - font-weight: 500; - letter-spacing: 0.04em; - line-height: 1; - text-transform: uppercase; - } - - .cart-drawer__qty { - display: inline-flex; - align-items: center; - height: 32px; - margin-top: 10px; - border: 1px solid #e1e1e1; - border-radius: 4px; - } - - .cart-drawer__qty button { - width: 32px; - height: 32px; - padding: 0; - font-size: 16px; - line-height: 1; - } - - .cart-drawer__qty button:disabled { - color: #bbb; - cursor: default; - } - - .cart-drawer__qty span { - min-width: 16px; - font-size: 14px; - text-align: center; - } - - .cart-drawer__remove { - display: inline-flex; - align-items: center; - justify-content: center; - width: 32px; - height: 32px; - padding: 0; - } - - .cart-drawer__footer { - flex: 0 0 auto; - padding: 16px 0 24px; - background: #fff; - } - - .cart-drawer__subtotal { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: 16px; - margin: 0; - font-size: 16px; - font-weight: 500; - } - - .cart-drawer__subtotal strong { - font-weight: 600; - } - - .cart-drawer__note { - margin: 8px 0 0; - color: #6d6d6d; - font-size: 12px; - font-weight: 300; - line-height: 1.4; - text-align: center; - } - - .cart-drawer__actions { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 12px; - margin-top: 16px; - } - - .cart-drawer__actions form { - display: contents; - } - - .cart-drawer__checkout, - .cart-drawer__view { - display: flex; - align-items: center; - justify-content: center; - height: 48px; - border-radius: 999px; - font-size: 13px; - font-weight: 600; - letter-spacing: 0.04em; - line-height: 1; - text-align: center; - text-decoration: none; - text-transform: uppercase; - } - - .cart-drawer__checkout { - border: 0; - background: #9dd6c7; - color: #000; - cursor: pointer; - } - - .cart-drawer__checkout:disabled { - opacity: 0.45; - cursor: default; - } - - .cart-drawer__view { - border: 1px solid #111; - background: #fff; - color: #000; - } - - .cart-drawer.is-busy .cart-drawer__layout { - pointer-events: none; - } - - html.cart-drawer-open, - html.cart-drawer-open body { - overflow: hidden; - } - - @media (max-width: 767px) { - .cart-drawer__panel { - width: 100%; - } - - .cart-drawer__layout, - .cart-drawer__layout:not(:has(.cart-drawer__recs)) { - display: flex; - flex-direction: column; - overflow: auto; - } - - .cart-drawer__recs { - order: 2; - border-right: 0; - border-top: 1px solid #ededed; - } - - .cart-drawer__main { - order: 1; - min-height: 100%; - padding: 20px 16px 0; - } - - .cart-drawer__items { - overflow: visible; - } - - .cart-drawer__footer { - position: sticky; - bottom: 0; - padding-bottom: 20px; - } - - .cart-drawer__actions { - grid-template-columns: 1fr; - } - } - - @media (prefers-reduced-motion: reduce) { - .cart-drawer__backdrop, - .cart-drawer__panel { - transition: none; - } - } -{% endstylesheet %} - {% javascript %} (() => { if (window.__seasonCartDrawer) return; @@ -666,6 +245,47 @@ }); }; + const mobileQuery = window.matchMedia('(max-width: 767px)'); + let floaterObserver = null; + + const parkFloaters = (root) => { + if (!mobileQuery.matches) return; + const nodes = root === document.body ? document.body.querySelectorAll('*') : [root, ...root.querySelectorAll('*')]; + nodes.forEach((node) => { + if (!(node instanceof HTMLElement) || node.closest('[data-cart-drawer]')) return; + if (node.hasAttribute('data-cart-parked')) return; + const style = window.getComputedStyle(node); + if (style.position !== 'fixed') return; + const rect = node.getBoundingClientRect(); + if (rect.width < 24 || rect.height < 24) return; + const namedWidget = node.id === 'aitana-fab' || node.id === 'aitana-overlay' || node.id === 'wa-coupon-fab' || node.id === 'wa-coupon-overlay'; + const low = rect.top > window.innerHeight * 0.4; + const side = rect.left < 160 || rect.right > window.innerWidth - 160; + if (!namedWidget && (!low || !side)) return; + node.setAttribute('data-cart-parked', ''); + }); + }; + + const watchFloaters = () => { + parkFloaters(document.body); + if (floaterObserver) return; + floaterObserver = new MutationObserver((records) => { + if (!document.documentElement.classList.contains('cart-drawer-open')) return; + records.forEach((record) => { + record.addedNodes.forEach((node) => { + if (node instanceof HTMLElement) parkFloaters(node); + }); + }); + }); + floaterObserver.observe(document.body, { childList: true, subtree: true }); + }; + + const releaseFloaters = () => { + document.querySelectorAll('[data-cart-parked]').forEach((node) => { + node.removeAttribute('data-cart-parked'); + }); + }; + const openDrawer = () => { const drawer = getDrawer(); if (!drawer) return; @@ -674,6 +294,7 @@ drawer.classList.add('is-open'); drawer.setAttribute('aria-hidden', 'false'); document.documentElement.classList.add('cart-drawer-open'); + watchFloaters(); document.querySelectorAll('[data-cart-open]').forEach((button) => { button.setAttribute('aria-expanded', 'true'); }); @@ -687,6 +308,7 @@ drawer.classList.add('is-closing'); drawer.setAttribute('aria-hidden', 'true'); document.documentElement.classList.remove('cart-drawer-open'); + releaseFloaters(); document.querySelectorAll('[data-cart-open]').forEach((button) => { button.setAttribute('aria-expanded', 'false'); }); diff --git a/sections/cart.liquid b/sections/cart.liquid index 6d7e498..6e51cbf 100644 --- a/sections/cart.liquid +++ b/sections/cart.liquid @@ -1,37 +1,143 @@ -{% comment %} - This section is used in the cart template to render /cart page with an - overview of the items in customer's cart. +{% liquid + assign free_shipping = section.settings.free_shipping | default: 699 + assign threshold = free_shipping | times: 100 + assign progress = 0 + assign remaining = 0 + assign unlocked = false - https://shopify.dev/docs/storefronts/themes/architecture/templates/cart -{% endcomment %} + if threshold > 0 + if cart.total_price >= threshold + assign progress = 100 + assign unlocked = true + else + assign remaining = threshold | minus: cart.total_price + assign progress = cart.total_price | times: 100 | divided_by: threshold + endif + endif +%} -

{{ 'cart.title' | t }}

+
+
+

{{ 'cart.title' | t }}

+ + {% if cart.item_count == 0 %} +
+

{{ 'cart_drawer.empty' | t }}

+ {{ 'cart.continue' | t }} +
+ {% else %} +
+
+ {% for item in cart.items %} +
+ + {% if item.image %} + {{ + item.image + | image_url: width: 240 + | image_tag: + loading: 'lazy', + alt: item.product.title, + class: 'cart-page__img', + widths: '96, 160, 240', + sizes: '96px' + }} + {% endif %} + + +
+ {{ item.product.title | escape }} + {% unless item.variant.title == 'Default Title' %} +

{{ item.variant.title | escape }}

+ {% endunless %} +

+ {{ item.final_line_price | money_without_trailing_zeros }} + {% if item.original_line_price > item.final_line_price %} + {{ item.original_line_price | money_without_trailing_zeros }} + {% endif %} +

+
+ {% if item.quantity > 1 %} + − + {% else %} + + {% endif %} + {{ item.quantity }} + + +
+
+ + + + +
+ {% endfor %} +
+ + +
+ {% endif %} +
+
-
- - {% for item in cart.items %} - - - - - - {% endfor %} -
- {% render 'image', image: item.image, url: item.url %} - -

{{ item.product.title }}

- {{ 'cart.remove' | t | link_to: item.url_to_remove }} -
- - -
- -
{% schema %} { "name": "t:general.cart", - "settings": [] + "settings": [ + { + "type": "number", + "id": "free_shipping", + "label": "t:cart_drawer.free_shipping", + "info": "t:cart_drawer.free_shipping_info", + "default": 699 + } + ] } {% endschema %} diff --git a/sections/collection.liquid b/sections/collection.liquid index cf23013..0123b17 100644 --- a/sections/collection.liquid +++ b/sections/collection.liquid @@ -14,6 +14,42 @@ assign banner_title = collection.title endif + assign banner_asset = blank + case collection.handle + when 'all-products' + assign banner_asset = 'banner-todos-productos.avif' + when 'proteccion-solar-1' + assign banner_asset = 'banner-proteccion-solar.avif' + when '4-protege-bloqueadores-solares' + assign banner_asset = 'banner-protectores.avif' + when 'hidratantes' + assign banner_asset = 'banner-hidratantes.avif' + when 'limpiadores' + assign banner_asset = 'banner-limpiadores.avif' + when 'mascarillas' + assign banner_asset = 'banner-mascarillas.avif' + when 'serum' + assign banner_asset = 'banner-serums.avif' + when 'kits-skincare-facial' + assign banner_asset = 'banner-kits.avif' + when 'piel-mixta-grasa' + assign banner_asset = 'banner-piel-mixta-grasa.avif' + when 'piel-grasa' + assign banner_asset = 'banner-piel-grasa.avif' + when 'piel-seca-1' + assign banner_asset = 'banner-piel-seca.avif' + when 'control-grasa' + assign banner_asset = 'banner-control-grasa.avif' + when 'acne-1' + assign banner_asset = 'banner-preocupacion-acne.avif' + when 'hidratacion' + assign banner_asset = 'banner-preocupacion-hidratacion.avif' + when 'antiedad-1' + assign banner_asset = 'banner-antiedad.avif' + when 'aclarar' + assign banner_asset = 'banner-manchas.avif' + endcase + assign banner_text = collection.metafields.custom.banner_texto.value | default: collection.metafields.custom.banner_text.value assign banner_text_is_html = false if banner_text == blank @@ -35,6 +71,10 @@ assign show_hero = true endif + if banner_asset != blank + assign show_hero = true + endif + if show_grid_banner and grid_image == blank assign grid_image = collection.metafields.custom.banner_imagen.value | default: collection.metafields.custom.banner_image.value endif @@ -65,14 +105,28 @@ data-cart-add-url="{{ routes.cart_add_url }}.js" > {% if show_hero %} -
-{% stylesheet %} - .product { - box-sizing: border-box; - width: 100%; - padding: 24px 50px 88px; - background: #fff; - color: #111; - font-family: inherit; - } - - .product__hero { - display: grid; - grid-template-columns: minmax(0, 1.6fr) minmax(340px, 640px); - align-items: start; - gap: 10px; - } - - .product__details { - position: sticky; - top: 24px; - align-self: start; - min-width: 0; - padding: 8px 10px 0 36px; - } - - .product__gallery { - display: flex; - flex-direction: column; - gap: 10px; - min-width: 0; - } - - .product__main-image, - .product__thumbs img { - display: block; - width: 100%; - height: auto; - aspect-ratio: 1; - object-fit: cover; - background: #f4f4f4; - } - - .product__thumbs { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 10px; - } - - .product__thumb { - min-width: 0; - } - - .product__thumb--main, - .product__gallery-progress { - display: none; - } - - .product__thumbs img { - -webkit-user-drag: none; - user-select: none; - } - - .product__badges { - display: flex; - flex-wrap: wrap; - gap: 8px; - margin: 0 0 12px; - } - - .product__badge { - display: inline-flex; - align-items: center; - height: 22px; - padding: 0 8px; - border-radius: 4px; - font-size: 12px; - font-weight: 500; - line-height: 1; - } - - .product__badge--best { - background: #bfffb2; - } - - .product__badge--skin { - background: #f7c585; - } - - .product__title { - margin: 0; - font-size: 32px; - line-height: 1.1; - font-weight: 700; - } - - .product__subtitle { - margin: 6px 0 0; - color: #808181; - font-size: 16px; - font-weight: 300; - } - - .product__rating, - .product__summary { - display: flex; - align-items: center; - gap: 8px; - } - - .product__rating { - margin-top: 10px; - } - - .product__reviews-count, - .product__based { - margin: 0; - color: #808181; - font-size: 14px; - font-weight: 300; - } - - .product__stars { - display: inline-flex; - gap: 2px; - color: #111; - } - - .product__star.is-off { - color: #d5d5d5; - } - - .product__price { - display: flex; - align-items: baseline; - gap: 10px; - margin: 12px 0 0; - font-size: 24px; - font-weight: 700; - } - - .product__price s { - color: #808181; - font-size: 18px; - font-weight: 400; - } - - .product__excerpt { - margin: 12px 0 0; - font-size: 16px; - font-weight: 300; - line-height: 1.45; - } - - .product__options-label { - margin: 18px 0 0; - font-size: 16px; - font-weight: 500; - } - - .product__swatches { - display: flex; - gap: 12px; - margin-top: 10px; - overflow-x: auto; - } - - .product__swatch { - width: 140px; - flex: none; - padding: 10px 10px 12px; - border: 1px solid #e6e6e6; - border-radius: 10px; - background: #fff; - text-align: center; - cursor: pointer; - } - - .product__swatch.is-selected { - border-color: #111; - } - - .product__swatch img { - display: block; - width: 120px; - height: 120px; - margin: 0 auto 8px; - object-fit: cover; - } - - .product__swatch span { - display: block; - font-size: 14px; - font-weight: 400; - } - - .product__trust { - display: flex; - flex-direction: column; - gap: 15px; - margin: 18px 0; - padding: 15px 20px; - border: 1px solid #ececec; - border-radius: 12px; - list-style: none; - } - - .product__trust-row { - display: flex; - align-items: center; - gap: 12px; - font-size: 15px; - font-weight: 300; - line-height: 20px; - } - - .product__trust-icon { - display: flex; - flex: none; - width: 20px; - height: 20px; - } - - .product__trust-icon svg { - width: 20px; - height: 20px; - } - - .product__purchase { - display: flex; - gap: 12px; - } - - .product__qty { - display: flex; - flex: none; - align-items: center; - justify-content: space-between; - width: 160px; - height: 50px; - padding: 0 14px; - border: 1px solid #111; - border-radius: 60px; - } - - .product__qty button, - .product__add, - .product__buy, - .product__favorite, - .product__more { - font-family: inherit; - } - - .product__qty button { - width: 28px; - height: 28px; - border: 0; - background: transparent; - font-size: 20px; - line-height: 1; - cursor: pointer; - } - - .product__qty input { - width: 42px; - border: 0; - background: transparent; - text-align: center; - font-size: 16px; - -moz-appearance: textfield; - } - - .product__qty input::-webkit-outer-spin-button, - .product__qty input::-webkit-inner-spin-button { - margin: 0; - -webkit-appearance: none; - } - - .product__add, - .product__buy { - height: 50px; - border-radius: 60px; - font-size: 16px; - font-weight: 300; - cursor: pointer; - } - - .product__add { - flex: 1; - border: 0; - background: #111; - color: #fff; - } - - .product__buy { - width: 100%; - margin-top: 10px; - border: 1px solid #111; - background: #fff; - color: #111; - } - - .product__add:disabled, - .product__buy:disabled { - cursor: not-allowed; - opacity: 0.45; - } - - .product__favorite { - display: flex; - align-items: center; - justify-content: center; - gap: 8px; - width: 100%; - height: 50px; - margin-top: 4px; - border: 0; - background: transparent; - font-size: 16px; - font-weight: 300; - cursor: pointer; - } - - .product__favorite.is-active svg path { - fill: currentColor; - } - - .product__accordions { - margin-top: 8px; - border-top: 1px solid #ececec; - } - - .product__accordion { - border-bottom: 1px solid #ececec; - } - - .product__accordion summary { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - min-height: 52px; - font-size: 16px; - font-weight: 300; - list-style: none; - cursor: pointer; - } - - .product__accordion summary::-webkit-details-marker { - display: none; - } - - .product__chevron { - flex: none; - transition: transform 0.2s ease; - } - - .product__accordion[open] .product__chevron { - transform: rotate(180deg); - } - - .product__accordion-body { - padding: 0 0 16px; - color: #333; - font-size: 15px; - font-weight: 300; - line-height: 1.5; - } - - .product__accordion-body img { - max-width: 100%; - height: auto; - } - - .product__routine { - margin-top: 28px; - } - - .product__routine-title, - .product__block-title { - margin: 0 0 16px; - font-weight: 500; - } - - .product__routine-title { - font-size: 16px; - } - - .product__block-title { - margin-bottom: 24px; - font-size: 32px; - } - - .product__routine-grid, - .product__also-grid { - display: grid; - gap: 20px; - } - - .product__routine-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .product__also-grid { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } - - .product__routine .collection-card__title { - font-size: 15px; - } - - .product__routine .collection-card__subtitle, - .product__routine .collection-card__reviews { - font-size: 12px; - } - - .product__compare { - display: flex; - height: 550px; - margin-top: 56px; - overflow: hidden; - border-radius: 16px; - position: relative; - } - - .product__compare-pane { - position: relative; - flex: 1; - min-width: 0; - } - - .product__compare-pane img { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .product__compare-label { - position: absolute; - top: 24px; - left: 24px; - display: inline-flex; - align-items: center; - height: 44px; - padding: 0 22px; - border-radius: 999px; - background: #fff; - font-size: 16px; - font-weight: 500; - } - - .product__compare-label--after { - right: 24px; - left: auto; - } - - .product__compare-mark { - position: absolute; - top: 50%; - left: 50%; - width: min(280px, 28%); - height: auto; - transform: translate(-50%, -50%); - filter: brightness(0) invert(1); - pointer-events: none; - } - - .product__also { - margin-top: 72px; - } - - .product:has(.product__reviews) { - padding-bottom: 0; - } - - .product__reviews { - margin: 72px -50px 0; - padding: 100px 100px 80px; - background: linear-gradient(180deg, #f9f9fa 0%, #e8fff9 100%); - } - - .product__reviews-head { - display: flex; - flex-direction: column; - margin-bottom: 8px; - } - - .product__reviews-title { - margin: 0 0 60px; - font-size: 30px; - font-weight: 500; - line-height: 1.2; - text-transform: uppercase; - } - - .product__reviews-bar { - display: flex; - align-items: center; - justify-content: center; - gap: 100px; - } - - .product__reviews-head .product__summary { - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 10px; - margin: 0; - } - - .product__summary-score { - display: flex; - align-items: center; - gap: 8px; - } - - .product__reviews .product__stars { - gap: 1px; - } - - .product__reviews-head .product__score, - .product__reviews-head .product__based { - margin: 0; - color: #111; - font-size: 16px; - font-weight: 300; - } - - .product__reviews-rule { - flex: none; - width: 1px; - height: 70px; - background: #d9d9d9; - } - - .product__write { - flex: none; - width: 326px; - height: 50px; - padding: 0 28px; - border: 0; - border-radius: 60px; - background: #9dd6c7; - color: #111; - font: inherit; - font-size: 16px; - font-weight: 300; - cursor: pointer; - } - - .product__write-form { - display: none; - max-width: 640px; - margin: 20px 0 8px; - gap: 8px; - } - - .product__write-form.is-open { - display: grid; - } - - .product__write-label { - margin-top: 8px; - font-size: 14px; - font-weight: 500; - } - - .product__write-input { - width: 100%; - box-sizing: border-box; - padding: 12px 14px; - border: 1px solid #e5e5e5; - border-radius: 10px; - font: inherit; - font-weight: 300; - } - - .product__write-stars { - display: flex; - gap: 8px; - margin: 0; - padding: 0; - border: 0; - } - - .product__write-stars label { - display: inline-flex; - align-items: center; - gap: 4px; - font-size: 14px; - font-weight: 300; - } - - .product__write-success { - margin: 0; - font-size: 16px; - font-weight: 300; - } - - .product__score { - margin: 0; - font-size: 28px; - font-weight: 600; - } - - .product__summary { - justify-content: space-between; - align-items: flex-end; - margin-bottom: 8px; - } - - .product__review-list { - margin: 40px 140px 0; - } - - .product__review { - display: flex; - flex-direction: column; - gap: 10px; - padding: 20px 50px; - border-top: 1px solid #e6e6e6; - } - - .product__review:last-child { - border-bottom: 1px solid #e6e6e6; - } - - .product__review-person { - display: flex; - align-items: center; - gap: 10px; - } - - .product__avatar { - display: grid; - width: 55px; - height: 56px; - place-items: center; - border: 1px solid #ececec; - border-radius: 10px; - background: #fff; - color: #111; - } - - .product__review-name { - margin: 0; - font-size: 16px; - font-weight: 300; - } - - .product__review-text { - margin: 0; - font-size: 16px; - font-weight: 300; - line-height: 22px; - } - - .product__more { - display: block; - margin: 28px auto 0; - padding: 6px 10px; - border: 0; - background: transparent; - color: #111; - font-size: 16px; - font-weight: 500; - line-height: 1; - cursor: pointer; - } - - .product__more:disabled { - opacity: 0.5; - cursor: default; - } - - .product [hidden] { - display: none !important; - } - - @media (max-width: 1119px) { - .product { - padding: 16px 20px 64px; - } - - .product__hero { - grid-template-columns: 1fr; - } - - .product__details { - position: static; - padding: 24px 0 0; - } - - .product__also-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .product__reviews { - margin-left: -20px; - margin-right: -20px; - padding-left: 40px; - padding-right: 40px; - } - - .product__review-list { - margin-left: 0; - margin-right: 0; - } - - .product__review { - padding-left: 0; - padding-right: 0; - } - - .product__compare { - height: 360px; - } - } - - @media (max-width: 767px) { - .product { - padding: 12px 16px 56px; - } - - .product__gallery { - gap: 16px; - } - - .product__thumbs { - display: flex; - gap: 0; - overflow-x: auto; - overscroll-behavior-x: contain; - scroll-snap-type: x mandatory; - scrollbar-width: none; - cursor: grab; - -webkit-overflow-scrolling: touch; - } - - .product__thumbs::-webkit-scrollbar { - display: none; - } - - .product__thumbs.is-dragging { - cursor: grabbing; - scroll-snap-type: none; - } - - .product__gallery:has(.product__thumbs) .product__main { - display: none; - } - - .product__thumb { - flex: 0 0 100%; - scroll-snap-align: start; - } - - .product__thumb--main { - display: block; - } - - .product__gallery-progress { - display: block; - position: relative; - height: 2px; - background: #d9d9d9; - } - - .product__gallery-progress span { - position: absolute; - top: 0; - left: 0; - height: 100%; - width: calc(100% / var(--slides)); - background: #111; - transform: translateX(0); - } - - .product__title { - font-size: 26px; - } - - .product__block-title { - font-size: 24px; - } - - .product__compare { - height: 240px; - margin-top: 32px; - border-radius: 12px; - } - - .product__compare-label { - top: 12px; - left: 12px; - height: 34px; - padding: 0 14px; - font-size: 13px; - } - - .product__compare-label--after { - right: 12px; - } - - .product__compare-mark { - display: none; - } - - .product__also { - margin-top: 40px; - } - - .product__reviews { - margin: 40px -16px 0; - padding: 50px 15px 48px; - } - - .product__reviews-title { - margin-bottom: 20px; - font-size: 20px; - } - - .product__reviews-bar { - flex-direction: column; - align-items: stretch; - gap: 20px; - } - - .product__reviews-rule { - display: none; - } - - .product__write { - width: 100%; - height: 35px; - font-size: 12px; - font-weight: 500; - } - - .product__review-list { - margin: 30px 0 0; - } - - .product__review { - padding: 20px 0; - } - - .product__avatar { - width: 45px; - height: 45px; - } - - .product__review-name { - font-size: 15px; - } - - .product__more { - font-size: 15px; - } - - .product__summary { - align-items: flex-start; - flex-direction: column; - } - } -{% endstylesheet %} - {% javascript %} (() => { if (window.__seasonProduct) return; @@ -1470,6 +658,24 @@ } }; + const readWishlist = () => { + try { + const stored = JSON.parse(window.localStorage.getItem(wishlistKey)); + if (!Array.isArray(stored)) return []; + return stored.map((item) => { + if (item && typeof item === 'object') return { id: String(item.id || ''), handle: String(item.handle || '') }; + return { id: String(item), handle: '' }; + }).filter((item) => item.id); + } catch (error) { + return []; + } + }; + + const writeWishlist = (items) => { + window.localStorage.setItem(wishlistKey, JSON.stringify(items)); + document.dispatchEvent(new CustomEvent('seasons:wishlist')); + }; + const root = document.querySelector('[data-product-page]'); if (!root) return; @@ -1480,7 +686,7 @@ } const applyWish = () => { - const saved = readList(wishlistKey); + const saved = readWishlist().map((item) => item.id); root.querySelectorAll('[data-product-wish]').forEach((button) => { const active = saved.includes(String(button.dataset.productId)); button.classList.toggle('is-active', active); @@ -1491,6 +697,16 @@ }; applyWish(); + document.addEventListener('seasons:wishlist', applyWish); + + root.querySelectorAll('.product__accordion').forEach((details) => { + details.addEventListener('toggle', () => { + if (!details.open) return; + root.querySelectorAll('.product__accordion[open]').forEach((other) => { + if (other !== details) other.open = false; + }); + }); + }); const thumbs = root.querySelector('[data-product-thumbs]'); if (thumbs) { @@ -1543,10 +759,13 @@ const wish = event.target.closest('[data-product-wish]'); if (wish && root.contains(wish)) { const id = String(wish.dataset.productId || ''); + const handle = String(wish.dataset.productHandle || ''); if (!id) return; - const saved = readList(wishlistKey); - const next = saved.includes(id) ? saved.filter((item) => item !== id) : saved.concat(id); - window.localStorage.setItem(wishlistKey, JSON.stringify(next)); + const saved = readWishlist(); + const next = saved.some((item) => item.id === id) + ? saved.filter((item) => item.id !== id) + : saved.concat({ id, handle }); + writeWishlist(next); applyWish(); return; } @@ -1585,16 +804,28 @@ const available = option.dataset.available === 'true'; const addButton = root.querySelector('[data-add]'); const buyButton = root.querySelector('[data-buy]'); + const stickyAdd = root.querySelector('[data-sticky-add]'); + const stickyPrice = root.querySelector('[data-sticky-price]'); if (addButton) { addButton.disabled = !available; addButton.textContent = available ? addButton.dataset.label || addButton.textContent : addButton.dataset.soldOut || addButton.textContent; } + if (stickyAdd) { + stickyAdd.disabled = !available; + stickyAdd.textContent = available ? stickyAdd.dataset.label || stickyAdd.textContent : stickyAdd.dataset.soldOut || stickyAdd.textContent; + } + if (stickyPrice) stickyPrice.textContent = option.dataset.price || ''; if (buyButton) buyButton.disabled = !available; const main = root.querySelector('[data-main-image]'); if (main && option.dataset.image) { main.removeAttribute('srcset'); main.src = option.dataset.image; } + const stickyImage = root.querySelector('[data-sticky-image]'); + if (stickyImage && option.dataset.image) { + stickyImage.removeAttribute('srcset'); + stickyImage.src = option.dataset.image; + } }); form?.addEventListener('submit', async (event) => { diff --git a/sections/recently-viewed.liquid b/sections/recently-viewed.liquid index a2e2547..6e3ce33 100644 --- a/sections/recently-viewed.liquid +++ b/sections/recently-viewed.liquid @@ -12,54 +12,6 @@ -{% stylesheet %} - .recent { - background: #f9f9fa; - color: #000; - } - - .recent__inner { - padding: 10px 100px 80px; - } - - .recent__title { - margin: 0 0 24px; - font-size: 20px; - font-weight: 500; - letter-spacing: 0.04em; - line-height: normal; - text-transform: uppercase; - } - - .recent__grid { - display: grid; - grid-template-columns: repeat(4, minmax(0, 1fr)); - gap: 28px 20px; - } - - @media (max-width: 1119px) { - .recent__inner { - padding-right: 24px; - padding-left: 24px; - } - - .recent__grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - } - - @media (max-width: 767px) { - .recent__inner { - padding: 8px 10px 48px; - } - - .recent__title { - margin-bottom: 16px; - font-size: 16px; - } - } -{% endstylesheet %} - {% javascript %} (() => { if (window.__seasonRecent) return; diff --git a/sections/routine.liquid b/sections/routine.liquid index 8c87c52..9de1b92 100644 --- a/sections/routine.liquid +++ b/sections/routine.liquid @@ -144,232 +144,6 @@ -{% stylesheet %} - .routine { - padding: 50px 0; - color: #000; - background: #fff; - font-family: Archivo, sans-serif; - } - - .routine__layout { - display: grid; - grid-template-columns: minmax(0, 849fr) minmax(0, 850fr); - gap: 21px; - align-items: stretch; - padding-inline: 100px; - } - - .routine__cover { - position: relative; - display: block; - min-height: 0; - height: 100%; - overflow: hidden; - border-radius: 10px; - color: inherit; - text-decoration: none; - } - - .routine__cover-image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .routine__heading { - position: absolute; - top: 40px; - left: 40px; - margin: 0; - color: #000; - font-family: "Roc Grotesk", Archivo, sans-serif; - font-size: 50px; - font-weight: 400; - line-height: 0.98; - } - - .routine__steps { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 20px; - min-width: 0; - } - - .routine__card { - position: relative; - display: block; - min-width: 0; - color: inherit; - text-decoration: none; - container-type: inline-size; - } - - .routine__media { - position: relative; - display: block; - aspect-ratio: 415 / 436; - overflow: hidden; - border-radius: 10px; - background: #f4f4f4; - } - - .routine__image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - transition: transform 0.45s ease; - } - - .routine__card:hover .routine__image, - .routine__card:focus-visible .routine__image { - transform: scale(1.06); - } - - .routine__shade { - position: absolute; - inset: 0; - background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2)); - pointer-events: none; - transition: background 0.35s ease; - } - - .routine__card:hover .routine__shade, - .routine__card:focus-visible .routine__shade { - background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.38)); - } - - @media (prefers-reduced-motion: reduce) { - .routine__image, - .routine__shade { - transition: none; - } - - .routine__card:hover .routine__image, - .routine__card:focus-visible .routine__image { - transform: none; - } - } - - .routine__caption { - position: absolute; - right: 20px; - bottom: 10px; - left: 20px; - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - color: #fff; - font-family: "Roc Grotesk", Archivo, sans-serif; - font-size: clamp(16px, 7.2cqi, 30px); - font-weight: 400; - line-height: normal; - } - - .routine__label { - min-width: 0; - white-space: nowrap; - } - - .routine__arrow { - display: grid; - flex: 0 0 30px; - width: 30px; - height: 30px; - place-items: center; - border-radius: 60px; - background: #9dd6c7; - } - - .routine__arrow-icon { - display: block; - transform: rotate(90deg); - } - - .routine__empty { - grid-column: 1 / -1; - margin: 0; - font-size: 14px; - } - - .routine__cover:focus-visible, - .routine__card:focus-visible { - outline: 2px solid #000; - outline-offset: 2px; - } - - @media (max-width: 1439px) { - .routine__layout { - padding-inline: 40px; - } - } - - @media (max-width: 1024px) { - .routine { - padding-top: 40px; - padding-bottom: 20px; - } - - .routine__layout { - display: block; - padding-inline: 0; - } - - .routine__cover { - height: 391px; - margin-inline: 15px; - } - - .routine__heading { - top: 10px; - left: 20px; - width: 155px; - font-size: 25px; - line-height: 1; - } - - .routine__steps { - display: flex; - gap: 20px; - margin-top: 0; - padding: 20px 15px; - overflow-x: auto; - scroll-snap-type: x mandatory; - scroll-padding-inline: 15px; - scrollbar-width: none; - } - - .routine__steps::-webkit-scrollbar { - display: none; - } - - .routine__card { - flex: 0 0 245px; - width: 245px; - scroll-snap-align: start; - } - - .routine__media { - height: 258px; - aspect-ratio: auto; - } - - .routine__caption { - position: static; - margin-top: 10px; - color: #000; - font-size: 22px; - } - - .routine__arrow { - display: none; - } - } -{% endstylesheet %} - {% schema %} { "name": "t:routine.name", diff --git a/sections/search.liquid b/sections/search.liquid index 7177c18..84e4434 100644 --- a/sections/search.liquid +++ b/sections/search.liquid @@ -1,66 +1,94 @@ -{% comment %} - This section is used in the search template to render search results for - products, articles, and pages. +{% liquid + assign search_heading = search.terms | remove: '*' | strip + if search_heading == blank + assign search_heading = 'search.title' | t + endif +%} - https://shopify.dev/docs/storefronts/themes/architecture/templates/search -{% endcomment %} +
+
+

{{ search_heading | escape }}

-

{{ 'search.title' | t }}

+ -
- - -
+ {% if search.performed %} + {% if search.results_count == 0 %} +

{{ 'search.no_results_html' | t: terms: search_heading }}

+ {% else %} +

{{ 'search.results_for_html' | t: terms: search_heading, count: search.results_count }}

-{% if search.performed %} - {% if search.results_count == 0 %} -

{{ 'search.no_results_html' | t: terms: search.terms }}

- {% else %} -

{{ 'search.results_for_html' | t: terms: search.terms, count: search.results_count }}

- -
- {% paginate search.results by 20 %} - {% # Search result items may be an article, a page, or a product. %} - {% for result in search.results %} - - {% endif %} -{% endif %} + {% if paginate.pages > 1 %} + + {% endif %} + {% endpaginate %} + {% endif %} + {% endif %} +
+
+ -{% stylesheet %} - .search-results { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); - } - .search-results .prev, - .search-results .page, - .search-results .next { - grid-column: 1 / -1; - } -{% endstylesheet %} {% schema %} { diff --git a/sections/signup.liquid b/sections/signup.liquid index a9927f1..04da024 100644 --- a/sections/signup.liquid +++ b/sections/signup.liquid @@ -120,252 +120,6 @@ -{% stylesheet %} - .signup { - padding: 50px 100px 63px; - background: #fff; - color: #000; - font-family: Archivo, sans-serif; - } - - .signup__panel { - position: relative; - display: flex; - align-items: center; - justify-content: center; - min-height: 450px; - overflow: hidden; - border-radius: 10px; - background: linear-gradient(128.45deg, #7dcaaf 0%, #a9ddfa 114.42%, #d2ebf9 133.7%); - } - - .signup__art { - position: absolute; - top: 40.9px; - left: 82px; - width: 317px; - height: 360.19px; - overflow: hidden; - pointer-events: none; - } - - .signup__art img { - display: block; - width: 317px; - height: 360.19px; - max-width: none; - object-fit: contain; - } - - .signup__copy { - position: relative; - z-index: 1; - display: flex; - flex-direction: column; - align-items: center; - gap: 20px; - width: min(100%, 804px); - padding: 82px 24px; - } - - .signup__title { - width: 100%; - margin: 0; - color: #000; - font-family: "Roc Grotesk", Archivo, sans-serif; - font-size: 40px; - font-weight: 500; - line-height: 45px; - text-align: center; - text-transform: uppercase; - } - - .signup__line { - display: block; - } - - .signup__line--medium { - font-weight: 500; - } - - .signup__line--light { - font-weight: 300; - } - - .signup__text { - width: 100%; - max-width: 804px; - margin: 0; - color: #000; - font-family: Archivo, sans-serif; - font-size: 20px; - font-weight: 300; - line-height: 30px; - text-align: center; - } - - .signup__form { - display: flex; - flex-direction: column; - align-items: center; - margin: 0; - } - - .signup__field { - display: flex; - align-items: center; - justify-content: space-between; - width: 400px; - max-width: 100%; - height: 50px; - padding: 0 30px; - border-radius: 100px; - background: #fff; - } - - .signup__field:focus-within { - outline: 2px solid #000; - outline-offset: 3px; - } - - .signup__label { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; - } - - .signup__input { - flex: 1; - min-width: 0; - height: 100%; - padding: 0; - border: 0; - border-radius: 0; - background: transparent; - color: #000; - font-family: Archivo, sans-serif; - font-size: 16px; - font-weight: 300; - line-height: normal; - outline: none; - } - - .signup__input::placeholder { - color: #808181; - opacity: 1; - } - - .signup__submit { - display: flex; - flex-shrink: 0; - align-items: center; - justify-content: center; - width: 20px; - height: 20px; - margin-left: 12px; - padding: 0; - border: 0; - background: transparent; - color: #000; - cursor: pointer; - } - - .signup__arrow { - display: block; - width: 20px; - height: 20px; - transform: rotate(90deg); - } - - .signup__arrow img { - display: block; - width: 20px; - height: 20px; - max-width: none; - } - - .signup__message { - margin: 12px 0 0; - font-size: 14px; - font-weight: 400; - line-height: 1.35; - text-align: center; - } - - .signup__message--error { - color: #9b1c1c; - } - - @media (max-width: 1439px) { - .signup { - padding-inline: 40px; - } - - .signup__panel { - min-height: 380px; - } - - .signup__art { - left: 24px; - transform: scale(0.72); - transform-origin: left center; - } - - .signup__copy { - width: min(100%, 640px); - padding-block: 48px; - } - - .signup__title { - font-size: 32px; - line-height: 36px; - } - - .signup__text { - font-size: 16px; - line-height: 24px; - } - } - - @media (max-width: 1024px) { - .signup { - padding: 24px 15px 32px; - } - - .signup__panel { - min-height: 0; - padding-top: 28px; - } - - .signup__art { - top: 12px; - left: 8px; - transform: scale(0.42); - transform-origin: left top; - } - - .signup__copy { - width: min(100%, 520px); - padding: 88px 16px 32px; - } - - .signup__title { - font-size: 24px; - line-height: 28px; - } - - .signup__field { - width: min(100%, 400px); - } - } -{% endstylesheet %} - {% schema %} { "name": "t:signup.name", diff --git a/sections/skin-match.liquid b/sections/skin-match.liquid index 3dd39e2..6a654d7 100644 --- a/sections/skin-match.liquid +++ b/sections/skin-match.liquid @@ -213,333 +213,6 @@ -{% stylesheet %} - .skin-match { - position: relative; - overflow: hidden; - padding-bottom: 75px; - color: #000; - background: #fff; - font-family: Archivo, sans-serif; - } - - .skin-match__canvas { - position: relative; - width: min(1705px, calc(100% - 200px)); - margin-inline: auto; - } - - .skin-match__blob { - position: absolute; - z-index: 0; - pointer-events: none; - } - - .skin-match__blob img { - display: block; - width: 100%; - max-width: none; - height: 100%; - object-fit: fill; - } - - .skin-match__blob--blue { - top: 0; - left: 64.81%; - width: 18.01%; - aspect-ratio: 307 / 300; - } - - .skin-match__blob--peach { - top: 11.82%; - left: 12.32%; - width: 14.31%; - aspect-ratio: 244 / 264; - } - - .skin-match__blob--peach img { - position: absolute; - top: 50%; - left: 50%; - width: 108.2%; - height: 92.42%; - transform: translate(-50%, -50%) rotate(90deg); - } - - .skin-match__blob--green { - top: 60.02%; - left: 81.23%; - width: 13.2%; - aspect-ratio: 225 / 253; - } - - .skin-match__blob--pink { - top: 70.05%; - left: 2.11%; - width: 16.3%; - aspect-ratio: 278 / 266; - } - - .skin-match__content { - position: relative; - z-index: 1; - padding: 37px 0 25px; - } - - .skin-match__heading { - margin: 0; - color: #000; - font-family: "Roc Grotesk", Archivo, sans-serif; - font-size: 30px; - font-weight: 500; - line-height: 1.15; - text-transform: uppercase; - } - - .skin-match__subheading { - margin: 10px 0 0; - color: #000; - font-size: 20px; - font-weight: 300; - line-height: 30px; - } - - .skin-match__gallery { - display: grid; - grid-template-columns: 2fr 3fr 3fr 2fr; - gap: 30px; - align-items: center; - margin-top: 53px; - padding-left: 0.88%; - } - - .skin-match__photo { - position: relative; - aspect-ratio: 1; - overflow: hidden; - border-radius: 10px; - } - - .skin-match__photo--cheek { - order: 1; - } - - .skin-match__photo--serum { - order: 2; - } - - .skin-match__photo--jar { - order: 3; - } - - .skin-match__photo--dropper { - order: 4; - } - - .skin-match__image { - position: absolute; - max-width: none; - height: auto; - } - - .skin-match__image--serum { - top: -25.21%; - left: 0; - width: 100.42%; - } - - .skin-match__image--jar { - top: -8.33%; - left: -49.38%; - width: 208.75%; - } - - .skin-match__image--dropper { - top: -7.71%; - left: 0; - width: 101.25%; - } - - .skin-match__image--cheek { - top: 0; - left: -2.71%; - width: 103.75%; - } - - .skin-match__body { - max-width: 990px; - margin: 50px auto 0; - color: #808181; - font-size: 20px; - font-weight: 300; - line-height: 30px; - } - - .skin-match__lead { - color: #000; - font-weight: 500; - } - - .skin-match__rest strong { - color: #000; - font-weight: 700; - } - - .skin-match__button { - display: flex; - width: 326px; - height: 50px; - align-items: center; - justify-content: center; - margin: 50px auto 0; - padding: 15px; - border: 0; - border-radius: 60px; - background: #9dd6c7; - color: #000; - font-family: inherit; - font-size: 16px; - font-weight: 300; - line-height: normal; - text-align: center; - text-decoration: none; - cursor: pointer; - } - - .skin-match__button:hover { - filter: brightness(0.96); - } - - .skin-match__button:focus-visible { - outline: 2px solid #000; - outline-offset: 2px; - } - - @media (max-width: 1439px) { - .skin-match__canvas { - width: min(1705px, calc(100% - 80px)); - } - - .skin-match__heading { - font-size: 26px; - } - - .skin-match__subheading, - .skin-match__body { - font-size: 18px; - line-height: 26px; - } - - .skin-match__gallery { - gap: 20px; - margin-top: 40px; - } - - .skin-match__body, - .skin-match__button { - margin-top: 36px; - } - } - - @media (max-width: 1024px) { - .skin-match { - padding-bottom: 40px; - } - - .skin-match__canvas { - width: min(382px, calc(100% - 30px)); - } - - .skin-match__blob--blue { - top: 3%; - left: 58%; - width: 42%; - aspect-ratio: 199 / 194; - } - - .skin-match__blob--peach { - top: 16%; - left: -8%; - width: 36%; - aspect-ratio: 179 / 194; - } - - .skin-match__blob--green { - top: 44%; - left: 62%; - width: 46%; - aspect-ratio: 224 / 253; - } - - .skin-match__blob--pink { - top: 62%; - left: -18%; - width: 52%; - aspect-ratio: 246 / 236; - } - - .skin-match__content { - padding: 0 0 8px; - } - - .skin-match__heading { - font-size: 20px; - line-height: 1.2; - } - - .skin-match__subheading { - max-width: 198px; - margin-top: 10px; - font-size: 14px; - line-height: normal; - } - - .skin-match__gallery { - grid-template-columns: 1fr 1fr; - gap: 10px; - margin-top: 30px; - padding-left: 0; - } - - .skin-match__photo--serum { - order: 1; - grid-column: 1 / -1; - width: 65.45%; - justify-self: center; - } - - .skin-match__photo--dropper { - order: 2; - } - - .skin-match__photo--cheek { - order: 3; - } - - .skin-match__photo--jar { - order: 4; - grid-column: 1 / -1; - width: 65.45%; - justify-self: center; - } - - .skin-match__body { - max-width: none; - margin-top: 30px; - font-size: 14px; - line-height: 22px; - } - - .skin-match__button { - width: min(300px, 100%); - height: 45px; - margin-top: 30px; - font-size: 14px; - font-weight: 500; - } - } -{% endstylesheet %} - {% schema %} { "name": "t:skin_match.name", diff --git a/sections/testimonials.liquid b/sections/testimonials.liquid index 2a3bd57..d10d5f2 100644 --- a/sections/testimonials.liquid +++ b/sections/testimonials.liquid @@ -195,424 +195,6 @@ {% endif %} -{% stylesheet %} - .testimonials { - position: relative; - margin-top: 100px; - padding-bottom: 100px; - overflow: hidden; - color: #000; - font-family: Archivo, sans-serif; - } - - .testimonials__blob { - position: absolute; - top: 209px; - left: 38px; - width: 434px; - height: auto; - opacity: 0.3; - pointer-events: none; - user-select: none; - } - - .testimonials__header { - position: relative; - z-index: 1; - padding-inline: 100px; - } - - .testimonials__heading { - margin: 0; - font-family: "Roc Grotesk", Archivo, sans-serif; - font-size: 30px; - font-weight: 500; - line-height: normal; - text-transform: uppercase; - } - - .testimonials__subheading { - margin: 10px 0 0; - font-size: 20px; - font-weight: 300; - line-height: 30px; - } - - .testimonials__stage { - position: relative; - z-index: 1; - display: grid; - grid-template-columns: minmax(0, 549fr) minmax(220px, 450px); - column-gap: clamp(32px, 10vw, 199px); - align-items: start; - width: min(1198px, calc(100% - 200px)); - margin: 100px auto 0; - } - - .testimonials__slide[hidden], - .testimonials__product[hidden] { - display: none; - } - - .testimonials__meta { - display: flex; - align-items: center; - gap: 20px; - } - - .testimonials__stars { - display: flex; - gap: 1px; - color: #000; - } - - .testimonials__star { - display: block; - width: 15px; - height: 15px; - } - - .testimonials__star svg { - display: block; - width: 15px; - height: 15px; - } - - .testimonials__star.is-off { - opacity: 0.25; - } - - .testimonials__author { - margin: 0; - font-size: 16px; - font-weight: 400; - line-height: normal; - } - - .testimonials__quote { - max-width: 549px; - margin: 60px 0 0; - font-size: 35px; - font-weight: 300; - line-height: 45px; - } - - .testimonials__nav { - display: flex; - gap: 20px; - margin-top: 155px; - } - - .testimonials__arrow { - display: grid; - width: 30px; - height: 30px; - place-items: center; - padding: 0; - border: 0; - border-radius: 60px; - background: #9dd6c7; - cursor: pointer; - } - - .testimonials__arrow:disabled { - cursor: default; - opacity: 0.35; - } - - .testimonials__arrow-icon { - display: block; - width: 20px; - height: 20px; - transform: rotate(-90deg); - } - - .testimonials__arrow-icon--next { - transform: rotate(90deg); - } - - .testimonials__product { - display: flex; - flex-direction: column; - gap: 10px; - } - - .testimonials__media { - position: relative; - aspect-ratio: 1; - overflow: hidden; - border: 1px solid #eaeaea; - border-radius: 10px; - background: #fff; - } - - .testimonials__media-link { - position: absolute; - inset: 0; - display: block; - } - - .testimonials__image { - display: block; - width: 100%; - height: 100%; - object-fit: contain; - } - - .testimonials__image--hover { - position: absolute; - inset: 0; - object-fit: cover; - opacity: 0; - transition: opacity 0.35s ease; - } - - .testimonials__media:hover .testimonials__image--hover, - .testimonials__media:focus-within .testimonials__image--hover { - opacity: 1; - } - - .testimonials__actions { - position: absolute; - right: 20px; - bottom: 10px; - left: 20px; - z-index: 2; - display: flex; - gap: 10px; - margin: 0; - opacity: 0; - pointer-events: none; - transition: opacity 0.25s ease; - } - - .testimonials__media:hover .testimonials__actions, - .testimonials__media:focus-within .testimonials__actions { - opacity: 1; - pointer-events: auto; - } - - .testimonials__bag, - .testimonials__buy { - display: flex; - align-items: center; - justify-content: center; - height: 50px; - padding: 15px; - border: 0; - border-radius: 60px; - box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); - cursor: pointer; - } - - .testimonials__bag { - flex: 0 0 50px; - width: 50px; - background: #000; - } - - .testimonials__bag img { - display: block; - width: 25px; - height: 25px; - } - - .testimonials__buy { - flex: 1 1 auto; - background: #9dd6c7; - color: #000; - font-family: Archivo, sans-serif; - font-size: 16px; - font-weight: 300; - line-height: normal; - } - - .testimonials__bag:disabled, - .testimonials__buy:disabled { - cursor: default; - opacity: 0.55; - } - - .testimonials__title { - display: block; - color: #000; - font-size: 18px; - font-weight: 700; - line-height: normal; - text-decoration: none; - } - - .testimonials__subtitle { - margin: 5px 0 0; - color: #808181; - font-size: 14px; - font-weight: 300; - line-height: normal; - } - - .testimonials__prices { - display: flex; - align-items: center; - margin: 15px 0 0; - } - - .testimonials__price, - .testimonials__compare { - width: 70px; - font-size: 16px; - line-height: normal; - } - - .testimonials__price { - font-weight: 700; - } - - .testimonials__compare { - color: #6e6f6f; - font-weight: 400; - } - - .testimonials__arrow:focus-visible, - .testimonials__bag:focus-visible, - .testimonials__buy:focus-visible, - .testimonials__title:focus-visible, - .testimonials__media-link:focus-visible { - outline: 2px solid #000; - outline-offset: 3px; - } - - @media (max-width: 1439px) { - .testimonials__header { - padding-inline: 40px; - } - - .testimonials__stage { - width: min(1198px, calc(100% - 80px)); - } - - .testimonials__blob { - left: -40px; - width: 280px; - } - } - - @media (max-width: 1024px) { - .testimonials { - margin-top: 50px; - padding-bottom: 80px; - } - - .testimonials__blob { - top: 80px; - left: -30px; - width: 180px; - } - - .testimonials__header { - padding-inline: 15px; - } - - .testimonials__heading { - max-width: 320px; - font-size: 22px; - line-height: 25px; - } - - .testimonials__subheading { - margin-top: 10px; - font-size: 14px; - line-height: 15px; - } - - .testimonials__stage { - display: flex; - flex-direction: column; - width: min(372px, calc(100% - 30px)); - margin-top: 50px; - } - - .testimonials__copy { - display: contents; - } - - .testimonials__slide { - order: 1; - } - - .testimonials__products { - order: 2; - margin-top: 25px; - } - - .testimonials__nav { - order: 3; - justify-content: center; - margin-top: 40px; - } - - .testimonials__star, - .testimonials__star svg { - width: 12px; - height: 12px; - } - - .testimonials__author { - font-size: 13px; - } - - .testimonials__quote { - margin-top: 30px; - font-size: 18px; - line-height: 25px; - } - - .testimonials__product { - flex-direction: row; - align-items: center; - gap: 10px; - width: min(297px, 100%); - margin-inline: auto; - } - - .testimonials__media { - flex: 0 0 70px; - width: 70px; - height: 70px; - aspect-ratio: auto; - } - - .testimonials__actions { - display: none; - } - - .testimonials__title { - font-size: 14px; - } - - .testimonials__subtitle { - font-size: 12px; - } - - .testimonials__prices { - margin-top: 6px; - } - - .testimonials__price, - .testimonials__compare { - width: auto; - margin-right: 10px; - font-size: 14px; - } - } - - @media (prefers-reduced-motion: reduce) { - .testimonials__image--hover, - .testimonials__actions { - transition: none; - } - } -{% endstylesheet %} - {% javascript %} (() => { const setCartCount = (count) => { diff --git a/snippets/bestsellers-card.liquid b/snippets/bestsellers-card.liquid index 2543762..f5354bb 100644 --- a/snippets/bestsellers-card.liquid +++ b/snippets/bestsellers-card.liquid @@ -138,6 +138,7 @@ type="button" data-wishlist data-product-id="{{ product.id }}" + data-product-handle="{{ product.handle }}" aria-pressed="false" aria-label="{{ 'bestsellers.save' | t: product: product.title }}" data-label-save="{{ 'bestsellers.save' | t: product: product.title }}" diff --git a/snippets/collection-card.liquid b/snippets/collection-card.liquid index 641aa11..2e243c5 100644 --- a/snippets/collection-card.liquid +++ b/snippets/collection-card.liquid @@ -116,6 +116,7 @@ type="button" data-wishlist data-product-id="{{ product.id }}" + data-product-handle="{{ product.handle }}" aria-pressed="false" aria-label="{{ 'bestsellers.save' | t: product: product.title }}" data-label-save="{{ 'bestsellers.save' | t: product: product.title }}" @@ -174,330 +175,6 @@ -{% stylesheet %} - .collection-card { - display: flex; - flex-direction: column; - gap: 15px; - min-width: 0; - } - - .collection-card__media { - position: relative; - aspect-ratio: 1; - overflow: hidden; - border-radius: 10px; - background: #fff; - } - - .collection-card__link { - position: absolute; - inset: 0; - display: block; - } - - .collection-card__image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .collection-card__image--hover { - position: absolute; - inset: 0; - opacity: 0; - transition: opacity 0.35s ease; - } - - .collection-card__media:hover .collection-card__image--hover, - .collection-card__media:focus-within .collection-card__image--hover { - opacity: 1; - } - - .collection-card__image--empty { - background: #f3f3f3; - } - - .collection-card__badges { - position: absolute; - top: 10px; - left: 10px; - z-index: 1; - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 4px; - } - - .collection-card__badge { - display: inline-flex; - align-items: center; - padding: 3px 5px; - border-radius: 2px; - color: #000; - font-size: 10px; - font-weight: 300; - line-height: normal; - text-transform: uppercase; - } - - .collection-card__badge--best { - background: #bfffb2; - } - - .collection-card__badge--skin { - background: #f7c585; - } - - .collection-card__wish { - position: absolute; - top: 16px; - right: 16px; - z-index: 2; - display: grid; - width: 25px; - height: 25px; - place-items: center; - padding: 0; - border: 0; - background: transparent; - cursor: pointer; - } - - .collection-card__wish svg { - display: block; - width: 25px; - height: 25px; - } - - .collection-card__wish.is-active svg path { - fill: #000; - } - - .collection-card__actions { - position: absolute; - right: 16px; - bottom: 16px; - left: 16px; - z-index: 2; - display: flex; - gap: 10px; - margin: 0; - opacity: 0; - pointer-events: none; - transition: opacity 0.25s ease; - } - - .collection-card__media:hover .collection-card__actions, - .collection-card__media:focus-within .collection-card__actions { - opacity: 1; - pointer-events: auto; - } - - .collection-card__add, - .collection-card__buy { - flex: 1 1 0; - height: 48px; - border-radius: 60px; - font: inherit; - font-size: 14px; - font-weight: 500; - line-height: 1; - cursor: pointer; - } - - .collection-card__add { - border: 1px solid #111; - background: #fff; - color: #000; - } - - .collection-card__buy { - border: 0; - background: #9dd6c7; - color: #000; - } - - .collection-card__add:disabled, - .collection-card__buy:disabled { - cursor: default; - opacity: 0.55; - } - - .collection-card__info { - display: flex; - flex-direction: column; - gap: 5px; - } - - .collection-card__title { - color: #000; - font-size: 22px; - font-weight: 700; - line-height: normal; - text-decoration: none; - } - - .collection-card__subtitle, - .collection-card__reviews, - .collection-card__prices { - margin: 0; - } - - .collection-card__subtitle { - color: #808181; - font-size: 18px; - font-weight: 300; - line-height: normal; - } - - .collection-card__rating { - display: flex; - align-items: center; - gap: 10px; - } - - .collection-card__stars { - display: flex; - gap: 1px; - color: #000; - } - - .collection-card__star { - display: block; - width: 14px; - height: 14px; - } - - .collection-card__star.is-off { - opacity: 0.25; - } - - .collection-card__reviews { - color: #000; - font-size: 14px; - font-weight: 300; - } - - .collection-card__prices { - display: flex; - align-items: baseline; - gap: 16px; - } - - .collection-card__price, - .collection-card__compare { - font-size: 20px; - line-height: normal; - } - - .collection-card__price { - font-weight: 700; - } - - .collection-card__compare { - color: #808181; - font-weight: 400; - } - - .recent .collection-card__title { - font-size: 18px; - } - - .recent .collection-card__subtitle, - .recent .collection-card__reviews { - font-size: 14px; - } - - .recent .collection-card__price, - .recent .collection-card__compare { - font-size: 16px; - } - - .recent .collection-card__star { - width: 10px; - height: 10px; - } - - @media (max-width: 767px) { - .collection-card { - gap: 10px; - } - - .collection-card__media { - aspect-ratio: auto; - overflow: visible; - background: transparent; - } - - .collection-card__link { - position: relative; - aspect-ratio: 1; - overflow: hidden; - border-radius: 10px; - background: #fff; - } - - .collection-card__image { - position: absolute; - inset: 0; - } - - .collection-card__actions { - position: static; - opacity: 1; - pointer-events: auto; - margin-top: 8px; - } - - .collection-card__add, - .collection-card__buy { - height: 36px; - font-size: 11px; - } - - .collection-card__title, - .recent .collection-card__title { - font-size: 12px; - } - - .collection-card__subtitle, - .recent .collection-card__subtitle { - font-size: 10px; - } - - .collection-card__price, - .collection-card__compare, - .recent .collection-card__price, - .recent .collection-card__compare { - font-size: 12px; - } - - .collection-card__reviews, - .recent .collection-card__reviews { - display: none; - } - - .collection-card__wish { - top: 8px; - right: 8px; - } - - .collection-card__wish svg { - width: 18px; - height: 18px; - } - } - - @media (prefers-reduced-motion: reduce) { - .collection-card__image--hover, - .collection-card__actions { - transition: none; - } - } -{% endstylesheet %} - {% javascript %} (() => { if (window.__seasonCollectionCard) return; @@ -508,14 +185,18 @@ const readWishlist = () => { try { const stored = JSON.parse(window.localStorage.getItem(wishlistKey)); - return Array.isArray(stored) ? stored.map(String) : []; + if (!Array.isArray(stored)) return []; + return stored.map((item) => { + if (item && typeof item === 'object') return { id: String(item.id || ''), handle: String(item.handle || '') }; + return { id: String(item), handle: '' }; + }).filter((item) => item.id); } catch (error) { return []; } }; const applyWishlist = () => { - const saved = readWishlist(); + const saved = readWishlist().map((item) => item.id); document.querySelectorAll('.collection-card [data-wishlist]').forEach((button) => { const active = saved.includes(String(button.dataset.productId)); button.classList.toggle('is-active', active); @@ -526,15 +207,20 @@ }; applyWishlist(); + document.addEventListener('seasons:wishlist', applyWishlist); document.addEventListener('click', (event) => { const wish = event.target.closest('.collection-card [data-wishlist]'); if (!wish) return; const id = String(wish.dataset.productId || ''); + const handle = String(wish.dataset.productHandle || ''); if (!id) return; const saved = readWishlist(); - const next = saved.includes(id) ? saved.filter((item) => item !== id) : saved.concat(id); + const next = saved.some((item) => item.id === id) + ? saved.filter((item) => item.id !== id) + : saved.concat({ id, handle }); window.localStorage.setItem(wishlistKey, JSON.stringify(next)); + document.dispatchEvent(new CustomEvent('seasons:wishlist')); applyWishlist(); }); diff --git a/snippets/delay-header-scripts.liquid b/snippets/delay-header-scripts.liquid index d860738..4c74d8d 100644 --- a/snippets/delay-header-scripts.liquid +++ b/snippets/delay-header-scripts.liquid @@ -9,10 +9,16 @@ {% render 'delay-header-scripts', html: shopify_header %} {% enddoc %} +{% capture blocking_style %}rel="stylesheet" media="screen"{% endcapture %} +{% capture deferred_style %}rel="stylesheet" media="print" onload="this.media='all'"{% endcapture %} + {% liquid if request.design_mode or html == blank echo html else + assign blocking_style = blocking_style | strip + assign deferred_style = deferred_style | strip + assign html = html | replace: 'media="screen"', 'media="print" onload="this.media='all'"' assign chunks = html | split: ' @font-face { font-family: Archivo; - src: url('{{ 'archivo-light.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-light.woff2' | asset_url }}') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: Archivo; - src: url('{{ 'archivo-regular.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-regular.woff2' | asset_url }}') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: Archivo; - src: url('{{ 'archivo-medium.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-medium.woff2' | asset_url }}') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: Archivo; - src: url('{{ 'archivo-bold.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-bold.woff2' | asset_url }}') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } body { diff --git a/snippets/glow-army-page.liquid b/snippets/glow-army-page.liquid index fdc2907..1ec95f6 100644 --- a/snippets/glow-army-page.liquid +++ b/snippets/glow-army-page.liquid @@ -243,209 +243,5 @@ -{% stylesheet %} - .glow-army { - box-sizing: border-box; - width: 100%; - padding: 24px 50px 88px; - background: #fff; - color: #111; - font-family: inherit; - } - .glow-army__hero, - .glow-army__referral { - display: flex; - align-items: flex-end; - min-height: 560px; - padding: 72px 64px; - border-radius: 8px; - background: linear-gradient(105deg, #f08a62 0%, #f6b89a 48%, #f8d5c8 100%); - color: #fff; - } - - .glow-army__hero-copy, - .glow-army__referral-copy { - max-width: 560px; - } - - .glow-army__title, - .glow-army__referral-title { - margin: 0; - font-size: 64px; - font-weight: 400; - line-height: 1.05; - letter-spacing: -0.02em; - } - - .glow-army__referral-title { - font-size: 40px; - line-height: 1.15; - } - - .glow-army__intro { - max-width: 460px; - margin: 18px 0 0; - font-size: 16px; - font-weight: 300; - line-height: 1.45; - } - - .glow-army__actions { - display: flex; - flex-wrap: wrap; - gap: 12px; - margin-top: 28px; - } - - .glow-army__button { - display: inline-flex; - align-items: center; - justify-content: center; - min-width: 160px; - height: 48px; - padding: 0 24px; - border-radius: 999px; - font-size: 16px; - font-weight: 500; - line-height: 1; - text-decoration: none; - } - - .glow-army__button--fill { - background: #e36b4a; - color: #fff; - } - - .glow-army__button--ghost { - background: #fff; - color: #e36b4a; - } - - .glow-army__referral .glow-army__button { - margin-top: 28px; - } - - .glow-army__body { - padding: 72px 0 24px; - } - - .glow-army__block + .glow-army__block { - margin-top: 72px; - } - - .glow-army__heading { - margin: 0 0 40px; - font-size: 36px; - font-weight: 400; - line-height: 1.2; - text-align: center; - } - - .glow-army__steps, - .glow-army__cards { - display: grid; - gap: 20px; - margin: 0; - padding: 0; - list-style: none; - } - - .glow-army__steps { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .glow-army__cards { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .glow-army__step, - .glow-army__card { - text-align: center; - } - - .glow-army__card { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - min-height: 210px; - padding: 28px 20px; - border: 1px solid #ececec; - border-radius: 16px; - } - - .glow-army__number { - margin: 0; - color: #e36b4a; - font-size: 64px; - font-weight: 400; - line-height: 1; - letter-spacing: 0.04em; - } - - .glow-army__icon { - display: grid; - margin-bottom: 16px; - color: #e36b4a; - place-items: center; - } - - .glow-army__reward-image { - width: 72px; - height: 72px; - margin-bottom: 12px; - object-fit: contain; - } - - .glow-army__card-title { - margin: 14px 0 0; - font-size: 18px; - font-weight: 600; - line-height: 1.3; - } - - .glow-army__step .glow-army__card-title { - margin-top: 18px; - } - - .glow-army__card-text { - margin: 8px 0 0; - color: #5c5c5c; - font-size: 15px; - font-weight: 300; - line-height: 1.4; - } - - .glow-army__referral { - min-height: 420px; - margin-top: 72px; - } - - @media (max-width: 1024px) { - .glow-army { - padding: 16px 20px 64px; - } - - .glow-army__hero, - .glow-army__referral { - min-height: 420px; - padding: 40px 24px; - } - - .glow-army__title { - font-size: 48px; - } - - .glow-army__referral-title, - .glow-army__heading { - font-size: 30px; - } - - .glow-army__steps, - .glow-army__cards { - grid-template-columns: 1fr; - } - } -{% endstylesheet %} diff --git a/snippets/header-menu-item.liquid b/snippets/header-menu-item.liquid index 08f3a7d..fe2d67e 100644 --- a/snippets/header-menu-item.liquid +++ b/snippets/header-menu-item.liquid @@ -8,6 +8,7 @@ @param {string} url - Link URL @param {link[]} [child_links] - Nested links from a menu @param {string} [child_menu] - Fallback items as `Label::/url`, separated by `|` + @param {string} [image_set] - Card images: categories, routine, skin or concern @param {boolean} [show_caret] - Shows a decorative caret when there are no child links @example @@ -24,6 +25,80 @@ assign manual_items = child_menu | strip | split: '|' assign child_count = manual_items.size endif + + assign cards = false + if child_menu contains '/collections/1-limpia' + assign cards = true + endif + if child_menu contains '/collections/2-trata' + assign cards = true + endif + if child_menu contains '/collections/3-hidrata' + assign cards = true + endif + if child_menu contains '/collections/4-protege-bloqueadores-solares' + assign cards = true + endif + if child_menu contains '/collections/kits-skincare-facial' + assign cards = true + endif + if child_menu contains '/collections/piel-mixta-grasa' + assign cards = true + endif + if child_menu contains '/collections/piel-grasa' + assign cards = true + endif + if child_menu contains '/collections/piel-seca-1' + assign cards = true + endif + if child_links != blank + for child in child_links + if child.url contains '/collections/1-limpia' + assign cards = true + endif + if child.url contains '/collections/2-trata' + assign cards = true + endif + if child.url contains '/collections/3-hidrata' + assign cards = true + endif + if child.url contains '/collections/4-protege-bloqueadores-solares' + assign cards = true + endif + if child.url contains '/collections/kits-skincare-facial' + assign cards = true + endif + if child.url contains '/collections/piel-mixta-grasa' + assign cards = true + endif + if child.url contains '/collections/piel-grasa' + assign cards = true + endif + if child.url contains '/collections/piel-seca-1' + assign cards = true + endif + endfor + endif + + if image_set == blank + assign title_key = title | handleize + if title_key == 'categorias' + assign image_set = 'categories' + endif + if title_key == 'preocupacion' + assign image_set = 'concern' + endif + if title_key == 'rutina' + assign image_set = 'routine' + endif + if title_key == 'tipo-de-piel' + assign image_set = 'skin' + endif + endif + + if image_set != blank + assign cards = true + endif %}
  • @@ -46,15 +121,89 @@ {{ 'icon-caret-down.svg' | inline_asset_content }} -