/**
 * Зимняя витрина: изумруд + пыльный снег + золото.
 * Только body.sk-winter-magic (не checkout / sk-winter-quiet).
 */
html:has(body.sk-winter-magic:not(.sk-winter-quiet):not(.sk-winter-spruce-bg)) {
  /* Зимний лес: только изумруд + золото, без розовых полос spruce-rose */
  --sk-emerald-deep: #052318;
  --sk-emerald: #0f5a38;
  --sk-emerald-dust: #157a4a;
  --sk-emerald-lit: #1b8f56;
  --sk-emerald-mist: #0c4730;
  --sk-gold-winter: #e8c050;
  --sk-gold-glow: rgba(255, 220, 110, 0.55);
  --sk-frost-line: rgba(255, 255, 255, 0.32);
  --sk-parallax-y: 0px;
  --sk-stars-fringe: url("../img/winter-emerald-stars-fringe.svg");
  --sk-xmas-contours: url("../img/winter-christmas-contours.svg");

  background-color: var(--sk-emerald-deep) !important;
  background-image:
    var(--sk-stars-fringe),
    var(--sk-xmas-contours),
    radial-gradient(ellipse 72% 58% at 50% 40%, rgba(27, 143, 86, 0.55) 0%, transparent 74%),
    radial-gradient(ellipse 100% 88% at 50% 50%, transparent 32%, rgba(5, 35, 24, 0.9) 100%),
    radial-gradient(ellipse 42% 28% at 50% 8%, rgba(255, 220, 120, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 42% 28% at 50% 92%, rgba(255, 220, 120, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 92% 62% at 8% 6%, rgba(255, 255, 255, 0.07) 0%, transparent 48%),
    radial-gradient(ellipse 88% 58% at 94% 12%, rgba(21, 122, 74, 0.42) 0%, transparent 52%),
    radial-gradient(ellipse 76% 64% at 86% 92%, rgba(12, 71, 48, 0.5) 0%, transparent 56%),
    radial-gradient(ellipse 62% 48% at 12% 84%, rgba(255, 255, 255, 0.05) 0%, transparent 58%),
    linear-gradient(
      168deg,
      #031a10 0%,
      var(--sk-emerald-deep) 14%,
      var(--sk-emerald) 42%,
      var(--sk-emerald-dust) 58%,
      var(--sk-emerald) 76%,
      #031a10 100%
    ) !important;
  background-size:
    cover,
    380px 380px,
    125% 125%,
    118% 118%,
    100% 100%,
    100% 100%,
    auto,
    142% 142%,
    128% 128%,
    126% 126%,
    100% 118% !important;
  background-position:
    center calc(0px + var(--sk-parallax-y)),
    0 calc(var(--sk-parallax-y) * 0.15),
    50% calc(6% + var(--sk-parallax-y)),
    50% calc(0% + var(--sk-parallax-y)),
    50% 0,
    50% 100%,
    0 0,
    0 0,
    0 0,
    0 0,
    50% calc(0% + var(--sk-parallax-y)) !important;
  background-repeat:
    no-repeat,
    repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat !important;
  background-attachment: scroll !important;
  animation: sk-emerald-green-tide 26s ease-in-out infinite !important;
}

@keyframes sk-emerald-green-tide {
  0%,
  100% {
    filter: brightness(0.95) saturate(1.02);
    background-color: #031a10;
  }
  38% {
    filter: brightness(1.08) saturate(1.14);
    background-color: #0c4730;
  }
  72% {
    filter: brightness(1.02) saturate(1.06);
    background-color: #052318;
  }
}

/* Пульс «дыхания леса» — зелёное пятно то шире, то уже */
html:has(body.sk-winter-magic:not(.sk-winter-quiet))::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 65% at 50% 45%, rgba(27, 143, 86, 0.55), transparent 70%);
  animation: sk-green-bloom 18s ease-in-out infinite;
  opacity: 0.42;
}

@keyframes sk-green-bloom {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.62;
    transform: scale(1.08);
  }
}

