    /**
 * Main Popup — карусель всплывающих окон главной страницы (snackbar 480×170).
 * Появляется снизу-слева через 5 сек после DOMContentLoaded.
 *
 * Файл подключается через functions.php только при is_front_page().
 * HTML-разметка живёт в template-parts/main-popup.php.
 */

.pp-popup {
  /* Палитра букв */
  --c1: #DFE8B0; --c2: #E94190; --c3: #EF7EAE;
  --c4: #4DBFD4; --c5: #86C5ED; --c6: #F3932D; --c7: #D0DE98;

  /* Токены */
  --bg: #203C91;
  --accent: #F3932D;
  --close-bg: #124734;
  --close-bg-hover: #0D3D2C;
  --hairline: rgba(255, 255, 255, .55);
  --glass: rgba(255, 255, 255, .18);
  --glass-hover: rgba(255, 255, 255, .32);
  --font: 'Geometria', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  position: fixed; left: 24px; bottom: 24px; z-index: 9990;
  width: 480px; min-height: 170px;
  color: #fff;
  font-family: var(--font);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  transform: translate3d(0, calc(100% + 32px), 0);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
}
.pp-popup * { box-sizing: border-box; }
.pp-popup.is-active {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
}
.pp-popup.is-settled { will-change: auto; }

/* ===== Карусель ===== */
.pp-popup__track {
  display: grid;
  grid-template-rows: 1fr;
  border-radius: 14px;
  overflow: hidden;
}
.pp-popup__slide {
  grid-area: 1 / 1;
  position: relative;
  min-height: 170px;
  padding: 14px 56px 14px 22px;
  background-color: var(--bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  opacity: 0;
  transform: translate3d(100%, 0, 0);
  pointer-events: none;
  overflow: hidden;
  transition: opacity .5s ease, transform .55s cubic-bezier(.4, 0, .2, 1);
}
.pp-popup__slide.is-current {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}
.pp-popup__slide.is-leaving-up {
  opacity: 0;
  transform: translate3d(-100%, 0, 0);
}
.pp-popup__slide.is-leaving-down {
  opacity: 0;
  transform: translate3d(100%, 0, 0);
}
.pp-popup__slide.is-entering-down {
  transform: translate3d(-100%, 0, 0);
}
.pp-popup.is-single .pp-popup__slide { padding-right: 22px; }
.pp-popup.is-single .pp-popup__nav { display: none; }

/* ===== Бейджи ===== */
.pp-popup__badges { display: flex; gap: 8px; margin-bottom: 4px; }
.pp-popup__badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 10px;
  font-size: 10px; line-height: 1.2;
  border-radius: 999px;
}
.pp-popup__badge--date { background: var(--accent); font-weight: 700; }
.pp-popup__badge--time { border: 1px solid var(--hairline); font-weight: 400; }

/* ===== Заголовки ===== */
.pp-popup__title,
.pp-popup__title-arkhip {
  margin: 0 0 4px;
  text-transform: uppercase;
}
.pp-popup__title {
  font-weight: 800; font-size: 22px; line-height: 1.1;
  margin-bottom: 2px;
}
.pp-popup__title .l1 { color: var(--c1); }
.pp-popup__title .l2 { color: var(--c2); }
.pp-popup__title .l3 { color: var(--c3); }
.pp-popup__title .l4 { color: var(--c4); }
.pp-popup__title .l5 { color: var(--c5); }
.pp-popup__title .l6 { color: var(--c6); }
.pp-popup__title .l7 { color: var(--c7); }
.pp-popup .pp-popup__title-arkhip {
  font-family: 'Arkhip', var(--font);
  font-weight: 400; font-size: 26px; line-height: 1.05;
  margin-bottom: 6px;
}

/* ===== Текст слайдов ===== */
.pp-popup__subtitle {
  margin: 0 0 6px;
  font-size: 11px; font-weight: 500; line-height: 1.2;
  text-transform: uppercase;
}
.pp-popup__desc {
  margin: 0 0 10px;
  font-size: 11px; font-weight: 400; line-height: 1.2;
  max-width: 280px;
}

/* ===== Инфо-строки ===== */
.pp-popup__info {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 4px;
  font-size: 11px; font-weight: 400; line-height: 1.2;
}
.pp-popup__info--age { align-items: center; margin-bottom: 8px; }
.pp-popup__info-ico {
  flex-shrink: 0; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}
