/* ══════════════════════════════════════════════════════════════
   archive-product.css  v4
   VIMENS — только стили КАТАЛОГА (layout, sidebar, filters).
   Стили карточек товаров и хлебных крошек НЕ ТРОГАЕМ —
   они общие для всего сайта и живут в других файлах темы.
   Переменные берём из style.css (--blue, --green, --red, и т.д.)
══════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────
   Алиасы: cat-* → глобальные переменные из style.css
   Используем их внутри этого файла чтобы не ломать
   локальные ссылки, но источник — style.css
──────────────────────────────────────────────────────────── */
:root {
    --cat-green:      var(--green);
    --cat-green-bg:   rgba(34, 204, 101, 0.08);
    --cat-green-brd:  rgba(34, 204, 101, 0.25);
    --cat-blue:       var(--blue);
    --cat-blue-bg:    rgba(26, 111, 212, 0.07);
    --cat-dark:       var(--dark);
    --cat-gray-900:   var(--gray-800);
    --cat-gray-700:   var(--gray-600);
    --cat-gray-600:   var(--gray-600);
    --cat-gray-500:   var(--gray-400);
    --cat-gray-400:   var(--gray-400);
    --cat-gray-300:   var(--gray-200);
    --cat-gray-200:   var(--gray-200);
    --cat-gray-100:   var(--gray-100);
    --cat-gray-50:    var(--off-white);
    --cat-red:        var(--red);
    --cat-radius:     var(--radius);
    --cat-shadow-sm:  var(--shadow-sm);
    --cat-shadow-md:  var(--shadow-md);
    --cat-tr:         0.18s ease;

    /* Типошкала — берём из style.css */
    --cat-xs:   var(--text-xs);
    --cat-sm:   var(--text-sm);
    --cat-base: var(--text-base);
    --cat-md:   var(--text-md);
    --cat-lg:   var(--text-lg);
    --cat-xl:   var(--text-xl);
    --cat-2xl:  var(--text-2xl);
}

/* ── CATALOG HERO ── */
.catalog-hero {
    background: var(--dark);
    position: relative;
    overflow: hidden;
    padding: 40px 0;
}
.catalog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(rgba(26,111,212,0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(26,111,212,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    pointer-events: none;
}
.chero-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    display: none;
    background: radial-gradient(circle, rgba(26,111,212,0.12) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    pointer-events: none;
    z-index: 1;
}

/* ── HERO IMAGE OVERLAY ── */
.chero-img-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--hero-img);
    background-size: cover;
    background-position: center right;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 30%, black 65%, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, transparent 30%, black 65%, black 100%);
    opacity: 0.55;
}
.chero-img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--dark) 0%, rgba(13,30,58,0.70) 40%, rgba(13,30,58,0.15) 75%, rgba(13,30,58,0.05) 100%);
    pointer-events: none;
}
.catalog-hero .container,
.catalog-hero .chero-glow,
.catalog-hero::before { position: relative; z-index: 2; }
.catalog-hero.has-hero-img::before {
    -webkit-mask-image: linear-gradient(to right, black 0%, black 35%, transparent 70%);
    mask-image: linear-gradient(to right, black 0%, black 35%, transparent 70%);
}


.container-catalog {
    max-width: 1800px;
}

.chero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.chero-left h1 {
    font-size: var(--text-2xl);
    font-weight: var(--fw-black);
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0 0 10px;
    line-height: 1.2;
}
.chero-left p {
    font-size: var(--text-base);
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    margin: 0;
}
.chero-stats { display: flex; gap: 14px; flex-shrink: 0; }
.hstat {
    text-align: center;
    padding: 16px 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    min-width: 100px;
}
.hstat--green {
    border-color: var(--cat-green-brd);
    background: var(--cat-green-bg);
}
.hstat-num {
    font-size: var(--text-xl);
    font-weight: var(--fw-black);
    color: #fff;
    line-height: 1;
}
.hstat--green .hstat-num,
.hstat--green .hstat-num span { color: var(--green); }
.hstat-num span { color: var(--green); }
.hstat-lbl {
    font-size: 11px;
    font-weight: var(--fw-bold);
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 6px;
}