html body.sk-winter-magic:not(.sk-winter-quiet)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.38;
  background: var(--sk-xmas-contours) 0 0 / 320px 320px repeat;
  animation: sk-xmas-contours-drift 55s linear infinite;
  mix-blend-mode: soft-light;
  transform: translate3d(0, calc(var(--sk-parallax-y) * 0.2), 0);
}

@keyframes sk-xmas-contours-drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 320px 240px;
  }
}

/* Глушим розово-полосатый spruce-rose на зимнем сезоне (не в режиме sk-winter-spruce-bg) */
html:has(body.sk-winter-magic:not(.sk-winter-quiet):not(.sk-winter-spruce-bg)) body.sk-gems::before,
html:has(body.sk-winter-magic:not(.sk-winter-quiet):not(.sk-winter-spruce-bg)) body.sk-gems.sk-ritual::before {
  opacity: 0.48 !important;
  background:
    radial-gradient(ellipse 58% 48% at 50% 38%, rgba(27, 143, 86, 0.72), transparent 70%),
    radial-gradient(ellipse 42% 36% at 18% 78%, rgba(21, 122, 74, 0.38), transparent 68%),
    radial-gradient(ellipse 42% 36% at 82% 72%, rgba(15, 90, 56, 0.35), transparent 68%) !important;
  animation: sk-green-mist-pulse 22s ease-in-out infinite !important;
}

@keyframes sk-green-mist-pulse {
  0%,
  100% {
    opacity: 0.32;
  }
  50% {
    opacity: 0.58;
  }
}

html:has(body.sk-winter-magic:not(.sk-winter-quiet):not(.sk-winter-spruce-bg)) body.sk-gems::after,
html:has(body.sk-winter-magic:not(.sk-winter-quiet):not(.sk-winter-spruce-bg)) body.sk-gems.sk-ritual::after {
  opacity: 0.28 !important;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 214, 120, 0.35) 0, transparent 8%),
    radial-gradient(circle at 86% 14%, rgba(255, 234, 160, 0.28) 0, transparent 7%),
    radial-gradient(circle at 12% 88%, rgba(255, 214, 120, 0.32) 0, transparent 8%),
    radial-gradient(circle at 88% 90%, rgba(127, 200, 169, 0.35) 0, transparent 8%) !important;
  background-size: 100% 100% !important;
  animation: sk-wm-gold-twinkle 8s ease-in-out infinite !important;
  mix-blend-mode: screen;
}

html:has(body.sk-winter-magic:not(.sk-winter-quiet):not(.sk-winter-spruce-bg)) body.sk-gems .sk-paper-layer {
  background-color: transparent !important;
  background-image: none !important;
  animation: none !important;
}

html body.sk-gems.sk-winter-magic:not(.sk-winter-quiet)::after {
  opacity: inherit;
}

html body.sk-gems.sk-winter-magic .sk-paper-layer {
  background-color: transparent !important;
}

/* Атмосфера: 4 декора + лёгкие CSS-снежинки */
html body.sk-winter-magic .sk-wm-atmo {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

/* Доп. мерцание звёзд у краёв экрана */
html body.sk-winter-magic:not(.sk-winter-quiet) .sk-wm-atmo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.88;
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 214, 100, 0.55) 0, transparent 7%),
    radial-gradient(circle at 18% 4%, rgba(255, 234, 160, 0.35) 0, transparent 5%),
    radial-gradient(circle at 92% 8%, rgba(255, 214, 100, 0.45) 0, transparent 7%),
    radial-gradient(circle at 82% 5%, rgba(255, 234, 160, 0.3) 0, transparent 5%),
    radial-gradient(circle at 12% 94%, rgba(255, 214, 100, 0.45) 0, transparent 7%),
    radial-gradient(circle at 88% 96%, rgba(255, 214, 100, 0.5) 0, transparent 7%),
    radial-gradient(circle at 48% 3%, rgba(255, 220, 120, 0.28) 0, transparent 6%),
    radial-gradient(circle at 52% 97%, rgba(255, 220, 120, 0.26) 0, transparent 6%);
  animation: sk-wm-fringe-twinkle 7.2s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes sk-wm-fringe-twinkle {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

html body.sk-winter-magic.sk-winter-quiet .sk-wm-atmo {
  display: none;
}

html body.sk-winter-magic .sk-wm-atmo__orn {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 45%),
    linear-gradient(145deg, var(--sk-emerald) 0%, var(--sk-emerald-dust) 100%);
  border: 2px solid var(--sk-gold-winter);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 0 18px var(--sk-gold-glow);
  opacity: 0.72;
  animation: sk-wm-orn-float 9s ease-in-out infinite;
}

