/* Бизнес Бонус — дизайн-токены и стили как на SaaS-версии сайта */
.bb {
  --bb-primary: oklch(0.62 0.19 258);
  --bb-primary-fg: #fff;
  --bb-fg: oklch(0.16 0.01 260);
  --bb-muted: oklch(0.52 0.012 260);
  --bb-surface: oklch(0.98 0.002 260);
  --bb-border: oklch(0.925 0.004 260);
  --bb-radius: 0.75rem;
  --bb-shadow: 0 1px 2px rgba(20, 25, 40, 0.05);
  --bb-lift: 0 2px 4px rgba(20, 25, 40, 0.04), 0 16px 36px -18px rgba(20, 25, 40, 0.25);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: var(--bb-fg);
  line-height: 1.55;
}

.bb-container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.bb-page { padding: 28px 0 56px; }
.bb-muted { color: var(--bb-muted); }
.bb-small { font-size: 12px; }

.bb-hero {
  background: radial-gradient(110% 80% at 50% -25%, rgba(190, 210, 255, 0.55), #fff 60%);
  padding: 72px 0 56px;
  text-align: center;
}
.bb-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em; margin: 14px 0 10px; }
.bb-hero p { max-width: 640px; margin: 0 auto 22px; color: var(--bb-muted); }
.bb-pill {
  display: inline-block; border: 1px solid var(--bb-border); background: #fff;
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--bb-muted);
}