/* ════════════════════════════════════════════════════════════
   FILTER TAB BAR
════════════════════════════════════════════════════════════ */
.fbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 73px;
    z-index: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.fbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
}
.fbar-left { display: flex; align-items: center; }
.cat-count-inline {
    font-size: var(--text-base);
    color: var(--gray-400);
    font-weight: var(--fw-medium);
}
.cat-count-inline strong {
    color: var(--gray-800);
    font-weight: var(--fw-bold);
}
.fbar-acts { display: flex; align-items: center; gap: 10px; }

.sort-sel {
    padding: 9px 32px 9px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--gray-600);
    cursor: pointer;
    outline: none;
    transition: border-color var(--cat-tr);
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.sort-sel:focus { border-color: var(--blue); }

/* ════════════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════════════ */
.cat-layout {
    display: grid;
    grid-template-columns: 272px 1fr;
    gap: 24px;
    padding: 28px 0 80px;
    align-items: start;
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════ */
.sidebar {
    position: sticky;
    top: 130px;
    max-height: calc(100vh - 155px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-scroll-area {
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar-scroll-area::-webkit-scrollbar { display: none; }

.sidebar-drawer-head { display: none; }

/* ── Filter Card ── */
.fc {
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}
.fc-head {
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    gap: 8px;
    transition: background var(--cat-tr);
}
.fc-head:hover { background: var(--off-white); }

.fc-title {
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}
.fc-title i {
    width: 16px;
    text-align: center;
    color: var(--blue);
    font-size: 12px;
    flex-shrink: 0;
}
.fc-chev {
    font-size: 11px;
    color: var(--gray-400);
    transition: transform var(--cat-tr);
    flex-shrink: 0;
}
.fc.open > .fc-head .fc-chev { transform: rotate(180deg); }

.fc-body { display: none; padding: 0 14px 14px; }
.fc.open > .fc-body { display: block; }
.fc-body--always-open { display: block !important; }

/* ── Stock ── */
.fc--stock {
    background: linear-gradient(135deg, rgba(34,204,101,0.06) 0%, rgba(34,204,101,0.02) 100%);
    border-color: var(--cat-green-brd);
}
.stock-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 15px;
    cursor: pointer;
    gap: 12px;
    margin: 0;
}
.stock-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    color: var(--gray-800);
}
.stock-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(34,204,101,0.2);
    flex-shrink: 0;
}

/* Toggle switch */
.tsw { position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.tsw input { opacity: 0; width: 0; height: 0; position: absolute; }
.tsl {
    position: absolute; inset: 0;
    background: var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--cat-tr);
}
.tsl::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--cat-tr);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.tsw input:checked + .tsl { background: var(--green); }
.tsw input:checked + .tsl::before { transform: translateX(20px); }

/* ── Category links ── */
.fc--cats .fc-head { pointer-events: none; }
.cat-links { display: flex; flex-direction: column; gap: 3px; }

.cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 9px;
    text-decoration: none;
    background: var(--off-white);
    border: 1.5px solid var(--gray-100);
    transition: all var(--cat-tr);
}
.cat-link:hover {
    background: var(--cat-blue-bg);
    border-color: rgba(26,111,212,0.25);
}
.cat-link--active {
    background: var(--cat-blue-bg);
    border-color: var(--blue);
}
.cat-link--hidden { display: none; }

.cat-link-name {
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--gray-600);
    line-height: 1.3;
    flex: 1;
}
.cat-link--active .cat-link-name { color: var(--blue); font-weight: var(--fw-black); }
.cat-link:hover .cat-link-name    { color: var(--blue); }

.cat-link-count {
    font-size: var(--text-xs);
    font-weight: var(--fw-bold);
    color: var(--blue);
    background: var(--cat-blue-bg);
    border: 1px solid rgba(26,111,212,0.18);
    padding: 2px 8px;
    border-radius: 8px;
    flex-shrink: 0;
    min-width: 26px;
    text-align: center;
}
.cat-link--active .cat-link-count {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.show-more-cats,
.show-more-vals {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 7px 4px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--blue);
    cursor: pointer;
    transition: opacity var(--cat-tr);
    width: 100%;
    text-align: left;
}
.show-more-cats:hover,
.show-more-vals:hover { opacity: 0.7; }
.show-more-cats i, .show-more-vals i { font-size: 11px; }

