/* Keep a slow font download from changing a catalogue already being read. */
@font-face { font-family:'Onest Catalogue'; src:url('../fonts/onest-var.woff2') format('woff2-variations'); font-weight:100 900; font-display:swap; }
@font-face { font-family:'Golos Catalogue'; src:url('../fonts/golos-text-var.woff2') format('woff2-variations'); font-weight:400 900; font-display:swap; }
.content-wrapper:has(.section-count-elements) { --fs-font-head:'Onest Catalogue','Onest Fallback','Helvetica Neue',Arial,sans-serif; --fs-font-body:'Golos Catalogue','Golos Fallback','Helvetica Neue',Arial,sans-serif; font-family:var(--fs-font-body); }
@media(min-width:992px) {
 .content-wrapper:has(.section-count-elements) .content-main-block > .container > .content { display:grid; grid-template-columns:24% minmax(0,1fr); }
 .content-wrapper:has(.section-count-elements) .content-main-block .content > .main-block { grid-column:2; grid-row:1; min-width:0; width:auto; }
 .content-wrapper:has(.section-count-elements) .content-main-block .content > .sidebar { grid-column:1; grid-row:1; width:auto; }
}
.content-wrapper:has(.section-count-elements) .content-navigation { padding-bottom:12px; }
.content-wrapper:has(.section-count-elements) .content-navigation .breadcrumbs { flex-basis:100%; padding-block:8px; }
.content-wrapper:has(.section-count-elements) .content-top { margin-bottom:12px; }
.content-wrapper:has(.section-count-elements) .content-main-block { padding-top:0; }
.content-wrapper:has(.section-count-elements) .content-top .landings { margin-top:8px; padding-bottom:8px; }
.content-wrapper:has(.section-count-elements) .filter-panel { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 12px; min-height:44px; padding:0; }
.content-wrapper:has(.section-count-elements) .filter-panel__sort { flex:1; margin:0; padding:0; min-width:0; }
.content-wrapper:has(.section-count-elements) .dropdown-select__title { min-height:44px; font-size:14px; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper > .row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0; padding:0; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper > .row > meta { display:none; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .catalog-item { width:auto; max-width:none; min-width:0; padding:0; margin:0; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item { margin:0; padding:12px; border-radius:12px; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__image { height:156px; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__image .thumb { width:100%; height:100%; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__image .thumb img { width:100%; height:156px; max-height:100%; object-fit:contain; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__info { margin-top:10px; gap:14px; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__info .name a { font:600 15px/1.35 var(--fs-font-head); }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__info .prices { gap:6px; margin-top:auto; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .price:not(.discount) { font:700 17px/1.3 var(--fs-font-head); }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .icons-basket-wrapper :is(.to-cart,.in-cart) { align-items:center; justify-content:center; min-width:44px; min-height:44px; width:44px; padding:10px; margin:0; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .icons-basket-wrapper .btn-exlg .svg { margin:0; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .icons-basket-wrapper .btn-exlg .svg + span { display:none; }
.content-wrapper:has(.section-count-elements) :is(a,button,input):focus-visible { outline:3px solid var(--fs-green); outline-offset:2px; }
@media(max-width:1199px) and (min-width:768px) { .content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper > .row { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:767px) {
 .content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper > .row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item { padding:10px; }
 .content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__image,.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__image .thumb img { height:124px; }
 .content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__info .name a { font-size:14px; }
 .content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .price:not(.discount) { font-size:15px; }
 .content-wrapper:has(.section-count-elements) .filter-panel__sort { flex:0 1 auto; min-width:0; }
 /* Сортировка и «Фильтры» в одну строку, когда влезают (Дмитрий, 21.09.2026): чуть меньше кегль подписи
    сортировки и поля кнопки, иначе «По умолчанию (возрастание)» с кнопкой не помещались в 380 px на 5 px. */
 .content-wrapper:has(.section-count-elements) .filter-panel__sort .dropdown-select__title { font-size:15px; white-space:nowrap; }
 .content-wrapper:has(.section-count-elements) .filter-panel__filter { display:flex; align-items:center; gap:6px; width:auto; height:44px; padding:8px 10px; margin:0 0 0 auto; border:1px solid var(--fs-line); border-radius:8px; background:var(--fs-surface); font-size:14px; }
 .content-wrapper:has(.section-count-elements) .filter-panel__filter { order:2; }
}
.content-wrapper:has(.section-count-elements) .dropdown-select__title { padding:0; }
/* Install CTA block (blocks/install-cta.php, rendered by catalog/main/page_blocks/section.php on catalogue sections). */
.install-cta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.125rem 1.5rem;
    margin: 0.5rem 0 1.5rem;
    background: var(--main-color-opacity, var(--fs-green-tint));
    border-left: 4px solid var(--main-color, var(--fs-green));
    border-radius: 6px;
}
.install-cta__body {
    flex: 1;
    min-width: 0;
}
.install-cta__title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.25rem;
    color: var(--text-color, var(--fs-ink));
}
.install-cta__sub {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-color, var(--fs-ink));
    opacity: 0.85;
}
.install-cta a.install-cta__btn {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--fs-action);
    color: var(--fs-white);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}
.install-cta a.install-cta__btn:hover,
.install-cta a.install-cta__btn:focus {
    background: var(--fs-action-hover);
    color: var(--fs-white);
    text-decoration: none;
}
@media (max-width: 767px) {
    .install-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1rem;
        gap: 0.875rem;
    }
    .install-cta__btn {
        text-align: center;
    }
}
.content-wrapper:has(.section-count-elements) .install-cta { display:flex; align-items:center; gap:12px; padding:12px 14px; margin:0 0 12px; text-align:left; }
.content-wrapper:has(.section-count-elements) .install-cta__title { font-size:15px; }
.content-wrapper:has(.section-count-elements) .install-cta__sub { font-size:13px; line-height:1.4; }
.content-wrapper:has(.section-count-elements) .install-cta__btn { min-height:44px; padding:10px 12px; font-size:14px; }
.content-wrapper:has(.section-count-elements) .filter-panel__filter svg [stroke] { stroke:var(--fs-ink); }
@media(max-width:767px) {
 .content-wrapper:has(.section-count-elements) .install-cta { flex-wrap:wrap; gap:6px 12px; }
 .content-wrapper:has(.section-count-elements) .install-cta__btn { width:auto; min-height:36px; padding:6px 0; border:0; background:transparent; color:var(--fs-green); text-decoration:underline; text-underline-offset:3px; }
 .content-wrapper:has(.section-count-elements) .install-cta__body { flex:1 1 190px; }
}
.content-wrapper:has(.section-count-elements) .install-cta { flex-direction:row; min-height:0; height:auto; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .item__info .prices { flex-direction:row; align-items:center; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .icons-basket-wrapper .btn-exlg { width:44px; min-width:44px; min-height:44px; padding:10px; margin:0; }
.content-wrapper:has(.section-count-elements):not(:has([data-fg-catalogue-cards="detailed"])) .items-wrapper .icons-basket-wrapper .btn-exlg .svg { margin:0; }

.fg-catalogue-sort { display:none; }
@media(min-width:992px) {
 .content-wrapper:has(.section-count-elements) .filter-panel__sort > .dropdown-select { display:none; }
 .fg-catalogue-sort { display:flex; flex-wrap:wrap; align-items:center; gap:0 16px; min-height:44px; font:400 14px/1.3 var(--fs-font-body); }
 .fg-catalogue-sort__label { color:var(--fs-ink-2); }
 .fg-catalogue-sort :is(a,button) { display:inline-flex; align-items:center; min-height:44px; padding:0; border:0; background:transparent; color:var(--fs-ink); font:inherit; text-decoration:underline; text-decoration-style:dotted; text-underline-offset:4px; cursor:pointer; }
 .fg-catalogue-sort [aria-current="true"], .fg-catalogue-sort [aria-pressed="true"] { color:var(--fs-green); font-weight:600; text-decoration-style:solid; text-decoration-thickness:2px; }
}

.content-wrapper:has(.section-count-elements) button.filter-panel__filter { color:var(--fs-ink); font-family:inherit; font-size:14px; }
@media(max-width:991px) {
 .content-wrapper:has(.section-count-elements) .filter-panel__filter { display:flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; margin-left:auto; border:1px solid var(--fs-line); border-radius:8px; background:var(--fs-surface); }
}

/* Search is part of the existing sidebar and phone drawer. */
.fg-filter-query { padding:16px; }
.fg-filter-query > label { display:block; font-weight:600; margin-bottom:8px; }
.fg-filter-query__controls { display:flex; flex-wrap:wrap; gap:6px; }
.fg-filter-query__controls input { flex:1 1 190px; width:100%; min-width:0; height:44px; padding:9px 10px; border:1px solid var(--fs-line); border-radius:6px; background:var(--fs-surface); color:var(--fs-ink); font:inherit; font-size:16px; }
.fg-filter-query__controls .btn { flex:0 0 auto; text-transform:none; background:var(--fs-action); color:var(--fs-white); border-radius:6px; min-width:64px; min-height:44px; padding:8px 10px; font-size:14px; }
.fg-filter-query__scope { display:block; margin-top:7px; color:var(--fs-ink-2); font-size:13px; line-height:1.35; }
.fg-filter-empty { padding:28px; border:1px solid var(--fs-line); border-radius:12px; background:var(--fs-surface); text-align:left; }
.fg-filter-empty h2 { margin:0 0 12px; }
.fg-filter-empty p { margin:0 0 20px; }
.fg-filter-empty .btn { text-transform:none; background:var(--fs-action); color:var(--fs-white); border-radius:6px; display:inline-flex; align-items:center; min-height:44px; }
.fg-filter-empty__global { display:block; margin-top:16px; }
.content-main-block .main-block:has(.fg-filter-empty) .filter-panel__sort,
.content-main-block .main-block:has(.fg-filter-empty) .install-cta { display:none; }
@media(max-width:991px) { .fg-filter-empty { padding:20px; } }

.no-products:has(.fg-filter-empty) { padding:0; border:0; }
.no-products:has(.fg-filter-empty)::before { display:none; }

.items-wrapper .prices .values_wrapper { white-space:nowrap; }
.fg-listing-size-price .fg-size-price-unit, .fg-listing-price-size { white-space:nowrap; }
.fg-listing-price-size { display:inline-block; font-size:14px; font-weight:400; color:var(--fs-ink-2); }
.fg-listing-size-discount { font-size:13px; color:var(--fs-ink-2); }
