/*
 * HS Winter Sales.
 * - .hs-xmas-* : the "delivered before Christmas" bar (shown on its own, with or without the winter design).
 * - html.hs-ws : the winter design; the class exists only while it is active, so the normal design is untouched.
 */
:root {
  --ws-pine: #0e3b2e;
  --ws-pine-2: #15553f;
  --ws-night: #0a2a20;
  --ws-red: #c8102e;
  --ws-red-dark: #a00d25;
  --ws-gold: #f2c14e;
  --ws-snow: #ffffff;
}

/* ---------- shared countdown boxes ---------- */

.hs-xmas-bar .hs-ws-timer-label,
html.hs-ws .hs-ws-timer-label { margin-right: 3px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }

.hs-xmas-bar .hs-ws-unit,
html.hs-ws .hs-ws-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 4px;
}

.hs-xmas-bar .hs-ws-unit b,
html.hs-ws .hs-ws-unit b { min-width: 1.3em; color: var(--ws-snow); font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }

.hs-xmas-bar .hs-ws-unit i,
html.hs-ws .hs-ws-unit i { font-style: normal; font-size: 11px; opacity: .8; }

.hs-ws-no-days .hs-ws-unit:first-of-type { display: none !important; }
.hs-ws-ended { display: none !important; }

/* ---------- Christmas delivery bar ---------- */

.hs-xmas-bar {
  position: relative;
  z-index: 61;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  min-height: 42px;
  padding: 7px 14px;
  background:
    radial-gradient(circle at 10% 30%, rgba(255, 255, 255, .18) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, .12) 0 1.5px, transparent 2.5px) 0 0 / 34px 34px,
    var(--ws-red);
  color: var(--ws-snow);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  border-bottom: 3px solid var(--ws-gold);
}

.hs-xmas-icon { flex: 0 0 auto; color: var(--ws-gold); }
.hs-xmas-timer { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 400; }

/* ---------- winter top bar ---------- */

html.hs-ws .hs-ws-bar {
  position: relative;
  z-index: 60;
  background:
    radial-gradient(circle at 20% 40%, rgba(255, 255, 255, .16) 0 1.5px, transparent 2.5px) 0 0 / 38px 38px,
    radial-gradient(circle at 60% 80%, rgba(255, 255, 255, .1) 0 1px, transparent 2px) 0 0 / 26px 26px,
    var(--ws-pine);
  color: var(--ws-snow);
  font-size: 14px;
  line-height: 1.3;
  border-bottom: 3px solid var(--ws-gold);
}

html.hs-ws .hs-ws-bar-link,
html.hs-ws .hs-ws-bar-link:visited {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  min-height: 46px;
  padding: 7px 16px;
  color: var(--ws-snow);
  text-decoration: none;
}

html.hs-ws .hs-ws-bar-link:hover .hs-ws-bar-cta { color: var(--ws-gold); }

html.hs-ws .hs-ws-tag {
  display: inline-block;
  padding: 4px 9px 3px;
  background: var(--ws-red);
  color: var(--ws-snow);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 3px;
  white-space: nowrap;
}

