/* ===== Winter & 11.11 effects — controlled from Admin → Settings → "Winter & Sale effects" ===== */

/* ---- snowfall canvas laid over the cover ---- */
#heroShowcase, #coverOverlay { position: relative; }
.fx-snow-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
#coverOverlay > .fx-snow-canvas { position: fixed; z-index: 3; }

/* ---- snow on buttons (class set on <html> when the toggle is on) ---- */
@keyframes fxCapTwinkle { 0%,100% { filter: brightness(1) drop-shadow(0 1px 0 rgba(160,200,235,.85)); }
                          50%     { filter: brightness(1.12) drop-shadow(0 1px 1px rgba(190,225,255,1)); } }
@keyframes fxBtnFlakes {
  from { background-position: center top, 0 -30px, 7px -18px, 3px -6px; }
  to   { background-position: center top, 9px 30px, -8px 36px, 12px 42px; }
}
html.fx-btn-snow .btn:not(.btn-ghost)::before,
html.fx-btn-snow .add-btn::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background-repeat: no-repeat, repeat, repeat, repeat;
  background-size: 100% 11px, 22px 30px, 31px 38px, 17px 24px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 14' preserveAspectRatio='none'%3E%3Cpath d='M0 0H100V6Q96 14 89 7Q83 3 77 8Q71 15 63 7Q56 2 49 8Q42 14 35 7Q28 3 21 8Q14 14 8 7Q3 4 0 8Z' fill='%23fff'/%3E%3C/svg%3E"),
    radial-gradient(circle, #fff 0 1.3px, transparent 1.8px),
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,255,255,.8) 0 .8px, transparent 1.3px);
  background-position: center top, 0 0, 7px 0, 3px 0;
  animation: fxCapTwinkle 2.8s ease-in-out infinite, fxBtnFlakes 5s linear infinite;
}
html.fx-btn-snow .add-btn { position: relative; }
html.fx-btn-snow .add-btn::before { background-size: 100% 8px, 22px 30px, 31px 38px, 17px 24px; }

/* ---- 11.11 sale badge ---- */
@keyframes fxBob    { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(4deg); } }
@keyframes fxPulse  { 0%,100% { box-shadow: 0 0 0 0 rgba(255,80,60,.55), 0 6px 18px rgba(0,0,0,.35); }
                      50%     { box-shadow: 0 0 0 11px rgba(255,80,60,0), 0 6px 26px rgba(255,190,60,.7); } }