/* ── Checkbox list ── */
.fcl { display: flex; flex-direction: column; gap: 1px; }

.fck {
    display: flex;
    align-items: center;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--cat-tr);
    gap: 8px;
}
.fck:hover { background: var(--off-white); }
.fck--hidden { display: none; }

.fck input[type=checkbox] {
    width: 17px; height: 17px;
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0;
}
.fck-name {
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    color: var(--gray-800);
    flex: 1;
    line-height: 1.3;
}
.fck:hover .fck-name { color: var(--dark); }
.fck input:checked ~ .fck-name { color: var(--dark); font-weight: var(--fw-black); }

.fck-qty {
    font-size: var(--text-xs);
    font-weight: var(--fw-bold);
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 2px 7px;
    border-radius: 7px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Price slider ── */
.range-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.range-sep { color: var(--gray-400); font-size: var(--text-sm); flex-shrink: 0; }
.range-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.range-input-label {
    font-size: 11px;
    font-weight: var(--fw-bold);
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rvi {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--gray-800);
    outline: none;
    text-align: center;
    transition: border-color var(--cat-tr);
    box-sizing: border-box;
}
.rvi:focus { border-color: var(--green); }

.range-track {
    position: relative;
    height: 5px;
    background: var(--gray-200);
    border-radius: 3px;
    margin: 22px 8px;
}
.range-fill {
    position: absolute;
    height: 100%;
    background: var(--green);
    border-radius: 3px;
}
.rslider {
    position: absolute;
    width: 20px; height: 20px;
    background: #fff;
    border: 2.5px solid var(--green);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    box-shadow: 0 2px 8px rgba(34,204,101,0.3);
    transition: box-shadow var(--cat-tr);
    touch-action: none;
}
.rslider:hover,
.rslider:active { box-shadow: 0 2px 14px rgba(34,204,101,0.5); }

/* ── Filter action buttons ── */
.filter-actions {
    display: flex;
    gap: 8px;
    padding-top: 4px;
    flex-shrink: 0;
}
.btn-apply-filters {
    flex: 1;
    padding: 13px 14px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: filter var(--cat-tr), transform var(--cat-tr);
}
.btn-apply-filters:hover  { filter: brightness(1.07); transform: translateY(-1px); }
.btn-apply-filters:active { transform: none; }

.btn-reset-filters {
    padding: 12px 13px;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: all var(--cat-tr);
    white-space: nowrap;
}
.btn-reset-filters:hover { background: #fff; border-color: var(--gray-400); color: var(--gray-800); }

/* ── Active filters bar ── */
.active-filters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--off-white);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}
.active-filters-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

.atag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cat-green-bg);
    color: #065f46;
    border: 1px solid var(--cat-green-brd);
    padding: 4px 10px 4px 12px;
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
}
.atag button {
    color: #065f46;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.6;
    transition: opacity var(--cat-tr);
}
.atag button:hover { opacity: 1; }

.clear-all-filters {
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--gray-400);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all var(--cat-tr);
    white-space: nowrap;
}
.clear-all-filters:hover { color: var(--red); }

/* ── Sidebar toggle (мобилка) ── */
.sidebar-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--cat-tr);
}
.sidebar-toggle:hover { border-color: var(--green); color: var(--green); }

.filter-badge {
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: var(--fw-black);
    width: 20px; height: 20px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1100;
    backdrop-filter: blur(3px);
}
.sidebar-overlay.open { display: block; }