html.hs-ws .hs-ws-bar-sub { font-weight: 600; }
html.hs-ws .hs-ws-bar-cta { font-weight: 700; text-decoration: underline; text-decoration-color: var(--ws-gold); text-underline-offset: 4px; white-space: nowrap; }
html.hs-ws .hs-ws-timer { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
html.hs-ws .hs-ws-preview-note { display: block; padding: 3px 10px; background: var(--ws-gold); color: var(--ws-night); font-size: 12px; text-align: center; }
html.hs-ws .hs-ws-preview-note a { color: var(--ws-night); text-decoration: underline; }

/* ---------- header ---------- */

html.hs-ws .header .top-bar,
html.hs-ws header.header-compact::before { background: var(--ws-pine) !important; }

html.hs-ws .header .top-bar a,
html.hs-ws .header .top-bar .links-text,
html.hs-ws .header .top-bar .fa,
html.hs-ws .header .top-bar i { color: var(--ws-snow) !important; }

html.hs-ws div.main-menu.main-menu-3 > .j-menu > li.hs-ws-menu-item > a,
html.hs-ws .main-menu > .j-menu > li.hs-ws-menu-item > a {
  background: var(--ws-red) !important;
  color: var(--ws-snow) !important;
  font-weight: 800;
  letter-spacing: .04em;
}

html.hs-ws .main-menu > .j-menu > li.hs-ws-menu-item > a .links-text { color: var(--ws-snow) !important; }

/* ---------- home banner (takes the place of the home slider) ---------- */

/* the banner is written by the server right after the header; the slider is back when the design is off or the banner is missing */
html.hs-ws .hs-ws-hero ~ .top-row .grid-row:has(.module-master_slider) { display: none !important; }
html.hs-ws .hs-ws-hero ~ .top-row .grid-row:has(.module-master_slider) ~ .grid-row svg.wave-top { display: none !important; }

html.hs-ws .hs-ws-hero {
  position: relative;
  margin: 0 0 24px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(242, 193, 78, .22), transparent 55%),
    radial-gradient(ellipse at 10% 110%, rgba(255, 255, 255, .08), transparent 50%),
    linear-gradient(160deg, var(--ws-pine-2), var(--ws-night));
  color: var(--ws-snow);
  border-bottom: 4px solid var(--ws-gold);
}

/* ---------- banner animation: falling snow + twinkling stars (decorative, aria-hidden) ---------- */

html.hs-ws .hs-ws-hero-inner { position: relative; z-index: 1; }

html.hs-ws .hs-ws-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/*
 * One snow layer = flakes in tiles of --tile height, moved down by exactly one tile per loop, so the loop is seamless.
 * Tile widths differ per flake (173/131/211/97 px...) so the flakes don't line up in a grid.
 */
html.hs-ws .hs-ws-snow {
  position: absolute;
  top: calc(-1 * var(--tile));
  bottom: 0;
  left: -24px;
  right: -24px;
  opacity: var(--op);
  background-repeat: repeat;
  will-change: transform;
  animation:
    hs-ws-fall var(--dur) linear infinite,
    hs-ws-sway var(--sway) ease-in-out infinite alternate;
}

