/* ========== ROOT VARIABLES ========== */

:root {
    --color-black: #000;
    --color-white: #fff;
    --color-light-gray: #f5f5f5;
    --color-medium-gray: #ddd;
    --color-dark-gray: #3a3a3a;
    --color-text-dark: #1a1a1a;
    --color-text-secondary: #666;
    --color-body-text: #333;
    --color-red: #c41e2e;
    --color-gold: #d4af37;
    --color-green: #28a745;
    --color-yellow-bg: #ffd700;
    --color-accent-tab: #4a6b3c;
    --color-surface-2: #fff;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --border-radius: 4px;
    --transition: 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   ROCKYJAM PLUGIN CONTRACT
   ─────────────────────────────────────────────────────────────
   Эти переменные читают плагины RockyJam-Addons и
   RockyJam-Templates. Они НЕ используются в самой теме напрямую —
   это мост между темой и плагинами.

   При смене или создании новой темы достаточно
   переопределить этот блок, чтобы плагины
   автоматически подстроились под новый дизайн.

   Полный список: PLUGIN-CONTRACT.md
═══════════════════════════════════════════════════════════════ */

:root {
    --rj-accent:         var(--color-red,             #c41e2e);
    --rj-accent-hover:   color-mix(in srgb, var(--color-red, #c41e2e) 80%, #000);
    --rj-accent-tab:     var(--color-accent-tab,      #4a6b3c);
    --rj-gold:           var(--color-gold,             #d4af37);
    --rj-btn-bg:         var(--color-black,            #000);
    --rj-btn-bg-hover:   var(--color-dark-gray,        #3a3a3a);
    --rj-btn-color:      var(--color-white,            #fff);
    --rj-surface:        var(--color-light-gray,       #f5f5f5);
    --rj-surface-2:      var(--color-surface-2,        #fff);
    --rj-border:         var(--color-medium-gray,      #ddd);
    --rj-text:           var(--color-text-dark,        #1a1a1a);
    --rj-text-muted:     var(--color-text-secondary,   #666);
    --rj-success:        var(--color-green,            #28a745);
    --rj-font-body:      'Roboto', sans-serif;
    --rj-radius:         var(--border-radius,          4px);
    --rj-transition:     var(--transition,             0.3s ease);
}


/* ========== GLOBAL STYLES ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--color-body-text, #333);
    background: var(--color-white, #fff);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Типографика */
h1,
h2,
h3 {
    /*font-family: 'Bebas Neue', cursive;*/
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--color-accent-tab, #4a6b3c);
    padding-bottom: 0.5rem;
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}



/* ========== HEADER STYLES ========== */

.announcement-bar {
    background-color: var(--color-red);
    color: var(--color-white);
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1000;
    text-transform: uppercase;
}

.header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-medium-gray);
    position: sticky;
    top: 44px;
    z-index: 999;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-black);
    text-decoration: none;
    letter-spacing: -1px;
    min-width: 120px;
    transition: color var(--transition);
}

.logo:hover {
    color: var(--color-red);
}

.site-logo-link svg {
    display: block;
    width: 100%;
    height: 100%;
}


/* ========== SEARCH ========== */
/*
 * Структура:
 * .search-container          — flex-обёртка в .header-top
 *   form.search-bar          — единый визуальный блок
 *     input[type="search"]   — поле ввода
 *     button[type="submit"]  — кнопка-лупа (встроена внутрь)
 */

.search-container {
    flex: 1;
    margin: 0 40px;
    max-width: 400px;
}

/* Форма — единый блок с рамкой */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--color-light-gray);
    border: 1px solid var(--color-medium-gray);
    border-radius: var(--border-radius);
    padding: 0;
    overflow: hidden;
    height: 40px;
}

.search-bar input[type="search"],
.search-bar input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--color-text-dark);
    padding: 0 15px;
    height: 100%;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}

.search-bar input[type="search"]::placeholder,
.search-bar input[type="text"]::placeholder {
    color: var(--color-text-secondary);
}

.search-bar input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-bar button[type="submit"] {
    flex-shrink: 0;
    background: none;
    border: none;
    border-left: 1px solid var(--color-medium-gray);
    cursor: pointer;
    color: var(--color-text-secondary);
    font-size: 15px;
    width: 42px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), background var(--transition);
    padding: 0;
}

.search-bar button[type="submit"]:hover {
    color: var(--color-red);
    background: color-mix(in srgb, var(--color-medium-gray) 50%, transparent);
}


.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icons a {
    color: var(--color-black);
    font-size: 18px;
    text-decoration: none;
    transition: color var(--transition);
}

.header-icons a:hover {
    color: var(--color-red);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--color-black);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    color: var(--color-black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-red);
    transition: width var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}




/* ========== FOOTER ========== */

.footer {
    background-color: var(--color-text-dark);
    color: var(--color-white);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    padding: var(--spacing-2xl) 40px;
}

.footer-column h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.3px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--spacing-md);
}

.footer-column a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition);
}

.footer-column a:hover {
    color: var(--color-gold);
}

.footer-social {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-medium-gray);
    border-radius: 50%;
    transition: all var(--transition);
    color: var(--color-white);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--color-gold);
    color: var(--color-black);
}

