/* =======================================================================
   FITNESSTART — СЕКЦИИ КАТАЛОГ + БРЕНДЫ  v1.5
   ======================================================================= */

:root {
    --fs-green:      #5e7e2b;
    --fs-green-dark: #4a6322;
    --fs-ink:        #2c3e50;
    --fs-muted:      #7a8590;
    --fs-link:       #4a5560;
    --fs-bg:         #f7f9f3;
    --fs-card:       #ffffff;
    --fs-line:       #e3e9d8;
}

.fs-cat, .fs-br {
    box-sizing: border-box;
    max-width: 1400px;
    margin: 30px auto;
    padding: clamp(20px, 4vw, 44px);
    background: var(--fs-bg);
    border-radius: 18px;
}
.fs-cat *, .fs-br * { box-sizing: border-box; }

/* ---------- Заголовки секций ---------- */
.fs-cat-head, .fs-br-head {
    text-align: center;
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--fs-line);
}
.fs-cat-head h3, .fs-br-head h3 {
    margin: 0 0 8px; padding: 0;
    font-size: clamp(22px, 3.4vw, 30px);
    font-weight: 800; color: var(--fs-ink); letter-spacing: -.01em;
}
.fs-cat-head p, .fs-br-head p {
    margin: 0; padding: 0; color: var(--fs-muted); font-size: 15px;
}