html.hs-ws .hs-ws-snow-far {
  --tile: 180px; --dur: 16s; --sway: 7s; --op: .5;
  background-image:
    radial-gradient(circle at 30% 20%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 60% 70%, #fff 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 15% 55%, #fff 0 .9px, transparent 1.5px),
    radial-gradient(circle at 80% 90%, #fff 0 1.1px, transparent 1.7px);
  background-size: 113px 180px, 89px 180px, 151px 180px, 67px 180px;
}

html.hs-ws .hs-ws-snow-mid {
  --tile: 260px; --dur: 11s; --sway: 5s; --op: .7;
  background-image:
    radial-gradient(circle at 25% 15%, #fff 0 2.4px, transparent 3.2px),
    radial-gradient(circle at 70% 60%, #fff 0 2px, transparent 2.8px),
    radial-gradient(circle at 45% 85%, #fff 0 2.7px, transparent 3.5px);
  background-size: 173px 260px, 131px 260px, 211px 260px;
}

html.hs-ws .hs-ws-snow-near {
  --tile: 380px; --dur: 7.5s; --sway: 4s; --op: .9;
  background-image:
    radial-gradient(circle at 35% 25%, #fff 0 4px, rgba(255, 255, 255, .4) 4.8px, transparent 6.4px),
    radial-gradient(circle at 75% 75%, #fff 0 3.4px, rgba(255, 255, 255, .35) 4.2px, transparent 5.6px),
    radial-gradient(circle at 15% 60%, #fff 0 3px, rgba(255, 255, 255, .3) 3.8px, transparent 5px);
  background-size: 263px 380px, 197px 380px, 311px 380px;
}

@keyframes hs-ws-fall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, var(--tile), 0); }
}

@keyframes hs-ws-sway {
  from { translate: -14px 0; }
  to { translate: 14px 0; }
}

/* Four-point gold sparkle: a soft core plus a thin horizontal and vertical ray */
html.hs-ws .hs-ws-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  --size: calc(var(--s) * 1.8);
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  background:
    radial-gradient(circle, #fff7dc 0 14%, rgba(242, 193, 78, .65) 28%, transparent 62%),
    linear-gradient(90deg, transparent 45%, #fff3c4 50%, transparent 55%),
    linear-gradient(0deg, transparent 45%, #fff3c4 50%, transparent 55%);
  opacity: 0;
  will-change: transform, opacity;
  animation: hs-ws-twinkle var(--t) ease-in-out var(--d) infinite;
}

@keyframes hs-ws-twinkle {
  0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
  45% { opacity: 1; transform: scale(1.35) rotate(45deg); }
  65% { opacity: .85; transform: scale(1) rotate(70deg); }
}

/* -40% badge breathes a little; the CTA gets a light sweep every few seconds */
html.hs-ws .hs-ws-hero-badge { animation: hs-ws-pulse 2.6s ease-in-out infinite alternate; }

@keyframes hs-ws-pulse {
  from { transform: rotate(-8deg) scale(1); box-shadow: 0 0 0 0 rgba(242, 193, 78, .0); }
  to { transform: rotate(-8deg) scale(1.05); box-shadow: 0 0 0 10px rgba(242, 193, 78, .18); }
}

html.hs-ws .hs-ws-hero-cta { position: relative; overflow: hidden; }

html.hs-ws .hs-ws-hero-cta::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-160%) skewX(-20deg);
  animation: hs-ws-shine 4.5s ease-in-out 1.5s infinite;
  pointer-events: none;
}

@keyframes hs-ws-shine {
  0%, 70% { transform: translateX(-160%) skewX(-20deg); }
  100% { transform: translateX(320%) skewX(-20deg); }
}

/* Banner scrolled out of view: pause everything (hs_wintersale.js toggles the class) */
html.hs-ws .hs-ws-hero.hs-ws-paused .hs-ws-snow,
html.hs-ws .hs-ws-hero.hs-ws-paused .hs-ws-star,
html.hs-ws .hs-ws-hero.hs-ws-paused .hs-ws-hero-badge,
html.hs-ws .hs-ws-hero.hs-ws-paused .hs-ws-hero-cta::after { animation-play-state: paused; }

/* On the desktop home Journal3 pulls the content under the header (".desktop.route-common-home header
   { margin-bottom: -60px }", option "Top bar over"); --hs-ws-over is that height, so the banner starts below the header.
   Same selector as the theme, so it applies from the first paint. */
html.hs-ws.desktop.route-common-home .site-wrapper > header + .hs-ws-hero { margin-top: var(--hs-ws-over, 0px); }

html.hs-ws .hs-ws-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 44px 24px;
}

html.hs-ws .hs-ws-hero-kicker { margin: 0 0 6px; color: var(--ws-gold); font-size: 14px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
html.hs-ws .hs-ws-hero-title { margin: 0; color: var(--ws-snow); font-size: clamp(40px, 7vw, 84px); font-weight: 900; line-height: .95; text-transform: uppercase; }
html.hs-ws .hs-ws-hero-sub { max-width: 560px; margin: 14px 0 22px; color: #e8f1ec; font-size: clamp(16px, 1.8vw, 21px); }

html.hs-ws .hs-ws-hero-cta,
html.hs-ws .hs-ws-hero-cta:visited {
  display: inline-block;
  padding: 14px 26px;
  background: var(--ws-red);
  color: var(--ws-snow);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 4px;
  transition: transform .15s ease, box-shadow .15s ease;
}

html.hs-ws .hs-ws-hero-cta:hover { color: var(--ws-snow); background: var(--ws-red-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200, 16, 46, .4); }

html.hs-ws .hs-ws-hero-side { display: flex; flex-direction: column; align-items: center; gap: 18px; }

html.hs-ws .hs-ws-hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 170px;
  background: var(--ws-red);
  color: var(--ws-snow);
  border: 4px solid var(--ws-gold);
  border-radius: 50%;
  transform: rotate(-8deg);
}

html.hs-ws .hs-ws-hero-badge span { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
html.hs-ws .hs-ws-hero-badge b { font-size: 52px; font-weight: 900; line-height: 1; }

html.hs-ws .hs-ws-timer-big { gap: 8px; }
html.hs-ws .hs-ws-timer-big .hs-ws-unit { flex-direction: column; align-items: center; min-width: 64px; padding: 8px 6px; }
html.hs-ws .hs-ws-timer-big .hs-ws-unit b { color: var(--ws-gold); font-size: 30px; line-height: 1.1; }
html.hs-ws .hs-ws-timer-big .hs-ws-unit i { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- product cards ---------- */

/* Label groups (absolutely placed over the product image) are left out until hs_wintersale.js has given the discount labels
   their winter look (.hs-ws-labels): a label that first appears is not a layout shift, a label that changes size is.
   If the script cannot load, its onerror adds html.hs-ws-nojs and the labels show in the theme style. */
html.hs-ws:not(.hs-ws-nojs) .product-labels:not(.hs-ws-labels) {
  display: none;
}

html.hs-ws .product-labels .product-label.hs-ws-discount { display: flex !important; }

html.hs-ws .product-labels .product-label.hs-ws-discount > b {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  white-space: nowrap;
  padding: 5px 8px 6px;
  background: var(--ws-red) !important;
  color: var(--ws-snow) !important;
  border-radius: 4px !important;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

html.hs-ws .product-labels .product-label.hs-ws-discount > b::before {
  content: attr(data-hs-ws);
  margin-bottom: 3px;
  color: var(--ws-gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

html.hs-ws .product-thumb .price-new,
html.hs-ws .product-info .product-price-new { color: var(--ws-red) !important; font-weight: 800 !important; }

html.hs-ws .product-thumb .btn-cart,
html.hs-ws .product-thumb .btn-cart:visited,
html.hs-ws .product-info .button-group-page .btn-cart {
  background: var(--ws-pine) !important;
  color: var(--ws-snow) !important;
  border-color: var(--ws-pine) !important;
}

html.hs-ws .product-thumb .btn-cart:hover,
html.hs-ws .product-info .button-group-page .btn-cart:hover { background: var(--ws-red) !important; color: var(--ws-snow) !important; }

html.hs-ws .product-thumb .btn-cart .btn-text,
html.hs-ws .product-info .button-group-page .btn-cart .btn-text { color: inherit !important; }

/* ---------- product page strip (special price) ---------- */

html.hs-ws .hs-ws-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--ws-pine);
  color: var(--ws-snow);
  border-left: 4px solid var(--ws-gold);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- small screens ---------- */

@media (max-width: 767px) {
  .hs-xmas-bar { gap: 4px 8px; min-height: 0; padding: 5px 8px; font-size: 12.5px; }
  .hs-xmas-bar .hs-ws-timer-label,
  .hs-xmas-icon { display: none; }
  /* both bars on a phone: the delivery deadline is the urgent one, the sale countdown stays in the banner */
  .hs-xmas-bar ~ #hs-ws-bar .hs-ws-timer { display: none; }
  html.hs-ws .hs-ws-bar-link { gap: 6px 10px; padding: 6px 10px; }
  html.hs-ws .hs-ws-bar-sub,
  html.hs-ws .hs-ws-bar .hs-ws-timer-label { display: none; }
  html.hs-ws .hs-ws-hero-inner { gap: 18px; padding: 24px 18px 26px; }
  html.hs-ws .hs-ws-hero-sub { margin: 10px 0 16px; }
  html.hs-ws .hs-ws-hero-side { width: 100%; flex-direction: row; justify-content: flex-start; }
  html.hs-ws .hs-ws-hero-badge { display: none; }
  html.hs-ws .hs-ws-timer-big .hs-ws-unit { min-width: 54px; }
  html.hs-ws .hs-ws-timer-big .hs-ws-unit b { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html.hs-ws .hs-ws-hero-cta { transition: none; }
  /* still snow and steady stars instead of motion */
  html.hs-ws .hs-ws-snow,
  html.hs-ws .hs-ws-star,
  html.hs-ws .hs-ws-hero-badge,
  html.hs-ws .hs-ws-hero-cta::after { animation: none; }
  html.hs-ws .hs-ws-star { opacity: .8; transform: rotate(45deg); }
  html.hs-ws .hs-ws-hero-cta::after { display: none; }
}
