/**
 * Доставка и оплата — BORMASH / Tornadotool (scope .tt-page)
 * Премиальный чёрно-золотой акцент, без красно-оранжевых «маркетплейс»-стилей.
 */

.tt-page {
  --tt-gold: #d6b55a;
  --tt-gold-deep: #b7923a;
  --tt-gold-hi: #e6cc73;
  --tt-gold-soft: rgba(214, 181, 90, 0.14);
  --tt-line: rgba(0, 0, 0, 0.1);
  --tt-line-soft: rgba(0, 0, 0, 0.06);
  --tt-surface: rgba(0, 0, 0, 0.03);
  --tt-surface-2: rgba(0, 0, 0, 0.04);
  --tt-text: #1e1e1e;
  --tt-text-muted: rgba(0, 0, 0, 0.68);
  --tt-shadow: rgba(0, 0, 0, 0.06);
  --tt-nav-bg: rgba(0, 0, 0, 0.03);
  --tt-nav-border: rgba(0, 0, 0, 0.1);
  --tt-nav-link: #1e1e1e;
  --tt-label: rgba(0, 0, 0, 0.55);
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 0 32px;
  color: var(--tt-text);
}

/* Тёмная тема + промышленная витрина BORMASH (как карточки «О компании» / реквизиты) */
html[data-theme="dark"] .tt-page,
html.theme-bormash-industrial:not([data-theme="light"]) .tt-page {
  --tt-line: rgba(255, 255, 255, 0.08);
  --tt-line-soft: rgba(255, 255, 255, 0.06);
  --tt-surface: rgba(255, 255, 255, 0.04);
  --tt-surface-2: rgba(255, 255, 255, 0.045);
  --tt-text: #f0f0f0;
  --tt-text-muted: rgba(255, 255, 255, 0.72);
  --tt-label: rgba(255, 255, 255, 0.55);
  --tt-shadow: rgba(0, 0, 0, 0.22);
  --tt-nav-bg: rgba(255, 255, 255, 0.04);
  --tt-nav-border: rgba(255, 255, 255, 0.1);
  --tt-nav-link: #eaeaea;
}

/* Явно светлая тема на промышленном шаблоне */
html[data-theme="light"] .tt-page,
html.theme-bormash-industrial[data-theme="light"] .tt-page {
  --tt-line: rgba(0, 0, 0, 0.1);
  --tt-line-soft: rgba(0, 0, 0, 0.06);
  --tt-surface: rgba(0, 0, 0, 0.03);
  --tt-surface-2: rgba(0, 0, 0, 0.04);
  --tt-text: #1e1e1e;
  --tt-text-muted: rgba(0, 0, 0, 0.68);
  --tt-label: rgba(0, 0, 0, 0.55);
  --tt-shadow: rgba(0, 0, 0, 0.06);
  --tt-nav-bg: rgba(0, 0, 0, 0.03);
  --tt-nav-border: rgba(0, 0, 0, 0.1);
  --tt-nav-link: #1e1e1e;
}

/* ---------- Навигация (премиум-фильтры) ---------- */
.tt-page .tt-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px 10px;
  margin: 0 0 20px;
  padding: 10px 10px;
  border-radius: 999px;
  border: 1px solid var(--tt-nav-border);
  background: var(--tt-nav-bg);
  box-shadow: none;
}

.tt-page .tt-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--tt-nav-link);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--tt-nav-border);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

html.theme-bormash-industrial[data-theme="light"] .tt-page .tt-nav a,
html[data-theme="light"] .tt-page .tt-nav a {
  background: rgba(0, 0, 0, 0.02);
}

.tt-page .tt-nav a:hover {
  border-color: var(--tt-gold);
  color: var(--tt-gold);
  box-shadow: none;
}

.tt-page .tt-nav a:focus-visible {
  outline: 2px solid var(--tt-gold);
  outline-offset: 2px;
}

