/* Новогодняя шапка apeti.ru: гирлянда, колпак на логотипе, снег на кнопке «Каталог товаров».
   Только украшения поверх шаблона: ничего не сдвигает, не перекрывает нажатия (pointer-events: none).
   Всё в классах apeti-ny-*; убрать — удалить подключение этого файла и apeti-newyear.js. */

/* ---------- гирлянда: своя полоска над шапкой ---------- */
.apeti-ny-garland {
  position: relative;
  height: 30px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='30' viewBox='0 0 220 30'%3E%3Cpath d='M0 3 C 55 17, 165 17, 220 3' fill='none' stroke='%232c3510' stroke-width='1.4' stroke-opacity='.85'/%3E%3Crect x='35.4' y='8.4' width='5.2' height='4' rx='1' fill='%233a3a2a'/%3E%3Cellipse cx='38' cy='18.4' rx='4.8' ry='6.8' fill='%23e8650a'/%3E%3Cellipse cx='36.5' cy='15.8' rx='1.3' ry='2.2' fill='%23fff' fill-opacity='.75'/%3E%3Crect x='81.4' y='12.3' width='5.2' height='4' rx='1' fill='%233a3a2a'/%3E%3Cellipse cx='84' cy='22.3' rx='4.8' ry='6.8' fill='%23e0362c'/%3E%3Cellipse cx='82.5' cy='19.7' rx='1.3' ry='2.2' fill='%23fff' fill-opacity='.75'/%3E%3Crect x='133.4' y='12.3' width='5.2' height='4' rx='1' fill='%233a3a2a'/%3E%3Cellipse cx='136' cy='22.3' rx='4.8' ry='6.8' fill='%23f5b800'/%3E%3Cellipse cx='134.5' cy='19.7' rx='1.3' ry='2.2' fill='%23fff' fill-opacity='.75'/%3E%3Crect x='179.4' y='8.4' width='5.2' height='4' rx='1' fill='%233a3a2a'/%3E%3Cellipse cx='182' cy='18.4' rx='4.8' ry='6.8' fill='%233f9a4a'/%3E%3Cellipse cx='180.5' cy='15.8' rx='1.3' ry='2.2' fill='%23fff' fill-opacity='.75'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: 220px 30px;
  pointer-events: none;
  overflow: hidden;
  z-index: 14;
}
/* свечение огоньков: два слоя мигают по очереди */
.apeti-ny-garland::before,
.apeti-ny-garland::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: repeat-x;
  background-position: center top;
  background-size: 220px 30px;
  opacity: .25;
  animation: apetiNyTwinkle 2.6s ease-in-out infinite alternate;
}
.apeti-ny-garland::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='30' viewBox='0 0 220 30'%3E%3Cdefs%3E%3CradialGradient id='g0'%3E%3Cstop offset='0' stop-color='%23e8650a' stop-opacity='.85'/%3E%3Cstop offset='1' stop-color='%23e8650a' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%23f5b800' stop-opacity='.85'/%3E%3Cstop offset='1' stop-color='%23f5b800' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='38' cy='18.4' r='13' fill='url(%23g0)'/%3E%3Ccircle cx='136' cy='22.3' r='13' fill='url(%23g1)'/%3E%3C/svg%3E");
}
.apeti-ny-garland::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='30' viewBox='0 0 220 30'%3E%3Cdefs%3E%3CradialGradient id='g0'%3E%3Cstop offset='0' stop-color='%23e0362c' stop-opacity='.85'/%3E%3Cstop offset='1' stop-color='%23e0362c' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%233f9a4a' stop-opacity='.85'/%3E%3Cstop offset='1' stop-color='%233f9a4a' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='84' cy='22.3' r='13' fill='url(%23g0)'/%3E%3Ccircle cx='182' cy='18.4' r='13' fill='url(%23g1)'/%3E%3C/svg%3E");
  animation-delay: -1.3s;
}
@keyframes apetiNyTwinkle {
  from { opacity: .1; }
  to   { opacity: 1; }
}
.apeti-ny-garland--mobile { display: none; }
@media (max-width: 999px) {
  .apeti-ny-garland--top { display: none; }
  .apeti-ny-garland { height: 24px; background-size: 176px 24px; }
  .apeti-ny-garland::before,
  .apeti-ny-garland::after { background-size: 176px 24px; }
  .apeti-ny-garland--mobile {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 43px;
    background-color: transparent;
    z-index: 1;
  }
  /* место под гирлянду: логотип, подпись и телефон — на 24px ниже, страница под шапкой — тоже */
  #page > header .header-wrap-tablet { transform: translateY(24px); }
  #page > header { margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .apeti-ny-garland::before,
  .apeti-ny-garland::after { animation: none; opacity: .5; }
}

