/* ============================================================
   SPORTHUB — holiday.css
   Новогоднее оформление (inc/holiday.php). Подключается только в сезон,
   на <body> при этом висит класс .is-holiday.

   Все картинки — SVG прямо в файле (data:), внешних запросов нет.
   Товарные карточки, цены и кнопки не трогаем: украшения только по краям
   страницы, на покупку они не влияют.
   ============================================================ */

/* ---- Гирлянда под полосой разделов ----
   Висит поверх начала контента (хлебных крошек, баннера), но кликов не
   перехватывает. Ниже липкой шапки (z-index 100): при прокрутке шапка
   её накрывает, а не наоборот. */
.holiday-garland {
  position: relative;
  z-index: 60;
  height: 0;
  pointer-events: none;
}
/* Провод — общий для обеих групп лампочек, чтобы не мигал вместе с ними */
.holiday-garland::before,
.holiday-garland > i {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  background-repeat: repeat-x;
  background-position: center top;
}
.holiday-garland::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28'%3E%3Cpath d='M0 1 Q24 17 48 1' fill='none' stroke='%232b3a31' stroke-width='1.4'/%3E%3C/svg%3E"); }
.holiday-garland-a { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='28' viewBox='0 0 192 28'%3E%3Ccircle cx='24' cy='16' r='8' fill='%23D4F03C' opacity='.22'/%3E%3Crect x='22' y='8' width='4' height='3.5' rx='1' fill='%233a4a40'/%3E%3Cellipse cx='24' cy='16.5' rx='3.6' ry='5.2' fill='%23D4F03C'/%3E%3Cellipse cx='22.8' cy='14.5' rx='1' ry='1.8' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='120' cy='16' r='8' fill='%23FF4D4F' opacity='.22'/%3E%3Crect x='118' y='8' width='4' height='3.5' rx='1' fill='%233a4a40'/%3E%3Cellipse cx='120' cy='16.5' rx='3.6' ry='5.2' fill='%23FF4D4F'/%3E%3Cellipse cx='118.8' cy='14.5' rx='1' ry='1.8' fill='%23fff' opacity='.7'/%3E%3C/svg%3E"); animation: sh-twinkle 2.4s ease-in-out infinite; }
/* Вторая группа — в противофазе: лампочки загораются по очереди */
.holiday-garland-b { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='28' viewBox='0 0 192 28'%3E%3Ccircle cx='72' cy='16' r='8' fill='%23FFB224' opacity='.22'/%3E%3Crect x='70' y='8' width='4' height='3.5' rx='1' fill='%233a4a40'/%3E%3Cellipse cx='72' cy='16.5' rx='3.6' ry='5.2' fill='%23FFB224'/%3E%3Cellipse cx='70.8' cy='14.5' rx='1' ry='1.8' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='168' cy='16' r='8' fill='%235CC8FF' opacity='.22'/%3E%3Crect x='166' y='8' width='4' height='3.5' rx='1' fill='%233a4a40'/%3E%3Cellipse cx='168' cy='16.5' rx='3.6' ry='5.2' fill='%235CC8FF'/%3E%3Cellipse cx='166.8' cy='14.5' rx='1' ry='1.8' fill='%23fff' opacity='.7'/%3E%3C/svg%3E"); animation: sh-twinkle 2.4s ease-in-out -1.2s infinite; }

@keyframes sh-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* На телефоне полоса разделов скрыта, гирлянда оказывается под шапкой.
   Там она мельче, чтобы не наползать на заголовок страницы. */
@media (max-width: 767px) {
  .holiday-garland::before,
  .holiday-garland > i { height: 22px; background-size: auto 22px; }
}

/* Хлебным крошкам — немного воздуха сверху, чтобы лампочки не висели
   прямо на тексте */
.is-holiday .breadcrumb-bar { padding-top: 22px; }

/* ---- Шапочка на логотипе ----
   Только у текстового логотипа: на картинку заранее не угадать, куда
   её надеть. Надета на последнюю букву «Republic»: строчная «c» ниже
   заглавной «T», над ней есть место, и шапочка не закрывает буквы —
   на «T» логотип читался как «ennis». */
/* fit-content — в подвале логотип блочный, во всю ширину колонки,
   и шапочка уезжала от текста к правому краю */
.is-holiday .site-logo:not(:has(.site-logo-img)) { position: relative; width: fit-content; }
.is-holiday .site-logo:not(:has(.site-logo-img))::before {
  content: "";
  position: absolute;
  top: -6px; right: -15px;
  width: 24px; height: 21px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='26' viewBox='0 0 30 26'%3E%3Cpath d='M5 19 C6 10 11 3 19 3 C24 3 27 7 27 12 C25 9 22 8 20 10 C18 12 20 17 21 19 Z' fill='%23D93A3A'/%3E%3Cpath d='M8 17 C10 10 13 6 18 5' fill='none' stroke='%23fff' stroke-opacity='.25' stroke-width='1.5' stroke-linecap='round'/%3E%3Crect x='2' y='17' width='22' height='6.5' rx='3.25' fill='%23fff' stroke='%23E3E8E4' stroke-width='.8'/%3E%3Ccircle cx='26.5' cy='13.5' r='3.3' fill='%23fff' stroke='%23E3E8E4' stroke-width='.8'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: scaleX(-1) rotate(-14deg);
  pointer-events: none;
}
@media (max-width: 600px) {
  .is-holiday .site-logo:not(:has(.site-logo-img))::before {
    top: -5px; right: -12px; width: 20px; height: 17px;
  }
}

/* ---- Баннер главной: снежинки на зелёной части ----
   Только под текстом, не поверх фото: снимок остаётся чистым,
   а заголовок читается — снежинки полупрозрачные и мелкие. */
.is-holiday .home-hero-body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='300' viewBox='0 0 420 300'%3E%3Cg transform='translate(40 46) rotate(0) scale(1.1)' opacity='0.28'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3Cpath d='M-2.5-6.5L0-4 2.5-6.5M-2.5 6.5L0 4 2.5 6.5'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(250 30) rotate(15) scale(0.6)' opacity='0.2'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3Cpath d='M-2.5-6.5L0-4 2.5-6.5M-2.5 6.5L0 4 2.5 6.5'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(370 120) rotate(8) scale(1.4)' opacity='0.22'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3Cpath d='M-2.5-6.5L0-4 2.5-6.5M-2.5 6.5L0 4 2.5 6.5'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(150 170) rotate(25) scale(0.75)' opacity='0.18'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3Cpath d='M-2.5-6.5L0-4 2.5-6.5M-2.5 6.5L0 4 2.5 6.5'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(300 250) rotate(40) scale(1)' opacity='0.24'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3Cpath d='M-2.5-6.5L0-4 2.5-6.5M-2.5 6.5L0 4 2.5 6.5'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(60 262) rotate(10) scale(0.6)' opacity='0.18'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0-9V9M-7.8-4.5L7.8 4.5M-7.8 4.5L7.8-4.5'/%3E%3Cpath d='M-2.5-6.5L0-4 2.5-6.5M-2.5 6.5L0 4 2.5 6.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-position: 0 0;
}

/* ---- Снегопад (assets/js/holiday.js) ----
   Холст на весь экран под шапкой. Кликов не ловит. */
.holiday-snow {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---- Сугроб на фото баннеров ----
   Снизу снимка — неровная кромка снега. Над фото, но ниже точек слайдера. */
.is-holiday .home-hero--photo .home-hero-visual::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  z-index: 1;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='30' viewBox='0 0 200 30' preserveAspectRatio='none'%3E%3Cpath d='M0 18 C20 8 40 10 60 18 S100 26 120 16 S170 8 200 18 V30 H0Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x left bottom / 320px 100%;
  filter: drop-shadow(0 -2px 3px rgba(20, 36, 27, .18));
  pointer-events: none;
}

/* ---- Снежная шапка на жёлтой кнопке ---- */
.is-holiday .home-btn--ball { position: relative; }
.is-holiday .home-btn--ball::before {
  content: "";
  position: absolute;
  top: -6px; left: 16px; right: 16px;
  height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='14' viewBox='0 0 100 14' preserveAspectRatio='none'%3E%3Cpath d='M2 12 C0 6 8 3 16 5 C24 1 34 2 41 5 C50 0 62 1 70 5 C80 2 92 3 96 7 C100 9 99 12 97 12 C93 12 92 9 88 11 C84 13 80 9 74 11 C68 13 64 10 58 11 C50 12 46 9 40 11 C34 13 30 10 24 11 C18 13 12 10 8 12 C5 13 3 13 2 12Z' fill='%23fff'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  filter: drop-shadow(0 1px 1px rgba(20, 36, 27, .15));
  pointer-events: none;
}

/* ---- Нижняя плашка на телефоне: ёлка, звезда, подарок ----
   Свои значки рисуем маской цвета текста, а не картинкой: так они
   перекрашиваются вместе с кнопкой, как и штатные. ::before у кнопок
   занят подложкой активного пункта, поэтому берём ::after. */
@media (max-width: 767px) {
  .is-holiday .mbar-btn[href]:first-child > svg,
  .is-holiday .mbar-btn.js-wishlist-toggle > svg,
  .is-holiday .mbar-cart > svg { display: none; }

  .is-holiday .mbar-btn[href]:first-child::after,
  .is-holiday .mbar-btn.js-wishlist-toggle::after,
  .is-holiday .mbar-cart::after {
    content: "";
    width: 24px; height: 24px;
    background: currentColor;
    -webkit-mask: var(--sh-ico) no-repeat center / contain;
            mask: var(--sh-ico) no-repeat center / contain;
    transition: transform .15s ease;
  }
  .is-holiday .mbar-btn:active::after { transform: scale(.9); }
  .is-holiday .mbar-btn[href]:first-child { --sh-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l4.5 5.5h-2.3l4 5h-2.4l3.7 5H4.5l3.7-5H5.8l4-5H7.5z'/%3E%3Cpath d='M10.5 18.5V21h3v-2.5'/%3E%3C/svg%3E"); }
  .is-holiday .mbar-btn.js-wishlist-toggle { --sh-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8l2.8 5.8 6.3.9-4.6 4.4 1.1 6.3L12 17.2l-5.6 3 1.1-6.3L2.9 9.5l6.3-.9z'/%3E%3C/svg%3E"); }
  .is-holiday .mbar-cart { --sh-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='8' width='17' height='4' rx='1'/%3E%3Cpath d='M5 12v8.5h14V12'/%3E%3Cpath d='M12 8v12.5'/%3E%3Cpath d='M12 8C10.5 5 7 4 7 6.2 7 7.6 9.5 8 12 8c2.5 0 5-.4 5-1.8C17 4 13.5 5 12 8z'/%3E%3C/svg%3E"); color: var(--primary); }
}

/* ---- Кнопка чата — ёлочная игрушка ----
   Сверху золотой колпачок с петелькой, кнопка покачивается на ней.
   Открытый чат не качаем: в него целятся пальцем. */
.is-holiday .tr-chat-toggle::before {
  content: "";
  position: absolute;
  left: 50%; top: -9px;
  width: 16px; height: 11px;
  margin-left: -8px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #B8892B, #F2D27A 45%, #C99A35);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.is-holiday .tr-chat-toggle::after {
  content: "";
  position: absolute;
  left: 50%; top: -17px;
  width: 9px; height: 9px;
  margin-left: -4.5px;
  border: 2px solid #C99A35;
  border-radius: 50%;
}
.is-holiday .tr-chat:not(.is-open) .tr-chat-toggle {
  transform-origin: 50% -14px;
  animation: sh-swing 3.6s ease-in-out infinite;
}
.is-holiday .tr-chat:not(.is-open) .tr-chat-toggle:active { animation-play-state: paused; }
@keyframes sh-swing {
  0%, 100% { transform: rotate(5deg); }
  50%      { transform: rotate(-5deg); }
}

/* ---- Пустая корзина: мяч-игрушка вместо тележки ---- */
.is-holiday .cart-empty-icon svg { display: none; }
.is-holiday .cart-empty-icon {
  background: var(--primary-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CclipPath id='b'%3E%3Ccircle cx='32' cy='40' r='21'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle cx='32' cy='6' r='3.6' fill='none' stroke='%23B8892B' stroke-width='2'/%3E%3Crect x='25' y='9' width='14' height='9' rx='2.5' fill='%23D4A63A'/%3E%3Ccircle cx='32' cy='40' r='21' fill='%23D4F03C'/%3E%3Cg clip-path='url(%23b)' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 28 C22 26 26 50 12 62'/%3E%3Cpath d='M58 28 C42 26 38 50 52 62'/%3E%3C/g%3E%3Cellipse cx='24' cy='31' rx='5' ry='3.5' fill='%23fff' opacity='.4' transform='rotate(-30 24 31)'/%3E%3Ccircle cx='32' cy='40' r='21' fill='none' stroke='%239DB52A' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center 46% / 58px 58px;
}

/* ---- Поздравление в подвале (inc/holiday.php) ---- */
.holiday-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 28px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.holiday-footer-ball {
  width: 64px; height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CclipPath id='b'%3E%3Ccircle cx='32' cy='40' r='21'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle cx='32' cy='6' r='3.6' fill='none' stroke='%23B8892B' stroke-width='2'/%3E%3Crect x='25' y='9' width='14' height='9' rx='2.5' fill='%23D4A63A'/%3E%3Ccircle cx='32' cy='40' r='21' fill='%23D4F03C'/%3E%3Cg clip-path='url(%23b)' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 28 C22 26 26 50 12 62'/%3E%3Cpath d='M58 28 C42 26 38 50 52 62'/%3E%3C/g%3E%3Cellipse cx='24' cy='31' rx='5' ry='3.5' fill='%23fff' opacity='.4' transform='rotate(-30 24 31)'/%3E%3Ccircle cx='32' cy='40' r='21' fill='none' stroke='%239DB52A' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
  transform-origin: 50% 6%;
  animation: sh-swing 4s ease-in-out infinite;
}
.holiday-footer-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; line-height: 1.1;
  color: #fff;
}
.holiday-footer-text { margin-top: 6px; max-width: 60ch; font-size: 14px; line-height: 1.6; }
.holiday-footer-schedule {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  font-size: 13px; line-height: 1.6;
}
.holiday-footer-schedule-title { margin-bottom: 4px; font-weight: 600; color: var(--ball); }
.holiday-footer-schedule ul { list-style: none; margin: 0; padding: 0; }
.holiday-footer-schedule li { color: rgba(255, 255, 255, .85); }
@media (max-width: 767px) {
  .holiday-footer { grid-template-columns: auto minmax(0, 1fr); }
  .holiday-footer-ball { width: 48px; height: 48px; }
  .holiday-footer-title { font-size: 21px; }
  .holiday-footer-schedule { grid-column: 1 / -1; }
}

/* ---- Сугробы на тёмных полосах ----
   Снег лежит по нижнему краю тёмного: у полосы разделов сверху страницы
   (на телефоне её нет — тогда у верхней полосы с городом) и у подвала.
   Два слоя: дальние холмы светло-серые, ближние — белые. */
.is-holiday .main-nav { position: relative; }
.is-holiday .main-nav::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='40' viewBox='0 0 240 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V24C20 12 42 12 62 22C82 32 96 30 112 20C132 8 156 10 176 22C192 31 210 30 226 23C233 20 238 21 240 24V40Z' fill='%23C9D8D0'/%3E%3Cpath d='M0 40V31C24 23 46 25 70 31C94 37 116 35 140 29C164 21 190 23 214 31C225 34 234 33 240 31V40Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x left bottom / 300px 100%;
  pointer-events: none;
}
/* Пункты меню и метка активного раздела — поверх снега */
.is-holiday .main-nav > .container { position: relative; z-index: 1; }

.is-holiday .site-footer {
  position: relative;
  padding-bottom: 38px; /* место под сугробы, чтобы не закрыли копирайт */
}
.is-holiday .site-footer::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='40' viewBox='0 0 240 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V24C20 12 42 12 62 22C82 32 96 30 112 20C132 8 156 10 176 22C192 31 210 30 226 23C233 20 238 21 240 24V40Z' fill='%23C9D8D0'/%3E%3Cpath d='M0 40V31C24 23 46 25 70 31C94 37 116 35 140 29C164 21 190 23 214 31C225 34 234 33 240 31V40Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x left bottom / 420px 100%;
  pointer-events: none;
}

@media (max-width: 767px) {
  .is-holiday .top-bar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='40' viewBox='0 0 240 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V24C20 12 42 12 62 22C82 32 96 30 112 20C132 8 156 10 176 22C192 31 210 30 226 23C233 20 238 21 240 24V40Z' fill='%23C9D8D0'/%3E%3Cpath d='M0 40V31C24 23 46 25 70 31C94 37 116 35 140 29C164 21 190 23 214 31C225 34 234 33 240 31V40Z' fill='%23fff'/%3E%3C/svg%3E") repeat-x left bottom / 200px 100%;
    pointer-events: none;
  }
  .is-holiday .top-bar-inner { position: relative; z-index: 1; padding-bottom: 4px; }
  .is-holiday .site-footer { padding-bottom: 30px; }
  .is-holiday .site-footer::after { height: 32px; background-size: 300px 100%; }
}

/* Кому анимация мешает (настройка системы «Уменьшить движение») —
   гирлянда горит ровно, снега нет (скрипт его и не запускает). */
@media (prefers-reduced-motion: reduce) {
  .holiday-garland > i,
  .tr-chat .tr-chat-toggle,
  .holiday-footer-ball { animation: none !important; }
  .holiday-snow { display: none; }
}
