/* ═══════════════════════════════════════════════════════════════════════
   NanoFarm · КНОПКИ — прежняя система (капсулы, 4 роли) + объём
   Объём: мягкий градиент сверху вниз, светлая кромка сверху,
   тёмная кромка снизу, мягкая тень. Без кругов-стрелок и заливок.
   primary — бирюза · secondary — белая · dark — графит · ghost — без фона.
   Размеры: lg 52 · md 46 · sm 38. Иконочные — круг.
   ═══════════════════════════════════════════════════════════════════════ */

html body {
  --b-teal-ink: #2f7f88;
  --b-text: #1f1e1f;
  --b-line: rgba(55, 53, 54, 0.14);
  --b-soft: rgba(55, 53, 54, 0.06);
  --b-ring: 0 0 0 3px rgba(77, 160, 169, 0.35);

  --b-pri-bg: linear-gradient(180deg, #5cb2bb 0%, #4ba1aa 52%, #43949d 100%);
  --b-pri-bg-h: linear-gradient(180deg, #55a9b2 0%, #44979f 52%, #3c8a93 100%);
  --b-pri-sh: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 1px 2px rgba(31, 30, 31, 0.1), 0 6px 14px -8px rgba(47, 127, 136, 0.5);
  --b-pri-sh-h: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.14), 0 2px 4px rgba(31, 30, 31, 0.1), 0 12px 22px -12px rgba(47, 127, 136, 0.65);

  --b-sec-bg: linear-gradient(180deg, #ffffff 0%, #f2f4f4 100%);
  --b-sec-sh: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(55, 53, 54, 0.05), 0 1px 2px rgba(31, 30, 31, 0.05), 0 6px 14px -10px rgba(31, 30, 31, 0.25);
  --b-sec-sh-h: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(55, 53, 54, 0.05), 0 2px 4px rgba(31, 30, 31, 0.05), 0 10px 20px -12px rgba(47, 127, 136, 0.35);

  --b-dark-bg: linear-gradient(180deg, #403e3f 0%, #2a2829 55%, #1f1e1f 100%);
  --b-dark-sh: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 1px 2px rgba(31, 30, 31, 0.15), 0 6px 14px -8px rgba(31, 30, 31, 0.5);

  --b-icon-bg: linear-gradient(180deg, #ffffff 0%, #f1f3f3 100%);
}
html[data-theme="dark"] body {
  --b-teal-ink: #6fb8c0;
  --b-text: #f2f1f0;
  --b-line: rgba(255, 255, 255, 0.12);
  --b-soft: rgba(255, 255, 255, 0.06);
  --b-sec-bg: linear-gradient(180deg, #393839 0%, #2b2a2b 100%);
  --b-sec-sh: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 6px 14px -10px rgba(0, 0, 0, 0.8);
  --b-sec-sh-h: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 10px 20px -12px rgba(0, 0, 0, 0.9);
  --b-dark-bg: linear-gradient(180deg, #ffffff 0%, #ecebea 100%);
  --b-dark-sh: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(0, 0, 0, 0.08), 0 6px 14px -10px rgba(0, 0, 0, 0.8);
  --b-icon-bg: linear-gradient(180deg, #393839 0%, #2b2a2b 100%);
}

/* ── база: все текстовые кнопки ── */
html body .nf-btn.nf-btn,
html body .nf-hero-btn.nf-hero-btn,
html body .nf-epdp-cta.nf-epdp-cta,
html body #quickQuoteBtn#quickQuoteBtn,
html body .pfg-card__cta.pfg-card__cta,
html body .nf-map-card-open-link.nf-map-card-open-link,
html body .nf-ps__cta.nf-ps__cta,
html body .news-sort-button.news-sort-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 46px !important;
  min-height: 0 !important;
  padding: 0 22px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1 !important;
  white-space: nowrap;
  text-shadow: none !important;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease !important;
}
html body .nf-btn.nf-btn::before,
html body .nf-btn.nf-btn::after,
html body .nf-hero-btn.nf-hero-btn::before,
html body .nf-hero-btn.nf-hero-btn::after,
html body .nf-hero--brand .nf-hero-btn.nf-hero-btn.nf-hero-btn::before,
html body #quickQuoteBtn#quickQuoteBtn::before,
html body #quickQuoteBtn#quickQuoteBtn::after,
html body .pfg-card__cta.pfg-card__cta::before,
html body .pfg-card__cta.pfg-card__cta::after,
html body .nf-ps__cta.nf-ps__cta::before,
html body .nf-ps__cta.nf-ps__cta::after,
html body .nf-epdp-cta.nf-epdp-cta--ghost::before,
html body .nf-epdp-cta.nf-epdp-cta--ghost::after,
html body .nf-map-card-open-link.nf-map-card-open-link::before,
html body .nf-map-card-open-link.nf-map-card-open-link::after { display: none !important; }

html body .nf-btn.nf-btn:active,
html body .nf-hero-btn.nf-hero-btn:active,
html body .nf-epdp-cta.nf-epdp-cta:active,
html body #quickQuoteBtn#quickQuoteBtn:active,
html body .nf-ps__cta.nf-ps__cta:active { transform: translateY(0) scale(0.98) !important; }
html body .nf-btn.nf-btn:focus-visible,
html body .nf-hero-btn.nf-hero-btn:focus-visible,
html body .nf-epdp-cta.nf-epdp-cta:focus-visible,
html body #quickQuoteBtn#quickQuoteBtn:focus-visible,
html body .nf-ps__cta.nf-ps__cta:focus-visible { outline: none !important; box-shadow: var(--b-ring) !important; }

/* размеры */
html body .nf-hero-btn.nf-hero-btn,
html body .nf-hero--brand .nf-hero-btn.nf-hero-btn.nf-hero-btn,
html body .nf-epdp-cta.nf-epdp-cta { height: 52px !important; padding: 0 26px !important; font-size: 15px !important; }
html body .nf-btn.nf-btn.nf-btn-sm,
html body .nf-map-card-open-link.nf-map-card-open-link,
html body .pfg-card__cta.pfg-card__cta { height: 38px !important; padding: 0 16px !important; font-size: 13px !important; }
html body #quickQuoteBtn#quickQuoteBtn { height: 44px !important; padding: 0 20px !important; font-size: 13.5px !important; }

/* ── PRIMARY ── */
html body .nf-btn.nf-btn.nf-btn-primary,
html body .nf-hero-btn.nf-hero-btn--primary,
html body .nf-hero--brand .nf-hero-btn.nf-hero-btn.nf-hero-btn--primary,
html body .nf-epdp-cta.nf-epdp-cta:not(.nf-epdp-cta--ghost),
html body #quickQuoteBtn#quickQuoteBtn,
html body .pfg-card__cta.pfg-card__cta {
  background: var(--b-pri-bg) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: var(--b-pri-sh) !important;
}
html body .nf-btn.nf-btn.nf-btn-primary:hover,
html body .nf-hero-btn.nf-hero-btn--primary:hover,
html body .nf-hero--brand .nf-hero-btn.nf-hero-btn.nf-hero-btn--primary:hover,
html body .nf-epdp-cta.nf-epdp-cta:not(.nf-epdp-cta--ghost):hover,
html body #quickQuoteBtn#quickQuoteBtn:hover,
html body .pfg-card:hover .pfg-card__cta.pfg-card__cta,
html body .pfg-card__cta.pfg-card__cta:hover {
  background: var(--b-pri-bg-h) !important;
  box-shadow: var(--b-pri-sh-h) !important;
  transform: translateY(-1px);
}
html body .nf-btn.nf-btn.nf-btn-primary *,
html body .nf-epdp-cta.nf-epdp-cta:not(.nf-epdp-cta--ghost) *,
html body .pfg-card__cta.pfg-card__cta * { color: inherit !important; }
html body .pfg-card__cta.pfg-card__cta svg {
  width: 20px !important;
  height: 20px !important;
  padding: 4px !important;
  margin-right: -6px;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

/* ── SECONDARY ── */
html body .nf-btn.nf-btn.nf-btn-secondary,
html body .nf-btn.nf-btn.nf-btn-ghost-dark,
html body .nf-hero-btn.nf-hero-btn--secondary,
html body .nf-hero--brand .nf-hero-btn.nf-hero-btn.nf-hero-btn--secondary,
html body .nf-epdp-cta.nf-epdp-cta--ghost,
html body .nf-map-card-open-link.nf-map-card-open-link,
html body .news-sort-button.news-sort-button {
  background: var(--b-sec-bg) !important;
  color: var(--b-text) !important;
  border: 1px solid var(--b-line) !important;
  box-shadow: var(--b-sec-sh) !important;
}
html body .nf-btn.nf-btn.nf-btn-secondary:hover,
html body .nf-btn.nf-btn.nf-btn-ghost-dark:hover,
html body .nf-hero-btn.nf-hero-btn--secondary:hover,
html body .nf-hero--brand .nf-hero-btn.nf-hero-btn.nf-hero-btn--secondary:hover,
html body .nf-epdp-cta.nf-epdp-cta--ghost:hover,
html body .nf-map-card-open-link.nf-map-card-open-link:hover,
html body .news-sort-button.news-sort-button:hover {
  border-color: rgba(77, 160, 169, 0.55) !important;
  color: var(--b-teal-ink) !important;
  box-shadow: var(--b-sec-sh-h) !important;
  transform: translateY(-1px);
}

/* ── DARK (сильный акцент) ── */
html body .nf-ps__cta.nf-ps__cta {
  background: var(--b-dark-bg) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: var(--b-dark-sh) !important;
}
html[data-theme="dark"] body .nf-ps__cta.nf-ps__cta { color: #1f1e1f !important; }
html body .nf-ps__cta.nf-ps__cta:hover {
  background: var(--b-pri-bg) !important;
  color: #fff !important;
  box-shadow: var(--b-pri-sh-h) !important;
  transform: translateY(-1px);
}
html body .nf-ps__cta.nf-ps__cta svg { color: inherit !important; }

/* ── GHOST ── */
html body .nf-btn.nf-btn.nf-btn-ghost {
  background: transparent !important;
  color: var(--b-text) !important;
  border: 0 !important;
  box-shadow: none !important;
}
html body .nf-btn.nf-btn.nf-btn-ghost:hover { background: var(--b-soft) !important; color: var(--b-teal-ink) !important; }
html body .nf-btn.nf-btn.nf-btn-ghost.nf-cart-clear-btn { background: var(--b-soft) !important; }

/* «В запрос» на странице товара, когда товар уже в запросе */
html body .nf-epdp-cta.nf-add-request.nf-add-request--in-cart {
  background: var(--b-sec-bg) !important;
  color: var(--b-teal-ink) !important;
  border: 1px solid rgba(77, 160, 169, 0.5) !important;
  box-shadow: var(--b-sec-sh) !important;
}

/* ── капсулы «Все …» в секциях главной: та же вторичная кнопка с объёмом ── */
html body .nf-home-section .nf-home-link-secondary.nf-home-link-secondary.nf-home-link-secondary {
  background: var(--b-sec-bg) !important;
  border: 1px solid var(--b-line) !important;
  box-shadow: var(--b-sec-sh) !important;
}
html body .nf-home-section .nf-home-link-secondary.nf-home-link-secondary.nf-home-link-secondary:hover {
  border-color: rgba(77, 160, 169, 0.55) !important;
  box-shadow: var(--b-sec-sh-h) !important;
  transform: translateY(-1px);
}

/* ── иконочные кнопки: круг с объёмом ── */
html body .nf-icon-btn.nf-icon-btn,
html body .nf-popular__nav-btn.nf-popular__nav-btn,
html body .nf-epdp-stage__zoom.nf-epdp-stage__zoom {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: var(--b-icon-bg) !important;
  border: 1px solid var(--b-line) !important;
  box-shadow: var(--b-sec-sh) !important;
  color: var(--b-text) !important;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.18s, box-shadow 0.2s !important;
}
html body .nf-icon-btn.nf-icon-btn:hover,
html body .nf-popular__nav-btn.nf-popular__nav-btn:hover,
html body .nf-epdp-stage__zoom.nf-epdp-stage__zoom:hover {
  background: var(--b-pri-bg) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--b-pri-sh) !important;
}
html body .nf-icon-btn.nf-icon-btn:active,
html body .nf-popular__nav-btn.nf-popular__nav-btn:active { transform: scale(0.94); }

/* ── сегменты и чипы-фильтры: капсулы ── */
html body .nf-tab-btn.nf-tab-btn,
html body .news-category-chip.news-category-chip,
html body .nf-epdp-seg button,
html body .nf-epdp-modes__filter button {
  border-radius: 999px !important;
  background-image: none !important;
  box-shadow: none !important;
}
html body .nf-tab-btn.nf-tab-btn {
  height: 40px !important;
  padding: 0 18px !important;
  background: transparent !important;
  border: 1px solid var(--b-line) !important;
  color: var(--b-text) !important;
  font-weight: 600 !important;
}
html body .nf-tab-btn.nf-tab-btn:hover { border-color: rgba(77, 160, 169, 0.6) !important; color: var(--b-teal-ink) !important; }
html body .nf-tab-btn.nf-tab-btn.nf-tab-btn-active,
html body .nf-tab-btn.nf-tab-btn.is-active,
html body .nf-tab-btn.nf-tab-btn[aria-selected="true"] {
  background: var(--b-dark-bg) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: var(--b-dark-sh) !important;
}
html[data-theme="dark"] body .nf-tab-btn.nf-tab-btn.nf-tab-btn-active,
html[data-theme="dark"] body .nf-tab-btn.nf-tab-btn.is-active,
html[data-theme="dark"] body .nf-tab-btn.nf-tab-btn[aria-selected="true"] { color: #1f1e1f !important; }
html body .news-category-chip.news-category-chip { padding: 6px 14px !important; height: auto !important; }

/* ── кнопка «Каталог» в меню каталога ── */
html body .nf-cat-rail__back.nf-cat-rail__back,
html body .nf-catalog-strip__back.nf-catalog-strip__back {
  height: 36px !important;
  padding: 0 14px 0 10px !important;
  border-radius: 999px !important;
  background: var(--b-sec-bg) !important;
  border: 1px solid var(--b-line) !important;
  color: var(--b-text) !important;
  font-weight: 600 !important;
  box-shadow: var(--b-sec-sh) !important;
}
html body .nf-cat-rail__back.nf-cat-rail__back:hover,
html body .nf-catalog-strip__back.nf-catalog-strip__back:hover { border-color: rgba(77, 160, 169, 0.6) !important; color: var(--b-teal-ink) !important; }

@media (max-width: 560px) {
  html body .nf-hero-btn.nf-hero-btn,
  html body .nf-hero--brand .nf-hero-btn.nf-hero-btn.nf-hero-btn,
  html body .nf-epdp-cta.nf-epdp-cta { height: 50px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body .nf-btn,
  html body .nf-hero-btn,
  html body .nf-epdp-cta,
  html body #quickQuoteBtn { transition: none !important; transform: none !important; }
}

/* переключатель «Все / Инвазивные / Неинвазивные» на странице товара */
html body .nf-epdp-seg { padding: 4px !important; gap: 2px !important; background: rgba(55, 53, 54, 0.05) !important; border: 0 !important; }
html[data-theme="dark"] body .nf-epdp-seg { background: rgba(255, 255, 255, 0.06) !important; }
html body .nf-epdp-seg button {
  height: 36px !important;
  padding: 0 16px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--b-text) !important;
  opacity: 0.7;
  font-weight: 600 !important;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s !important;
}
html body .nf-epdp-seg button:hover { opacity: 1; }
html body .nf-epdp-seg button.is-active {
  opacity: 1;
  background: var(--b-pri-bg) !important;
  color: #fff !important;
  box-shadow: var(--b-pri-sh) !important;
}