/* ════════════════════════════════════════════════════════════
   CATALOG LOADER
════════════════════════════════════════════════════════════ */
.catalog-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: var(--gray-400);
    font-size: var(--text-base);
    font-weight: var(--fw-medium);
}
.loader-spinner {
    width: 22px; height: 22px;
    border: 2.5px solid var(--gray-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: cat-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes cat-spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════
   PRODUCT GRID
════════════════════════════════════════════════════════════ */
.pgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    transition: opacity 0.2s ease;
}
.pgrid.vlist { grid-template-columns: 1fr; }

.card-reveal { opacity: 0; transform: translateY(10px); transition: none; }
.card-reveal--in {
    opacity: 1; transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ════════════════════════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════════════════════════ */
.empty-st {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 72px 24px;
}
.empty-ico {
    width: 80px; height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: var(--gray-400);
}
.empty-t { font-size: var(--text-xl); font-weight: var(--fw-black); color: var(--dark); margin-bottom: 10px; }
.empty-s { font-size: var(--text-base); color: var(--gray-400); margin-bottom: 20px; }

/* ════════════════════════════════════════════════════════════
   LOAD MORE
════════════════════════════════════════════════════════════ */
.load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px 0 28px;
}
.load-more-info { font-size: var(--text-base); color: var(--gray-400); font-weight: var(--fw-medium); }
.load-more-info strong { color: var(--gray-800); font-weight: var(--fw-bold); }
.load-more-bar {
    width: 240px; height: 5px;
    background: var(--gray-100);
    border-radius: 3px; overflow: hidden;
}
.load-more-progress {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: #fff;
    color: var(--gray-800);
    border: 2px solid var(--green);
    border-radius: 50px;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    cursor: pointer;
    transition: all var(--cat-tr);
}
.load-more-btn i { color: var(--green); font-size: 16px; transition: color var(--cat-tr); }
.load-more-btn #loadMoreRemaining { font-size: var(--text-sm); color: var(--gray-400); }
.load-more-btn:hover { background: var(--green); color: #fff; }
.load-more-btn:hover i { color: #fff; }
.load-more-btn:hover #loadMoreRemaining { color: rgba(255,255,255,0.7); }
.load-more-btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ════════════════════════════════════════════════════════════
   SEO TEXT
════════════════════════════════════════════════════════════ */
.seo-text-section {
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 48px 0 64px;
}
.seo-text-title {
    font-size: var(--text-xl);
    font-weight: var(--fw-bold);
    color: var(--gray-800);
    display: flex; align-items: flex-start; gap: 12px;
    margin: 0 0 20px;
    line-height: 1.25;
}
.seo-text-title i { color: var(--green); flex-shrink: 0; margin-top: 0.15em; font-size: 0.85em; }
.seo-text-body { position: relative; }
.seo-text-content {
    font-size: var(--text-base);
    color: var(--gray-600);
    line-height: 1.75;
    max-height: 96px; overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1);
}
.seo-text-inner.open .seo-text-content { max-height: 2000px; }
.seo-text-fade {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 64px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 85%);
    pointer-events: none; transition: opacity 0.3s;
}
.seo-text-inner.open .seo-text-fade { opacity: 0; pointer-events: none; }
.seo-text-content p          { margin: 0 0 14px; }
.seo-text-content p:last-child { margin-bottom: 0; }
.seo-text-content h2         { font-size: var(--text-lg); font-weight: var(--fw-bold); margin: 20px 0 8px; }
.seo-text-content h3         { font-size: var(--text-md); font-weight: var(--fw-bold); margin: 16px 0 6px; }
.seo-text-content ul,
.seo-text-content ol         { padding-left: 20px; margin: 8px 0 14px; }
.seo-text-content a          { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(26,111,212,0.25); }
.seo-text-content a:hover    { border-color: var(--blue); }
.seo-read-more {
    margin-top: 16px;
    display: inline-flex; align-items: center; gap: 7px;
    font-size: var(--text-sm); font-weight: var(--fw-black);
    color: var(--green);
    background: none; border: none;
    cursor: pointer; font-family: inherit; padding: 0;
}
.seo-read-more i { transition: transform 0.3s; }
.seo-text-inner.open .seo-read-more i { transform: rotate(180deg); }

/* ════════════════════════════════════════════════════════════
   MOBILE TOOLBAR — фильтры + сортировка рядом
════════════════════════════════════════════════════════════ */
.mobile-toolbar {
    display: none; /* скрыт на десктопе */
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */

@media (max-width: 1600px) {
    .pgrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1280px) {
    .pgrid { grid-template-columns: repeat(2, 1fr); }
    .cat-layout { grid-template-columns: 252px 1fr; }
}



@media (max-width: 1200px) {
    .pgrid { grid-template-columns: repeat(1, 1fr); }
}

/* Tablet ≤1024px */
@media (max-width: 1024px) {
    .catalog-hero  { padding: 32px 0; }
    .chero-left h1 { font-size: var(--text-xl); }
    .cat-layout    { grid-template-columns: 230px 1fr; gap: 18px; }
    .sidebar       { top: 118px; max-height: calc(100vh - 140px); }
    .fbar          { top: 60px; }
    .pgrid { grid-template-columns: repeat(1, 1fr); }
}

/* Mobile ≤768px */
@media (max-width: 768px) {
    .catalog-hero  { padding: 24px 0; }
    .chero-left h1 { font-size: var(--text-lg); }
    .chero-inner   { flex-direction: column; align-items: flex-start; gap: 20px; }
    .chero-stats   { width: 100%; flex-wrap: wrap; gap: 10px; }
    .hstat         { flex: 1; min-width: 110px; padding: 14px 16px; }

    /* fbar: на мобилке скрываем — сортировка переехала в .mobile-toolbar */
    .fbar          { display: none; }

    .chero-img-overlay {
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60%, black 100%);
        mask-image:         linear-gradient(to bottom, transparent 0%, black 60%, black 100%);
        background-position: center bottom;
        opacity: 0.3;
    }

    /* Sidebar → drawer */
    .cat-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 18px 0 56px;
    }
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 300px;
        max-height: 100dvh;
        background: #fff;
        z-index: 1200;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
        box-shadow: 4px 0 28px rgba(0,0,0,0.18);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border-radius: 0;
    }
    .sidebar.open { transform: translateX(0); }

    .sidebar-scroll-area {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 12px 14px 24px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .sidebar-scroll-area::-webkit-scrollbar { display: none; }

    /* Drawer header */
    .sidebar-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 18px;
        border-bottom: 1px solid var(--gray-200);
        flex-shrink: 0;
        background: #fff;
    }
    .sidebar-drawer-title {
        font-size: var(--text-base);
        font-weight: var(--fw-bold);
        color: var(--gray-800);
        display: flex; align-items: center; gap: 8px;
    }
    .sidebar-drawer-title i { color: var(--green); }
    .sidebar-drawer-close {
        width: 36px; height: 36px;
        background: var(--gray-100);
        border: none; border-radius: 9px;
        display: flex; align-items: center; justify-content: center;
        font-size: 15px;
        color: var(--gray-600);
        cursor: pointer;
        font-family: inherit;
        transition: all var(--cat-tr);
    }
    .sidebar-drawer-close:hover { background: var(--red); color: #fff; }

    /* mobile-toolbar: показываем, кнопка фильтров + сортировка */
    .mobile-toolbar {
        display: flex;
    }
    .sidebar-toggle {
        display: flex;
        flex-shrink: 0;
    }
    /* Сортировка в mobile-toolbar растягивается на остаток */
    .mobile-toolbar .sort-sel {
        flex: 1;
        min-width: 0;
    }

    .pgrid { grid-template-columns: repeat(1, 1fr); gap: 12px; }
    .load-more-btn { padding: 13px 28px; font-size: var(--text-sm); }
    .load-more-bar { width: 180px; }
    .seo-text-section { padding: 32px 0 48px; }
    .seo-text-title { font-size: var(--text-lg); gap: 10px; }
    .seo-text-title i { font-size: 0.8em; margin-top: 0.2em; }
    .seo-text-content { max-height: 88px; }
}