.footer-bottom {
    border-top: 1px solid var(--color-medium-gray);
    padding: var(--spacing-xl) 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.payment-methods {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.payment-methods i {
    font-size: 20px;
    color: var(--color-gold);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .header-top {
        padding: 16px 24px;
    }

    .search-container {
        margin: 0 24px;
    }

    .product-main {
        grid-template-columns: 1fr 1fr !important;
        gap: var(--spacing-lg) !important;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Footer: 2 колонки на планшете */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
        padding: var(--spacing-xl) 24px;
    }

    .footer-bottom {
        padding: var(--spacing-lg) 24px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-medium-gray);
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        z-index: 998;
    }

    .search-container {
        display: none;
    }

    .header-top {
        padding: 12px 16px;
    }

    .product-main {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-lg) !important;
    }

    .product-gallery {
        position: relative !important;
        top: auto !important;
    }

    .sidebar {
        position: relative;
        top: auto;
    }

    .product-title {
        font-size: 24px !important;
    }

    .price {
        font-size: 22px !important;
    }

    .product-badges {
        grid-template-columns: 1fr !important;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Footer: 2 колонки на мобильном */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        padding: var(--spacing-lg) 16px;
    }

    /* Колонки — выравниваем по центру */
    .footer-column {
        text-align: center;
    }

    .footer-column h3 {
        font-size: 14px;
        margin-bottom: var(--spacing-sm);
    }

    .footer-column li {
        margin-bottom: var(--spacing-sm);
    }

    /* Социальные иконки — центрируем */
    .footer-social {
        justify-content: center;
        gap: var(--spacing-md);
        margin-top: var(--spacing-md);
    }

    /* Footer bottom — стопка по центру */
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
        padding: var(--spacing-lg) 16px;
    }

    .container {
        padding: 0 16px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .header-icons {
        gap: 12px;
    }

    .product-title {
        font-size: 20px;
    }

    .price {
        font-size: 18px;
    }

    .section-title {
        font-size: 18px;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Footer: минимальные отступы */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        padding: var(--spacing-md) 12px;
    }

    .footer-column h3 {
        font-size: 13px;
        margin-bottom: var(--spacing-xs);
    }

    .footer-column li {
        margin-bottom: var(--spacing-xs);
    }

    .footer-column a {
        font-size: 13px;
    }

    /* Социальные иконки чуть меньше */
    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .footer-social {
        gap: var(--spacing-sm);
    }

    /* Footer bottom */
    .footer-bottom {
        padding: var(--spacing-md) 12px;
        gap: var(--spacing-sm);
    }

    /* Платёжные иконки чуть крупнее для читаемости */
    .payment-methods i {
        font-size: 24px;
    }

    .payment-methods {
        gap: var(--spacing-sm);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════
   RJ Cart Icon + Counter
   ═══════════════════════════════════════════════ */

.rj-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rj-cart-icon:hover {
    color: var(--accent, #555);
}

.rj-cart-icon .fas {
    font-size: 20px;
}

/* ─── Счётчик (кружок) ──────────────────────── */

.rj-cart-count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 9px;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.rj-cart-count.is-visible {
    opacity: 1;
    transform: scale(1);
}

@keyframes rj-cart-bump {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.rj-cart-count.is-bumping {
    animation: rj-cart-bump 0.3s ease;
}

@media (max-width: 768px) {
    .rj-cart-icon {
        width: 40px;
        height: 40px;
    }

    .rj-cart-icon .fas {
        font-size: 18px;
    }

    .rj-cart-count {
        top: 0;
        right: -2px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   PRODUCT TABS
   ─────────────────────────────────────────────────────────────
   Стиль: вкладки-ссылки с цветным подчёркиванием
   (как на Rogue Fitness). Без рамок, фоны нейтральные.
   Активная: тёмно-зелёная (—color-accent-tab), жирный шрифт,
   линия 2px снизу (перекрывает горизонтальную линию навигации).

   Структура WooCommerce:
     .woocommerce-tabs
       ul.tabs.wc-tabs
         li.active > a
       .panel (контент)

   Структура темы (кастомная):
     .product-tabs
       .tabs-nav
         button.tab-link[data-tab] / button.tab-link.active
       .tab-content / .tab-content.active
═══════════════════════════════════════════════════════════════ */

/* ── Обёртка ─────────────────────────────────── */
.product-tabs,
.woocommerce-tabs {
    margin: var(--spacing-2xl) 0 var(--spacing-xl);
}

/* ── Навигация: полоса вкладок ────────────────── */
.tabs-nav,
.woocommerce-tabs ul.tabs.wc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 0 0;
    /* Горизонтальная линия под всеми вкладками */
    border-bottom: 2px solid var(--color-medium-gray);
}

/* ── Сброс стилей на <li> WooCommerce ───────────── */
.woocommerce-tabs ul.tabs li {
    list-style: none;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

/* ── Кнопка или ссылка вкладки ─────────────── */
.tabs-nav .tab-link,
.woocommerce-tabs ul.tabs li a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;   /* перекрывает border-bottom навигации */
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color var(--transition),
        border-color var(--transition);
}

/* Убираем закругление от WooCommerce */
.woocommerce-tabs ul.tabs li a {
    border-radius: 0 !important;
    background: none !important;
}

/* Hover — неактивная вкладка */
.tabs-nav .tab-link:not(.active):hover,
.woocommerce-tabs ul.tabs li:not(.active) a:hover {
    color: var(--color-accent-tab);
    border-bottom-color: var(--color-accent-tab);
}

/* ── Активная вкладка ────────────────────────── */
.tabs-nav .tab-link.active,
.woocommerce-tabs ul.tabs li.active a {
    color: var(--color-accent-tab);
    font-weight: 700;
    border-bottom-color: var(--color-accent-tab);
    cursor: default;
    background: none !important;
}

/* ── Панель с контентом ─────────────────────── */
.tab-content,
.woocommerce-tabs .panel {
    display: none;
    padding: 2rem 0;
}

.tab-content.active,
.woocommerce-tabs .panel:not([style*="display: none"]) {
    display: block;
}

.woocommerce-tabs .panel[style*="display: block"] {
    display: block !important;
}

/* ── Сброс псевдоэлементов WooCommerce ────────
   WC добавляет декоративные ::before/::after, рисующие лишние линии */
.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs::after,
.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after {
    display: none !important;
    content: none !important;
}

/* ── Адаптив ─────────────────────────────────── */
@media (max-width: 600px) {
    .tabs-nav .tab-link,
    .woocommerce-tabs ul.tabs li a {
        padding: 0.6rem 0.75rem;
        font-size: 0.95rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   BREADCRUMBS — Хлебные крошки
   ─────────────────────────────────────────────────────────────
   Поддерживаемые структуры:

   1. WooCommerce (woocommerce_breadcrumb):
      nav.woocommerce-breadcrumb
        a / span (текущая страница)
        span.separator (разделитель)

   2. Yoast SEO / RankMath / SEOPress:
      nav[aria-label="breadcrumb"] или .breadcrumb-trail
        ol / ul > li > a | span

   3. Кастомная тема (RockyJam):
      nav.rj-breadcrumb[aria-label="breadcrumb"]
        ol.rj-breadcrumb__list
          li.rj-breadcrumb__item > a | span[aria-current="page"]

   Переменные дизайна читаются из PLUGIN-CONTRACT:
     --rj-text-muted   — цвет неактивных крошек
     --rj-accent       — hover и текущая страница
     --rj-border       — разделитель
═══════════════════════════════════════════════════════════════ */

/* ── 1. Обёртка nav ──────────────────────────── */
.woocommerce-breadcrumb,
nav.rj-breadcrumb,
nav[aria-label="breadcrumb"],
.breadcrumb-trail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;                                     /* gap управляется разделителем */
    padding: 5px 0 6px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--rj-text-muted, #666);
    list-style: none;                           /* если nav содержит ul напрямую */
}

/* ── 2. Список (WC и кастомная структура) ─────── */
.rj-breadcrumb__list,
.woocommerce-breadcrumb ol,
nav[aria-label="breadcrumb"] ol,
nav[aria-label="breadcrumb"] ul,
.breadcrumb-trail ol,
.breadcrumb-trail ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
            margin: auto 0;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── 3. Элемент списка ───────────────────────── */
.rj-breadcrumb__item,
nav[aria-label="breadcrumb"] li,
.breadcrumb-trail li {
    display: flex;
    align-items: center;
}

/* ── 4. Разделитель «/» ─────────────────────────
   Реализация через псевдоэлемент ::after на каждом элементе,
   кроме последнего — надёжно работает и с WC, и с SEO-плагинами.

   WooCommerce использует <span class="separator">,
   для единообразия скрываем его и рисуем свой. */

.rj-breadcrumb__item:not(:last-child)::after,
nav[aria-label="breadcrumb"] li:not(:last-child)::after,
.breadcrumb-trail li:not(:last-child)::after {
    content: '/';
    display: inline-block;
    margin: 0 var(--spacing-xs);
    color: var(--rj-border, #ddd);
    font-weight: 400;
    pointer-events: none;
    user-select: none;
}

/* Скрываем нативный WooCommerce-разделитель (он выводится как span.separator) */
.woocommerce-breadcrumb .separator {
    display: none !important;
}

/* WC сам вставляет разделитель текстом между <a> — добавляем отступы */
.woocommerce-breadcrumb a,
.woocommerce-breadcrumb span:not(.separator) {
    display: inline-flex;
    align-items: center;
}

/* ── 5. Ссылки ───────────────────────────────── */
.rj-breadcrumb__item a,
.woocommerce-breadcrumb a,
nav[aria-label="breadcrumb"] li a,
.breadcrumb-trail a {
    color: var(--rj-text-muted, #666);
    text-decoration: none;
    transition: color var(--rj-transition, 0.3s ease);
    white-space: nowrap;
}

.rj-breadcrumb__item a:hover,
.woocommerce-breadcrumb a:hover,
nav[aria-label="breadcrumb"] li a:hover,
.breadcrumb-trail a:hover {
    color: var(--rj-accent, #c41e2e);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── 6. Текущая страница (последний элемент) ─── */
.rj-breadcrumb__item [aria-current="page"],
.rj-breadcrumb__item:last-child span,
.woocommerce-breadcrumb > span:last-child,   /* WC: последний span без ссылки */
nav[aria-label="breadcrumb"] li:last-child span,
nav[aria-label="breadcrumb"] li[aria-current="page"],
.breadcrumb-trail li:last-child span {
    color: var(--rj-text, #1a1a1a);
    font-weight: 500;
    pointer-events: none;
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;                           /* не даём длинному названию «разорвать» строку */
}

/* ── 7. Иконка «домик» перед первым элементом ──
   Показываем через псевдоэлемент ::before на первом <li> / <a>.
   Используем символ ⌂ (U+2302) — не требует Font Awesome. */
.rj-breadcrumb__item:first-child > a::before,
nav[aria-label="breadcrumb"] li:first-child > a::before,
.breadcrumb-trail li:first-child > a::before,
.woocommerce-breadcrumb > a:first-child::before {
    content: none;                           /* ⌂ */
    display: inline-block;
    margin-right: 4px;
    font-size: 15px;
    line-height: 1;
    vertical-align: -1px;
}

/* ── 8. Структурированная разметка (schema) ─────
   Скрываем meta-теги, которые некоторые SEO-плагины
   вставляют внутрь <li> для schema.org */
.rj-breadcrumb__item meta,
nav[aria-label="breadcrumb"] li meta {
    display: none;
}

/* ── 9. Адаптив ─────────────────────────────────
   На очень маленьких экранах обрезаем до двух крошек:
   Главная / Текущая страница */
@media (max-width: 480px) {
    .rj-breadcrumb__list,
    nav[aria-label="breadcrumb"] ol,
    nav[aria-label="breadcrumb"] ul,
    .breadcrumb-trail ol {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    /* Скрываем промежуточные элементы (оставляем первый и последний) */
    .rj-breadcrumb__item:not(:first-child):not(:last-child),
    nav[aria-label="breadcrumb"] li:not(:first-child):not(:last-child),
    .breadcrumb-trail li:not(:first-child):not(:last-child) {
        display: none;
    }

    /* Между «домом» и текущей страницей ставим «…» */
    .rj-breadcrumb__item:last-child::before,
    nav[aria-label="breadcrumb"] li:last-child::before,
    .breadcrumb-trail li:last-child::before {
        content: '…';
        display: inline-block;
        margin: 0 var(--spacing-xs);
        color: var(--rj-border, #ddd);
        pointer-events: none;
        user-select: none;
    }

    /* Текущая страница — ещё меньше max-width */
    .rj-breadcrumb__item [aria-current="page"],
    .rj-breadcrumb__item:last-child span,
    .woocommerce-breadcrumb > span:last-child,
    nav[aria-label="breadcrumb"] li:last-child span {
        max-width: 160px;
    }
}
