.bf-catalog,
.bf-catalog *,
.bf-modal,
.bf-modal *,
.bf-back-top {
    box-sizing: border-box;
}

.bf-catalog {
    --bf-ink: #123f2b;
    --bf-muted: #8e887e;
    --bf-red: #9b1b31;
    --bf-line: #ddd6ca;
    --bf-paper: #f7f4ee;
    --bf-card: #fffdf8;
    --bf-sticky-offset: 132px;
    background: var(--bf-paper);
    color: #272522;
    margin: 0 auto;
    max-width: 1510px;
    padding: clamp(32px, 5vw, 72px) clamp(18px, 4vw, 54px);
    width: min(100%, calc(100vw - 36px));
}

.bf-inner {
    margin: 0 auto;
    max-width: 1380px;
}

.bf-top {
    border-bottom: 1px solid var(--bf-line);
    margin-bottom: 28px;
    padding-bottom: 30px;
}

.bf-top h1 {
    color: var(--bf-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 0.95;
    letter-spacing: 0;
    margin: 0;
    max-width: 900px;
}

.bf-tools {
    background: rgba(247, 244, 238, 0.94);
    border: 1px solid transparent;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 190px 128px;
    gap: 12px;
    margin-bottom: 34px;
    padding: 8px;
    position: sticky;
    top: var(--bf-sticky-offset);
    transition: border-color 160ms ease, box-shadow 160ms ease;
    z-index: 20;
}

.bf-tools.is-stuck {
    border-color: rgba(221, 214, 202, 0.86);
    box-shadow: 0 12px 34px rgba(37, 27, 14, 0.1);
}

.bf-tools input,
.bf-tools select,
.bf-tools button {
    border-radius: 6px;
    font: 600 16px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 52px;
}

.bf-tools input,
.bf-tools select {
    background: #fff;
    border: 1px solid var(--bf-line);
    color: #242424;
    padding: 0 18px;
}

.bf-sort {
    display: grid;
    min-width: 0;
    position: relative;
}

.bf-sort span {
    color: #756f66;
    font-size: 11px;
    font-weight: 800;
    left: 14px;
    letter-spacing: 0.06em;
    line-height: 1;
    position: absolute;
    text-transform: uppercase;
    top: 8px;
    z-index: 1;
}

.bf-sort select {
    appearance: none;
    cursor: pointer;
    padding-bottom: 3px;
    padding-top: 17px;
    width: 100%;
}

.bf-tools button {
    background: var(--bf-ink);
    border: 0;
    color: #fff;
    cursor: pointer;
}

.bf-layout {
    align-items: start;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.bf-sidebar {
    background: #fffdf8;
    border: 1px solid var(--bf-line);
    border-radius: 8px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 24px 22px;
    position: sticky;
    top: 18px;
}

.bf-brand-toggle,
.bf-filter-toggle {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    display: flex;
    justify-content: space-between;
    margin: 0;
    cursor: pointer;
    padding: 0;
    text-align: left;
    width: 100%;
}

.bf-filter-toggle {
    margin-bottom: 0;
}

.bf-brand-toggle {
    border-top: 1px solid #eee6da;
    margin-top: 20px;
    padding-top: 20px;
}

.bf-brand-toggle strong,
.bf-filter-toggle strong {
    color: var(--bf-ink);
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 6px;
}

.bf-brand-toggle small,
.bf-filter-toggle small {
    color: var(--bf-muted);
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
}

.bf-brand-toggle-icon,
.bf-filter-toggle-icon {
    align-items: center;
    background: var(--bf-ink);
    border-radius: 999px;
    color: #fff;
    display: flex;
    flex: 0 0 auto;
    font-size: 22px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    line-height: 1;
    width: 34px;
}

.bf-brand-toggle[aria-expanded="true"] .bf-brand-toggle-icon,
.bf-filter-toggle[aria-expanded="true"] .bf-filter-toggle-icon {
    padding-bottom: 3px;
}

.bf-brand-panel,
.bf-filter-panel {
    display: none;
    max-height: min(58vh, 520px);
    overflow: auto;
    padding: 16px 0 0;
}

.bf-brand-panel.is-open,
.bf-filter-panel.is-open {
    display: block;
}


.bf-filter-search {
    display: block;
    margin: 0 0 12px;
}

.bf-filter-search input {
    background: #fff;
    border: 1px solid var(--bf-line);
    border-radius: 6px;
    color: #242424;
    font: 600 14px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 42px;
    padding: 0 12px;
    width: 100%;
}

.bf-check.is-filtered-out {
    display: none;
}

.bf-check-list {
    display: grid;
}

.bf-check {
    align-items: center;
    border-top: 1px solid #eee6da;
    color: #3b3935;
    display: flex;
    gap: 10px;
    min-height: 42px;
    padding: 9px 0;
}

.bf-check input {
    accent-color: var(--bf-ink);
    height: 16px;
    width: 16px;
}

.bf-brand-section {
    margin-bottom: 48px;
}

.bf-section-head {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
}

.bf-section-head h2 {
    color: var(--bf-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 4vw, 44px);
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
}

.bf-section-head span {
    color: #756f66;
    font-size: 14px;
    font-weight: 800;
}

.bf-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.bf-card {
    min-width: 0;
}

.bf-card-button {
    appearance: none;
    background: var(--bf-card);
    border: 1px solid var(--bf-line);
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    display: grid;
    min-height: 360px;
    overflow: hidden;
    padding: 0;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    width: 100%;
}

.bf-card-button:hover,
.bf-card-button:focus-visible {
    border-color: rgba(18, 63, 43, 0.45);
    box-shadow: 0 14px 30px rgba(37, 27, 14, 0.09);
    outline: none;
    transform: translateY(-2px);
}

.bf-card-img-wrap {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--bf-line);
    display: flex;
    height: 190px;
    justify-content: center;
    padding: 18px;
}

.bf-card-img {
    display: block;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.bf-card-placeholder {
    color: #aaa095;
    font-size: 13px;
}

.bf-card-body {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.bf-card-title {
    color: var(--bf-ink);
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
}


.bf-card-category {
    align-self: start;
    border: 1px solid rgba(18, 63, 43, 0.18);
    border-radius: 999px;
    color: var(--bf-ink);
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    justify-self: start;
    letter-spacing: 0.07em;
    padding: 6px 10px;
    text-transform: uppercase;
}

.bf-price {
    color: var(--bf-red);
    font-size: 17px;
    font-weight: 900;
}

.bf-meta {
    border-top: 1px solid var(--bf-line);
    color: var(--bf-ink);
    display: block;
    font-size: 13px;
    letter-spacing: 0.08em;
    padding-top: 14px;
    text-transform: uppercase;
}

.bf-empty {
    color: var(--bf-muted);
    font-weight: 700;
    margin: 28px 0 0;
}

.bf-modal[hidden] {
    display: none !important;
}

.bf-modal {
    align-items: center;
    background: rgba(18, 63, 43, 0.72);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: clamp(18px, 4vw, 44px);
    position: fixed;
    z-index: 999999;
}

.bf-modal-card {
    background: #f7f4ee;
    border: 1px solid var(--bf-line);
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    max-height: calc(100vh - 88px);
    max-width: 1120px;
    overflow: auto;
    position: relative;
    width: min(1120px, 100%);
}

.bf-modal-image {
    align-items: center;
    background: #fff;
    border-right: 1px solid var(--bf-line);
    display: grid;
    gap: 18px;
    justify-content: center;
    min-height: 520px;
    padding: clamp(26px, 5vw, 58px);
}

.bf-modal-image img {
    display: block;
    max-height: 62vh;
    max-width: 100%;
    object-fit: contain;
}

.bf-modal-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.bf-modal-thumb {
    align-items: center;
    background: #fff;
    border: 1px solid var(--bf-line);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    height: 62px;
    justify-content: center;
    padding: 6px;
    width: 62px;
}

.bf-modal-thumb[aria-current="true"] {
    border-color: var(--bf-ink);
    box-shadow: 0 0 0 2px rgba(18, 63, 43, 0.12);
}

.bf-modal-thumb img {
    height: 100%;
    max-height: none;
    object-fit: contain;
    width: 100%;
}

.bf-modal-content {
    padding: clamp(32px, 4vw, 54px);
}

.bf-modal-brand {
    color: var(--bf-red);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    margin: 0 0 16px;
    text-transform: uppercase;
}

.bf-modal-content h2 {
    color: var(--bf-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 54px);
    letter-spacing: 0;
    line-height: 0.98;
    margin: 0 0 24px;
}

.bf-modal-price {
    color: var(--bf-red);
    font-size: 22px;
    font-weight: 900;
    margin: -8px 0 24px;
}

.bf-modal-description {
    color: #33312e;
    font-size: 16px;
    line-height: 1.55;
    margin: 0 0 26px;
}

.bf-modal-facts {
    border-top: 1px solid var(--bf-line);
    margin: 0;
}

.bf-modal-facts div {
    border-bottom: 1px solid var(--bf-line);
    display: grid;
    gap: 18px;
    grid-template-columns: 140px 1fr;
    padding: 13px 0;
}

.bf-modal-facts dt {
    color: #756f66;
    font-weight: 900;
}

.bf-modal-facts dd {
    margin: 0;
    text-align: right;
}

.bf-modal-close {
    align-items: center;
    background: #fff;
    border: 1px solid var(--bf-line);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    color: var(--bf-ink);
    cursor: pointer;
    display: flex;
    font-size: 28px;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 4px;
    position: fixed;
    right: max(18px, calc((100vw - 1120px) / 2 - 24px));
    top: max(18px, calc((100vh - min(760px, calc(100vh - 88px))) / 2 - 24px));
    width: 48px;
    z-index: 1000000;
}

body.bf-modal-open {
    overflow: hidden;
}

.bf-back-top {
    align-items: center;
    background: var(--bf-ink, #123f2b);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    bottom: 24px;
    box-shadow: 0 16px 36px rgba(18, 63, 43, 0.26);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 24px;
    font-weight: 900;
    height: 52px;
    justify-content: center;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 24px;
    transform: translateY(12px);
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
    width: 52px;
    z-index: 99990;
}

.bf-back-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.bf-back-top:hover,
.bf-back-top:focus-visible {
    background: #0c2f20;
    outline: none;
}

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

@media (max-width: 900px) {
    .bf-catalog {
        width: min(100%, calc(100vw - 20px));
    }

    .bf-layout {
        grid-template-columns: 1fr;
    }

    .bf-sidebar {
        max-height: none;
        position: static;
        padding: 0;
    }

    .bf-tools {
        top: 104px;
    }

    .bf-brand-toggle,
    .bf-filter-toggle {
        align-items: center;
        cursor: pointer;
        padding: 20px 22px;
    }

    .bf-filter-toggle {
        border-top: 1px solid #eee6da;
        margin-top: 0;
    }

    .bf-brand-toggle strong,
    .bf-filter-toggle strong {
        font-size: 26px;
        margin-bottom: 4px;
    }

    .bf-brand-toggle small,
    .bf-filter-toggle small {
        margin: 0;
    }

    .bf-brand-toggle-icon,
    .bf-filter-toggle-icon {
        align-items: center;
        background: var(--bf-ink);
        border-radius: 999px;
        color: #fff;
        display: flex;
        flex: 0 0 auto;
        font-size: 22px;
        font-weight: 800;
        height: 34px;
        justify-content: center;
        line-height: 1;
        width: 34px;
    }

    .bf-brand-toggle[aria-expanded="true"] .bf-brand-toggle-icon,
    .bf-filter-toggle[aria-expanded="true"] .bf-filter-toggle-icon {
        padding-bottom: 3px;
    }

    .bf-brand-panel,
    .bf-filter-panel {
        display: none;
        max-height: min(58vh, 520px);
        overflow: auto;
        padding: 0 22px 20px;
    }

    .bf-brand-panel.is-open,
    .bf-filter-panel.is-open {
        display: block;
    }

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

    .bf-modal-card {
        grid-template-columns: 1fr;
        max-height: calc(100vh - 36px);
    }

    .bf-modal-image {
        border-bottom: 1px solid var(--bf-line);
        border-right: 0;
        min-height: 340px;
    }

    .bf-modal-close {
        right: 16px;
        top: 16px;
    }
}

@media (max-width: 620px) {
    .bf-catalog {
        padding: 28px 14px;
        width: 100%;
    }

    .bf-tools {
        grid-template-columns: 1fr;
        top: 86px;
    }

    .bf-brand-panel,
    .bf-filter-panel {
        max-height: 54vh;
    }

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

    .bf-section-head {
        align-items: start;
        gap: 8px;
    }

    .bf-card-button {
        min-height: 0;
    }

    .bf-modal {
        align-items: center;
        padding: 14px;
    }

    .bf-modal-card {
        max-height: calc(100vh - 28px);
        width: 100%;
    }

    .bf-modal-image {
        min-height: 280px;
        padding: 34px 24px 24px;
    }

    .bf-modal-image img {
        max-height: 260px;
    }

    .bf-modal-content {
        padding: 28px 22px;
    }

    .bf-modal-facts div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .bf-modal-facts dd {
        text-align: left;
    }

    .bf-back-top {
        bottom: 16px;
        height: 46px;
        right: 16px;
        width: 46px;
    }
}