html body.sk-winter-magic .sk-wm-atmo__orn::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.35);
}

html body.sk-winter-magic .sk-wm-atmo__orn--1 {
  top: 14%;
  left: 6%;
  animation-delay: 0s;
}

html body.sk-winter-magic .sk-wm-atmo__orn--2 {
  top: 22%;
  right: 8%;
  width: 36px;
  height: 36px;
  animation-delay: 1.2s;
}

html body.sk-winter-magic .sk-wm-atmo__orn--3 {
  bottom: 18%;
  left: 10%;
  width: 32px;
  height: 32px;
  animation-delay: 2.4s;
}

html body.sk-winter-magic .sk-wm-atmo__orn--4 {
  bottom: 24%;
  right: 6%;
  animation-delay: 0.8s;
}

html body.sk-winter-magic .sk-wm-atmo__ribbon,
html body.sk-gems .sk-wm-atmo__ribbon,
html body .sk-wm-atmo__ribbon {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* legacy ribbon layout — disabled, остаются только зелёные sk-wm-atmo__orn */
html body.sk-winter-magic .sk-wm-atmo__ribbon--layout-off {
  position: absolute;
  display: block;
  width: 54px;
  height: 62px;
  line-height: 0;
  opacity: 0.62;
  animation: sk-wm-orn-float 11s ease-in-out infinite;
}

html body.sk-winter-magic .sk-wm-atmo__ribbon svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.28));
}

html body.sk-winter-magic .sk-wm-atmo__ribbon--a {
  top: 38%;
  left: 4%;
  animation-delay: 0.5s;
}

html body.sk-winter-magic .sk-wm-atmo__ribbon--b {
  top: 52%;
  right: 5%;
  width: 48px;
  height: 56px;
  animation-delay: 1.8s;
}

@keyframes sk-wm-orn-float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

html body.sk-winter-magic .sk-wm-atmo__css-snow i {
  position: absolute;
  top: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
  animation: sk-wm-css-fall linear infinite;
}

html body.sk-winter-magic .sk-wm-atmo__css-snow i:nth-child(1) {
  left: 12%;
  animation-duration: 14s;
  animation-delay: 0s;
}

html body.sk-winter-magic .sk-wm-atmo__css-snow i:nth-child(2) {
  left: 28%;
  animation-duration: 18s;
  animation-delay: 2s;
  opacity: 0.7;
}

html body.sk-winter-magic .sk-wm-atmo__css-snow i:nth-child(3) {
  left: 48%;
  animation-duration: 16s;
  animation-delay: 4s;
}

html body.sk-winter-magic .sk-wm-atmo__css-snow i:nth-child(4) {
  left: 68%;
  animation-duration: 20s;
  animation-delay: 1s;
  width: 4px;
  height: 4px;
}

html body.sk-winter-magic .sk-wm-atmo__css-snow i:nth-child(5) {
  left: 84%;
  animation-duration: 17s;
  animation-delay: 3s;
}