/* Small ≤480px */
@media (max-width: 480px) {
    .chero-left h1 { font-size: var(--text-md); }
    .pgrid         { grid-template-columns: 1fr; }
    .sidebar       { width: 88vw; }
    .load-more-bar { width: 140px; }
    .hstat         { min-width: 80px; }
}

/* ════════════════════════════════════════════════════════════
   КАРТОЧКА ТОВАРА
════════════════════════════════════════════════════════════ */

.product-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 260px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.28s ease, transform 0.28s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(26, 111, 212, 0.14);
}

.product-img {
    height: 250px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    padding: 16px;
    box-sizing: border-box;
}
.product-card:hover .product-img img { transform: scale(1.05); }

.product-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    background: none;
    color: var(--green);
    font-size: 12px;
    font-weight: var(--fw-black);
    padding: 0;
    margin-bottom: 15px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    box-shadow: none;
}
.product-badge i { font-size: 14px; margin-right: 5px; }
.product-badge::before { display: none; }
.product-badge--order { color: var(--accent); }

.product-cat {
    font-size: 11px;
    font-weight: var(--fw-bold);
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 18px;
    font-weight: var(--fw-black);
    color: var(--dark);
    margin: 0 0 16px;
    line-height: 1.35;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-specs {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    overflow: hidden;
    flex: 1;
}
.spec-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eef0f4;
    gap: 8px;
}
.spec-row:last-child { border-bottom: none; }
.spec-row--empty { pointer-events: none; opacity: 0; }
.spec-label {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: var(--fw-bold);
    flex-shrink: 0;
    max-width: 55%;
}
.spec-val {
    font-size: 14px;
    font-weight: var(--fw-medium);
    color: var(--dark);
    text-align: right;
    max-width: 40%;
    text-wrap: wrap;
}
.spec-row--full { flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: 15px; }
.spec-row--full .spec-label,
.spec-row--full .spec-val  { white-space: normal; overflow: visible; text-overflow: unset; max-width: 100%; }
.spec-row--full .spec-val  { text-align: left; }
.spec-val--img { display: flex; align-items: center; justify-content: flex-end; max-width: 45%; overflow: visible; }
.spec-val--img img { max-height: 68px; max-width: 100%; width: auto; object-fit: contain; display: block; }

