/* Плашка акции 4+1 */

.ps-promo-4plus1 {
  --ps-promo-bg: linear-gradient(105deg, #fff7ee 0%, #ffe3c2 55%, #ffd3a0 100%);
  --ps-promo-glow: rgba(230, 5, 13, 0.28);
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 12px 40px 12px 14px;
  max-width: 640px;
  border: 1px solid rgba(230, 5, 13, 0.18);
  border-radius: 16px;
  background: var(--ps-promo-bg);
  overflow: visible;
  animation: ps-promo-cta-glow 1.2s ease-in-out infinite;
  transition: box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.ps-promo-4plus1.is-dismissed,
.ps-catalog__promo-slot.is-dismissed,
.ps-home-top__promo.is-dismissed,
.ps-home-top__promo-slot.is-dismissed,
.ps-kiosk-header__promo.is-dismissed {
  display: none !important;
}

.ps-promo-4plus1__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  text-indent: -9999px;
  overflow: hidden;
  color: transparent;
}

.ps-promo-4plus1 > :not(.ps-promo-4plus1__fx):not(.ps-promo-4plus1__link):not(.ps-promo-4plus1__close):not(.ps-promo-4plus1__info-wrap) {
  position: relative;
  z-index: 3;
}

.ps-promo-4plus1__close {
  position: absolute;
  top: 6px;
  right: 6px;
  left: auto;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ps-red, #E6050D);
  border-radius: 50%;
  background: #fff;
  color: var(--ps-red, #E6050D);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 2px 8px rgba(79, 29, 5, 0.16);
  transition: background 0.15s ease, color 0.15s ease;
}

.ps-promo-4plus1__close:hover,
.ps-promo-4plus1__close:focus-visible {
  background: var(--ps-red, #E6050D);
  color: #fff;
  outline: none;
}

.ps-promo-4plus1__fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.ps-promo-4plus1__fx::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: ps-promo-cta-shine 1.6s ease-in-out infinite;
}

@keyframes ps-promo-cta-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(230, 5, 13, 0.12);
  }
  50% {
    box-shadow: 0 0 22px 2px var(--ps-promo-glow);
  }
}

@keyframes ps-promo-cta-shine {
  0% {
    transform: translateX(-130%) skewX(-18deg);
  }
  55%,
  100% {
    transform: translateX(230%) skewX(-18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-promo-4plus1,
  .ps-promo-4plus1__fx::after {
    animation: none;
  }
}

.ps-promo-4plus1__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding-right: 4px;
}

.ps-promo-4plus1__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  min-width: 0;
  max-width: 100%;
  padding-right: 8px;
}

.ps-promo-4plus1__label {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ps-red, #E6050D);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ps-promo-4plus1__title {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  color: var(--ps-red, #E6050D);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.ps-promo-4plus1__formula {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 6px;
  min-width: 0;
  max-width: 100%;
  padding-right: 28px;
}

.ps-promo-4plus1__photos {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
  min-width: 0;
}

.ps-promo-4plus1__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 11px;
  color: var(--ps-red, #E6050D);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.ps-promo-4plus1__eq,
.ps-promo-4plus1__five {
  flex: 0 0 auto;
  color: var(--ps-red, #E6050D);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  line-height: 1;
}

.ps-promo-4plus1__eq {
  margin-left: 2px;
  font-size: 22px;
}

.ps-promo-4plus1__five {
  font-size: 30px;
  letter-spacing: -0.02em;
}

.ps-promo-4plus1__stack {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 74px;
  height: 44px;
  margin-left: 2px;
}

.ps-promo-4plus1__stack-photo {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  width: 38px;
  height: 38px;
  margin: 0;
  overflow: visible;
  transform: translate(calc(var(--ps-promo-i, 0) * 8px), -50%);
  z-index: calc(1 + var(--ps-promo-i, 0));
}

.ps-promo-4plus1__stack-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.14));
}