.pp-popup__info-ico--addr { margin-top: 1px; }
.pp-popup__info-ico svg { width: 100%; height: 100%; display: block; }
.pp-popup__info-text strong { display: block; font-weight: 400; }
.pp-popup__info-text span { display: block; font-size: 10px; }

/* ===== Кнопки ===== */
.pp-popup__actions { display: flex; gap: 8px; }
.pp-popup__btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 18px;
  font-family: inherit;
  font-weight: 500; font-size: 9px; line-height: 1em;
  text-transform: uppercase; letter-spacing: .5px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity .2s, background .2s, color .2s;
}
.pp-popup__btn--primary {
  background: #fff; color: #333; border: none;
  gap: 8px;
}
.pp-popup__btn--primary:hover { opacity: .9; }
.pp-popup__btn--label {
  background: transparent; color: #fff;
  border: 1px solid var(--hairline);
  cursor: default; pointer-events: none;
}
.pp-popup__btn-arrow {
  width: 10px; height: 10px; display: block; flex-shrink: 0;
}

/* ===== Слайд: Фабрика сладких чудес ===== */
.pp-popup__slide--fabrika {
  color: #333;
  font-family: 'Geometria', var(--font);
}
.pp-popup .pp-popup__slide--fabrika__title {
  margin: 0 0 8px;
  color: #124734;
  font-family: 'Arkhip', var(--font);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.2em;
  text-transform: uppercase;
}
.pp-popup__slide--fabrika__lead {
  margin: 0 0 8px;
  color: #333;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2em;
  text-transform: uppercase;
}
.pp-popup__slide--fabrika__ticket {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2em;
  color: #333;
}
.pp-popup__slide--fabrika__ticket--gold .pp-popup__slide--fabrika__ticket-name,
.pp-popup__slide--fabrika__ticket--gold .pp-popup__slide--fabrika__ticket-dash {
  color: #DD9C35;
}
.pp-popup__slide--fabrika__ticket--gold .pp-popup__slide--fabrika__ticket-name {
  font-weight: 500;
}
.pp-popup__slide--fabrika__ticket--silver .pp-popup__slide--fabrika__ticket-name {
  color: #868E91;
  font-weight: 500;
}
.pp-popup__slide--fabrika__date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 6px 14px;
  color: #124734;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.333em;
  text-transform: uppercase;
  border: 1px solid #124734;
  border-radius: 6px;
}

