/* «Хлебные крошки» (Главная › Раздел › Страница) — на всех страницах сайта. v1.1.0
   Только CSS поверх разметки темы crb (div.breadcrumbs > .inner > span…), PHP не меняется.
   Компьютер: строка с иконкой «домой», стрелками-разделителями и текущей страницей.
   Телефон/планшет (до 1024 px, где тема крошки прятала): одна ссылка «‹ Родительский раздел». */

.breadcrumbs {
  padding: 14px 0 !important;
  background: #f8f5f4 !important;
  border-bottom: 1px solid #ebe3e2;
}
.breadcrumbs .inner {
  display: flex !important;
  align-items: center;
  min-width: 0;
  font: 400 14px/1.4 Roboto, -apple-system, "Segoe UI", Arial, sans-serif;
  color: #63707a;
}
.breadcrumbs .inner > span { flex: none; display: inline-flex; align-items: center; }

/* Ссылки: графит вместо ярко-синего, без подчёркивания; наведение — красный бренда */
.breadcrumbs .inner a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px; margin: -4px -6px;
  border-radius: 7px;
  color: #4a5560 !important;
  text-decoration: none !important;
  transition: color .15s ease, background-color .15s ease;
}
.breadcrumbs .inner a:hover { color: #b51d22 !important; background: #fcf1f1; }
.breadcrumbs .inner a:active { background: #f7dede; }
.breadcrumbs .inner a:focus-visible { outline: 2px solid rgb(181 29 34 / .5); outline-offset: 1px; }

/* Иконка «домой» у первой крошки */
.breadcrumbs .inner > span:first-child a::before {
  content: "";
  width: 16px; height: 16px; flex: none;
  background: #b51d22;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5.5 9v11h13V9'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5.5 9v11h13V9'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Разделитель «>» → тонкая стрелка */
.breadcrumbs .breadcrumbs__divider {
  position: relative;
  width: 26px; height: 16px; padding: 0 !important;
  font-size: 0 !important; color: transparent !important;
}
.breadcrumbs .breadcrumbs__divider::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px;
  border-top: 1.5px solid #b3a6a5; border-right: 1.5px solid #b3a6a5;
  transform: translate(-75%, -50%) rotate(45deg);
}

/* Текущая страница: тёмным, длинное название — в одну строку с многоточием (полностью оно в заголовке ниже) */
.breadcrumbs .inner > .current {
  flex: 0 1 auto; min-width: 0;
  display: block;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #1e2428; font-weight: 500;
}

/* Телефон и планшет: тема прятала крошки целиком — показываем одну ссылку «назад» в родительский раздел */
@media only screen and (max-width: 1024px) {
  body .breadcrumbs { display: block !important; padding: 6px 0 !important; }
  .breadcrumbs .inner > * { display: none !important; }
  .breadcrumbs .inner > span[itemscope]:nth-last-child(3) { display: inline-flex !important; }
  .breadcrumbs .inner > span[itemscope]:nth-last-child(3) a {
    min-height: 44px; margin: 0 -8px; padding: 0 10px 0 8px;
    font-size: 15px; font-weight: 500;
  }
  .breadcrumbs .inner > span[itemscope]:nth-last-child(3) a::before {
    content: "";
    width: 8px; height: 8px; flex: none; margin: 0 4px 0 2px;
    border-left: 2px solid #b51d22; border-bottom: 2px solid #b51d22;
    background: none; -webkit-mask: none; mask: none;
    transform: rotate(45deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .breadcrumbs .inner a { transition: none; }
}