@keyframes fxSpin   { to { transform: rotate(360deg); } }
@keyframes fxSpark  { 0%,100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(90deg); } }
@keyframes fxNum    { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.fx-1111 {
  position: absolute; top: 14px; z-index: 6; width: 88px; height: 88px; padding: 0; border: 0; background: none;
  cursor: pointer; animation: fxBob 3.2s ease-in-out infinite; -webkit-tap-highlight-color: transparent;
}
.fx-1111.pos-left  { left: 12px; }
.fx-1111.pos-right { right: 12px; }
.fx-1111-ring { position: absolute; inset: -5px; border-radius: 50%; border: 2px dashed #ffd85a; animation: fxSpin 9s linear infinite; }
.fx-1111-core {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 25%, #ff6a4d 0%, #d62718 55%, #8f130b 100%);
  border: 2px solid #ffe08a; animation: fxPulse 2.2s ease-in-out infinite; color: #fff; font-family: 'Work Sans', system-ui, sans-serif;
}
.fx-1111-num { font-weight: 900; font-size: 24px; line-height: 1; letter-spacing: -.5px; filter: drop-shadow(0 1.5px 0 rgba(90,10,5,.55));
  background: linear-gradient(180deg, #fff 0%, #ffe9a6 60%, #ffc83d 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: fxNum 1.6s ease-in-out infinite; }
.fx-1111-txt { margin-top: 3px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: #fff3c4; text-transform: uppercase; }
.fx-1111-spark { position: absolute; color: #ffe27a; font-size: 14px; line-height: 1; animation: fxSpark 1.8s ease-in-out infinite; pointer-events: none; }
.fx-1111-spark.s1 { top: -8px; right: 4px; } .fx-1111-spark.s2 { bottom: -4px; left: -6px; animation-delay: .6s; }
.fx-1111-spark.s3 { top: 20px; right: -10px; animation-delay: 1.1s; font-size: 11px; }
@media (max-width: 700px) {
  .fx-1111 { width: 68px; height: 68px; top: 10px; }
  .fx-1111-num { font-size: 18px; } .fx-1111-txt { font-size: 9px; }
}

/* ===== buttons: effects always LOOP (never wait for hover / tap) — snow, twinkle and a soft pulse; no sweeping lines ===== */
@keyframes fxBtnBreath { 0%,100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.028); filter: brightness(1.1); } }
html.fx-btn-snow .btn:not(.btn-ghost):not(.btn-sm):not(.btn-block),
html.fx-btn-snow .card-order-btn,
html.fx-btn-snow .add-btn { animation: fxBtnBreath 3s ease-in-out infinite; }
html.fx-btn-snow .card-order-btn { animation-delay: .4s; }
html.fx-btn-snow .btn:active { animation-play-state: paused; }

/* ===== animated cover: a WebGL canvas drawn over the uploaded cover image (see cover-anim.js) ===== */
.whole-cover-picture.wc-anim-on { position: relative; }
.wc-anim-canvas { z-index: 1; }

/* ===== header brand logo: loop animations + winter snow (Admin → Settings) ===== */
.brand { position: relative; }
@keyframes fxLogoFloat { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-4px); } }
@keyframes fxLogoGlow  { 0%,100% { filter: drop-shadow(0 0 0 rgba(222,176,50,0)); } 50% { filter: drop-shadow(0 0 8px rgba(232,190,70,.9)) brightness(1.07); } }
@keyframes fxLogoPulse { 0%,100% { transform: scale(1); }        50% { transform: scale(1.07); } }
@keyframes fxLogoSwing { 0%,100% { transform: rotate(-2.6deg); } 50% { transform: rotate(2.6deg); } }
.brand[data-logo-anim="float"] { animation: fxLogoFloat 3.4s ease-in-out infinite; }
.brand[data-logo-anim="glow"]  { animation: fxLogoGlow 2.8s ease-in-out infinite; }
.brand[data-logo-anim="pulse"] { animation: fxLogoPulse 2.4s ease-in-out infinite; }
.brand[data-logo-anim="swing"] { transform-origin: 50% 0; animation: fxLogoSwing 3.8s ease-in-out infinite; }
.fx-logo-sparks { position: absolute; pointer-events: none; z-index: 3; }
.fx-logo-sparks i { position: absolute; font-style: normal; font-size: 11px; line-height: 1; color: #f4cf57; text-shadow: 0 0 4px #fff, 0 0 8px rgba(244,207,87,.9); animation: fxSpark 2s ease-in-out infinite; }
.fx-logo-snow {
  position: absolute; pointer-events: none; z-index: 2; background: #fff;
  -webkit-mask-image: var(--fx-m), var(--fx-m); mask-image: var(--fx-m), var(--fx-m);
  -webkit-mask-size: contain, contain; mask-size: contain, contain;
  -webkit-mask-repeat: no-repeat, no-repeat; mask-repeat: no-repeat, no-repeat;
  -webkit-mask-position: center, center calc(50% + var(--fx-cap, 4px)); mask-position: center, center calc(50% + var(--fx-cap, 4px));
  -webkit-mask-composite: source-out; mask-composite: subtract;
  animation: fxCapTwinkle 3s ease-in-out infinite;
}

/* ===== "11.11 SALE" text on the header logo — position / style / font / animation are all settings ===== */
@keyframes fxRise   { 0%,100% { transform: translateY(0); } 38% { transform: translateY(-3px); } 62% { transform: translateY(0); } }
@keyframes fxFire   { 0%,100% { color: #c9241a; } 35% { color: #ff6a3d; } 62% { color: #e0a51f; } }
@keyframes fxType   { 0% { opacity: 0; } 8%,84% { opacity: 1; } 96%,100% { opacity: 0; } }
@keyframes fxSaleGlow { 0%,100% { filter: drop-shadow(0 0 0 rgba(255,190,70,0)); } 50% { filter: drop-shadow(0 0 5px rgba(255,190,70,.95)); } }
@keyframes fxHop    { 0%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } 55% { transform: translateY(0); } 70% { transform: translateY(-2px); } 85% { transform: translateY(0); } }
@keyframes fxBlink  { 0%,100% { opacity: 1; } 50% { opacity: .18; } }
@keyframes fxSway   { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes fxSaleBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

.fx-logo-sale { --sc: #c9241a; position: absolute; z-index: 4; pointer-events: none; white-space: nowrap; display: flex; align-items: center; gap: 3px;
  font-family: 'Work Sans', system-ui, sans-serif; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; line-height: 1; }
.fx-logo-sale .fx-ls-txt { display: inline-flex; align-items: center; }
.fx-logo-sale .fx-ls-txt i { font-style: normal; display: inline-block; color: var(--sc); text-shadow: 0 0 2px #fff, 0 1px 0 rgba(255,255,255,.9); }
.fx-logo-sale .fx-ls-txt i.sp { width: .38em; }
.fx-logo-sale .fx-ls-star { color: #f2b51f; font-size: .95em; text-shadow: 0 0 3px #fff; animation: fxSpark 1.8s ease-in-out infinite; }
.fx-logo-sale.fx-fn-serif { font-family: 'Fraunces', Georgia, 'Times New Roman', serif; font-weight: 800; letter-spacing: .05em; }

/* size */
.fx-logo-sale.fx-sz-small  { font-size: 10px; } .fx-logo-sale.fx-sz-medium { font-size: 12.5px; } .fx-logo-sale.fx-sz-large { font-size: 15px; }

/* position (relative to the logo) */
/* "on the logo": sits on the empty space along the top edge of the logo, no gap above it */
.fx-logo-sale.fx-pos-on-letters { left: 0; top: 0; visibility: hidden; } /* placed by winter-fx.js right above the logo letters */
.fx-logo-sale.fx-pos-tr-on { top: 1px; right: -14px; justify-content: flex-end; }
.fx-logo-sale.fx-pos-tc-on { top: 1px; left: 0; right: 0; justify-content: center; }
.fx-logo-sale.fx-pos-above { top: -11px; left: 0; right: 0; justify-content: center; }
.fx-logo-sale.fx-pos-below { bottom: -11px; left: 0; right: 0; justify-content: center; }
.fx-logo-sale.fx-pos-tl    { top: -10px; left: -4px; justify-content: flex-start; }
.fx-logo-sale.fx-pos-tr    { top: -10px; right: -4px; justify-content: flex-end; }
.fx-logo-sale.fx-pos-left  { top: 0; bottom: 0; right: 100%; margin-right: 6px; }
.fx-logo-sale.fx-pos-right { top: 0; bottom: 0; left: 100%; margin-left: 6px; }

/* style (colours / look) */
.fx-logo-sale.fx-st-red   { --sc: #c9241a; }
.fx-logo-sale.fx-st-green { --sc: #0f4d2e; }
.fx-logo-sale.fx-st-fire:not(.fx-an-none) i { animation: fxFire 2.4s ease-in-out infinite; }
.fx-logo-sale.fx-st-gold i { background: linear-gradient(180deg, #fbe38f 0%, #dba722 55%, #94640a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 1px 0 rgba(104,68,4,.95)) drop-shadow(0 0 1.5px rgba(255,255,255,.95)); }
.fx-logo-sale.fx-st-tag-red .fx-ls-txt, .fx-logo-sale.fx-st-tag-gold .fx-ls-txt { padding: .32em .85em; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.fx-logo-sale.fx-st-tag-red  .fx-ls-txt { background: linear-gradient(180deg, #e8402e, #b81f12); }
.fx-logo-sale.fx-st-tag-red  .fx-ls-txt i { --sc: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.fx-logo-sale.fx-st-tag-gold .fx-ls-txt { background: linear-gradient(180deg, #f8dc7a, #c8961b); }
.fx-logo-sale.fx-st-tag-gold .fx-ls-txt i { --sc: #4a2f00; text-shadow: 0 1px 0 rgba(255,255,255,.5); }

/* animation (all loop) */
.fx-logo-sale.fx-an-wave   .fx-ls-txt i { animation: fxRise 1.9s ease-in-out infinite; }
.fx-logo-sale.fx-an-wave.fx-st-fire .fx-ls-txt i { animation: fxRise 1.9s ease-in-out infinite, fxFire 2.4s ease-in-out infinite; }
.fx-logo-sale.fx-an-wave   .fx-ls-txt { animation: fxSaleGlow 2s ease-in-out infinite; }
.fx-logo-sale.fx-an-typing .fx-ls-txt i { animation: fxType 3.8s ease-in-out infinite; }
.fx-logo-sale.fx-an-typing.fx-st-fire .fx-ls-txt i { animation: fxType 3.8s ease-in-out infinite, fxFire 2.4s ease-in-out infinite; }
.fx-logo-sale.fx-an-glow   .fx-ls-txt { animation: fxSaleGlow 1.8s ease-in-out infinite; }
.fx-logo-sale.fx-an-bounce .fx-ls-txt { animation: fxHop 1.3s ease-in-out infinite; }
.fx-logo-sale.fx-an-blink  .fx-ls-txt { animation: fxBlink 1.3s ease-in-out infinite; }
.fx-logo-sale.fx-an-swing  .fx-ls-txt { transform-origin: 50% 100%; animation: fxSway 2.2s ease-in-out infinite; }

@media (max-width: 700px) {
  .fx-logo-sale.fx-sz-small  { font-size: 8.5px; } .fx-logo-sale.fx-sz-medium { font-size: 10.5px; } .fx-logo-sale.fx-sz-large { font-size: 12.5px; }
  .fx-logo-sale.fx-pos-above { top: -9px; } .fx-logo-sale.fx-pos-below { bottom: -9px; }
  .fx-logo-sale.fx-pos-tr-on { right: -8px; }
}

/* snow clumps sitting on the tops of the letters (thicker, patchy) */
.fx-logo-clumps {
  position: absolute; pointer-events: none; z-index: 2;
  background:
    radial-gradient(circle, #fff 0 3.4px, rgba(255,255,255,0) 4.1px) 0 0 / 12px 12px,
    radial-gradient(circle, #fff 0 2.7px, rgba(255,255,255,0) 3.3px) 6px 3px / 17px 17px,
    radial-gradient(circle, #fff 0 2.2px, rgba(255,255,255,0) 2.8px) 3px 0 / 9px 14px;
  -webkit-mask-image: var(--fx-m), var(--fx-m); mask-image: var(--fx-m), var(--fx-m);
  -webkit-mask-size: contain, contain; mask-size: contain, contain;
  -webkit-mask-repeat: no-repeat, no-repeat; mask-repeat: no-repeat, no-repeat;
  -webkit-mask-position: center, center calc(50% + var(--fx-cap, 4px)); mask-position: center, center calc(50% + var(--fx-cap, 4px));
  -webkit-mask-composite: source-out; mask-composite: subtract;
  filter: drop-shadow(0 1px 0 rgba(150,190,228,.85));
  animation: fxCapTwinkle 3.4s ease-in-out infinite .6s;
}