/* ================= КАТАЛОГ ================= */
.fs-cat-wide {
    background: var(--fs-card);
    border-radius: 16px;
    padding: 26px 30px;
    box-shadow: 0 4px 18px rgba(40,55,20,.06);
    margin-bottom: 22px;
}
.fs-cat-title {
    display: flex; align-items: center; gap: 12px;
    padding-bottom: 12px; margin-bottom: 16px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(var(--fs-card), var(--fs-card)) padding-box,
                linear-gradient(90deg, var(--fs-green), #a7c957) border-box;
    border-image: linear-gradient(90deg, var(--fs-green), #a7c957) 1;
    border-bottom-width: 2px; border-bottom-style: solid;
}
.fs-cat-ic { font-size: 22px; line-height: 1; flex-shrink: 0; }
.fs-cat-title a {
    font-size: 19px; font-weight: 700; color: var(--fs-ink);
    text-decoration: none; transition: color .18s ease;
}
.fs-cat-title a:hover { color: var(--fs-green); }

.fs-cat-cols {
    list-style: none; margin: 0; padding: 0;
    column-count: 4; column-gap: 34px;
}
.fs-cat-cols li { break-inside: avoid; margin: 0; padding: 0; }
.fs-cat-cols li a,
.fs-cat-list li a {
    position: relative; display: block; padding: 8px 0 8px 18px;
    color: var(--fs-link); text-decoration: none; font-size: 14.5px; line-height: 1.3;
    transition: color .18s ease, transform .18s ease;
}
.fs-cat-cols li a::before,
.fs-cat-list li a::before {
    content: ""; position: absolute; left: 2px; top: 50%;
    width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
    background: var(--fs-green); opacity: .55; transition: opacity .18s ease, transform .18s ease;
}
.fs-cat-cols li a:hover,
.fs-cat-list li a:hover { color: var(--fs-green); transform: translateX(3px); }
.fs-cat-cols li a:hover::before,
.fs-cat-list li a:hover::before { opacity: 1; transform: scale(1.25); }

.fs-cat-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px;
}
.fs-cat-card {
    background: var(--fs-card); border-radius: 16px; padding: 24px 26px;
    box-shadow: 0 4px 18px rgba(40,55,20,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.fs-cat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(40,55,20,.1); }
.fs-cat-list { list-style: none; margin: 0; padding: 0; }

.fs-cat-footer { text-align: center; margin-top: 28px; }
.fs-cat-btn {
    display: inline-block; padding: 14px 34px; border-radius: 50px;
    background: var(--fs-green); color: #fff; font-size: 15px; font-weight: 700;
    text-decoration: none; transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 6px 18px rgba(94,126,43,.28);
}
.fs-cat-btn:hover { background: var(--fs-green-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(94,126,43,.34); }

/* ================= БРЕНДЫ ================= */
.fs-br-filter {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin: 0 0 26px;
}
.fs-br-letter {
    width: 38px; height: 38px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%; background: var(--fs-card);
    color: var(--fs-ink); font-size: 14px; font-weight: 700; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.fs-br-letter[data-letter="*"] { width: auto; padding: 0 16px; border-radius: 50px; }
.fs-br-letter:hover { transform: translateY(-2px); color: var(--fs-green); }
.fs-br-letter.is-active { background: var(--fs-green); color: #fff; box-shadow: 0 4px 12px rgba(94,126,43,.3); }

.fs-br-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.fs-br-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 16px 6px 6px; min-height: 54px;
    background: var(--fs-card); border-radius: 50px; text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.05); overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.fs-br-item:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.fs-br-ava {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 15px;
}
.fs-br-ava--logo { background: #fff; border: 1px solid #eef0ea; }
.fs-br-ava--logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; padding: 4px; }
.fs-br-name {
    flex: 1 1 0; min-width: 0; color: var(--fs-ink); font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fs-br-item.is-hidden { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    .fs-cat-cols { column-count: 3; }
}
@media (max-width: 768px) {
    .fs-cat-cols { column-count: 2; column-gap: 22px; }
    .fs-cat-grid { grid-template-columns: 1fr; }
    .fs-br-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .fs-br-name { font-size: 13px; }

    .fs-br-filter-wrap { position: relative; margin-bottom: 20px; }
    .fs-br-filter {
        flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
        gap: 7px; padding: 2px 40px 8px 2px; margin: 0;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
        scroll-snap-type: x proximity;
    }
    .fs-br-filter::-webkit-scrollbar { display: none; }
    .fs-br-letter { width: 36px; height: 36px; scroll-snap-align: start; }

    /* Подсказка «листай вбок» — отдельный элемент, чтобы тема не вмешивалась */
    .fs-br-hint {
        position: absolute; top: 0; bottom: 8px; right: 0; width: 60px;
        pointer-events: none; opacity: 0; transition: opacity .25s ease;
        background: linear-gradient(90deg, rgba(247,249,243,0) 0%, var(--fs-bg) 70%);
    }
    .fs-br-hint::after {
        content: ""; position: absolute; top: 50%; right: 6px;
        width: 11px; height: 16px; margin-top: -8px;
        background: no-repeat center/contain
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='16' viewBox='0 0 9 14' fill='none'%3E%3Cpath d='M1.5 1.5L7 7l-5.5 5.5' stroke='%235e7e2b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        animation: fsNudge 1.3s ease-in-out infinite;
    }
    .fs-br--scrollable .fs-br-hint { opacity: 1; }
    @keyframes fsNudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
}

/* Десктоп: подсказка не нужна */
@media (min-width: 769px) {
    .fs-br-hint { display: none; }
}

/* ---------- Свёртка / «Показать все» ---------- */
.fs-br-item--extra { display: none; }
.fs-br.is-expanded .fs-br-item--extra { display: flex; }

.fs-br-more { text-align: center; margin-top: 22px; }
.fs-br-more-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 30px; border: 1.5px solid var(--fs-green);
    border-radius: 50px; background: transparent; color: var(--fs-green);
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.fs-br-more-btn::after {
    content: ""; width: 8px; height: 8px; flex-shrink: 0;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .2s ease;
    margin-top: -3px;
}
.fs-br-more-btn:hover { background: var(--fs-green); color: #fff; transform: translateY(-2px); }
.fs-br.is-expanded .fs-br-more-btn::after { transform: rotate(-135deg); margin-top: 3px; }
@media (max-width: 460px) {
    .fs-cat-cols { column-count: 1; }
}