/* ---------- колпак Деда Мороза на логотипе ---------- */
.apeti-ny-logo {
  position: relative;
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
}
.apeti-ny-logo > img { position: relative; z-index: 1; }
.apeti-ny-hat {
  position: absolute;
  z-index: 2;
  left: 13%;
  top: -50%;
  width: 42%;
  aspect-ratio: 64 / 50;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 50'%3E%3Cpath d='M8 37 C 10 20, 26 5, 46 6 C 54 6.5, 60 12, 59 19 L 52 20 C 49 17, 46 17, 45 19 C 49 25, 51 31, 51 37 Z' fill='%23d7372f'/%3E%3Cpath d='M45 19 C 49 25, 51 31, 51 37 L 40 37 C 41 30, 43 24, 45 19 Z' fill='%23a82620' fill-opacity='.55'/%3E%3Cpath d='M15 30 C 20 18, 30 11, 40 10' fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='2.4' stroke-linecap='round'/%3E%3Crect x='4' y='33' width='52' height='13' rx='6.5' fill='%23fff' stroke='%23e3e3e3' stroke-width='1'/%3E%3Ccircle cx='57' cy='21' r='6.4' fill='%23fff' stroke='%23e3e3e3' stroke-width='1'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-14deg);
  transform-origin: 50% 90%;
  pointer-events: none;
}

/* планшет: логотип крупнее — колпак чуть меньше, чтобы не касался гирлянды */
@media (min-width: 681px) and (max-width: 999px) {
  .apeti-ny-hat { left: 16%; top: -38%; width: 34%; }
}

/* ---------- снег на зелёной кнопке «Каталог товаров» (только компьютер) ---------- */
#page > header a.header-main-menu-button {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M0 0 H120 V4 C 112 4, 110 9, 104 9 C 98 9, 98 4, 90 4 C 84 4, 84 11, 77 11 C 70 11, 71 4, 62 4 C 56 4, 55 8, 49 8 C 43 8, 43 4, 35 4 C 29 4, 28 10, 21 10 C 14 10, 14 4, 7 4 C 3 4, 2 5, 0 5 Z' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: left top;
  background-size: 120px 12px;
}

/* ---------- главная: снег на зелёной вкладке «Хиты продаж» ---------- */
a.rr-tabLink.active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M0 0 H120 V4 C 112 4, 110 9, 104 9 C 98 9, 98 4, 90 4 C 84 4, 84 11, 77 11 C 70 11, 71 4, 62 4 C 56 4, 55 8, 49 8 C 43 8, 43 4, 35 4 C 29 4, 28 10, 21 10 C 14 10, 14 4, 7 4 C 3 4, 2 5, 0 5 Z' fill='%23fff'/%3E%3C/svg%3E") !important;
  background-repeat: repeat-x !important;
  background-position: left top !important;
  background-size: 120px 12px !important;
}