/* Активный раздел по якорю в URL */
body:has(#pickup:target) .tt-page .tt-nav a[href="#pickup"],
body:has(#msk:target) .tt-page .tt-nav a[href="#msk"],
body:has(#russia:target) .tt-page .tt-nav a[href="#russia"],
body:has(#cis:target) .tt-page .tt-nav a[href="#cis"],
body:has(#payment:target) .tt-page .tt-nav a[href="#payment"] {
  background: rgba(214, 181, 90, 0.14);
  border-color: var(--tt-gold);
  color: #f6e7b0;
}

html.theme-bormash-industrial[data-theme="light"] body:has(#pickup:target) .tt-page .tt-nav a[href="#pickup"],
html.theme-bormash-industrial[data-theme="light"] body:has(#msk:target) .tt-page .tt-nav a[href="#msk"],
html.theme-bormash-industrial[data-theme="light"] body:has(#russia:target) .tt-page .tt-nav a[href="#russia"],
html.theme-bormash-industrial[data-theme="light"] body:has(#cis:target) .tt-page .tt-nav a[href="#cis"],
html.theme-bormash-industrial[data-theme="light"] body:has(#payment:target) .tt-page .tt-nav a[href="#payment"],
html[data-theme="light"] body:has(#pickup:target) .tt-page .tt-nav a[href="#pickup"],
html[data-theme="light"] body:has(#msk:target) .tt-page .tt-nav a[href="#msk"],
html[data-theme="light"] body:has(#russia:target) .tt-page .tt-nav a[href="#russia"],
html[data-theme="light"] body:has(#cis:target) .tt-page .tt-nav a[href="#cis"],
html[data-theme="light"] body:has(#payment:target) .tt-page .tt-nav a[href="#payment"] {
  color: #6b5a2a;
  background: rgba(214, 181, 90, 0.18);
}

/* ---------- Заголовки ---------- */
.tt-page h2 {
  margin: 22px 0 10px;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  padding: 0 0 0 12px;
  border-bottom: none;
  border-left: 2px solid var(--tt-gold);
  scroll-margin-top: 72px;
  color: var(--tt-text);
}

.tt-page h2:first-of-type {
  margin-top: 0;
}

.tt-page h3 {
  margin: 16px 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tt-text);
}

.tt-page > p {
  margin: 0 0 8px;
  line-height: 1.55;
  color: var(--tt-text-muted);
}

/* ---------- Карточки ---------- */
.tt-page .tt-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--tt-line);
  background: var(--tt-surface);
  line-height: 1.55;
  color: var(--tt-text);
  box-shadow: 0 4px 20px var(--tt-shadow);
}

html[data-theme="light"] .tt-page .tt-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .tt-page .tt-card,
html.theme-bormash-industrial:not([data-theme="light"]) .tt-page .tt-card {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 28px rgba(0, 0, 0, 0.28);
}

.tt-page h2#pickup + .tt-card {
  border: 1px solid var(--tt-line);
  border-left: 2px solid var(--tt-gold);
  background: var(--tt-surface);
}

.tt-page .tt-card--center {
  text-align: center;
}

/* ---------- Бейджи ---------- */
.tt-page .tt-badge {
  display: inline-block;
  margin-left: 4px;
  margin-top: 2px;
  margin-bottom: 2px;
  vertical-align: middle;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  background: rgba(214, 181, 90, 0.12);
  color: var(--tt-gold-hi);
  border: 1px solid rgba(214, 181, 90, 0.28);
}

html.theme-bormash-industrial[data-theme="light"] .tt-page .tt-badge,
html[data-theme="light"] .tt-page .tt-badge {
  color: #7a6529;
  background: rgba(214, 181, 90, 0.14);
  border-color: rgba(214, 181, 90, 0.35);
}

/* ---------- Таблицы ---------- */
.tt-page .tt-table {
  margin: 0 0 16px;
  border-radius: 14px;
  border: 1px solid var(--tt-line);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--tt-surface);
  box-shadow: 0 4px 20px var(--tt-shadow);
}

html[data-theme="dark"] .tt-page .tt-table,
html.theme-bormash-industrial:not([data-theme="light"]) .tt-page .tt-table {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 28px rgba(0, 0, 0, 0.28);
}

.tt-page .tt-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

/* Шапка: как подписи в блоке «Реквизиты» — приглушённо, без «баннера» */
.tt-page .tt-table thead th {
  background: var(--tt-surface-2);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--tt-label);
  border-bottom: 1px solid var(--tt-line-soft);
}

html[data-theme="dark"] .tt-page .tt-table thead th,
html.theme-bormash-industrial:not([data-theme="light"]) .tt-page .tt-table thead th {
  background: rgba(255, 255, 255, 0.02);
}

.tt-page .tt-table th,
.tt-page .tt-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--tt-line-soft);
  color: var(--tt-text);
}

/* Первый столбец — роль «названия строки», как лейбл слева в реквизитах */
.tt-page .tt-table tbody td:first-child {
  color: var(--tt-text-muted);
  font-weight: 600;
}

.tt-page .tt-table tbody tr:last-child td {
  border-bottom: none;
}

.tt-page .tt-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

html[data-theme="light"] .tt-page .tt-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.025);
}

.tt-page .tt-table a {
  color: var(--tt-gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tt-page .tt-table a:hover {
  color: var(--tt-gold-hi);
}

/* ---------- Сетка комиссий ---------- */
.tt-page .tt-fee {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--tt-line);
  background: var(--tt-surface);
  font-size: 0.9rem;
}

.tt-page .tt-fee > div:nth-child(odd) {
  font-weight: 600;
  color: var(--tt-text-muted);
}

.tt-page .tt-fee > div:nth-child(even) {
  font-weight: 600;
  color: var(--tt-gold-hi);
}

html.theme-bormash-industrial[data-theme="light"] .tt-page .tt-fee > div:nth-child(even),
html[data-theme="light"] .tt-page .tt-fee > div:nth-child(even) {
  color: #7a6529;
}

/* ---------- Шаги PayLate ---------- */
.tt-page .tt-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .tt-page .tt-steps {
    grid-template-columns: 1fr;
  }
}

.tt-page .tt-step {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--tt-line);
  background: var(--tt-surface);
  text-align: center;
  box-shadow: 0 4px 18px var(--tt-shadow);
}

html[data-theme="dark"] .tt-page .tt-step,
html.theme-bormash-industrial:not([data-theme="light"]) .tt-page .tt-step {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 26px rgba(0, 0, 0, 0.26);
}

.tt-page .tt-step img {
  display: block;
  margin: 0 auto 8px;
  max-width: 72px;
  height: auto;
}

.tt-page .tt-step h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tt-gold);
}