.bb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 10px 20px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: 0.16s ease;
}
.bb-btn-primary { background: var(--bb-primary); color: var(--bb-primary-fg); }
.bb-btn-primary:hover { filter: brightness(1.06); box-shadow: var(--bb-lift); color: #fff; }
.bb-btn-ghost { background: #fff; border-color: var(--bb-border); color: var(--bb-fg); }
.bb-btn[disabled] { opacity: 0.65; cursor: progress; }

.bb-crumbs { font-size: 13px; color: var(--bb-muted); margin-bottom: 12px; }
.bb-crumbs a { color: inherit; text-decoration: none; }
.bb-crumbs a:hover { color: var(--bb-primary); }

.bb-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 24px; }
.bb-filters input, .bb-filters select {
  height: 42px; border: 1px solid var(--bb-border); border-radius: 999px;
  padding: 0 16px; background: var(--bb-surface); font: inherit; min-width: 200px; flex: 1;
}

.bb-grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.bb-card-service {
  display: block; background: #fff; border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius); padding: 18px; text-decoration: none; color: inherit;
  box-shadow: var(--bb-shadow); transition: 0.18s ease;
}
.bb-card-service:hover { transform: translateY(-2px); box-shadow: var(--bb-lift); border-color: rgba(90, 120, 240, 0.4); }
.bb-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bb-card-title { font-weight: 700; font-size: 16px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-logo {
  width: 36px; height: 36px; border-radius: 10px; background: var(--bb-surface);
  border: 1px solid var(--bb-border); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; overflow: hidden; flex: none;
}
.bb-logo-lg { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
.bb-value { font-weight: 800; color: var(--bb-primary); font-size: 14px; white-space: nowrap; }
.bb-price { margin-top: 10px; font-size: 13px; color: var(--bb-muted); }

.bb-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bb-badge { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #eef2ff; color: #3949ab; }
.bb-badge-discount { background: #e8f5ee; color: #17683f; }
.bb-badge-promo { background: #eef2ff; color: #3949ab; }
.bb-badge-bonus { background: #fff4e5; color: #98570a; }
.bb-badge-free_setup { background: #e6f4fb; color: #14607f; }
.bb-badge-consult { background: #f3ecff; color: #5b3ba8; }
.bb-badge-custom { background: #f1f3f6; color: #414a5a; }

.bb-cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.bb-cat {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; background: #fff;
  border: 1px solid var(--bb-border); border-radius: var(--bb-radius); text-decoration: none; color: inherit;
}
.bb-cat:hover { box-shadow: var(--bb-lift); }
.bb-cat span { font-size: 13px; color: var(--bb-muted); }

.bb-service { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 900px) { .bb-service { grid-template-columns: 1fr; } }
.bb-service-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 14px; }
.bb-service-head h1 { margin: 0 0 4px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.bb-prose { margin-top: 18px; }
.bb-prose h2, .bb-prose h3 { margin-top: 24px; font-weight: 700; }

.bb-side-card {
  position: sticky; top: 24px; background: #fff; border: 1px solid var(--bb-border);
  border-radius: 16px; padding: 20px; box-shadow: var(--bb-shadow); display: grid; gap: 10px;
}
.bb-side-value { font-size: 28px; font-weight: 800; color: var(--bb-primary); }
.bb-side-meta { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--bb-muted); display: grid; gap: 6px; }
.bb-side-meta a { color: var(--bb-primary); text-decoration: none; }
.bb-promo-code {
  font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: 0.08em;
  border: 1px dashed var(--bb-primary); border-radius: 10px; padding: 12px; text-align: center; background: #f5f8ff;
}

.bb-faq { margin-top: 28px; }
.bb-faq details { border: 1px solid var(--bb-border); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.bb-faq summary { font-weight: 600; cursor: pointer; }

.bb-lead {
  margin-top: 28px; background: #fff; border: 1px solid var(--bb-border);
  border-radius: 16px; padding: 20px; box-shadow: var(--bb-shadow); scroll-margin-top: 90px;
}
.bb-lead-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bb-lead-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.bb-free { background: rgba(90, 120, 240, 0.12); color: var(--bb-primary); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; }
.bb-lead-form { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.bb-lead-form > label, .bb-consent, .bb-switch, .bb-lead-form > button, .bb-lead-form > p, .bb-company-fields { grid-column: 1 / -1; }
@media (min-width: 640px) { .bb-lead-form > label { grid-column: auto; } }
.bb-lead-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.bb-lead-form input[type="text"], .bb-lead-form input[type="tel"], .bb-lead-form input[type="email"] {
  height: 42px; border: 1px solid var(--bb-border); border-radius: 10px; padding: 0 12px; font: inherit; font-weight: 400;
}
.bb-lead-form input[aria-invalid="true"] { border-color: #d64545; }
.bb-company-fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bb-company-fields[hidden] { display: none !important; }
.bb-switch { display: inline-flex; gap: 4px; background: var(--bb-surface); border-radius: 999px; padding: 4px; width: fit-content; }
.bb-switch button { border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 600; color: var(--bb-muted); cursor: pointer; }
.bb-switch button.is-active { background: #fff; color: var(--bb-fg); box-shadow: var(--bb-shadow); }
.bb-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; font-weight: 400; color: var(--bb-muted); }
.bb-form-msg:empty { display: none; }
.bb-form-msg { font-size: 14px; font-weight: 600; }
.bb-form-msg.is-error { color: #d64545; }
.bb-form-msg.is-ok { color: #17683f; }

.bb-footer { margin-top: 56px; border-top: 1px solid var(--bb-border); background: var(--bb-surface); padding: 36px 0; }
.bb-footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bb-footer a { color: inherit; }

.bb-block { margin: 26px 0; }
.bb-block h2 { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.bb-block h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.bb-reviews { scroll-margin-top: 90px; }
.bb-review-list { display: grid; gap: 12px; margin-bottom: 24px; }
.bb-review { border: 1px solid var(--bb-border); border-radius: 12px; padding: 14px 16px; background: #fff; }
.bb-review p { margin: 8px 0 0; }
.bb-review-head { display: flex; justify-content: space-between; gap: 12px; }
.bb-reviews #respond { margin-top: 20px; }
.bb-reviews #respond label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.bb-reviews #respond input[type="text"], .bb-reviews #respond input[type="email"], .bb-reviews #respond textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--bb-border); border-radius: 10px; padding: 10px 12px; font: inherit; }
.bb-reviews #respond .form-submit { margin-bottom: 0; }
.bb-reviews #respond .submit { border: 0; }
.bb-proscons { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bb-check-list, .bb-minus-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.bb-check-list li::before { content: "✓"; color: #17683f; font-weight: 700; margin-right: 8px; }
.bb-minus-list li::before { content: "—"; color: #b42318; font-weight: 700; margin-right: 8px; }
.bb-tags { margin-top: 12px; }
.bb-lead.is-highlight { box-shadow: 0 0 0 3px rgba(90, 130, 255, .35); transition: box-shadow .3s ease; }
@media (max-width: 720px) { .bb-proscons { grid-template-columns: 1fr; } }

/* ---- Исправления вёрстки ---- */
/* Кнопки: тема может перекрашивать ссылки — повышаем приоритет */
.bb a.bb-btn, .bb button.bb-btn { text-decoration: none; }
.bb a.bb-btn-primary, .bb button.bb-btn-primary,
.bb a.bb-btn-primary:visited { background: var(--bb-primary); color: var(--bb-primary-fg); }
.bb a.bb-btn-primary:hover, .bb button.bb-btn-primary:hover { color: var(--bb-primary-fg); text-decoration: none; }
.bb a.bb-btn-ghost, .bb a.bb-btn-ghost:visited, .bb button.bb-btn-ghost { background: #fff; color: var(--bb-fg); border-color: var(--bb-border); }
.bb a.bb-btn-ghost:hover { color: var(--bb-primary); border-color: var(--bb-primary); text-decoration: none; }

/* Чекбокс согласия: не должен превращаться в grid-строку */
.bb-lead-form label.bb-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; font-weight: 400; color: var(--bb-muted); line-height: 1.45; }
.bb-lead-form label.bb-consent input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--bb-primary); }
.bb-lead-form label.bb-consent span { display: block; }

/* Главная страница */
.bb-hero-search { display: flex; gap: 10px; max-width: 560px; margin: 0 auto 14px; flex-wrap: wrap; }
.bb-hero-search input {
  flex: 1 1 240px; height: 46px; border: 1px solid var(--bb-border); border-radius: 999px;
  padding: 0 18px; background: #fff; font: inherit; box-shadow: var(--bb-shadow);
}
.bb-hero-stats { font-size: 14px; color: var(--bb-muted); margin: 0; }
.bb-home-block { margin-top: 40px; }
.bb-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bb-section-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.bb-link { color: var(--bb-primary); font-weight: 600; font-size: 14px; text-decoration: none; }
.bb-new-services { margin-top: 28px; overflow: hidden; }
.bb-new-services .bb-section-head { margin-bottom: 12px; }
.bb-new-services .bb-section-head h2 { font-size: 20px; }
.bb-marquee { overflow: hidden; padding: 4px 2px 10px; }
.bb-marquee-track { display: flex; gap: 14px; width: max-content; animation: bb-marquee 32s linear infinite; }
.bb-marquee:hover .bb-marquee-track,
.bb-marquee:focus-within .bb-marquee-track { animation-play-state: paused; }
.bb-new-service { display: inline-flex; align-items: center; gap: 10px; min-width: 220px; min-height: 82px; padding: 16px 18px; border: 1px solid var(--bb-border); border-radius: var(--bb-radius); background: var(--bb-surface); color: var(--bb-fg); font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: var(--bb-shadow); white-space: nowrap; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.bb-new-service:hover { color: var(--bb-primary); text-decoration: none; transform: translateY(-2px); border-color: var(--bb-primary); box-shadow: var(--bb-lift); }
.bb-new-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--bb-primary); box-shadow: 0 0 0 4px rgba(90, 120, 240, .14); }
.bb-new-arrow { color: var(--bb-primary); font-size: 18px; font-weight: 400; }
@keyframes bb-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .bb-marquee-track { animation: none; } }
.bb-cta {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  border: 1px solid var(--bb-border); border-radius: 18px; padding: 24px; background: var(--bb-surface);
}
.bb-cta h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.bb-cta p { margin: 0; max-width: 620px; }

/* Каталог с боковыми фильтрами */
.bb-catalog-search { display: flex; gap: 10px; margin: 20px 0 20px; flex-wrap: wrap; }
.bb-catalog-search input[type="search"] {
  flex: 1; min-width: 220px; height: 44px; border: 1px solid var(--bb-border);
  border-radius: 999px; padding: 0 18px; background: #fff; font: inherit;
}
.bb-filters-toggle { display: none; }
.bb-catalog-layout { display: grid; gap: 28px; grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
.bb-sidebar {
  position: sticky; top: 16px; order: 1; min-width: 0;
  border: 1px solid var(--bb-border); border-radius: 16px; background: #fff;
  padding: 18px; box-shadow: var(--bb-shadow);
}
.bb-catalog-results { order: 2; min-width: 0; }
.bb-catalog-results .bb-grid-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.bb-filter-block { margin-bottom: 22px; }
.bb-filter-block h3 { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.bb-cat-list { max-height: 320px; overflow: auto; padding-right: 4px; display: grid; gap: 2px; }
.bb-radio, .bb-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.bb-radio input, .bb-check input { margin: 0; flex: none; }
.bb-radio span { flex: 1; }
.bb-radio em { font-style: normal; font-size: 12px; color: var(--bb-muted, #6b7280); }
.bb-radio:hover, .bb-check:hover { background: var(--bb-surface); }
.bb-radio.is-active { background: rgba(90, 120, 240, 0.1); font-weight: 600; }
.bb-range { width: 100%; }
.bb-filter-actions { display: flex; align-items: center; gap: 12px; }
.bb-results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bb-sort { display: inline-flex; gap: 4px; border: 1px solid var(--bb-border); border-radius: 999px; padding: 4px; }
.bb-sort-item { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--bb-muted, #6b7280); }
.bb-sort-item.is-active { background: var(--bb-primary, #4f6ef7); color: #fff; }
.bb-empty { border: 1px solid var(--bb-border); border-radius: var(--bb-radius); padding: 40px; text-align: center; color: var(--bb-muted, #6b7280); background: #fff; }
@media (max-width: 1000px) {
  .bb-catalog-layout { grid-template-columns: 1fr; }
  .bb-sidebar { position: static; display: none; order: 0; }
  .bb-sidebar.is-open { display: block; }
  .bb-filters-toggle { display: inline-flex; }
}

/* Responsive and theme-aware overrides. */
body.bbt.is-dark .bb {
  --bb-fg: #eef2f7;
  --bb-muted: #aab5c4;
  --bb-surface: #202936;
  --bb-border: #344052;
  --bb-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  --bb-lift: 0 10px 30px rgba(0, 0, 0, .28);
}
body.bbt.is-dark .bb-hero { background: radial-gradient(110% 80% at 50% -25%, rgba(45, 72, 135, .55), #111820 60%); }
body.bbt.is-dark .bb-pill,
body.bbt.is-dark .bb-btn-ghost,
body.bbt.is-dark .bb-card-service,
body.bbt.is-dark .bb-cat,
body.bbt.is-dark .bb-sidebar,
body.bbt.is-dark .bb-side-card,
body.bbt.is-dark .bb-lead,
body.bbt.is-dark .bb-faq details,
body.bbt.is-dark .bb-empty,
body.bbt.is-dark .bb-hero-search input,
body.bbt.is-dark .bb-catalog-search input[type="search"],
body.bbt.is-dark .bb-filters input,
body.bbt.is-dark .bb-filters select,
body.bbt.is-dark .bb-lead-form input { background: #19222d; color: var(--bb-fg); }
body.bbt.is-dark .bb-switch button.is-active { background: #2c394a; color: var(--bb-fg); }
body.bbt.is-dark .bb-promo-code { background: #202d43; }

.bb-card-service,
.bb-cat,
.bb-side-card,
.bb-lead,
.bb-sidebar { min-width: 0; }
.bb-card-service:focus-visible,
.bb-btn:focus-visible,
.bb-cat:focus-visible,
.bb-sort-item:focus-visible,
.bb-link:focus-visible { outline: 3px solid rgba(90, 120, 240, .45); outline-offset: 2px; }
.bb-lead-form input,
.bb-filters input,
.bb-filters select,
.bb-hero-search input,
.bb-catalog-search input { min-width: 0; max-width: 100%; }
.bb-lead-form input:focus,
.bb-filters input:focus,
.bb-filters select:focus,
.bb-hero-search input:focus,
.bb-catalog-search input:focus { border-color: var(--bb-primary); outline: 2px solid rgba(90, 120, 240, .2); outline-offset: 0; }

@media (max-width: 640px) {
  .bb { overflow-wrap: anywhere; }
  .bb-page { padding: 20px 0 40px; }
  .bb-hero { padding: 44px 0 36px; }
  .bb-hero h1 { font-size: clamp(28px, 9vw, 38px); }
  .bb-hero-search { display: grid; grid-template-columns: 1fr; }
  .bb-hero-search input, .bb-hero-search .bb-btn { width: 100%; }
  .bb-container { padding-left: 14px; padding-right: 14px; }
  .bb-grid-cards, .bb-catalog-results .bb-grid-cards { grid-template-columns: 1fr; }
  .bb-card-title { white-space: normal; overflow: visible; text-overflow: clip; }
  .bb-card-top { align-items: flex-start; }
  .bb-value { margin-left: auto; }
  .bb-service-head { align-items: flex-start; }
  .bb-service-head h1 { font-size: 26px; overflow-wrap: anywhere; }
  .bb-side-card { position: static; padding: 16px; }
  .bb-side-card .bb-btn { width: 100%; }
  .bb-section-head { align-items: flex-start; flex-direction: column; }
  .bb-section-head h2 { font-size: 21px; }
  .bb-cta { padding: 18px; }
  .bb-lead { padding: 16px; }
  .bb-lead-form { grid-template-columns: 1fr; gap: 12px; }
  .bb-lead-form > label { grid-column: 1 / -1; }
  .bb-company-fields { grid-template-columns: 1fr; }
  .bb-switch { width: 100%; }
  .bb-switch button { flex: 1; padding-left: 8px; padding-right: 8px; }
  .bb-lead-form > button { width: 100%; }
  .bb-catalog-search input[type="search"] { min-width: 0; width: 100%; flex-basis: 100%; }
  .bb-catalog-search .bb-btn { flex: 1; }
  .bb-results-head { align-items: flex-start; flex-direction: column; }
  .bb-sort { max-width: 100%; overflow-x: auto; }
  .bb-sort-item { white-space: nowrap; }
}