@keyframes sk-wm-css-fall {
  0% {
    transform: translateY(-5vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(105vh) translateX(12px);
    opacity: 0.2;
  }
}

/* Морозные карточки */
html body.sk-gems.sk-winter-magic:not(.sk-winter-quiet) ul.products li.product:not(.product-category),
html body.sk-gems.sk-winter-magic:not(.sk-winter-quiet) .woocommerce ul.products li.product:not(.product-category) {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 246, 0.88) 100%) padding-box,
    linear-gradient(130deg, var(--sk-gold-winter), #f8e7a0, #b8860b, var(--sk-gold-winter)) border-box !important;
  border: 1px solid transparent !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 10px 25px rgba(255, 255, 255, 0.15),
    0 18px 36px rgba(47, 63, 45, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}

html body.sk-gems.sk-winter-magic:not(.woocommerce-checkout) ul.products li.product:not(.product-category) {
  box-shadow:
    0 10px 25px rgba(255, 255, 255, 0.15),
    0 16px 32px rgba(47, 63, 45, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

@media (hover: hover) and (pointer: fine) {
  html body.sk-gems.sk-winter-magic:not(.woocommerce-checkout) ul.products li.product:not(.product-category):hover {
    transform: translateY(-5px);
    box-shadow:
      0 14px 32px rgba(255, 255, 255, 0.22),
      0 0 0 1px var(--sk-frost-line),
      0 22px 40px rgba(47, 63, 45, 0.32),
      0 0 24px var(--sk-gold-glow) !important;
  }
}

html body.sk-gems.sk-winter-magic .sk-wm-pick,
html body.sk-gems.sk-winter-magic .sk-wm-door.is-open,
html body.sk-gems.sk-winter-magic .sk-home-buy__card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--sk-frost-line) !important;
  box-shadow:
    0 10px 25px rgba(255, 255, 255, 0.15),
    0 12px 28px rgba(47, 63, 45, 0.18) !important;
}

/* Кнопки — «ёлочная игрушка» */
html body.sk-winter-magic .woocommerce a.button.add_to_cart_button,
html body.sk-winter-magic .woocommerce button.button.alt,
html body.sk-winter-magic .single_add_to_cart_button,
html body.sk-winter-magic .ajax_add_to_cart,
html body.sk-winter-magic .sk-shopbar__cta {
  background: linear-gradient(165deg, var(--sk-emerald) 0%, var(--sk-emerald-dust) 48%, var(--sk-emerald-deep) 100%) !important;
  border: 2px solid var(--sk-gold-winter) !important;
  color: #fff9ed !important;
  -webkit-text-fill-color: #fff9ed !important;
  box-shadow:
    0 8px 20px rgba(35, 48, 34, 0.35),
    0 0 16px var(--sk-gold-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.35s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  html body.sk-winter-magic .woocommerce a.button.add_to_cart_button:hover,
  html body.sk-winter-magic .woocommerce button.button.alt:hover,
  html body.sk-winter-magic .single_add_to_cart_button:hover,
  html body.sk-winter-magic .ajax_add_to_cart:hover,
  html body.sk-winter-magic .sk-shopbar__cta:hover {
    transform: translateY(-2px);
    background: linear-gradient(165deg, var(--sk-emerald-lit) 0%, var(--sk-emerald) 50%, var(--sk-emerald-dust) 100%) !important;
    box-shadow:
      0 12px 26px rgba(35, 48, 34, 0.38),
      0 0 22px rgba(212, 175, 55, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  }
}

html body.sk-winter-magic .sk-wm-garland {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent) !important;
}

html body.sk-winter-magic .sk-wm-garland i {
  background: linear-gradient(180deg, #fff6d4, var(--sk-gold-winter)) !important;
  box-shadow: 0 0 10px 2px var(--sk-gold-glow) !important;
}

@keyframes sk-wm-gold-twinkle {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.42;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.sk-winter-magic:not(.sk-winter-quiet)),
  html:has(body.sk-winter-magic:not(.sk-winter-quiet))::before,
  html:has(body.sk-winter-magic:not(.sk-winter-quiet)) body.sk-gems::before {
    animation: none !important;
    transform: none !important;
  }

  html body.sk-winter-magic .sk-wm-atmo__orn,
  html body.sk-winter-magic .sk-wm-atmo__ribbon,
  html body.sk-winter-magic .sk-wm-atmo__css-snow i,
  html body.sk-winter-magic:not(.sk-winter-quiet)::before,
  html:has(body.sk-winter-magic:not(.sk-winter-quiet)) body.sk-gems::after {
    animation: none !important;
    transform: none !important;
  }
}