.tt-page .tt-step p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--tt-text-muted);
}

/* Блок призыва — не «danger», спокойное золото */
.tt-page .tt-warn {
  margin: 8px 0 0;
  font-weight: 600;
  color: var(--tt-gold-hi);
}

html.theme-bormash-industrial[data-theme="light"] .tt-page .tt-warn,
html[data-theme="light"] .tt-page .tt-warn {
  color: #7a6529;
}

/* ---------- Страница CMS: плашки «Страница» / дата в том же стиле ---------- */
.content-article:has(.content-article__body .tt-page) .content-pill {
  background: rgba(214, 181, 90, 0.12);
  color: #7a6529;
  border: 1px solid rgba(214, 181, 90, 0.28);
}

html[data-theme="dark"] .content-article:has(.content-article__body .tt-page) .content-pill,
html.theme-bormash-industrial:not([data-theme="light"]) .content-article:has(.content-article__body .tt-page) .content-pill {
  color: #e6cc73;
  background: rgba(214, 181, 90, 0.12);
  border-color: rgba(214, 181, 90, 0.28);
}

.content-article:has(.content-article__body .tt-page) .content-pill--draft {
  background: rgba(214, 181, 90, 0.08);
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}

html.theme-bormash-industrial[data-theme="light"] .content-article:has(.content-article__body .tt-page) .content-pill--draft,
html[data-theme="light"] .content-article:has(.content-article__body .tt-page) .content-pill--draft {
  color: rgba(0, 0, 0, 0.55);
  border-color: rgba(0, 0, 0, 0.12);
}

.content-article:has(.content-article__body .tt-page) .content-article__summary {
  color: rgba(0, 0, 0, 0.68);
}

html[data-theme="dark"] .content-article:has(.content-article__body .tt-page) .content-article__summary,
html.theme-bormash-industrial:not([data-theme="light"]) .content-article:has(.content-article__body .tt-page) .content-article__summary {
  color: rgba(255, 255, 255, 0.78);
}
