/* Paracelsum UI patch — 2026-09-19 (v4)
   1. Кнопка «В корзину» на карточке каталога: во всю ширину, с подписью
   2. Уведомление «Добавлено в корзину»
   3. Счётчик количества на карточке
   4. Красные плашки скидок не показываются
   Виджет чата «Служба заботы» — как в исходном дизайне, с подписью.
   Откат: убрать подключение patch.css и patch.js из HTML. */

/* ---------- 1. Карточка каталога ---------- */
div:has(> button[aria-label="В корзину"]),
div:has(> button[aria-label="Add to cart"]) {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

button[aria-label="В корзину"],
button[aria-label="Add to cart"] {
  width: 100% !important;
  height: auto !important;
  min-height: 44px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
}

button[aria-label="В корзину"]::after  { content: "В корзину"; }
button[aria-label="Add to cart"]::after { content: "Add to cart"; }

/* ---------- 2. Уведомление «Добавлено в корзину» ---------- */
.pc-toast {
  position: fixed;
  left: 50%;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px;
  border-radius: 999px;
  background: var(--app-surface, #ffffff);
  color: var(--app-heading, #1c1917);
  border: 1px solid var(--app-border, rgba(28, 25, 23, .12));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .18);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px);
  transition: opacity .2s ease, transform .2s ease;
}

.pc-toast.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.pc-toast__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--app-accent, #c49a3c);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

.pc-toast__btn {
  flex: none;
  border: 0;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--app-accent, #c49a3c);
  color: #1c1917;
  font: inherit;
  font-weight: 600;
}

.pc-toast__btn:hover { background: var(--app-accent-soft, #b8892f); }

@media (min-width: 768px) {
  .pc-toast { bottom: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-toast { transition: none; }
}

/* ---------- 3. Счётчик количества на карточке ---------- */
.pc-has-qty > button[aria-label="В корзину"],
.pc-has-qty > button[aria-label="Add to cart"] { display: none !important; }

.pc-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 4px;
  gap: 4px;
  border-radius: 999px;
  background: var(--app-accent, #c49a3c);
  color: #1c1917;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.pc-qty__btn {
  flex: none;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: inherit;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.pc-qty__btn:hover { background: rgba(0, 0, 0, .10); }
.pc-qty__btn:active { background: rgba(0, 0, 0, .18); }

.pc-qty__val {
  flex: 1 1 auto;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

/* ---------- 4. Красные плашки скидок ----------
   Плашка приходит из боевой сборки: <span class="… bg-[#e53935] …">−29%</span>.
   Этот класс в сборке больше нигде не используется, поэтому правило
   выключает только их. Подстраховка на случай смены цвета — в patch.js. */
[class*="bg-[#e53935]"] { display: none !important; }
.pc-no-badge { display: none !important; }

/* ---------- 2026-09-25: кнопка «Служба заботы» на телефоне выше нижнего меню ---------- */
@media (max-width: 639px) {
  div.fixed:has(> * > .fab-main-btn),
  div.fixed:has(.fab-main-btn) {
    bottom: calc(6.75rem + env(safe-area-inset-bottom, 0px) + var(--keyboard-bottom-inset, 0px)) !important;
  }
}

/* PC-MOBILE-FOOTER-WRAP 20260930 */
@media (max-width:639px){footer>div:last-child>div>div:last-child{flex-wrap:wrap;justify-content:center;gap:8px 12px}}

/* SEO speed 20261011: stop recurring paint work while keeping links and design. */
.pc-ch-link,.pc-ch-link::before,.pc-ch-link img,.pc-ch-link .pc-ch-shine,.pc-logo img,.pc-logo::after{animation:none!important}.pc-ch-link{box-shadow:0 0 10px rgba(var(--glow),.45)}.pc-logo img{filter:brightness(1.2) saturate(1.4)}.pc-article-publisher{margin-top:2rem;padding-top:1rem;border-top:1px solid var(--app-border);font-size:.875rem;color:var(--app-muted)}.pc-article-publisher a{text-decoration:underline;text-underline-offset:3px}

/* SEO paint 20261012: Lighthouse confirmed repeated border/shadow/background paints. */
.pfg-usp-glow,.pfg-shimmer-btn,.care-service-label{animation:none!important}

/* Stop the two remaining perpetual decorative sweeps. */
.pfg-shimmer-btn::after,.fab-main-btn::after{animation:none!important;display:none}