/* ---------- карточка товара: снег на кнопке «Купить» и веточка в углу блока с ценой ---------- */
.product-info-price-block a.product-info-button-primary {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M0 0 H120 V4 C 112 4, 110 9, 104 9 C 98 9, 98 4, 90 4 C 84 4, 84 11, 77 11 C 70 11, 71 4, 62 4 C 56 4, 55 8, 49 8 C 43 8, 43 4, 35 4 C 29 4, 28 10, 21 10 C 14 10, 14 4, 7 4 C 3 4, 2 5, 0 5 Z' fill='%23fff'/%3E%3C/svg%3E") !important;
  background-repeat: repeat-x !important;
  background-position: left top !important;
  background-size: 120px 12px !important;
}
.apeti-ny-sprig {
  position: absolute;
  right: 10px;
  bottom: 4px;
  width: 112px;
  height: 61px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 50'%3E%3Cpath d='M90 30L18 14' stroke='%235a4126' stroke-width='1.6'/%3E%3Cpath d='M90.0 30.0l-8.6 4.8M90.0 30.0l-6.1 -7.8M85.8 29.1l-6.1 -7.8M83.6 28.6l-8.8 7.2M77.3 27.2l-7.3 5.6M68.8 25.3l-5.7 6.1M66.7 24.8l-4.8 -8.2M62.5 23.9l-5.4 -6.9M60.4 23.4l-7.7 5.5M56.1 22.5l-4.7 -7.6M41.3 19.2l-6.0 5.2M39.2 18.7l-2.8 -5.9M30.7 16.8l-3.1 -5.6M24.4 15.4l-5.5 3.0M22.2 14.9l-3.9 3.0M71.1 24.5l-5.9 -0.2M65.1 19.4l-4.3 0.1M63.1 17.7l-4.7 -0.1M59.1 14.2l-3.2 0.8M52.1 25.6l-0.2 5.1M52.1 25.6l-5.1 -0.0M46.1 30.3l-4.4 -1.4M42.1 33.5l-3.6 -0.7M39.2 18.7l-7.2 1.9M37.2 17.0l-5.5 0.8M35.2 15.3l0.6 -6.0M33.2 13.6l-0.5 -5.8M31.2 11.8l-4.7 0.8M25.2 6.7l-3.7 0.0' stroke='%232f6a3c' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M87.9 29.5l-8.8 4.4M81.5 28.1l-7.3 4.3M81.5 28.1l-4.6 -7.1M79.4 27.6l-7.7 6.0M79.4 27.6l-5.9 -7.8M77.3 27.2l-4.2 -8.1M73.1 26.2l-7.6 4.5M73.1 26.2l-3.6 -8.0M68.8 25.3l-3.9 -7.3M54.0 22.0l-4.7 -6.3M49.8 21.1l-6.2 3.8M47.6 20.6l-2.5 -7.5M45.5 20.1l-5.5 3.0M45.5 20.1l-4.0 -4.9M34.9 17.8l-5.9 3.1M32.8 17.3l-5.8 3.0M32.8 17.3l-2.9 -5.9M20.1 14.5l-2.9 -5.5M18.0 14.0l-2.1 -4.5M73.1 26.2l-7.0 1.9M67.1 21.1l-5.9 0.6M63.1 17.7l0.7 -4.6M59.1 14.2l0.3 -3.3M56.1 22.5l-7.3 -2.3M50.1 27.2l-4.9 -1.9M48.1 28.8l-5.2 -0.4M42.1 33.5l0.4 3.7M39.2 18.7l0.7 -7.4M33.2 13.6l-5.9 -0.1M31.2 11.8l-0.1 -4.8M29.2 10.1l-0.0 -4.5M27.2 8.4l0.6 -4.0' stroke='%2324583a' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M75.2 26.7l-7.5 5.7M64.6 24.4l-7.3 5.8M64.6 24.4l-4.9 -7.9M60.4 23.4l-5.8 -7.4M54.0 22.0l-6.8 3.9M49.8 21.1l-2.7 -6.8M43.4 19.6l-3.0 -5.8M37.1 18.2l-3.5 -4.8M34.9 17.8l-3.1 -5.9M30.7 16.8l-4.4 4.6M28.6 16.4l-3.2 -5.8M26.5 15.9l-4.5 2.4M24.4 15.4l-3.6 -5.1M22.2 14.9l-1.9 -4.5M20.1 14.5l-4.4 4.3M18.0 14.0l-4.3 2.5M69.1 22.8l-5.1 1.2M69.1 22.8l-0.1 -5.3M65.1 19.4l-0.1 -4.3M61.1 15.9l-3.8 0.1M54.1 24.0l-6.2 -1.6M48.1 28.8l-0.8 5.2M37.2 17.0l0.1 -5.5M27.2 8.4l-3.9 1.2M25.2 6.7l-0.2 -3.7' stroke='%233e7f4b' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M87.9 29.5l-6.2 -7.7M85.8 29.1l-8.5 5.1M83.6 28.6l-5.1 -10.2M75.2 26.7l-4.6 -8.2M70.9 25.8l-6.7 4.2M70.9 25.8l-2.7 -7.4M66.7 24.8l-8.3 4.6M62.5 23.9l-6.8 5.4M58.2 22.9l-5.8 6.3M58.2 22.9l-4.7 -7.1M56.1 22.5l-7.5 4.9M51.9 21.5l-5.2 5.3M51.9 21.5l-4.5 -5.9M47.6 20.6l-5.3 5.8M43.4 19.6l-5.9 2.8M41.3 19.2l-3.9 -6.9M39.2 18.7l-5.4 3.7M37.1 18.2l-4.1 4.4M28.6 16.4l-4.5 4.9M26.5 15.9l-2.0 -4.7M73.1 26.2l-0.9 -7.2M71.1 24.5l0.6 -5.9M67.1 21.1l-1.0 -5.9M61.1 15.9l-0.6 -3.7M56.1 22.5l-1.8 7.5M54.1 24.0l-0.1 6.4M50.1 27.2l0.6 5.2M46.1 30.3l-0.5 4.6M44.1 31.9l-0.5 4.3M44.1 31.9l-4.2 -1.1M35.2 15.3l-6.0 1.0M29.2 10.1l-4.5 0.6' stroke='%231f4d33' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M50 22V31' stroke='%23c9a24a' stroke-width='.8'/%3E%3Crect x='48' y='29.4' width='4' height='3' rx='.8' fill='%23c9a24a'/%3E%3Ccircle cx='50' cy='38' r='7.4' fill='%23e2382c'/%3E%3Ccircle cx='47.8' cy='35.6' r='1.9' fill='%23ffb3a8' fill-opacity='.9'/%3E%3Cpath d='M70 26V34' stroke='%23c9a24a' stroke-width='.8'/%3E%3Crect x='68' y='32.4' width='4' height='3' rx='.8' fill='%23c9a24a'/%3E%3Ccircle cx='70' cy='41' r='7.4' fill='%23f0b21f'/%3E%3Ccircle cx='67.8' cy='38.6' r='1.9' fill='%23fff0b8' fill-opacity='.9'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 999px) {
  .apeti-ny-sprig { display: none; }   /* на телефоне блок с ценой узкий — веточку не показываем */
}

/* ---------- подвал: сугроб по верхнему краю зелёной части (все страницы) ---------- */
.apeti-ny-footer-snow {
  position: relative;
  height: 0;
  z-index: 2;
  pointer-events: none;
}
.apeti-ny-footer-snow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='18' viewBox='0 0 180 18'%3E%3Cpath d='M0 0 H180 V6 C 168 6, 166 14, 156 14 C 146 14, 146 7, 134 7 C 124 7, 123 16, 112 16 C 101 16, 102 6, 90 6 C 80 6, 79 12, 70 12 C 61 12, 60 6, 50 6 C 41 6, 40 15, 29 15 C 18 15, 18 6, 8 6 C 4 6, 2 7, 0 7 Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x left top / 180px 18px;
}