.product-footer { padding-top: 14px; margin-top: auto; }
.product-price-line { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.product-price { font-size: 24px; font-weight: var(--fw-semi); color: var(--dark); letter-spacing: -0.3px; }
.product-price-sub { font-size: 11px; color: var(--gray-400); }

.product-actions { display: grid; grid-template-columns: .25fr 1fr; gap: 8px; }

.btn-detail {
    padding: 14px 12px;
    background: #f7fff9;
    color: var(--green);
    border-radius: 8px;
    font-size: 12px;
    font-weight: var(--fw-bold);
    display: flex; align-items: center; justify-content: center; gap: 5px;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid #acecb9;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-detail:hover { border-color: var(--green); }

.btn-order {
    padding: 14px 12px;
    background: var(--red);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: var(--fw-bold);
    display: flex; align-items: center; justify-content: center; gap: 5px;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.btn-order:hover {
    background: #c62828;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.35);
}

/* LIST VIEW */
.pgrid.vlist .product-card { flex-direction: row; }
.pgrid.vlist .product-card .product-img {
    height: auto; min-height: 180px; width: 190px;
    flex-shrink: 0; border-bottom: none;
    border-right: 1px solid #f0f2f5;
}
.pgrid.vlist .product-card .product-body  { padding: 16px 18px; }
.pgrid.vlist .product-card .product-name  { font-size: var(--text-md); }
.pgrid.vlist .product-card .product-specs {
    flex-direction: row; flex-wrap: wrap;
    background: none; border: none; gap: 6px; margin-bottom: 10px;
}
.pgrid.vlist .product-card .spec-row {
    border-radius: 7px; border: 1px solid var(--gray-100);
    flex-direction: column; align-items: flex-start;
    padding: 5px 9px; background: var(--off-white);
}
.pgrid.vlist .product-card .product-footer {
    border-top: none; padding-top: 0;
    display: flex; align-items: center; gap: 12px;
}
.pgrid.vlist .product-card .product-price-line { margin-bottom: 0; flex: 1; }
.pgrid.vlist .product-card .product-actions    { display: flex; gap: 7px; }

@media (max-width: 768px) {
    .product-img { height: 150px; }
    .product-actions { gap: 5px; }
    .pgrid.vlist .product-card { flex-direction: column; }
    .pgrid.vlist .product-card .product-img { width: 100%; min-height: 140px; border-right: none; border-bottom: 1px solid #f0f2f5; }
    .pgrid.vlist .product-card .product-body { padding: 12px; }
    .pgrid.vlist .product-card .product-footer { flex-direction: column; align-items: stretch; gap: 8px; }
}
@media (max-width: 480px) {
    .product-img { height: 180px; }
}

/* ════════════════════════════════════════════════════════════
   RECENTLY VIEWED (каталог) — «Вы недавно смотрели»
════════════════════════════════════════════════════════════ */
.cat-recent-section {
    padding: 8px 0 56px;
}
.cat-recent-section .pd-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cat-recent-section .pd-section-title {
    font-size: var(--text-xl);
    font-weight: var(--fw-black);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.cat-recent-section .pd-section-title i { color: var(--green); }
/* Сетка блока — как основная сетка каталога */
#catRecentGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1280px) { #catRecentGrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { #catRecentGrid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 480px)  { #catRecentGrid { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════════════════════
   РЕКЛАМНАЯ КАРТОЧКА (ad-card)
   База — .product-card. Бейдж/заголовок/отступы НАСЛЕДУЮТСЯ
   от товарной карточки (.product-cat / .product-name /
   .product-body / .product-footer) → размеры совпадают 1-в-1.
   Здесь только: цвета акцентов, режимы wide/banner, высота.
════════════════════════════════════════════════════════════ */
.ad-card {
    --ad-outline: var(--red);  /* перекрывается inline из ACF */
    --ad-btn:     var(--red);  /* цвет кнопки, по умолч. как у товаров */
}

/* Высота по контенту: НЕ растягиваем на высоту соседей,
   чтобы не было пустого провала под коротким текстом. */
.pgrid .ad-card.ad-card--card { align-self: start; }

/* Обводка, выделяющая карточку */
.ad-card--outline {
    border: 2px solid var(--ad-outline);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07),
    0 0 0 4px color-mix(in srgb, var(--ad-outline) 12%, transparent);
}
.ad-card--outline:hover {
    box-shadow: 0 16px 48px color-mix(in srgb, var(--ad-outline) 22%, transparent),
    0 0 0 4px color-mix(in srgb, var(--ad-outline) 18%, transparent);
}

/* Бейдж: тот же размер/отступ, что .product-cat, только цвет акцентный.
   .ad-badge ставится РЯДОМ с .product-cat → перекрывает цвет. */
.product-cat.ad-badge { color: var(--ad-outline); }
/* В режиме «Товар» рекламный бейдж заменяет статус (.product-badge) */
.product-badge.ad-badge { color: var(--ad-outline); }
.ad-badge--float {
    display: inline-block;
    font-size: 11px;
    font-weight: var(--fw-black);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

/* Текст рекламы — нейтральный абзац под заголовком */
.ad-text {
    font-size: var(--text-base);
    color: var(--gray-600);
    line-height: 1.55;
    margin-bottom: 16px;
}

/* Кнопка: .btn-order, но цвет берём из --ad-btn */
.ad-btn {
    width: 100%;
    background: var(--ad-btn);
}
.ad-btn:hover {
    background: var(--ad-btn);
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--ad-btn) 35%, transparent);
}
/* footer без верхней линии (у рекламы нет цены/спеков сверху) */
.ad-footer { padding-top: 0; }

/* ── BANNER: фото на всю карточку ── */
.ad-card--banner {
    padding: 0;
    overflow: hidden;
    position: relative;
    align-self: stretch;
}
.ad-card--banner .ad-banner-link,
.ad-card--banner .ad-banner-img {
    display: block;
    width: 100%;
    height: 100%;
}
.ad-card--banner .ad-banner-img {
    object-fit: cover;
    min-height: 100%;
}
.ad-badge--float {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--ad-outline);
    color: #fff;
}
.pgrid .ad-card--banner { height: 100%; }

/* ── WIDE: широкая полоса на весь ряд ── */
.ad-card--wide {
    grid-column: 1 / -1;     /* занимает всю ширину сетки */
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
}
.ad-card--wide .ad-wide-img {
    flex: 0 0 38%;
    max-width: 38%;
    overflow: hidden;
    position: relative;
}
.ad-card--wide .ad-wide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-card--wide .ad-wide-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 32px;
    min-width: 0;
}
.ad-card--wide .product-name { min-height: 0; -webkit-line-clamp: unset; }
.ad-card--wide .ad-wide-footer { margin-top: 4px; }
.ad-card--wide .ad-btn { width: auto; align-self: flex-start; padding-left: 32px; padding-right: 32px; }

/* В list-режиме обычная ad-card остаётся вертикальной (не как товар-строка) */
.pgrid.vlist .ad-card--card { flex-direction: column; }
.pgrid.vlist .ad-card--card .product-img { width: 100%; border-right: none; }
/* wide и banner в list-режиме занимают всю строку */
.pgrid.vlist .ad-card--wide,
.pgrid.vlist .ad-card--banner { grid-column: auto; }
.pgrid.vlist .ad-card--banner { min-height: 200px; }

@media (max-width: 768px) {
    /* На мобилке широкая карточка складывается в столбик */
    .ad-card--wide { flex-direction: column; }
    .ad-card--wide .ad-wide-img { flex: none; max-width: 100%; width: 100%; min-height: 160px; }
    .ad-card--wide .ad-wide-body { padding: 16px; }
    .ad-card--wide .ad-btn { width: 100%; }
}







/* ════════════════════════════════════════════════════════════
   ПРАВЫЙ САЙДБАР С РЕКЛАМОЙ (.cat-ads-col)
   Реклама вынесена из сетки товаров в отдельную колонку справа.
════════════════════════════════════════════════════════════ */

/* Сетка с тремя колонками, когда реклама есть */
.cat-layout.has-ads { grid-template-columns: 272px 1fr 320px; }

.cat-ads-col { align-self: start; }
.cat-ads-sticky {
    position: sticky;
    top: 130px;
    display: flex;
    flex-direction: column;
}
.cat-ads-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Карточки в сайдбаре всегда во всю ширину колонки (без min-width товара) */
.cat-ads-list .product-card,
.cat-ads-list .ad-card {
    flex: none;
    min-width: 0;
    width: 100%;
}

/* «Широкая» реклама в узком сайдбаре превращается в обычную вертикальную */
.cat-ads-list .ad-card--wide {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
}
.cat-ads-list .ad-card--wide .ad-wide-img {
    flex: none;
    max-width: 100%;
    width: 100%;
    min-height: 160px;
}
.cat-ads-list .ad-card--wide .ad-wide-body { padding: 16px; }
.cat-ads-list .ad-card--wide .ad-btn { width: 100%; align-self: stretch; }

/* Баннер в сайдбаре — фиксированная высота, чтобы не схлопывался */
/*.cat-ads-list .ad-card--banner { min-height: 220px; }*/

/* ── Адаптив ── */
@media (max-width: 1280px) {
    .cat-layout.has-ads { grid-template-columns: 252px 1fr 300px; }
}

/* Планшет: реклама уезжает под товары, на всю ширину, в ряд */
@media (max-width: 1024px) {
    .cat-layout.has-ads { grid-template-columns: 230px 1fr; }
    .cat-ads-col { grid-column: span 2; margin-top: 24px; display: none;  }
    .cat-ads-sticky { position: static; }
    .cat-ads-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    /* широкая снова может занять весь ряд */
    .cat-ads-list .ad-card--wide { grid-column: 1 / -1; flex-direction: row; }
    .cat-ads-list .ad-card--wide .ad-wide-img { flex: 0 0 38%; max-width: 38%; width: auto; }
}

@media (max-width: 900px) {
    .cat-layout.has-ads { grid-template-columns: 1fr; }
    .cat-ads-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-ads-list .ad-card--wide { grid-column: 1 / -1; flex-direction: column; }
    .cat-ads-list .ad-card--wide .ad-wide-img { flex: none; max-width: 100%; width: 100%; }
}

@media (max-width: 768px) {
    .cat-ads-col { display: block;  }
    .cat-layout.has-ads { grid-template-columns: 1fr; }
    .cat-ads-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-ads-list .ad-card--wide { grid-column: 1 / -1; flex-direction: column; }
    .cat-ads-list .ad-card--wide .ad-wide-img { flex: none; max-width: 100%; width: 100%; }
}

@media (max-width: 480px) {
    .cat-ads-list { grid-template-columns: 1fr; }
}