.ps-promo-4plus1__photo {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ps-promo-4plus1__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.ps-promo-4plus1__info-wrap {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: auto;
  top: auto;
  z-index: 5;
  overflow: visible;
}

.ps-promo-4plus1__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ps-red, #E6050D);
  border-radius: 50%;
  background: #fff;
  color: var(--ps-red, #E6050D);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.ps-promo-4plus1__info:hover,
.ps-promo-4plus1__info:focus-visible,
.ps-promo-4plus1__info[aria-expanded="true"] {
  background: var(--ps-red, #E6050D);
  color: #fff;
  outline: none;
}

/* Ниже и левее иконки «i» — не растягивает плашку */
.ps-promo-4plus1__tip {
  position: absolute;
  top: calc(100% + 8px);
  bottom: auto;
  left: auto;
  right: 100%;
  margin: 0 6px 0 0;
  z-index: 60;
  display: none;
  box-sizing: border-box;
  width: max-content;
  max-width: min(280px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--ps-brown, #4F1D05);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
}

.ps-promo-4plus1__tip::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 100%;
  top: auto;
  left: auto;
  border: 7px solid transparent;
  border-bottom-color: #fff;
}

/* Только по клику (повторный клик сворачивает) */
.ps-promo-4plus1__tip.is-open {
  display: block;
}

/* Верх каталога: крошки + заголовок слева, плашка справа; сетка товаров на всю ширину */
.ps-catalog__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 28px;
  margin: 0 0 22px;
}

.ps-catalog__top--no-promo {
  display: block;
}

.ps-catalog__top-meta {
  flex: 1 1 40%;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.ps-catalog__top-meta .ps-breadcrumbs,
.ps-catalog__top-meta #breadcrumbs {
  margin: 0 0 8px;
  width: 100%;
  text-align: left;
}

.ps-catalog__top-meta .ps-cat-heading {
  margin: 0;
  justify-content: flex-start;
  width: 100%;
}

.ps-catalog__promo-slot {
  flex: 0 1 640px;
  min-width: 0;
  max-width: 400px;
}

.ps-catalog__top-promo {
  width: 100%;
  max-width: 640px;
  z-index: 40;
  overflow: visible;
}

.ps-catalog__top-promo.is-fixed {
  position: fixed;
  left: auto;
  right: 16px;
  margin: 0;
  z-index: 40;
  max-width: min(640px, calc(100vw - 32px));
  overflow: visible;
}

.ps-catalog__top-promo .ps-promo-4plus1 {
  overflow: visible;
}

/* Главная: h1 слева, плашка справа; прилипание к шапке через JS (is-fixed) */
.ps-promo-4plus1--home {
  margin: 0;
  overflow: visible;
}

.ps-home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  margin: 0 0 22px;
}

.ps-home-top--no-promo {
  display: block;
}

.ps-home-top .ps-page-title,
.ps-home-top h1.ps-page-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.ps-home-top__promo-slot {
  flex: 0 1 400px;
  width: 100%;
  max-width: 400px;
  min-width: 0;
}

.ps-home-top__promo {
  width: 100%;
  max-width: 400px;
  z-index: 40;
  overflow: visible;
}

.ps-home-top__promo.is-fixed {
  position: fixed;
  left: auto;
  right: 16px;
  margin: 0;
  z-index: 40;
  max-width: min(400px, calc(100vw - 32px));
  overflow: visible;
}

.ps-home-top__promo .ps-promo-4plus1--home {
  width: 100%;
  max-width: none;
}

.ps-home-top__promo-slot.is-dismissed,
.ps-home-top__promo.is-dismissed {
  display: none !important;
}

@media (max-width: 900px) {
  .ps-catalog__top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ps-catalog__promo-slot {
    order: 0;
    max-width: none;
    width: 100%;
  }

  .ps-catalog__top-meta {
    order: -1;
    align-items: flex-start;
    text-align: left;
  }

  .ps-home-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0 0 14px;
  }

  .ps-home-top__promo-slot {
    order: 0;
    flex: 0 1 100px;
    max-width: none;
    width: 100%;
  }

  .ps-home-top .ps-page-title,
  .ps-home-top h1.ps-page-title {
    order: -1;
    margin: 0;
  }
}

@media (max-width: 720px) {
  .ps-promo-4plus1 {
    padding: 10px 36px 12px 12px;
    max-width: none;
  }

  .ps-promo-4plus1__title {
    font-size: 14px;
  }

  .ps-promo-4plus1__eq {
    font-size: 22px;
  }

  .ps-promo-4plus1__five {
    font-size: 30px;
  }

  .ps-promo-4plus1__photo {
    width: 36px;
    height: 36px;
  }

  .ps-promo-4plus1__stack {
    width: 72px;
    height: 44px;
  }

  .ps-promo-4plus1__stack-photo {
    width: 36px;
    height: 36px;
  }

  .ps-promo-4plus1__plus {
    font-size: 15px;
    width: 12px;
  }

  .ps-promo-4plus1__tip {
    max-width: min(260px, calc(100vw - 32px));
  }
}