/* ===== Закрытие ===== */
.pp-popup__close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 10px;
    border: none;
    border-radius: 0 14px 0 12px;
    background: var(--color-primary, #124734);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
}
.pp-popup__close:hover {
    background: var(--color-primary-dark, #0D3D2C);
    color: #ffffff;
}
.pp-popup__close svg { width: 12px; height: 12px;
    transition: transform 0.25s ease;
}

.pp-popup__close:hover svg,
.pp-popup__close:focus-visible svg {
    transform: rotate(90deg);
}

/* ===== Навигация ===== */
.pp-popup__nav {
  position: absolute; right: 10px; bottom: 10px; z-index: 4;
  display: flex; flex-direction: row; gap: 4px;
}
.pp-popup__arrow {
  width: 22px; height: 22px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none; border-radius: 6px;
  color: #fff; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, opacity .2s;
}
.pp-popup__arrow:hover { background: var(--glass-hover); }
.pp-popup__arrow:disabled { opacity: .4; cursor: default; }
.pp-popup__arrow svg { width: 10px; height: 10px; display: block; }

/* ===== Слайд: Летние выходные ===== */
.pp-popup__slide--leto .pp-popup__title-arkhip {
  font-size: 18px;
  line-height: 1.1;
  margin-bottom: 8px;
}
.pp-popup__slide--leto .pp-popup__desc {
  font-size: 10px;
  line-height: 12px;
  max-width: 330px;
  margin-bottom: 10px;
}
.pp-popup__slide--leto .pp-popup__btn--primary {
  color: #124734;
  font-size: 9px;
  line-height: 13.5px;
}

.pg-spop { color: #fff; }
.pp-popup .pg-spop__title {
  margin: 0;
  font-family: 'Arkhip', var(--font);
  font-weight: 400; font-size: 24px; line-height: 1.2;
  text-transform: uppercase;
}
.pg-spop__lead {
  margin: 4px 0 0;
  font-size: 11px; line-height: 1.1;
  text-transform: uppercase;
}
.pg-spop__desc {
  margin: 6px 0 0;
  font-size: 11px; font-weight: 300; line-height: 1.2;
  color: #f0f0f0;
}
.pg-spop__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pg-spop__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 24px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .9);
  color: #191919;
  font-size: 12px; font-weight: 500; line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.pg-spop__btn:hover { background: #fff; color: #124734; }
.pg-spop--day .pg-spop__btn {
  padding: 5px 16px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #fff;
  color: #333;
  line-height: 1.33;
  text-transform: none;
}
.pg-spop--day .pg-spop__btn--ghost { background: transparent; color: #fff; }
.pg-spop--day .pg-spop__btn--ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.pp-popup .pg-spop--day .pg-spop__title { font-size: 20px; line-height: 1; font-weight: 300; }
.pg-spop--day { max-width: 385px; }
.pg-spop--day .pg-spop__lead { max-width: 300px; }
.pg-spop--day .pg-spop__desc { max-width: 305px; font-weight: 400; }
.pg-spop--cert { align-self: flex-end; width: 232px; margin-right: -12px; }
.pg-spop--hydra { width: 280px; margin-left: 12px; }
.pg-spop--hydra .pg-spop__desc { font-size: 12px; }

/* ===== Адаптив ===== */
@media (max-width: 540px) {
  .pp-popup .pg-spop__title { font-size: 17px; }
  .pp-popup .pg-spop--day .pg-spop__title { font-size: 15px; }
  .pg-spop__lead, .pg-spop__desc, .pg-spop--hydra .pg-spop__desc { font-size: 10px; }
  .pg-spop__actions { margin-top: 8px; }
  .pg-spop__btn { padding: 5px 16px; font-size: 10.5px; border-radius: 4px; }
  .pg-spop--day .pg-spop__btn { padding: 5px 12px; font-size: 11px; }
  .pg-spop--cert { width: 190px; margin-right: -14px; }
  .pg-spop--hydra { width: 255px; margin-left: 0; }
  .pp-popup { left: 12px; right: 12px; bottom: 12px; width: auto; min-height: 0; }
  .pp-popup__slide { padding: 14px 44px 14px 16px; }
  .pp-popup.is-single .pp-popup__slide { padding-right: 16px; }
  .pp-popup__title-arkhip { font-size: 20px; }
  .pp-popup__slide--leto .pp-popup__title-arkhip { font-size: 16px; }
  .pp-popup__desc { max-width: 100%; }
  .pp-popup__nav { right: 8px; bottom: 8px; gap: 3px; }
  .pp-popup__arrow { width: 20px; height: 20px; border-radius: 5px; }
  .pp-popup__arrow svg { width: 9px; height: 9px; }
  
  .pp-popup__close svg { width: 10px; height: 10px; }
}

@media (max-width: 400px) {
  .pp-popup__title { font-size: 20px; }
  .pp-popup__title-arkhip { font-size: 17px; }
  .pp-popup__subtitle { font-size: 10px; }
  .pp-popup__info { font-size: 10px; }
  .pp-popup__btn { padding: 0 14px; height: 28px; }
  .pp-popup__actions { gap: 6px; }
}

@media (hover: none) {
  .pp-popup__arrow { background: rgba(255, 255, 255, .28); }
}

@media (prefers-reduced-motion: reduce) {
  .pp-popup,
  .pp-popup__slide,
  .pp-popup__arrow,
  .pp-popup__close,
  .pp-popup__btn--primary {
    transition: opacity .15s ease;
  }
  .pp-popup,
  .pp-popup__slide,
  .pp-popup__slide.is-leaving-up,
  .pp-popup__slide.is-leaving-down,
  .pp-popup__slide.is-entering-down {
    transform: none;
  }
}

.home #pp-main-popup .pp-popup__track .pp-popup__slide [class*="__btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: flex-start;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  height: 32px;
  min-height: 0;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .home #pp-main-popup .pp-popup__track .pp-popup__slide [class*="__btn"] {
    height: 30px;
    padding: 0 14px;
  }
}
